]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/dll-9.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / dll-9.c
CommitLineData
47ea1edf
DK
1/* { dg-do link } */
2/* { dg-require-dll "" } */
3/* { dg-additional-sources "dll-9a.c" } */
4/* { dg-options "-w -O2 -std=gnu89 -fno-keep-inline-dllexport" } */
5/* { dg-prune-output .*undefined.* } */
6/* { dg-xfail-if "link failure expected" { *-*-* } } */
7
8/* Test that inline functions declared "dllexport" appear in object files,
9 even if they are not called - except when -fno-keep-inline-dllexport.
10
11 This behavior is required by the ARM C++ ABI:
12
13 Exporting a function that can be inlined should force the
14 creation and export of an out-of-line copy of it.
15
16 and should presumably also apply.
17
18 Visual Studio 2005 also honors that rule. */
19
20__declspec(dllexport) inline void i1() {}
21
22__declspec(dllexport) extern inline void e1() {}
23
24/* It is invalid to declare the function inline after its definition. */
25#if 0
26__declspec(dllexport) void i2() {}
27inline void i2();
28
29__declspec(dllexport) extern void e2() {}
30inline void e2();
31#endif
32
33__declspec(dllexport) inline void i3() {}
34void i3();
35
36__declspec(dllexport) inline void e3() {}
37extern void e3();
38
39__declspec(dllexport) void i4();
40inline void i4() {};
41
42__declspec(dllexport) extern void e4();
43inline void e4() {};
44
45__declspec(dllexport) inline void i5();
46void i5() {};
47
48__declspec(dllexport) inline void e5();
49extern void e5() {};
50
51/* Make sure that just declaring the function -- without defining it
52 -- does not cause errors. */
53__declspec(dllexport) inline void i6();
54__declspec(dllexport) extern inline void e6();