[Bug tree-optimization/120616] Incorrect code with -O3 and compound literal

2025-06-09 Thread fanghs666 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120616 --- Comment #5 from Jia-Xien Fang --- It seems I can only try modifying the literal initialization to match how the data is being used. Thanks for the explanation!

[Bug tree-optimization/120616] Incorrect code with -O3 and compound literal

2025-06-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120616 --- Comment #4 from Andrew Pinski --- (In reply to Jia-Xien Fang from comment #3) > Is there any ways to perform the cast for the parameter without using > -fno-strict-aliasing? The issue is not the cast but what type the load and store are don

[Bug tree-optimization/120616] Incorrect code with -O3 and compound literal

2025-06-09 Thread fanghs666 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120616 --- Comment #3 from Jia-Xien Fang --- Is there any ways to perform the cast for the parameter without using -fno-strict-aliasing?

[Bug tree-optimization/120616] Incorrect code with -O3 and compound literal

2025-06-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120616 --- Comment #2 from Andrew Pinski --- changing the type of the compound literal to `long[]` instead of `long long[]` works. Also using -fno-strict-aliasing also allows the code to do the "right thing".

[Bug tree-optimization/120616] Incorrect code with -O3 and compound literal

2025-06-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120616 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED