* constexpr.c (potential_constant_expression_1): REALPART_EXPR and
IMAGPART_EXPR can be lvalues.
From-SVN: r242349
2016-11-12 Jason Merrill <jason@redhat.com>
+ * constexpr.c (potential_constant_expression_1): REALPART_EXPR and
+ IMAGPART_EXPR can be lvalues.
+
DR 374
PR c++/56840
* pt.c (check_specialization_namespace): Allow any enclosing
#endif
return RECUR (t, any);
+ case REALPART_EXPR:
+ case IMAGPART_EXPR:
case COMPONENT_REF:
case BIT_FIELD_REF:
case ARROW_EXPR:
return true;
/* fall through. */
- case REALPART_EXPR:
- case IMAGPART_EXPR:
case CONJ_EXPR:
case SAVE_EXPR:
case FIX_TRUNC_EXPR:
--- /dev/null
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+
+static _Complex int i;
+static_assert (&__imag i == &__imag i, "");