Commit 7d127f59 by Jason Merrill Committed by Jason Merrill

re PR c++/47003 (ice in stabilize_expr)

	PR c++/47003
	* tree.c (stabilize_expr): Really stabilize scalar glvalues.

From-SVN: r168180
parent 711aef43
2010-12-22 Jason Merrill <jason@redhat.com>
PR c++/47003
* tree.c (stabilize_expr): Really stabilize scalar glvalues.
2010-12-22 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
* parser.c (cp_parser_unary_expression): Call pedwarn for alignof
......
......@@ -3058,9 +3058,7 @@ stabilize_expr (tree exp, tree* initp)
if (!TREE_SIDE_EFFECTS (exp))
init_expr = NULL_TREE;
/* There are no expressions with REFERENCE_TYPE, but there can be call
arguments with such a type; just treat it as a pointer. */
else if (TREE_CODE (TREE_TYPE (exp)) == REFERENCE_TYPE
else if (!TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (exp))
|| !lvalue_or_rvalue_with_address_p (exp))
{
init_expr = get_target_expr (exp);
......
2010-12-22 Jason Merrill <jason@redhat.com>
* g++.dg/init/volatile2.C: New.
2010-12-22 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
* g++.dg/cpp0x/alignof2.C: New.
......
// PR c++/47003
struct A
{
A(int);
};
volatile int i;
int main()
{
A *q = new A (i);
}
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