[Bug tree-optimization/106171] wrong code at -O1 and above on x86_64-linux-gnu

2022-07-03 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106171 --- Comment #7 from Zhendong Su --- (In reply to Jakub Jelinek from comment #5) > And -O1 -Wall warns: > pr106171.c: In function ‘c’: > pr106171.c:10:15: warning: ‘e[0]’ is used uninitialized [-Wuninitialized] >10 | return e[0]; >

[Bug tree-optimization/106171] wrong code at -O1 and above on x86_64-linux-gnu

2022-07-03 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106171 Zhendong Su changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

[Bug tree-optimization/106171] wrong code at -O1 and above on x86_64-linux-gnu

2022-07-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106171 --- Comment #5 from Jakub Jelinek --- And -O1 -Wall warns: pr106171.c: In function ‘c’: pr106171.c:10:15: warning: ‘e[0]’ is used uninitialized [-Wuninitialized] 10 | return e[0]; | ~^~~ pr106171.c:6:9: note: ‘e’ decl

[Bug tree-optimization/106171] wrong code at -O1 and above on x86_64-linux-gnu

2022-07-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106171 --- Comment #4 from Jakub Jelinek --- We don't have uninitialized memory sanitizer. -fsanitize-address-use-after-scope doesn't trigger because it is use in scope, just not initialized there.

[Bug tree-optimization/106171] wrong code at -O1 and above on x86_64-linux-gnu

2022-07-03 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106171 --- Comment #3 from Zhendong Su --- Yes, you're right, Jakub. Then, it's a false negative for the sanitizers.

[Bug tree-optimization/106171] wrong code at -O1 and above on x86_64-linux-gnu

2022-07-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106171 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2

[Bug tree-optimization/106171] wrong code at -O1 and above on x86_64-linux-gnu

2022-07-03 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106171 --- Comment #1 from Zhendong Su --- Compiler Explorer: https://godbolt.org/z/eEhKn8x9T