[Bug c++/120775] [C++26] P2996R13 - Reflection
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 3 18:49:39 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120775
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The #c8 ICE can be reduced to
constexpr void foo () { if consteval { static constexpr auto a = ^^::; } }
auto bar () { return &foo; }
or
template <typename T> struct S { static constexpr auto s = ^^T; void foo () {
constexpr auto s = ^^T; } };
template struct S <int>;
The first ICE is during mangling, where we try to mangle the foo::a static
variable, the second ICE is trying to output the S<int>::s variable.
More information about the Gcc-bugs
mailing list