[Bug tree-optimization/78886] [5/6 Regression] Segmentation fault malloc and volatile

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 22 13:46:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78886

--- Comment #8 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #5)
> I'd say tree-ssa-strlen.c is not the pass that should remove the malloc.

We probably want another PR about this, because a malloc whose return value is
ignored should not have survived all the way to the strlen pass.
gimple_fold_builtin looks like a place where we could handle this. I don't know
if there is some attribute that could be put on malloc so that DCE would handle
it automatically...


More information about the Gcc-bugs mailing list