[Bug tree-optimization/92765] [10 Regression] Wrong code caused by folding of -Wstring-compare since r276773
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 3 16:35:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92765
--- Comment #12 from Martin Sebor <msebor at gcc dot gnu.org> ---
The __builtin_strcmp(ptr->header.magic, "x") call in comment #0 is undefined
because the two-element array ptr->header.magic is not a nul-terminated string.
The warning was designed to point that out.
Removing the call removes the bug from the test case and lets it run to
completion.
More information about the Gcc-bugs
mailing list