PR rtl-optimization/87918
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / interrupt-6.c
blob2a0266ad576471a3db59cea069b1566183b5d7fe
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mgeneral-regs-only -mno-cld" } */
4 typedef unsigned int uword_t __attribute__ ((mode (__word__)));
6 extern int error;
8 __attribute__((interrupt))
9 void
10 fn1 (void *p, short error_code)
11 { /* { dg-error "interrupt service routine should have unsigned \(long long |long |\)int as the second argument" } */
14 __attribute__((interrupt))
15 void
16 fn2 (void)
17 { /* { dg-error "interrupt service routine can only have a pointer argument and an optional integer argument" } */
20 __attribute__((interrupt))
21 void
22 fn3 (uword_t error_code)
23 { /* { dg-error "interrupt service routine should have a pointer as the first argument" } */
24 error = error_code;
27 __attribute__((interrupt))
28 void
29 fn4 (uword_t error_code, void *frame)
30 { /* { dg-error "interrupt service routine should have .* the .* argument" } */
31 error = error_code;
34 extern int fn5 (void *) __attribute__ ((interrupt)); /* { dg-error "interrupt service routine can't have non-void return value" } */
36 int
37 fn5 (void *frame)
39 return 0;