https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106248
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This is interesting because I get the same behavior in clang with LLVM's libc++. Also with -std=c++20 I get the value 0 for all optimization levels. Maybe there is undefined code here ...