tree-ssa-dom.c (dom_opt_finalize_block): Fix violation of strict aliasing rules.
authorJeff Law <law@redhat.com>
Fri, 24 Sep 2004 22:31:13 +0000 (16:31 -0600)
committerJeff Law <law@gcc.gnu.org>
Fri, 24 Sep 2004 22:31:13 +0000 (16:31 -0600)
* tree-ssa-dom.c (dom_opt_finalize_block): Fix violation of strict
aliasing rules.
(simplify_cond_and_lookup_avail_expr): Likewise.

From-SVN: r88077

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

index ddfa56b14408052b795a72008bb2c9dd20350c63..9ff33e2e53463473ea58c7a27274f3405f36f559 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 97ee199751533732bb88ca930c39fda376816079..8bce1c3a9aa06db38a23b388b4a136040f591428 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;