mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
* call.c (build_new_method_call_1): Call reshape_init.
From-SVN: r225784
This commit is contained in:
committed by
Jason Merrill
parent
87679b76c3
commit
e056dfd06a
@@ -1,3 +1,7 @@
|
||||
2015-07-14 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* call.c (build_new_method_call_1): Call reshape_init.
|
||||
|
||||
2015-07-14 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* pt.c (check_template_shadow): Emit error + inform instead of
|
||||
|
||||
@@ -8069,7 +8069,10 @@ build_new_method_call_1 (tree instance, tree fns, vec<tree, va_gc> **args,
|
||||
/* If BASETYPE is an aggregate, we need to do aggregate
|
||||
initialization. */
|
||||
else if (CP_AGGREGATE_TYPE_P (basetype))
|
||||
init = digest_init (basetype, init_list, complain);
|
||||
{
|
||||
init = reshape_init (basetype, init_list, complain);
|
||||
init = digest_init (basetype, init, complain);
|
||||
}
|
||||
|
||||
if (init)
|
||||
{
|
||||
|
||||
12
gcc/testsuite/g++.dg/cpp0x/initlist-new1.C
Normal file
12
gcc/testsuite/g++.dg/cpp0x/initlist-new1.C
Normal file
@@ -0,0 +1,12 @@
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct A
|
||||
{
|
||||
A() = default;
|
||||
A(const A&) = default;
|
||||
};
|
||||
|
||||
void f()
|
||||
{
|
||||
new A{A()};
|
||||
}
|
||||
Reference in New Issue
Block a user