gcc/testsuite/gdc.dg/attr_alwaysinline1.d
raw| 1 | // { dg-do compile } |
| 2 | // { dg-options "-O0" } |
| 3 | |
| 4 | import gcc.attributes; |
| 5 | |
| 6 | int func() |
| 7 | { |
| 8 | int nested_function() @always_inline |
| 9 | { |
| 10 | return 13; |
| 11 | } |
| 12 | return nested_function(); |
| 13 | } |
| 14 | |
| 15 | @always_inline int var = 0; // { dg-warning ".always_inline. attribute ignored" } |
| 16 | |
| 17 | // { dg-final { scan-assembler-not "nested_function" } } |