https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78886
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |glisse at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org --- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> --- Following patch fixes that: diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index 67075f07e29..4a05725ca7c 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -1869,6 +1869,9 @@ handle_builtin_malloc (enum built_in_function bcode, gimple_stmt_iterator *gsi) { gimple *stmt = gsi_stmt (*gsi); tree lhs = gimple_call_lhs (stmt); + if (lhs == NULL_TREE) + return; + gcc_assert (get_stridx (lhs) == 0); int idx = new_stridx (lhs); tree length = NULL_TREE; If Mark Glisse, the author of the handle_builtin_malloc function, is fine, I'll test that.