1 /* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
2 /* { dg-options "-O2 -fpic -fno-reorder-blocks" } */
3
4 /* On the Linux 64-bit ABIs, we eliminate NOP in the 'rec' call even if
5 -fpic is used. The recursive call should call the local alias. The
6 Linux 32-bit ABIs do not require NOPs after the BL instruction. */
7
8 int f (void);
9
10 void
g(void)11 g (void)
12 {
13 }
14
15 int
rec(int a)16 rec (int a)
17 {
18 int ret = 0;
19 if (a > 10 && f ())
20 ret += rec (a - 1);
21 g ();
22 return a + ret;
23 }
24
25 /* { dg-final { scan-assembler-times {\mbl f\M} 1 } } */
26 /* { dg-final { scan-assembler-times {\mbl g\M} 1 } } */
27 /* { dg-final { scan-assembler-times {\mbl rec\M} 1 } } */
28 /* { dg-final { scan-assembler-times {\mnop\M} 2 } } */
29