[Bug middle-end/111615] NULL check incorrectly skipped at O2 and O3

2023-09-27 Thread gardner.ben at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111615 --- Comment #6 from Ben Gardner --- (In reply to Andrew Pinski from comment #5) > extern void *memmem (const void *__haystack, size_t __haystacklen, >const void *__needle, size_t __needlelen) > __attribute__ ((__nothrow__ , __leaf__

[Bug middle-end/111615] NULL check incorrectly skipped at O2 and O3

2023-09-27 Thread gardner.ben at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111615 --- Comment #3 from Ben Gardner --- The issue isn't with memmem(). It is with the value passed into pr_str() from the structure. I suspect memmem() is a distraction. I'll try to further reduce the test case to eliminate memmem(), if possible.

[Bug c/111615] NULL check incorrectly skipped at O2 and O3

2023-09-27 Thread gardner.ben at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111615 --- Comment #1 from Ben Gardner --- Created attachment 56004 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56004&action=edit Build script.

[Bug c/111615] New: NULL check incorrectly skipped at O2 and O3

2023-09-27 Thread gardner.ben at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111615 Bug ID: 111615 Summary: NULL check incorrectly skipped at O2 and O3 Product: gcc Version: 11.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c