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
This commit is contained in:
parent
2c9da85bf0
commit
0c5f6539ad
4 changed files with 50 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
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.
|
||||
|
||||
|
|
38
gcc/testsuite/gcc.dg/pr48768.c
Normal file
38
gcc/testsuite/gcc.dg/pr48768.c
Normal file
|
@ -0,0 +1,38 @@
|
|||
/* 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;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/* 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))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue