https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120801
--- Comment #2 from Oskari Alaranta <oskari.alaranta at bananymous dot com> --- (In reply to Andreas Schwab from comment #1) > You need to use constexpr from C23. Oh thank you. The bug may be with something else then. This happened in c++ with --std=c++20 using a constexpr variable and I reduced it to this and thought it was the same problem. I'll take a deeper look then.