aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2006-11-11 01:47:18 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2006-11-11 01:47:18 +0000
commitb8b7f1621f4c8270babb2a492e3f58413a368741 (patch)
tree44698d4692f54c1fccaf5bfd54844b6aeb857b34 /gcc
parent845e145b6d78551fda4bf8fea6c5b3634b0fb71f (diff)
downloadgcc-b8b7f1621f4c8270babb2a492e3f58413a368741.zip
gcc-b8b7f1621f4c8270babb2a492e3f58413a368741.tar.gz
gcc-b8b7f1621f4c8270babb2a492e3f58413a368741.tar.bz2
tree.c (build_int_cst_wide): Add an assertion (gcc_unreachable) when attempting to build INTEGER_CSTs of...
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/expmed.c10
-rw-r--r--gcc/tree.c6
3 files changed, 17 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index da4b39e..7f38662 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 0f3a14d..b044780 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -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);
diff --git a/gcc/tree.c b/gcc/tree.c
index 5886e18..6f8dc86 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -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)