Index: ChangeLog =================================================================== --- ChangeLog (revision 124139) +++ ChangeLog (working copy) @@ -1,3 +1,10 @@ +2007-04-24 Andrew Pinski + Roger Sayle + + PR middle-end/30222 + * expmed.c (make_tree): Use the correct type, i.e. the inner + type, when constructing the individual elements of a CONST_VECTOR. + 2007-04-24 Ian Lance Taylor PR tree-optimization/31605 Index: expmed.c =================================================================== --- expmed.c (revision 124139) +++ expmed.c (working copy) @@ -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);