diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/expr.c | 8 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8777019..6574cc8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +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 @@ -6945,9 +6945,11 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, || 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)); |