1 /* Test __attribute__((gnu_inline)).
3 Check that __attribute__((gnu_inline)) has no effect, in the
4 absence of extern and/or inline.
6 Check that we don't get out-of-line definitions for extern inline
7 gnu_inline functions, regardless of declarations or definitions.
9 Check that such functions can be overridden by out-of-line
14 /* { dg-do compile } */
15 /* { dg-options "-O" } */ // such that static functions are optimized out
16 /* { dg-final { scan-assembler "func1" } } */
17 /* { dg-final { scan-assembler "func2" } } */
18 /* { dg-final { scan-assembler-not "func3" } } */
19 /* { dg-final { scan-assembler "func4" } } */
20 /* { dg-final { scan-assembler-not "func5" } } */
22 #include "gnu-inline-common.h"
25 #define fn pfx(func1) // must be emitted out-of-line
30 #define fn pfx(func2) // must be emitted out-of-line
36 #define fn pfx(func3) // must not be emitted
41 #define fn pfx(func4) // must be emitted out-of-line
47 #define fn pfx(func5) // must NOT be emitted, because it's static and unused