view gcc/testsuite/gcc.dg/ipa/vrp7.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 "-O2 -fdump-ipa-cp-details" } */

volatile int cond;
int abs (int);

static __attribute__((noinline, noclone))
int foo (int i)
{
  if (i < 5)
    __builtin_abort ();
  return 0;
}

static __attribute__((noinline, noclone))
int bar (int j)
{
  foo (~j);
  foo (abs (j));
  foo (j);
  return 0;
}

int main ()
{
  for (unsigned int i = 0; i < 10; ++i)
    bar (i);

  return 0;
}

/* { dg-final { scan-ipa-dump-times "Setting value range of param 0 \\(now 0\\) \\\[-10, 9\\\]" 1 "cp" } } */