* tree.c (stabilize_expr): Really stabilize scalar glvalues.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168180
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
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.
--- /dev/null
+// PR c++/47003
+
+struct A
+{
+ A(int);
+};
+
+volatile int i;
+
+int main()
+{
+ A *q = new A (i);
+}