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

--- Comment #1 from Philip Craig <philip at pobox dot com> ---
Still reproduces with the 20261101 snapshot (a7a46d303ca5).

Only -fsanitize=null, -fsanitize=alignment and -fsanitize=vptr trigger it.
The other -fsanitize=undefined checks and -fsanitize=address accept the
testcase, and -fsanitize=undefined -fno-sanitize=null,alignment,vptr
compiles it.

Declaring enum_to_string constexpr shows the sanitizer making it an
immediate function. Without the flag it compiles and runs; with
-fsanitize=null:

error: call to consteval function 'enum_to_string<Suit>(Suit::Clubs)' is not a
constant expression

Reply via email to