gcc/testsuite/gdc.dg/attr_noipa1.d
raw| 1 | // { dg-do compile } |
| 2 | // { dg-options "-O2 -finline-functions" } |
| 3 | |
| 4 | import gcc.attributes; |
| 5 | |
| 6 | int func(int x) |
| 7 | { |
| 8 | int nested_function(int y, int z) @noipa |
| 9 | { |
| 10 | return y + z; |
| 11 | } |
| 12 | return nested_function(x, 0); |
| 13 | } |
| 14 | |
| 15 | @noipa int var = 0; // { dg-warning ".noipa. attribute ignored" } |
| 16 | |
| 17 | // { dg-final { scan-assembler "nested_function" } } |