]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree.c (build_int_cst_wide): Add an assertion (gcc_unreachable) when attempting to...
authorRoger Sayle <roger@eyesopen.com>
Sat, 11 Nov 2006 01:47:18 +0000 (01:47 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sat, 11 Nov 2006 01:47:18 +0000 (01:47 +0000)
* tree.c (build_int_cst_wide): Add an assertion (gcc_unreachable)
when attempting to build INTEGER_CSTs of non-integral types.
* expmed.c (make_tree): Use the correct type, i.e. the inner
type, when constructing the individual elements of a CONST_VECTOR.

From-SVN: r118678

gcc/ChangeLog
gcc/expmed.c
gcc/tree.c

index da4b39e3659d9500bfebe2e1da437452ca071542..7f38662fced496a876ce71f485ec0379a1f0fea6 100644 (file)
@@ -1,3 +1,10 @@
+2006-11-10  Roger Sayle  <roger@eyesopen.com>
+
+       * tree.c (build_int_cst_wide): Add an assertion (gcc_unreachable)
+       when attempting to build INTEGER_CSTs of non-integral types.
+       * expmed.c (make_tree): Use the correct type, i.e. the inner
+       type, when constructing the individual elements of a CONST_VECTOR.
+
 2006-11-10  Jan Hubicka  <jh@suse.cz>
 
        * cse.c (cse_process_notes): Copy the propagated value.
index 0f3a14df509aaeeb72cf93df63418acbd342bc3b..b044780d71c9ad68a473350862604dae69e8cfb6 100644 (file)
@@ -4976,17 +4976,17 @@ make_tree (tree type, rtx x)
 
     case CONST_VECTOR:
       {
-       int i, units;
-       rtx elt;
+       int units = CONST_VECTOR_NUNITS (x);
+       tree itype = TREE_TYPE (type);
        tree t = NULL_TREE;
+       int i;
 
-       units = CONST_VECTOR_NUNITS (x);
 
        /* Build a tree with vector elements.  */
        for (i = units - 1; i >= 0; --i)
          {
-           elt = CONST_VECTOR_ELT (x, i);
-           t = tree_cons (NULL_TREE, make_tree (type, elt), t);
+           rtx elt = CONST_VECTOR_ELT (x, i);
+           t = tree_cons (NULL_TREE, make_tree (itype, elt), t);
          }
 
        return build_vector (type, t);
index 5886e18da0a2ce3b71ba013007d8ab5b33dcccc2..6f8dc86e3af7954ab3629e424a5080bb12f2a752 100644 (file)
@@ -844,8 +844,12 @@ build_int_cst_wide (tree type, unsigned HOST_WIDE_INT low, HOST_WIDE_INT hi)
            ix = 0;
        }
       break;
-    default:
+
+    case ENUMERAL_TYPE:
       break;
+
+    default:
+      gcc_unreachable ();
     }
 
   if (ix >= 0)