https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104359
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2022-02-03
Status|UNCONFIRMED |WAITING
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is undefined behavior so anything can happen.
Why do you think GCC should act consistent here?
Using -fsanitize=undefined, I get:
/app/example.cpp:9:9: runtime error: load of value 255, which is not a valid
value for type 'bool'
/app/example.cpp:14:5: runtime error: load of value 255, which is not a valid
value for type 'bool'