diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-23 02:01:30 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-23 02:01:30 +0000 |
commit | 231c1565139ea28c28e21447bc824787f1ac5e31 (patch) | |
tree | 51061fe9ec006508fc227b11971025086131aea0 /gcc/expr.c | |
parent | f11164aa647603361ea0a5368cbeff81ec1061bd (diff) | |
download | gcc-231c1565139ea28c28e21447bc824787f1ac5e31.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114923 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 562588a4481..e46e3e787bd 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -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)); |