[Bug middle-end/95189] [10/11 Regression] memcmp being wrongly stripped like strcmp

2020-07-13 Thread jerryfromearth at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189 --- Comment #10 from Jiarui Hong --- Please note that there seems to be two issues here that affect different versions of gcc: (From the comment of g...@pkh.me) https://godbolt.org/z/xc59TM This fails in 9.3.0 but works in 10.1.0. (From the

[Bug tree-optimization/96007] New: -O2 miscompiles memcmp an object with a string literal containing '\0'

2020-06-30 Thread jerryfromearth at gmail dot com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: jerryfromearth at gmail dot com Target Milestone: --- Hi, While comparing an object to a literal string that contains "\0" (e.g. memcmp((), "\0\0\0\0\