Commit b8b7f162 by Roger Sayle Committed by Roger Sayle

tree.c (build_int_cst_wide): Add an assertion (gcc_unreachable) when attempting…

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
parent 845e145b
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> 2006-11-10 Jan Hubicka <jh@suse.cz>
* cse.c (cse_process_notes): Copy the propagated value. * cse.c (cse_process_notes): Copy the propagated value.
......
...@@ -4976,17 +4976,17 @@ make_tree (tree type, rtx x) ...@@ -4976,17 +4976,17 @@ make_tree (tree type, rtx x)
case CONST_VECTOR: case CONST_VECTOR:
{ {
int i, units; int units = CONST_VECTOR_NUNITS (x);
rtx elt; tree itype = TREE_TYPE (type);
tree t = NULL_TREE; tree t = NULL_TREE;
int i;
units = CONST_VECTOR_NUNITS (x);
/* Build a tree with vector elements. */ /* Build a tree with vector elements. */
for (i = units - 1; i >= 0; --i) for (i = units - 1; i >= 0; --i)
{ {
elt = CONST_VECTOR_ELT (x, i); rtx elt = CONST_VECTOR_ELT (x, i);
t = tree_cons (NULL_TREE, make_tree (type, elt), t); t = tree_cons (NULL_TREE, make_tree (itype, elt), t);
} }
return build_vector (type, t); return build_vector (type, t);
......
...@@ -844,8 +844,12 @@ build_int_cst_wide (tree type, unsigned HOST_WIDE_INT low, HOST_WIDE_INT hi) ...@@ -844,8 +844,12 @@ build_int_cst_wide (tree type, unsigned HOST_WIDE_INT low, HOST_WIDE_INT hi)
ix = 0; ix = 0;
} }
break; break;
default:
case ENUMERAL_TYPE:
break; break;
default:
gcc_unreachable ();
} }
if (ix >= 0) if (ix >= 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment