re PR tree-optimization/65551 (FAIL: 26_numerics/complex/50880.cc execution test)
authorJakub Jelinek <jakub@redhat.com>
Thu, 26 Mar 2015 19:17:44 +0000 (20:17 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 26 Mar 2015 19:17:44 +0000 (20:17 +0100)
PR tree-optimization/65551
* tree-ssa-sccvn.c (fully_constant_vn_reference_p): Use
TYPE_PRECISION only for INTEGRAL_TYPE_P types.

From-SVN: r221702

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

index f9ea6a0891fe3f74cf48f76a4b6ee4ee1c2a9ce4..50610b51a7fc04f6337edb56818025c659f4884c 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-26  Jakub Jelinek  <jakub@redhat.com>
+
+       PR tree-optimization/65551
+       * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Use
+       TYPE_PRECISION only for INTEGRAL_TYPE_P types.
+
 2015-03-26  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/65555
index e417a1536efc0a087bc3bdd232c23d56693152ee..46ce285d9c7edb631a17fd027da7e47703f0ac14 100644 (file)
@@ -1352,7 +1352,11 @@ fully_constant_vn_reference_p (vn_reference_t ref)
               || TYPE_PRECISION (ref->type) % BITS_PER_UNIT == 0))
     {
       HOST_WIDE_INT off = 0;
-      HOST_WIDE_INT size = TYPE_PRECISION (ref->type);
+      HOST_WIDE_INT size;
+      if (INTEGRAL_TYPE_P (ref->type))
+       size = TYPE_PRECISION (ref->type);
+      else
+       size = tree_to_shwi (TYPE_SIZE (ref->type));
       if (size % BITS_PER_UNIT != 0
          || size > MAX_BITSIZE_MODE_ANY_MODE)
        return NULL_TREE;