OSDN Git Service

* i386.c (legitimize_pic_address): Fix splitting of PLUS with
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-alias.c
index 801de5b..ae06ea0 100644 (file)
@@ -694,6 +694,9 @@ compute_points_to_and_addr_escape (struct alias_info *ai)
              bitmap_set_bit (ai->written_vars, ann->uid);
              if (may_be_aliased (var))
                (VARRAY_UINT (ai->num_references, ann->uid))++;
+
+             if (POINTER_TYPE_P (TREE_TYPE (op)))
+               collect_points_to_info_for (ai, op);
            }
 
          /* Mark variables in V_MAY_DEF operands as being written to.  */
@@ -977,7 +980,6 @@ compute_flow_insensitive_aliasing (struct alias_info *ai)
        {
          struct alias_map_d *p_map2 = ai->pointers[j];
          tree tag2 = var_ann (p_map2->var)->type_mem_tag;
-         var_ann_t tag2_ann = var_ann (tag2);
          sbitmap may_aliases2 = p_map2->may_aliases;
 
          /* If the pointers may not point to each other, do nothing.  */
@@ -999,8 +1001,6 @@ compute_flow_insensitive_aliasing (struct alias_info *ai)
              EXECUTE_IF_SET_IN_SBITMAP (may_aliases2, 0, k,
                  add_may_alias (tag1, referenced_var (k)));
              sbitmap_a_or_b (may_aliases1, may_aliases1, may_aliases2);
-             sbitmap_zero (may_aliases2);
-             tag2_ann->may_aliases = NULL;
            }
          else
            {
@@ -1790,7 +1790,7 @@ add_pointed_to_var (struct alias_info *ai, tree ptr, tree value)
   gcc_assert (TREE_CODE (value) == ADDR_EXPR);
 
   pt_var = TREE_OPERAND (value, 0);
-  if (TREE_CODE_CLASS (TREE_CODE (pt_var)) == 'r')
+  if (REFERENCE_CLASS_P (pt_var))
     pt_var = get_base_address (pt_var);
 
   if (pt_var && SSA_VAR_P (pt_var))
@@ -1834,6 +1834,12 @@ collect_points_to_info_r (tree var, tree stmt, void *data)
 
   switch (TREE_CODE (stmt))
     {
+    case RETURN_EXPR:
+      if (TREE_CODE (TREE_OPERAND (stmt, 0)) != MODIFY_EXPR)
+       abort ();
+      stmt = TREE_OPERAND (stmt, 0);
+      /* FALLTHRU  */
+
     case MODIFY_EXPR:
       {
        tree rhs = TREE_OPERAND (stmt, 1);