* tree-ssa-dom.c (dom_opt_finalize_block): Fix violation of strict
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Sep 2004 22:31:13 +0000 (22:31 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Sep 2004 22:31:13 +0000 (22:31 +0000)
aliasing rules.
(simplify_cond_and_lookup_avail_expr): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88077 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-ssa-dom.c

index ddfa56b..9ff33e2 100644 (file)
@@ -1,3 +1,9 @@
+2004-09-24 Jeff Law  <law@redhat.com>
+
+       * tree-ssa-dom.c (dom_opt_finalize_block): Fix violation of strict
+       aliasing rules.
+       (simplify_cond_and_lookup_avail_expr): Likewise.
+
 2004-09-24  Joseph S. Myers  <jsm@polyomino.org.uk>
 
        PR c/12802
index 97ee199..8bce1c3 100644 (file)
@@ -978,7 +978,7 @@ dom_opt_finalize_block (struct dom_walk_data *walk_data, basic_block bb)
   while (VARRAY_ACTIVE_SIZE (vrp_variables_stack) > 0)
     {
       tree var = VARRAY_TOP_TREE (vrp_variables_stack);
-      struct vrp_hash_elt vrp_hash_elt;
+      struct vrp_hash_elt vrp_hash_elt, *vrp_hash_elt_p;
       void **slot;
 
       /* Each variable has a stack of value range records.  We want to
@@ -998,7 +998,9 @@ dom_opt_finalize_block (struct dom_walk_data *walk_data, basic_block bb)
 
       slot = htab_find_slot (vrp_data, &vrp_hash_elt, NO_INSERT);
 
-      var_vrp_records = (*(struct vrp_hash_elt **)slot)->records;
+      vrp_hash_elt_p = (struct vrp_hash_elt *) *slot;
+      var_vrp_records = vrp_hash_elt_p->records;
+
       while (VARRAY_ACTIVE_SIZE (var_vrp_records) > 0)
        {
          struct vrp_element *element
@@ -1894,7 +1896,7 @@ simplify_cond_and_lookup_avail_expr (tree stmt,
          int lowequal, highequal, swapped, no_overlap, subset, cond_inverted;
          varray_type vrp_records;
          struct vrp_element *element;
-         struct vrp_hash_elt vrp_hash_elt;
+         struct vrp_hash_elt vrp_hash_elt, *vrp_hash_elt_p;
          void **slot;
 
          /* First see if we have test of an SSA_NAME against a constant
@@ -1944,7 +1946,8 @@ simplify_cond_and_lookup_avail_expr (tree stmt,
           if (slot == NULL)
            return NULL;
 
-         vrp_records = (*(struct vrp_hash_elt **)slot)->records;
+         vrp_hash_elt_p = (struct vrp_hash_elt *) *slot;
+         vrp_records = vrp_hash_elt_p->records;
          if (vrp_records == NULL)
            return NULL;