re PR debug/42234 (internal compiler error: verify_ssa failed)
PR debug/42234 * tree-ssa-dom.c (degenerate_phi_result): Check for NULL phi argument earlier. From-SVN: r155025
This commit is contained in:
parent
a15b72fa7f
commit
6edde54505
@ -1,3 +1,9 @@
|
||||
2009-12-06 Richard Henderson <rth@redhat.com>
|
||||
|
||||
PR debug/42234
|
||||
* tree-ssa-dom.c (degenerate_phi_result): Check for NULL phi
|
||||
argument earlier.
|
||||
|
||||
2009-12-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* doc/install.texi: Document MPC is required.
|
||||
|
14
gcc/testsuite/gcc.c-torture/compile/pr42234.c
Normal file
14
gcc/testsuite/gcc.c-torture/compile/pr42234.c
Normal file
@ -0,0 +1,14 @@
|
||||
/* { dg-options "-g" } */
|
||||
|
||||
void
|
||||
foo (int x)
|
||||
{
|
||||
struct S { int s; } d = { 1 };
|
||||
unsigned int e = 1;
|
||||
if (x)
|
||||
e = x && d.s;
|
||||
else
|
||||
for (e = 0; e <= 3; e--)
|
||||
;
|
||||
e++;
|
||||
}
|
@ -2396,6 +2396,8 @@ degenerate_phi_result (gimple phi)
|
||||
|
||||
if (arg == lhs)
|
||||
continue;
|
||||
else if (!arg)
|
||||
break;
|
||||
else if (!val)
|
||||
val = arg;
|
||||
else if (arg == val)
|
||||
@ -2403,7 +2405,7 @@ degenerate_phi_result (gimple phi)
|
||||
/* We bring in some of operand_equal_p not only to speed things
|
||||
up, but also to avoid crashing when dereferencing the type of
|
||||
a released SSA name. */
|
||||
else if (!arg || TREE_CODE (val) != TREE_CODE (arg)
|
||||
else if (TREE_CODE (val) != TREE_CODE (arg)
|
||||
|| TREE_CODE (val) == SSA_NAME
|
||||
|| !operand_equal_p (arg, val, 0))
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user