[Bug middle-end/110282] Segmentation fault with specific optimizations

2025-04-16 Thread mcccs at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110282 --- Comment #14 from mcccs at gmx dot com --- Minimized testcase: int a[], d[]; long b, c, e, g; int f, h, i; short j, k, l; int *m = a; static int *n(int *o) { int p = l == *o | k <= j; p = *d; h = c; g = 0 == e; f = *m; b = 0; re

[Bug middle-end/110282] Segmentation fault with specific optimizations

2025-04-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110282 --- Comment #13 from Sam James --- No problem -- you may want to do -Werror=return-type -Werror=uninitialized -Werror=sequence-point as well to reduce the chance of reducing to something bogus. (-Werror=return-type would catch that issue I menti

[Bug middle-end/110282] Segmentation fault with specific optimizations

2025-04-15 Thread mcccs at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110282 --- Comment #12 from mcccs at gmx dot com --- Thanks Sam, I'm restarting reduction this time checking if it compiles with trunk GCC as well

[Bug middle-end/110282] Segmentation fault with specific optimizations

2025-04-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110282 --- Comment #11 from Sam James --- (In reply to mcccs from comment #10) Using the return value of e() when it didn't return anything is undefined.

[Bug middle-end/110282] Segmentation fault with specific optimizations

2025-04-15 Thread mcccs at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110282 --- Comment #10 from mcccs at gmx dot com --- Bad commit: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ff6686d2e5f797d6c6a36ad14a7084bc1dc350e4 Minimal testcase: int a[]; short b, c; long d; __attribute__((noipa)) long(e)() {} static int f(in

[Bug middle-end/110282] Segmentation fault with specific optimizations

2025-04-15 Thread mcccs at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110282 --- Comment #9 from mcccs at gmx dot com --- Sorry never mind I understand, it should still be bisected and reduced so that any hidden bugs would be uncovered. I'll bisect it

[Bug middle-end/110282] Segmentation fault with specific optimizations

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

[Bug middle-end/110282] Segmentation fault with specific optimizations

2023-06-30 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110282 --- Comment #7 from Xi Ruoyao --- (In reply to CTC from comment #6) > Another related and smaller reproducer: > > # cat tmp.i > main() { > int *a = 0; > int b = *a; > } No, this is an undefined behavior and the compiler is allowed to gener

[Bug middle-end/110282] Segmentation fault with specific optimizations

2023-06-30 Thread 19373742 at buaa dot edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110282 --- Comment #6 from CTC <19373742 at buaa dot edu.cn> --- Another related and smaller reproducer: # cat tmp.i main() { int *a = 0; int b = *a; }

[Bug middle-end/110282] Segmentation fault with specific optimizations

2023-06-19 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110282 --- Comment #5 from Andrew Pinski --- Note I suspect r12-248-gb58dc0b803057c0e6032e0d9b made the problem latent in GCC 12+. But turning off DSE in GCC 12.1.0 does not reproduce the bug

[Bug middle-end/110282] Segmentation fault with specific optimizations

2023-06-19 Thread 19373742 at buaa dot edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110282 --- Comment #4 from CTC <19373742 at buaa dot edu.cn> --- (In reply to Richard Biener from comment #3) > Confirmed behavior also with GCC 10, with -fno-bit-tests -fbit-tests > -fno-ipa-modref -fipa-modref removed. > > Can you please adjust your

[Bug middle-end/110282] Segmentation fault with specific optimizations

2023-06-18 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110282 Richard Biener changed: What|Removed |Added Known to fail||10.4.0, 11.1.0, 11.3.0 Known to w

[Bug middle-end/110282] Segmentation fault with specific optimizations

2023-06-16 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110282 Xi Ruoyao changed: What|Removed |Added CC||xry111 at gcc dot gnu.org --- Comment #2 fr