| 1 |
/* { dg-options "-DCE_EXTRACT_FUNCTIONS=f -DCE_NO_EXTERNALIZATION" }*/ |
| 2 |
#define __gnu_inline |
| 3 |
#define inline inline __gnu_inline __inline_maybe_unused notrace |
| 4 |
#define __inline__ inline |
| 5 |
#define __inline_maybe_unused |
| 6 |
|
| 7 |
#if defined(CC_USING_HOTPATCH) |
| 8 |
#define notrace __attribute__((hotpatch(0, 0))) |
| 9 |
#elif defined(CC_USING_PATCHABLE_FUNCTION_ENTRY) |
| 10 |
#define notrace __attribute__((patchable_function_entry(0, 0))) |
| 11 |
#else |
| 12 |
#define notrace |
| 13 |
#endif |
| 14 |
|
| 15 |
#define __maybe_unused __attribute__((unused)) |
| 16 |
|
| 17 |
int __inline__ g(int x) |
| 18 |
{ |
| 19 |
return x + 3; |
| 20 |
} |
| 21 |
|
| 22 |
int f(int x) |
| 23 |
{ |
| 24 |
return g(x); |
| 25 |
} |
| 26 |
|
| 27 |
/* { dg-final { scan-tree-dump "int f\(int x\)" } } */ |
| 28 |
/* { dg-final { scan-tree-dump "#define __gnu_inline" } } */ |
| 29 |
/* { dg-final { scan-tree-dump "#define __inline__ inline" } } */ |
| 30 |
/* { dg-final { scan-tree-dump "#define inline inline __gnu_inline __inline_maybe_unused notrace" } } */ |
| 31 |
/* { dg-final { scan-tree-dump "#define notrace" } } */ |