https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126922
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Testcase without headers:
struct A {
decltype (^^::) a, b;
};
template <A>
consteval void foo () {}
int
main ()
{
foo <A { .b = {}}> ();
}
We ICE in
3890 if (abi_check (21))
3891 write_expression (build_zero_cst
3892 (TREE_TYPE
(field)));
because build_zero_cst, which is defined in generic part of the compiler,
doesn't properly handle META_TYPE (which is FE specific).
Now, we could call instead of build_zero_cst (type) build_zero_init (type,
NULL_TREE, false), or do so only for scalar types and keep using build_zero_cst
otherwise, ...