view gcc/testsuite/gcc.dg/ipa/pr93707.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-O3 --param ipa-cp-eval-threshold=1 -fdump-ipa-cp" } */

int foo();
int data[100];

__attribute__((noinline)) static int recur_fn (int i, int j, int depth)
{
   if (depth > 10)
     return 1;

   data[i + j]++;

   if (depth & 3)
     recur_fn (i, 1, depth + 1);
   else
     recur_fn (i, j & 1, depth + 1);

   foo();

   return i + j;
}

int caller (int v, int depth)
{
  recur_fn (1, v, depth);

  return 0;
}

/* { dg-final { scan-ipa-dump-times "Clone of recur_fn/" 2 "cp" } } */