aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/pr79439-3.c
blob: 0cc80f4af42745f2d464b85f6618b0c3a0639991 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* { dg-do compile { target { powerpc-*-linux* && ilp32 } } } */
/* { dg-options "-O2 -fpic -fno-reorder-blocks" } */
/* { dg-require-effective-target fpic } */

/* Analog of pr79439-1.c for 32-bit Linux.  */

int f (void);

void
g (void)
{
}

int
rec (int a)
{
  int ret = 0;
  if (a > 10 && f ())
    ret += rec (a - 1);
  g ();
  return a + ret;
}

/* { dg-final { scan-assembler-times {\mbl f@plt\M}   1 } } */
/* { dg-final { scan-assembler-times {\mbl g@plt\M}   1 } } */
/* { dg-final { scan-assembler-times {\mbl rec@plt\M} 0 } } */