[Bug c++/111019] [12/13 Regression] Optimizer incorrectly assumes variable is not changed while change happens through another pointer

2023-08-21 Thread boskidialer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111019 --- Comment #12 from Sławomir Fraś --- $ /opt/gcc-745ec1/bin/g++ -v Using built-in specs. COLLECT_GCC=/opt/gcc-745ec1/bin/g++ COLLECT_LTO_WRAPPER=/opt/gcc-745ec1/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-w

[Bug c++/111019] [12/13/14 Regression] Optimizer incorrectly assumes variable is not changed while change happens through another pointer

2023-08-15 Thread boskidialer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111019 --- Comment #4 from Sławomir Fraś --- Not sure if that hints at the possible cause, when i extracted `this` variable out of the loop to something like this (https://godbolt.org/z/8ebb5E1qG): Target* first = this; while (first->next)

[Bug c++/111019] New: Optimizer incorrectly assumes variable is not changed while change happens through another pointer

2023-08-14 Thread boskidialer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111019 Bug ID: 111019 Summary: Optimizer incorrectly assumes variable is not changed while change happens through another pointer Product: gcc Version: 12.3.0 Status: UNCONFIRM