| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-Os" } */ |
| 3 |
/* { dg-final { scan-assembler-times "__interrupt_vector_" 4 } } */ |
| 4 |
|
| 5 |
/* Test that interrupts aren't optimised out and that "__interrupt__" and |
| 6 |
"interrupt" can be used interchangeably. */ |
| 7 |
|
| 8 |
static void __attribute__((interrupt(1))) |
| 9 |
isr_static (void) |
| 10 |
{ |
| 11 |
} |
| 12 |
|
| 13 |
static void __attribute__((__interrupt__(2))) |
| 14 |
isr_static_alt (void) |
| 15 |
{ |
| 16 |
} |
| 17 |
|
| 18 |
void __attribute__((interrupt(3))) |
| 19 |
isr_global (void) |
| 20 |
{ |
| 21 |
} |
| 22 |
|
| 23 |
void __attribute__((__interrupt__(4))) |
| 24 |
isr_global_alt (void) |
| 25 |
{ |
| 26 |
} |