PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / m68k / interrupt_thread-2.c
blob1518bece55ba1ded58df477886f5a5cd84bb5afa
1 /* { dg-do compile } */
2 /* { dg-options "-mcpu=fidoa" } */
4 /* Check that an error is issued for using more than one
5 interrupt_attribute at the same time. */
7 /* If the current mutilib is, say, -mcpu=5485, the compiler gets
8 -mcpu=fidoa -mcpu=5485, where -mcpu=fidoa is overridden. In that
9 case, we just use two interrupt_handler attributes and expect the
10 same error. */
11 #ifdef __mfido___
12 #define IH interrupt_thread
13 #else
14 #define IH interrupt_handler
15 #endif
17 extern void f1 (void) __attribute__((interrupt_handler, interrupt_handler)); /* { dg-error "multiple interrupt attributes not allowed" } */
19 extern void f2 (void) __attribute__((interrupt_handler, IH)); /* { dg-error "multiple interrupt attributes not allowed" } */
21 extern void f3 (void) __attribute__((IH, interrupt_handler)); /* { dg-error "multiple interrupt attributes not allowed" } */
23 extern void f4 (void) __attribute__((IH, IH)); /* { dg-error "multiple interrupt attributes not allowed" } */