blob: 7f66b7ee3f40609210cae6de29da3a279a4190ca [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-fre1" } */
void bar ();
void foo (int pred, int *other)
{
*other = 0;
if (*other)
goto cnt;
if (pred)
{
*other = 1;
cnt:
if (!pred)
bar ();
}
}
/* The first VN pass should figure that if (!pred) is false because
if (*other) is and thus the predicate test is redundant. */
/* { dg-final { scan-tree-dump-not "bar" "fre1" } } */