On Tue, 2020-02-11 at 16:01 -0700, Martin Sebor wrote:
> Along with some special handling of calloc calls, r272717 introduced
> the assumption into stmt_kills_ref_p that the value returned from
> the call is used. The code triggers an ICE when invoked during DCE
> in an attempt to determine whether a calloc call can be eliminated.
>
> To avoid the ICE the attached patch avoids using the return value if
> it's not set.
>
> Tested on x86_64-linux.
>
> PR tree-optimization/93683 - ICE on calloc with unused return value in
> ao_ref_init_from_ptr_and_size
>
> gcc/testsuite/ChangeLog:
>
> PR tree-optimization/93683
> * gcc.dg/tree-ssa/ssa-dse-39.c: New test.
>
> gcc/ChangeLog:
>
> PR tree-optimization/93683
> * tree-ssa-alias.c (stmt_kills_ref_p): Avoid using LHS when not set.
OK
jeff