If the result from SSA_NAME_DEF_STMT is NULL, we could try to
dereference it anyway and ICE. Avoid this.
gcc/ChangeLog:
* config/bpf/bpf.c (handle_attr_preserve): Avoid calling
is_gimple_assign with a NULL pointer.
&& TREE_CODE (TREE_OPERAND (expr, 0)) == SSA_NAME)
{
gimple *def_stmt = SSA_NAME_DEF_STMT (TREE_OPERAND (expr, 0));
- if (is_gimple_assign (def_stmt))
+ if (def_stmt && is_gimple_assign (def_stmt))
expr = gimple_assign_rhs1 (def_stmt);
}