Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.target / m68k / interrupt-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3 /* { dg-final { scan-assembler "j(ra|mp)\[ \t\]*interrupt_sibcall" } } */
4 /* { dg-final { scan-assembler "j(b|)sr\[ \t\]*interrupt_call" } } */
5 /* { dg-final { scan-assembler "j(ra|mp)\[ \t\]*normal_sibcall" } } */
6
7 void normal_sibcall (void);
8 void interrupt_call (void);
9 void __attribute ((interrupt)) interrupt_sibcall (void);
10
11 void normal (void)
12 {
13   normal_sibcall ();
14 }
15
16 void __attribute ((interrupt)) interrupt (void)
17 {
18   interrupt_call ();
19 }
20
21 void __attribute ((interrupt)) interrupt_2 (void)
22 {
23   interrupt_sibcall ();
24 }