[Bug tree-optimization/120182] Incorrect code with -O3 and constant addresses

2025-05-08 Thread mcccs at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120182 --- Comment #5 from mcccs at gmx dot com --- Created attachment 61376 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61376&action=edit gimple before store-merging Simplified gimple before the store-merging pass. If you want it to be optimi

[Bug tree-optimization/120182] Incorrect code with -O3 and constant addresses

2025-05-08 Thread mcccs at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120182 --- Comment #4 from mcccs at gmx dot com --- By comparing S2 = 256 and S2 = 255, the brokenness and the major difference is first outputted by the store-merging pass. [local count: 39764240]: MEM[(struct S *)2654208B].next = 256B; MEM[(ch

[Bug tree-optimization/120182] Incorrect code with -O3 and constant addresses

2025-05-08 Thread mcccs at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120182 --- Comment #3 from mcccs at gmx dot com --- MEM [(void *)2654208B] = 256; MEM[(char *)2654209B] = 0; MEM[(char *)2654210B] = 0; MEM[(char *)2654211B] = 0; MEM[(char *)2654212B] = 0; MEM[(char *)2654213B] = 0; MEM[(char *)2654214B]

[Bug tree-optimization/120182] Incorrect code with -O3 and constant addresses

2025-05-08 Thread mcccs at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120182 mcccs at gmx dot com changed: What|Removed |Added CC||mcccs at gmx dot com --- Comment

[Bug tree-optimization/120182] Incorrect code with -O3 and constant addresses

2025-05-08 Thread mcccs at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120182 --- Comment #2 from mcccs at gmx dot com --- Unsurprisingly the following also fails, but if you change always_inline to noipa it works __attribute__((always_inline)) inline char * x() { return (char *)0x288000ull; } int main (void) { int s