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