* tree.c (build_vec_init_elt): Use the type of the initializer.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194281
138bc75d-0d04-0410-961f-
82ee72b054a4
2012-12-06 Jason Merrill <jason@redhat.com>
+ PR c++/55249
+ * tree.c (build_vec_init_elt): Use the type of the initializer.
+
PR c++/54744
* pt.c (resolve_typename_type): Check TYPENAME_IS_RESOLVING_P on scope.
* init.c (expand_member_init): Check for being in a template first.
argvec = make_tree_vector ();
if (init)
{
- tree dummy = build_dummy_object (inner_type);
+ tree init_type = strip_array_types (TREE_TYPE (init));
+ tree dummy = build_dummy_object (init_type);
if (!real_lvalue_p (init))
dummy = move (dummy);
argvec->quick_push (dummy);
--- /dev/null
+// PR c++/55249
+
+template <typename _Tp> struct A
+{
+ _Tp _M_instance[1];
+};
+template <class> struct inner_type
+{
+ inner_type () {}
+ inner_type (inner_type &);
+ inner_type (const inner_type &) {}
+};
+
+int
+main ()
+{
+ A <inner_type <int> > a, b = a;
+}