OSDN Git Service

Fix PR target/50099
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / powerpc / outofline_rnreg.c
1 /* Test that registers used by out of line restore functions does not get renamed.
2    AIX, and 64 bit targets uses r1, which rnreg stays away from.
3    Linux 32 bits targets uses r11, which is susceptible to be renamed */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target ilp32 } */
6 /* { dg-options "-Os -frename-registers -fdump-rtl-rnreg" } */
7 /* "* renamed" or "* no available better choice" results are not acceptable */
8 /* { dg-final { scan-rtl-dump-not "Register 11 in insn *" "rnreg" { target powerpc*-*-linux* } } } */
9 /* { dg-final { cleanup-rtl-dump "rnreg" } } */
10 int
11 calc (int j)
12 {
13   if (j<=1) return 1;
14   return calc(j-1)*(j+1);
15 }