https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63191

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #12)
> For the C++ FE, the question here is why we actually emit dynamic
> initialization at all.  If constexpr is added to the ctor, then we just emit
> the initializer, but even without the constexpr I'd think that if the ctor
> has empty body and trivial mem initializers and if all arguments of the
> ctors are constants, as an optimization we should handle it as if it was
> declared constexpr.  Jason?

I think there is a PR somewhere suggesting C++ should (for all initializers)
try constexpr evaluation.  It's much harder to do this in the middle-end.

Reply via email to