PR c++/55249
* tree.c (build_vec_init_elt): Use the type of the initializer.
From-SVN: r194285
+2012-12-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/55249
+ * tree.c (build_vec_init_elt): Use the type of the initializer.
+
2012-11-29 Jason Merrill <jason@redhat.com>
PR c++/53862
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);
VEC_quick_push (tree, argvec, 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;
+}