Debian Codegraph @

gcc/testsuite/gcc.target/sh/attr-isr-trap_exit.c

raw
1 /* Check that trapa / interrput_handler attributes can paired in
2 either order. */
3 /* { dg-do compile } */
4 /* { dg-options "-O" } */
5 /* { dg-final { scan-assembler "trapa\[ \t\]\[ \t\]*#4"} } */
6 /* { dg-final { scan-assembler-times "trapa" 1 } } */
7
8 void h0 (void) __attribute__ ((trap_exit (4))) __attribute__ ((interrupt_handler));
9 void h1 (void) __attribute__ ((interrupt_handler)) __attribute__ ((trap_exit (5)));
10
11 void
12 foo (void)
13 {
14 }
15
16 void
17 h0 (void)
18 {
19 }
20
21 void delay
22 (int a)
23 {
24 }
25
26 int
27 main (void)
28 {
29 return 0;
30 }