diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-04 02:10:05 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-04 02:10:05 +0000 |
commit | 1ba56394133cf064d0b3ed1d80aab88c6790dd30 (patch) | |
tree | f8cfb26c56f8017a9b1ecb575af8d9081c7b8277 /gcc/cp/init.c | |
parent | c716fee0e310ddfb33488e4bffc47b5db408f75e (diff) | |
download | gcc-1ba56394133cf064d0b3ed1d80aab88c6790dd30.tar.gz |
PR c++/40948
* init.c (build_vec_init): Look through a TARGET_EXPR around a
CONSTRUCTOR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150394 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 3da8ab8464c..4462428321b 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2695,6 +2695,12 @@ build_vec_init (tree base, tree maxindex, tree init, gcc_assert (!init); inner_elt_type = strip_array_types (type); + + /* Look through the TARGET_EXPR around a compound literal. */ + if (init && TREE_CODE (init) == TARGET_EXPR + && TREE_CODE (TARGET_EXPR_INITIAL (init)) == CONSTRUCTOR) + init = TARGET_EXPR_INITIAL (init); + if (init && TREE_CODE (atype) == ARRAY_TYPE && (from_array == 2 |