commit e7e659890bfa248aa57eefd62992a71d8d0bd399
Author: Jason Merrill <jason@redhat.com>
Date: Thu Jan 22 16:58:01 2015 -0500
PR c++/64727
* constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
of CONST_DECL.
@@ -2955,10 +2955,11 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
return (*ctx->values->get (t));
case VAR_DECL:
+ case CONST_DECL:
+ /* We used to not check lval for CONST_DECL, but darwin.c uses
+ CONST_DECL for aggregate constants. */
if (lval)
return t;
- /* else fall through. */
- case CONST_DECL:
if (ctx->strict)
r = decl_really_constant_value (t);
else