gcc/testsuite/gcc.dg/tm/unused.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fgnu-tm -Wall" } */ |
| 3 | |
| 4 | __attribute__((transaction_safe)) |
| 5 | static int unused_func () /* { dg-warning "defined but not used" } */ |
| 6 | { |
| 7 | return 12345; |
| 8 | } |
| 9 | |
| 10 | int main() |
| 11 | { |
| 12 | return 0; |
| 13 | } |
| 14 | |
| 15 | /* { dg-final { scan-assembler "_ZGTt11unused_func:" } } */ |