Commit 0c5f6539 by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/48768 (ICE in get_expr_operands())

	PR debug/48768
	* tree-ssa.c (insert_debug_temp_for_var_def): If degenerate_phi_result
	is error_mark_node, set value to NULL.

	* gcc.dg/pr48768.c: New test.

From-SVN: r172968
parent 2c9da85b
2011-04-26 Jakub Jelinek <jakub@redhat.com>
PR debug/48768
* tree-ssa.c (insert_debug_temp_for_var_def): If degenerate_phi_result
is error_mark_node, set value to NULL.
PR tree-optimization/48734
* tree-ssa-reassoc.c (eliminate_redundant_comparison): Give up
if return value from maybe_fold_*_comparsions isn't something
......
2011-04-26 Jakub Jelinek <jakub@redhat.com>
PR debug/48768
* gcc.dg/pr48768.c: New test.
PR tree-optimization/48734
* gcc.c-torture/compile/pr48734.c: New test.
......
/* PR debug/48768 */
/* { dg-do compile } */
/* { dg-options "-O -fcompare-debug" } */
int a, b;
int
bar (void)
{
int i, j = 1;
for (i = 0; i != 10; i++)
{
lab:
if (i)
{
int *k = &j;
}
else if (j)
goto lab;
}
return 1;
}
inline int
foo (int x)
{
unsigned int c = x;
int d = x;
if (bar ())
for (; c; c++)
while (x >= 0)
if (foo (d) >= 0)
{
d = bar ();
a = b ? b : 1;
}
return 0;
}
/* Miscellaneous SSA utility functions.
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -352,6 +352,10 @@ insert_debug_temp_for_var_def (gimple_stmt_iterator *gsi, tree var)
value = degenerate_phi_result (def_stmt);
if (value && walk_tree (&value, find_released_ssa_name, NULL, NULL))
value = NULL;
/* error_mark_node is what fixup_noreturn_call changes PHI arguments
to. */
else if (value == error_mark_node)
value = NULL;
}
else if (is_gimple_assign (def_stmt))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment