blob: 138b98fe1ea7a131963284e044a610557800db0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/* { dg-do compile } */
/* { dg-options "-O2 -mgeneral-regs-only -mno-cld" } */
typedef unsigned int uword_t __attribute__ ((mode (__word__)));
extern int error;
__attribute__((interrupt))
void
fn1 (void *p, short error_code)
{ /* { dg-error "interrupt service routine should have 'unsigned \(long long |long |\)int' as the second argument" } */
}
__attribute__((interrupt))
void
fn2 (void)
{ /* { dg-error "interrupt service routine can only have a pointer argument and an optional integer argument" } */
}
__attribute__((interrupt))
void
fn3 (uword_t error_code)
{ /* { dg-error "interrupt service routine should have a pointer as the first argument" } */
error = error_code;
}
__attribute__((interrupt))
void
fn4 (uword_t error_code, void *frame)
{ /* { dg-error "interrupt service routine should have .* the .* argument" } */
error = error_code;
}
extern int fn5 (void *) __attribute__ ((interrupt)); /* { dg-error "interrupt service routine must return 'void'" } */
int
fn5 (void *frame)
{
return 0;
}
|