[Bug tree-optimization/92157] [10 Regression] incorrect strcmp() == 0 result for unknown strings
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Oct 18 20:02:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92157
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Keywords| |wrong-code
Last reconfirmed| |2019-10-18
Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org
Blocks| |83819
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=92155
Ever confirmed|0 |1
Summary|incorrect strcmp() == 0 |[10 Regression] incorrect
|result for unknown strings |strcmp() == 0 result for
| |unknown strings
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
The test for the optimization, strlenopt-69.c, actually passes because of the
bug, and also because of the missing memset optimization reported in pr92155.
The test_empty_string() function calls memset to zero out two arrays, a and b,
and expects strcmp(a, b) == 0 to be folded to true. It is folded, but not
because the strlen pass knows the strings are the same (the missing
optimization), but because of this bug.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83819
[Bug 83819] [meta-bug] missing strlen optimizations
More information about the Gcc-bugs
mailing list