view gcc/testsuite/gcc.dg/tree-ssa/pr87126.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
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 *-*-* } } } */