Commit edb7c512 by Jason Merrill Committed by Jason Merrill

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
parent b3a50850
2010-11-08 Jason Merrill <jason@redhat.com>
PR c++/46335
* tree.c (bot_manip): Check TREE_SIDE_EFFECTS as well.
Correct conversion/overflow behavior.
* cvt.c (ignore_overflows): Move here from typeck.c.
(ocp_convert): Use it.
......
......@@ -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;
}
......
2010-11-08 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/constexpr-defarg.C: New.
2010-11-08 Xinliang David Li <davidxl@google.com>
PR/46316
......
// PR c++/46335
// { dg-options -std=c++0x }
struct T { };
struct A {
A(const T &tr =T()) {}
};
struct B {
A k;
};
B kk_;
A fk_;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment