Commit ff4bfb10 by Jason Merrill Committed by Jason Merrill

re PR c++/47950 ([C++0x] Internal compiler error: non-dependent declaration as…

re PR c++/47950 ([C++0x] Internal compiler error: non-dependent declaration as condition causes tsubst_copy_and_build assertion failure.)

	PR c++/47950
	* pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Retain TREE_CONSTANT.

From-SVN: r170656
parent 423ed416
2011-03-03 Jason Merrill <jason@redhat.com>
PR c++/47950
* pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Retain TREE_CONSTANT.
2011-03-02 Jason Merrill <jason@redhat.com>
PR c++/47950
......
......@@ -13368,7 +13368,11 @@ tsubst_copy_and_build (tree t,
/* We can get here for a constant initializer of non-dependent type.
FIXME stop folding in cp_parser_initializer_clause. */
gcc_assert (TREE_CONSTANT (t));
return get_target_expr (RECUR (TARGET_EXPR_INITIAL (t)));
{
tree r = get_target_expr (RECUR (TARGET_EXPR_INITIAL (t)));
TREE_CONSTANT (r) = true;
return r;
}
default:
/* Handle Objective-C++ constructs, if appropriate. */
......
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