https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127395
--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #4)
> so, it seems that in cxx_eval_constant_expression() we intend to handle
> CONSTRUCTORS that are TREE_CONSTANT [ours is], but we also require
> reduced_constant_expression_p () to be true and that returns false for any
> CONSTRUCTOR that is not an aggregate type (which ours is not [since it's a
> bare int]).
>
> I am not sure what the right fix here would be - to match the combined
> intents.
reduced_constant_expression_p:
case CONSTRUCTOR:
/* And we need to handle PTRMEM_CST wrapped in a CONSTRUCTOR. */
tree field;
if (!AGGREGATE_TYPE_P (TREE_TYPE (t)))
/* A constant vector would be folded to VECTOR_CST.
A CONSTRUCTOR of scalar type means uninitialized. */
return false;
However, that is not the case here - we have a CONSTRUCTOR of scalar type that
represents 0 initialisation.