re PR middle-end/55331 (ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre)
2012-11-27 Richard Biener <rguenther@suse.de> PR middle-end/55331 * gimple-fold.c (gimplify_and_update_call_from_tree): Replace stmt with a NOP instead of removing it. * g++.dg/opt/pr55331.C: New testcase. From-SVN: r193839
This commit is contained in:
parent
3711757e19
commit
77d19c725f
4 changed files with 26 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2012-11-27 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/55331
|
||||
* gimple-fold.c (gimplify_and_update_call_from_tree): Replace
|
||||
stmt with a NOP instead of removing it.
|
||||
|
||||
2012-11-27 Steven Bosscher <steven@gcc.gnu.org>
|
||||
|
||||
* loop-invariant.c (check_invariant_table_size): Take sizeof of
|
||||
|
|
|
@ -607,7 +607,7 @@ gimplify_and_update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
|
|||
unlink_stmt_vdef (stmt);
|
||||
release_defs (stmt);
|
||||
}
|
||||
gsi_remove (si_p, true);
|
||||
gsi_replace (si_p, gimple_build_nop (), true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2012-11-27 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/55331
|
||||
* g++.dg/opt/pr55331.C: New testcase.
|
||||
|
||||
2012-11-26 Steven Bosscher <steven@gcc.gnu.org>
|
||||
|
||||
* gcc.dg/20050811-2.c: Change -dv option to -graph option.
|
||||
|
|
14
gcc/testsuite/g++.dg/opt/pr55331.C
Normal file
14
gcc/testsuite/g++.dg/opt/pr55331.C
Normal file
|
@ -0,0 +1,14 @@
|
|||
// PR tree-optimization/55331
|
||||
// { dg-do compile }
|
||||
// { dg-options "-O2 -fno-tree-fre" }
|
||||
|
||||
struct A {};
|
||||
|
||||
void
|
||||
foo (A *p, bool x)
|
||||
{
|
||||
A a;
|
||||
char *e = (char *) (&a + 1);
|
||||
if (x)
|
||||
__builtin_memmove (p, &a, e - (char *) &a);
|
||||
}
|
Loading…
Add table
Reference in a new issue