[Bug c++/111097] mistifying bug triggered by trivial code change

2023-08-22 Thread fabio at cannizzo dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111097 --- Comment #7 from Fabio Cannizzo --- Apologies for my ignorance. Thank you.

[Bug c++/111097] mistifying bug triggered by trivial code change

2023-08-22 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111097 --- Comment #6 from Jonathan Wakely --- (In reply to Fabio Cannizzo from comment #3) > Using -fno-strict-aliasing the issue disappear, however I am not sure if > that is a real fix, or if it is merely circumstantial. When creating the bug repor

[Bug c++/111097] mistifying bug triggered by trivial code change

2023-08-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111097 --- Comment #5 from Andrew Pinski --- > Worth noting, this code works correctly with Visual Studio and with clang. Gcc is known to be take more into account when it comes to aliasing rules of c and c++. That is exactly what you are running into

[Bug c++/111097] mistifying bug triggered by trivial code change

2023-08-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111097 --- Comment #4 from Andrew Pinski --- You can mark XV as may_alias attribute to fix the code too.

[Bug c++/111097] mistifying bug triggered by trivial code change

2023-08-22 Thread fabio at cannizzo dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111097 --- Comment #3 from Fabio Cannizzo --- Hi Richard Using -fno-strict-aliasing the issue disappear, however I am not sure if that is a real fix, or if it is merely circumstantial. As mentioned, there are many other possible workarounds which als

[Bug c++/111097] mistifying bug triggered by trivial code change

2023-08-22 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111097 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/111097] mistifying bug triggered by trivial code change

2023-08-21 Thread fabio at cannizzo dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111097 --- Comment #1 from Fabio Cannizzo --- Changing the `#if 1` to `#if 0` is probably the easiest way to isolate the debug. It causes only minimal changes to the generated assembler. I forgot to mention, the code is compiled with the flags -O3 -ms