https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126017
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-07-08
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
#include <meta>
consteval auto
foo ()
{
struct S;
consteval { define_aggregate (^^S, { data_member_spec (^^int, { .name = "abc"
}) }); }
return ^^S;
}
struct T : [: foo () :] {};
int
main ()
{
T a;
}
The reason this makes it into LTO is that T has foo()::S as base, and
TYPE_CONTEXT of foo()::S is foo, and foo is consteval function with
std::meta::info return type, so when streaming the TYPE_CONTEXT of that type,
we eventually want to stream foo FUNCTION_DECL and its TREE_TYPE and TREE_TYPE
of that is META_TYPE.
I think this ICE will go away when https://wg21.link/P4101R1 is implemented.