mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-24 19:21:12 +08:00
re PR tree-optimization/59386 (ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode)
PR tree-optimization/59386 * tree-inline.c (remap_gimple_stmt): If not id->do_not_unshare, unshare_expr (id->retval) before passing it to gimple_build_assign. * gcc.c-torture/compile/pr59386.c: New test. From-SVN: r205883
This commit is contained in:
parent
ba8267926c
commit
f8cb36a94c
gcc
@ -1,3 +1,9 @@
|
||||
2013-12-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/59386
|
||||
* tree-inline.c (remap_gimple_stmt): If not id->do_not_unshare,
|
||||
unshare_expr (id->retval) before passing it to gimple_build_assign.
|
||||
|
||||
2013-12-11 Bin Cheng <bin.cheng@arm.com>
|
||||
|
||||
Reverted:
|
||||
|
@ -1,3 +1,8 @@
|
||||
2013-12-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/59386
|
||||
* gcc.c-torture/compile/pr59386.c: New test.
|
||||
|
||||
2013-12-11 Bin Cheng <bin.cheng@arm.com>
|
||||
|
||||
Reverted:
|
||||
|
24
gcc/testsuite/gcc.c-torture/compile/pr59386.c
Normal file
24
gcc/testsuite/gcc.c-torture/compile/pr59386.c
Normal file
@ -0,0 +1,24 @@
|
||||
/* PR tree-optimization/59386 */
|
||||
|
||||
struct S { int s; };
|
||||
struct T { int t; struct S u; } c;
|
||||
int b;
|
||||
|
||||
struct S
|
||||
foo ()
|
||||
{
|
||||
struct T d;
|
||||
if (b)
|
||||
while (c.t)
|
||||
;
|
||||
else
|
||||
return d.u;
|
||||
}
|
||||
|
||||
struct S
|
||||
bar ()
|
||||
{
|
||||
struct T a;
|
||||
a.u = foo ();
|
||||
return a.u;
|
||||
}
|
@ -1273,7 +1273,9 @@ remap_gimple_stmt (gimple stmt, copy_body_data *id)
|
||||
|| ! SSA_NAME_VAR (retval)
|
||||
|| TREE_CODE (SSA_NAME_VAR (retval)) != RESULT_DECL)))
|
||||
{
|
||||
copy = gimple_build_assign (id->retvar, retval);
|
||||
copy = gimple_build_assign (id->do_not_unshare
|
||||
? id->retvar : unshare_expr (id->retvar),
|
||||
retval);
|
||||
/* id->retvar is already substituted. Skip it on later remapping. */
|
||||
skip_first = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user