| 1 |
/* Verify proper errors are generated for invalid code. */ |
| 2 |
int __attribute__ ((interrupt)) |
| 3 |
sub0 (void) |
| 4 |
{ /* { dg-error "function cannot return a value" } */ |
| 5 |
return 10; |
| 6 |
} |
| 7 |
|
| 8 |
void __attribute__ ((interrupt)) |
| 9 |
sub1 (int i) |
| 10 |
{ /* { dg-error "function cannot have arguments" } */ |
| 11 |
} |
| 12 |
|
| 13 |
void __attribute__ ((interrupt, naked)) |
| 14 |
sub2 (void) |
| 15 |
{ /* { dg-error "are mutually exclusive" } */ |
| 16 |
} |
| 17 |
|
| 18 |
void __attribute__ ((interrupt ("hypervisor"))) |
| 19 |
sub3 (void) |
| 20 |
{ /* { dg-warning "argument to" } */ |
| 21 |
} |