+2006-06-22 Roger Sayle <roger@eyesopen.com>
+ John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR middle-end/28131
+ * expr.c (expand_expr_real_1) <VECTOR_CST>: Check whether the
+ call to lang_hooks.types.type_for_mode returned NULL_TREE.
+
2006-06-23 Ben Elliston <bje@au.ibm.com>
* dfp.c (decimal_to_decnumber): Do not use decNumberNegate to
|| GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
return const_vector_from_tree (exp);
if (GET_MODE_CLASS (mode) == MODE_INT)
- tmp = fold_unary (VIEW_CONVERT_EXPR,
- lang_hooks.types.type_for_mode (mode, 1),
- exp);
+ {
+ tree type_for_mode = lang_hooks.types.type_for_mode (mode, 1);
+ if (type_for_mode)
+ tmp = fold_unary (VIEW_CONVERT_EXPR, type_for_mode, exp);
+ }
if (!tmp)
tmp = build_constructor_from_list (type,
TREE_VECTOR_CST_ELTS (exp));