FreeBSD/contrib/gcc/tree-ssa-alias-warnings.c
/* Try to get more location info when something is missing.
   OBJECT1 and OBJECT2 are aliased names.  If IS_PTR1 or IS_PTR2, the alias
   is on the memory referenced or pointed to by OBJECT1 and OBJECT2.
   ALIAS_SITE, DEREF_SITE1 and DEREF_SITE2 are the statements where the
   alias takes place (some pointer assignment usually) and where the
   alias is referenced through OBJECT1 and OBJECT2 respectively.
   REF_TYPE1 and REF_TYPE2 will return the type of the reference at the
   respective sites.  Only the first matching reference is returned for
   each name.  If no statement is found, the function header is returned.  */
Try to get more location info when something is missing.
OBJECT1 and OBJECT2 are aliased names.  If IS_PTR1 or IS_PTR2, the alias
is on the memory referenced or pointed to by OBJECT1 and OBJECT2.
ALIAS_SITE, DEREF_SITE1 and DEREF_SITE2 are the statements where the
alias takes place (some pointer assignment usually) and where the
alias is referenced through OBJECT1 and OBJECT2 respectively.
REF_TYPE1 and REF_TYPE2 will return the type of the reference at the
respective sites.  Only the first matching reference is returned for
each name.  If no statement is found, the function header is returned.
Try to get more location info when something is missing . OBJECT1 and OBJECT2 are aliased names . If IS_PTR1 or IS_PTR2 the alias is on the memory referenced or pointed to by OBJECT1 and OBJECT2 . ALIAS_SITE DEREF_SITE1 and DEREF_SITE2 are the statements where the alias takes place ( some pointer assignment usually ) and where the alias is referenced through OBJECT1 and OBJECT2 respectively . REF_TYPE1 and REF_TYPE2 will return the type of the reference at the respective sites . Only the first matching reference is returned for each name . If no statement is found the function header is returned .
static void
maybe_find_missing_stmts (tree object1, bool is_ptr1,
                          tree object2, bool is_ptr2,
                          tree *alias_site,
                          tree *deref_site1,
                          tree *deref_site2)
{
  if (object1 && object2)
    {
      if (!*alias_site || !EXPR_HAS_LOCATION (*alias_site))
	*alias_site = find_alias_site (object1, is_ptr1, object2, is_ptr2);
      if (!*deref_site1 || !EXPR_HAS_LOCATION (*deref_site1))
	*deref_site1 = reference_site (object1, is_ptr1);
      if (!*deref_site2 || !EXPR_HAS_LOCATION (*deref_site2))
	*deref_site2 = reference_site (object2, is_ptr2);
    }
  if (!*alias_site)
    {
      if (*deref_site1)
	*alias_site = *deref_site1;
      else if (*deref_site2)
	*alias_site = *deref_site2;
    }
  if (!*deref_site1 && *alias_site)
    *deref_site1 = *alias_site;
  if (!*deref_site2 && *alias_site)
    *deref_site2 = *alias_site;
}
static void maybe_find_missing_stmts ( tree object1 , bool is_ptr1 , tree object2 , bool is_ptr2 , tree * alias_site , tree * deref_site1 , tree * deref_site2 ) { if ( object1 && object2 ) { if ( ! * alias_site || ! EXPR_HAS_LOCATION ( * alias_site ) ) * alias_site = find_alias_site ( object1 , is_ptr1 , object2 , is_ptr2 ) ; if ( ! * deref_site1 || ! EXPR_HAS_LOCATION ( * deref_site1 ) ) * deref_site1 = reference_site ( object1 , is_ptr1 ) ; if ( ! * deref_site2 || ! EXPR_HAS_LOCATION ( * deref_site2 ) ) * deref_site2 = reference_site ( object2 , is_ptr2 ) ; } if ( ! * alias_site ) { if ( * deref_site1 ) * alias_site = * deref_site1 ; else if ( * deref_site2 ) * alias_site = * deref_site2 ; } if ( ! * deref_site1 && * alias_site ) * deref_site1 = * alias_site ; if ( ! * deref_site2 && * alias_site ) * deref_site2 = * alias_site ; }
Try to get more location info when something is missing.
Try to get more location info when something is missing .
/* If we could not find the alias site, set it to one of the dereference
     sites, if available.  */ /* If we could not find the dereference sites, set them to the alias site,
     if known.  */