2 This test makes sure that flang's runtime does not depend on the C++ runtime
3 library. It tries to link this simple file against libFortranRuntime.a with
8 RUN: %cc -std=c99 %s -I%include %libruntime %libdecimal -lm -o /dev/null
11 #include "flang/Runtime/entry-names.h"
15 Manually add declarations for the runtime functions that we want to make sure
16 we're testing. We can't include any headers directly since they likely contain
17 C++ code that would explode here.
19 struct EnvironmentDefaultList
;
22 double RTNAME(CpuTime
)();
24 void RTNAME(ProgramStart
)(
25 int, const char *[], const char *[], const struct EnvironmentDefaultList
*);
26 int32_t RTNAME(ArgumentCount
)();
27 int32_t RTNAME(GetCommandArgument
)(int32_t, const struct Descriptor
*,
28 const struct Descriptor
*, const struct Descriptor
*);
29 int32_t RTNAME(GetEnvVariable
)();
32 double x
= RTNAME(CpuTime
)();
33 RTNAME(ProgramStart
)(0, 0, 0, 0);
34 int32_t c
= RTNAME(ArgumentCount
)();
35 int32_t v
= RTNAME(GetCommandArgument
)(0, 0, 0, 0);
36 int32_t e
= RTNAME(GetEnvVariable
)("FOO", 0, 0);