[Bug tree-optimization/104657] array subscript 0 is outside array bounds

2022-02-23 Thread christophm30 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104657 --- Comment #5 from Christoph Müllner --- Creating hard-wired object references might be a solution, but there is a lot of existing code out there, that would need to be patched (including all the hassle with support for old and new compilers).

[Bug tree-optimization/104657] array subscript 0 is outside array bounds

2022-02-23 Thread christophm30 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104657 --- Comment #4 from Christoph Müllner --- Thanks for mentioning the volatile pointer method. However, the pragma-solution results in better code (fewer instructions and does not require a valid stack pointer). I've used the code below to see wh

[Bug tree-optimization/104657] array subscript 0 is outside array bounds

2022-02-23 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104657 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #3

[Bug tree-optimization/104657] array subscript 0 is outside array bounds

2022-02-23 Thread christophm30 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104657 --- Comment #2 from Christoph Müllner --- Thanks for referencing pr99578. Based on the information there, I created the following workaround: void foo(unsigned long v) { volatile unsigned long *p; p = (volatile unsigned long*)8;

[Bug tree-optimization/104657] array subscript 0 is outside array bounds

2022-02-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104657 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---