]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/tree-ssa-structalias.c
Merge with trunk.
[thirdparty/gcc.git] / gcc / tree-ssa-structalias.c
index 482b69e072707236ce2e71b1a4ab6ed2f353723b..b08a20e26940896bb7941664f5c0fc44b0aea17d 100644 (file)
@@ -22,7 +22,6 @@
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
-#include "ggc.h"
 #include "obstack.h"
 #include "bitmap.h"
 #include "sbitmap.h"
 #include "tree.h"
 #include "stor-layout.h"
 #include "stmt.h"
+#include "pointer-set.h"
+#include "hash-table.h"
+#include "tree-ssa-alias.h"
+#include "internal-fn.h"
+#include "gimple-expr.h"
+#include "is-a.h"
 #include "gimple.h"
 #include "gimple-iterator.h"
 #include "gimple-ssa.h"
 #include "tree-dfa.h"
 #include "tree-inline.h"
 #include "diagnostic-core.h"
-#include "hash-table.h"
 #include "function.h"
 #include "tree-pass.h"
 #include "alloc-pool.h"
 #include "splay-tree.h"
 #include "params.h"
 #include "alias.h"
-#include "pointer-set.h"
 
 /* The idea behind this analyzer is to generate set constraints from the
    program, then solve the resulting constraints in order to generate the
@@ -3159,29 +3162,6 @@ get_constraint_for_component_ref (tree t, vec<ce_s> *results,
       return;
     }
 
-  /* Handle type-punning through unions.  If we are extracting a pointer
-     from a union via a possibly type-punning access that pointer
-     points to anything, similar to a conversion of an integer to
-     a pointer.  */
-  if (!lhs_p)
-    {
-      tree u;
-      for (u = t;
-          TREE_CODE (u) == COMPONENT_REF || TREE_CODE (u) == ARRAY_REF;
-          u = TREE_OPERAND (u, 0))
-       if (TREE_CODE (u) == COMPONENT_REF
-           && TREE_CODE (TREE_TYPE (TREE_OPERAND (u, 0))) == UNION_TYPE)
-         {
-           struct constraint_expr temp;
-
-           temp.offset = 0;
-           temp.var = anything_id;
-           temp.type = ADDRESSOF;
-           results->safe_push (temp);
-           return;
-         }
-    }
-
   t = get_ref_base_and_extent (t, &bitpos, &bitsize, &bitmaxsize);
 
   /* Pretend to take the address of the base, we'll take care of