File: pr40657-2.c

package info (click to toggle)
gcc-arm-none-eabi 15%3A8-2019-q3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 571,828 kB
  • sloc: ansic: 2,937,651; cpp: 881,644; ada: 597,189; makefile: 65,528; asm: 56,499; xml: 46,621; exp: 24,747; sh: 19,684; python: 7,256; pascal: 4,370; awk: 3,497; perl: 2,695; yacc: 316; ml: 285; f90: 234; lex: 198; objc: 194; haskell: 119
file content (20 lines) | stat: -rw-r--r-- 557 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-options "-Os -mthumb" }  */
/* { dg-require-effective-target arm_thumb1_ok } */
/* { dg-final { scan-assembler-not "sub\[\\t \]*sp,\[\\t \]*sp" } } */
/* { dg-final { scan-assembler-not "add\[\\t \]*sp,\[\\t \]*sp" } } */

/* Here, we test that if there's a pop of r[4567] in the epilogue,
   add sp,sp,#12 is removed and replaced by three additional pops
   of lower-numbered regs.  */

extern void bar(int*);

int t1, t2, t3, t4, t5;
int foo()
{
  int i,j,k,x = 0;
  for (i = 0; i < t1; i++)
    for (j = 0; j < t2; j++)
	  bar(&x);
  return x;
}