2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pr40657-2.c
blobafd469a76bb6ae9c817badd5ab2685c992d77467
1 /* { dg-options "-Os -mthumb" } */
2 /* { dg-require-effective-target arm_thumb1_ok } */
3 /* { dg-final { scan-assembler-not "sub\[\\t \]*sp,\[\\t \]*sp" } } */
4 /* { dg-final { scan-assembler-not "add\[\\t \]*sp,\[\\t \]*sp" } } */
6 /* Here, we test that if there's a pop of r[4567] in the epilogue,
7 add sp,sp,#12 is removed and replaced by three additional pops
8 of lower-numbered regs. */
10 extern void bar(int*);
12 int t1, t2, t3, t4, t5;
13 int foo()
15 int i,j,k,x = 0;
16 for (i = 0; i < t1; i++)
17 for (j = 0; j < t2; j++)
18 bar(&x);
19 return x;