From 1ba56394133cf064d0b3ed1d80aab88c6790dd30 Mon Sep 17 00:00:00 2001 From: jason Date: Tue, 4 Aug 2009 02:10:05 +0000 Subject: 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 --- gcc/cp/init.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/cp/init.c') 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 -- cgit v1.2.1