PR c++/67273
[official-gcc.git] / gcc / testsuite / gcc.target / arm / interrupt-2.c
blob289eca0f6406bb73b029b9307cdcca6e047bcfb2
1 /* Verify that prologue and epilogue are correct for functions with
2 __attribute__ ((interrupt)). */
3 /* { dg-do assemble } */
4 /* { dg-require-effective-target arm_nothumb } */
5 /* { dg-options "-O1 -marm -save-temps" } */
7 /* This test is not valid when -mthumb. */
8 extern void bar (int);
9 extern void test (void) __attribute__((__interrupt__));
11 int foo;
12 void test()
14 bar (foo);
15 foo = 0;
18 /* { dg-final { scan-assembler "push\t{r0, r1, r2, r3, r4, r5, ip, lr}" } } */
19 /* { dg-final { scan-assembler "ldmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, pc}\\^" } } */