/* Alias analysis for trees.
- Copyright (C) 2004-2018 Free Software Foundation, Inc.
+ Copyright (C) 2004-2019 Free Software Foundation, Inc.
Contributed by Diego Novillo <dnovillo@redhat.com>
This file is part of GCC.
return true;
}
- /* Non-aliased variables can not be pointed to. */
+ /* Non-aliased variables cannot be pointed to. */
if (!may_be_aliased (decl))
return false;
}
else
{
+ gcc_assert (POINTER_TYPE_P (TREE_TYPE (ptr)));
ref->base = build2 (MEM_REF, char_type_node,
ptr, null_pointer_node);
ref->offset = 0;
/* Be conservative with non-call exceptions when the address might
be NULL. */
- if (flag_non_call_exceptions && pi->pt.null)
+ if (cfun->can_throw_non_call_exceptions && pi->pt.null)
return false;
/* Check that ptr points relative to obj. */
??? We only need to care about the RHS throwing. For aggregate
assignments or similar calls and non-call exceptions the LHS
might throw as well. */
- && !stmt_can_throw_internal (stmt))
+ && !stmt_can_throw_internal (cfun, stmt))
{
tree lhs = gimple_get_lhs (stmt);
/* If LHS is literally a base of the access we are done. */