| 1 |
/* PR middle-end/68582 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-Wunused-function" } */ |
| 4 |
|
| 5 |
/* We failed to give the warning for functions with TREE_THIS_VOLATILE set. */ |
| 6 |
|
| 7 |
static void |
| 8 |
fn1 (void) /* { dg-warning "defined but not used" } */ |
| 9 |
{ |
| 10 |
__builtin_abort (); |
| 11 |
} |
| 12 |
|
| 13 |
__attribute__ ((noreturn)) |
| 14 |
static void |
| 15 |
fn2 (void) /* { dg-warning "defined but not used" } */ |
| 16 |
{ |
| 17 |
__builtin_abort (); |
| 18 |
} |
| 19 |
|
| 20 |
__attribute__ ((volatile)) |
| 21 |
static void |
| 22 |
fn3 (void) /* { dg-warning "defined but not used" } */ |
| 23 |
{ |
| 24 |
__builtin_abort (); |
| 25 |
} |