2 /* { dg-require-dll "" } */
3 /* { dg-additional-sources "dll-11a.c" } */
4 /* { dg-options "-w -O2 -std=gnu89 -fkeep-inline-dllexport" } */
6 /* Test that inline functions declared "dllexport" appear in object files,
7 even if they are not called, when -fkeep-inline-dllexport is supplied.
9 This behavior is required by the ARM C++ ABI:
11 Exporting a function that can be inlined should force the
12 creation and export of an out-of-line copy of it.
14 and should presumably also apply.
16 Visual Studio 2005 also honors that rule. */
18 __declspec(dllexport
) inline void i1() {}
20 __declspec(dllexport
) extern inline void e1() {}
22 /* It is invalid to declare the function inline after its definition. */
24 __declspec(dllexport
) void i2() {}
27 __declspec(dllexport
) extern void e2() {}
31 __declspec(dllexport
) inline void i3() {}
34 __declspec(dllexport
) inline void e3() {}
37 __declspec(dllexport
) void i4();
40 __declspec(dllexport
) extern void e4();
43 __declspec(dllexport
) inline void i5();
46 __declspec(dllexport
) inline void e5();
49 /* Make sure that just declaring the function -- without defining it
50 -- does not cause errors. */
51 __declspec(dllexport
) inline void i6();
52 __declspec(dllexport
) extern inline void e6();