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

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

/* { dg-do compile } */
/* { dg-options "-O3 -fdump-ipa-cp-details -fno-early-inlining --param ipa-cp-max-recursive-depth=8" } */

int fn();

int data[100];

int recur_fn (int i)
{
  int j;
   
  if (i == 6)
    {
      fn();
      fn();
      fn();
      fn();
      fn();
      fn();
      fn();
      fn();
      fn();
      fn();
      fn();
      fn();
      return 10;
    }

  data[i] = i; 

  for (j = 0; j < 100; j++)
    recur_fn (i + 1);

  return i; 
}

int main ()
{
  int i;

  for (i = 0; i < 100; i++)
    recur_fn (1) + recur_fn (-5);

  return 1;
}

/* { dg-final { scan-ipa-dump-times "Creating a specialized node of recur_fn/\[0-9\]*\\." 12 "cp" } } */