diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-22 14:55:48 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-22 14:55:48 +0000 |
commit | e80e26dbccf3025687e6ff283d3b0ea3df323e31 (patch) | |
tree | fa066c45b21e099c0fd6d70615ac22a7b64cf45a /gcc/expr.c | |
parent | c29bc60ba5560af4a645eeab1f350b470ee09513 (diff) | |
parent | 8b450f8859f22b0d3afa8edb42f3f287400d6975 (diff) | |
download | gcc-e80e26dbccf3025687e6ff283d3b0ea3df323e31.tar.gz |
Merge with trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@205263 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 95d24647e75..ec6391d29b0 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -6275,6 +6275,18 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) enum machine_mode mode = GET_MODE (target); icode = (int) optab_handler (vec_init_optab, mode); + /* Don't use vec_init<mode> if some elements have VECTOR_TYPE. */ + if (icode != CODE_FOR_nothing) + { + tree value; + + FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (exp), idx, value) + if (TREE_CODE (TREE_TYPE (value)) == VECTOR_TYPE) + { + icode = CODE_FOR_nothing; + break; + } + } if (icode != CODE_FOR_nothing) { unsigned int i; @@ -6352,8 +6364,8 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) if (vector) { - /* Vector CONSTRUCTORs should only be built from smaller - vectors in the case of BLKmode vectors. */ + /* vec_init<mode> should not be used if there are VECTOR_TYPE + elements. */ gcc_assert (TREE_CODE (TREE_TYPE (value)) != VECTOR_TYPE); RTVEC_ELT (vector, eltpos) = expand_normal (value); |