gcc/testsuite/gdc.dg/attr_noinline1.d
raw| 1 | // { dg-do compile } |
| 2 | // { dg-options "-O2 -finline-functions -fno-ipa-icf" } |
| 3 | |
| 4 | import gcc.attributes; |
| 5 | |
| 6 | extern int t(); |
| 7 | |
| 8 | void func() |
| 9 | { |
| 10 | void nested_function() @noinline |
| 11 | { |
| 12 | t(); |
| 13 | } |
| 14 | nested_function(); |
| 15 | } |
| 16 | |
| 17 | @noinline int var = 0; // { dg-warning ".noinline. attribute ignored" } |
| 18 | |
| 19 | // { dg-final { scan-assembler "nested_function" } } |