view gcc/testsuite/gcc.dg/tree-ssa/pr87126.c @ 152:2b5abeee2509

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

/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-fre1" } */

int a, *b;

void f ()
{ 
  int d = 0, e = d;
  while (a++)
    ;
  if (e)
    goto L2;
L1:
  d = e;
  b = &d;
L2:
  if (d)
    goto L1;
}

/* The load of d could be eliminated if we'd value-number the
   irreducible region in RPO of the reducible result.  Likewise
   a redundant store could be removed.  */
/* { dg-final { scan-tree-dump-times "d = 0;" 1 "fre1" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-not " = d;" "fre1" { xfail *-*-* } } } */