diff options
author | Jason Merrill <jason@redhat.com> | 2010-11-08 22:54:12 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-11-08 22:54:12 -0500 |
commit | edb7c512888ad65f3804585a43448ada0d10f690 (patch) | |
tree | a07594bbf0000e132be82f1b03a75d377620cc8a /gcc/cp/tree.c | |
parent | b3a50850b16796a6bb2505cabf14571e1e13c656 (diff) | |
download | gcc-edb7c512888ad65f3804585a43448ada0d10f690.zip gcc-edb7c512888ad65f3804585a43448ada0d10f690.tar.gz gcc-edb7c512888ad65f3804585a43448ada0d10f690.tar.bz2 |
re PR c++/46335 ([C++0X] [4.6 Regression] ICE: in gimple_add_tmp_var, at gimplify.c:701)
PR c++/46335
* tree.c (bot_manip): Check TREE_SIDE_EFFECTS as well.
From-SVN: r166470
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 5440e10..462e35f 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1763,11 +1763,10 @@ bot_manip (tree* tp, int* walk_subtrees, void* data) splay_tree target_remap = ((splay_tree) data); tree t = *tp; - if (!TYPE_P (t) && TREE_CONSTANT (t)) + if (!TYPE_P (t) && TREE_CONSTANT (t) && !TREE_SIDE_EFFECTS (t)) { /* There can't be any TARGET_EXPRs or their slot variables below - this point. We used to check !TREE_SIDE_EFFECTS, but then we - failed to copy an ADDR_EXPR of the slot VAR_DECL. */ + this point. */ *walk_subtrees = 0; return NULL_TREE; } |