diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-01-05 01:49:14 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2020-01-05 01:49:14 +0100 |
commit | 72036b59a0143c61acd2652a832e3903e180d0f9 (patch) | |
tree | 6fd71becf369d6803fab4a017e9d6b849d257fd9 /gcc/cp | |
parent | 48cb874a04c2d34c91ad83e029ffeb8232bd3f23 (diff) | |
download | gcc-72036b59a0143c61acd2652a832e3903e180d0f9.zip gcc-72036b59a0143c61acd2652a832e3903e180d0f9.tar.gz gcc-72036b59a0143c61acd2652a832e3903e180d0f9.tar.bz2 |
re PR c++/93046 (ICE in cp_gimplify_init_expr)
PR c++/93046
* cp-gimplify.c (cp_gimplify_init_expr): Don't look through
TARGET_EXPR if it has been gimplified already.
* g++.dg/ext/cond4.C: New test.
From-SVN: r279884
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/cp-gimplify.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 421048b..a1fb787 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2010-01-05 Jakub Jelinek <jakub@redhat.com> + + PR c++/93046 + * cp-gimplify.c (cp_gimplify_init_expr): Don't look through + TARGET_EXPR if it has been gimplified already. + 2020-01-03 Jason Merrill <jason@redhat.com> PR c++/93033 - incorrect tree node sharing with array init. diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index eb55276..1d2a77d 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -523,7 +523,7 @@ cp_gimplify_init_expr (tree *expr_p, gimple_seq *pre_p) think that such code never uses the TARGET_EXPR as an initializer. If I'm wrong, we'll abort because the temp won't have any RTL. In that case, I guess we'll need to replace references somehow. */ - if (TREE_CODE (from) == TARGET_EXPR) + if (TREE_CODE (from) == TARGET_EXPR && TARGET_EXPR_INITIAL (from)) from = TARGET_EXPR_INITIAL (from); /* If we might need to clean up a partially constructed object, break down |