[Bug tree-optimization/87314] pointless comparison of malloc result to a string not eliminated
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 3 11:16:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87314
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #7)
> Is it safe with -fmerge-all-constants if the decls are TREE_READONLY?
I don't think DECL vs STRING_CST is any special here (or well, STRING_CSTs
will end up in mergeable string sections). It's probably more a question
for
const int a = 2;
const int b = 2;
int main() { return &a != &b; }
which we "miscompile" since forever with -fmerge-all-constants.
More information about the Gcc-bugs
mailing list