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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It was the typeck2.c (store_init_value): Don't call cp_fully_fold_init on
initializers of automatic non-constexpr variables in constexpr
functions. part of the above change btw, with that reverted the folding folds
the CONSTRUCTOR into VECTOR_CST and so we don't trigger that.
The problematic CONSTRUCTORs are created by build_vector_from_val, and the
reason we don't get a VECTOR_CST out of it immediately is that we don't call it
with an INTEGER_CST, but NON_LVALUE_EXPR wrapping the INTEGER_CST, aka location
wrapper.
So, another way out of this for this particular testcase might be e.g. strip
the location wrapper out from the arg before calling build_vector_from_val and
wrap the resulting VECTOR_CST into a location wrapper instead.

Reply via email to