FreeBSD/contrib/gcc/tree-ssa-alias-warnings.c
/* Returns true when *PTR may not be aliased to ALIAS.
   See C standard 6.5p7 and C++ standard 3.10p15.
   If PTR_PTR is true, ALIAS represents a pointer or reference to the
   aliased storage rather than its actual name.  */
Returns true when *PTR may not be aliased to ALIAS.
Returns true when * PTR may not be aliased to ALIAS .
static bool
nonstandard_alias_p (tree ptr, tree alias, bool ptr_ptr)
{
  tree ptr_type = get_otype (ptr, true);
  tree alias_type = get_otype (alias, ptr_ptr);
  if (var_ann (get_ssa_base (alias))->escape_mask != NO_ESCAPE)
      return false;
  if (struct_class_union_p (ptr_type) || struct_class_union_p (alias_type))
    return false;
  if (struct_field_tag_p (alias))
     return false;
  if (find_first_artificial_name (ptr) && find_first_artificial_name (alias))
    return false;
  return nonstandard_alias_types_p (ptr_type, alias_type);
}
static bool nonstandard_alias_p ( tree ptr , tree alias , bool ptr_ptr ) { tree ptr_type = get_otype ( ptr , true ) ; tree alias_type = get_otype ( alias , ptr_ptr ) ; if ( var_ann ( get_ssa_base ( alias ) ) -> escape_mask != NO_ESCAPE ) return false ; if ( struct_class_union_p ( ptr_type ) || struct_class_union_p ( alias_type ) ) return false ; if ( struct_field_tag_p ( alias ) ) return false ; if ( find_first_artificial_name ( ptr ) && find_first_artificial_name ( alias ) ) return false ; return nonstandard_alias_types_p ( ptr_type , alias_type ) ; }
Returns true when *PTR may not be aliased to ALIAS.
Returns true when * PTR may not be aliased to ALIAS .
/* Find the types to compare.  */ /* XXX: for now, say it's OK if the alias escapes.
     Not sure this is needed in general, but otherwise GCC will not
     bootstrap.  */ /* XXX: don't get into structures for now.  It brings much complication
     and little benefit.  */ /* XXX: In 4.2.1, field resolution in alias is not as good as in pre-4.3
     This fixes problems found during the backport, where a pointer to the
     first field of a struct appears to be aliased to the whole struct.  */ /* If they are both SSA names of artificials, let it go, the warning
     is too confusing.  */ /* Compare the types.  */