re PR c++/60980 (ICE in build_special_member_call, at cp/call.c:7447)
PR c++/60980 * init.c (build_value_init): Don't try to call an array constructor. From-SVN: r209934
This commit is contained in:
parent
4f419f8cdc
commit
60ff8e1654
3 changed files with 20 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
2014-04-30 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/60980
|
||||
* init.c (build_value_init): Don't try to call an array constructor.
|
||||
|
||||
PR c++/60951
|
||||
* typeck2.c (massage_init_elt): Use maybe_constant_init.
|
||||
|
||||
|
|
|
@ -339,7 +339,8 @@ build_value_init (tree type, tsubst_flags_t complain)
|
|||
gcc_assert (!processing_template_decl
|
||||
|| (SCALAR_TYPE_P (type) || TREE_CODE (type) == ARRAY_TYPE));
|
||||
|
||||
if (type_build_ctor_call (type))
|
||||
if (CLASS_TYPE_P (type)
|
||||
&& type_build_ctor_call (type))
|
||||
{
|
||||
tree ctor = build_aggr_init_expr
|
||||
(type,
|
||||
|
|
15
gcc/testsuite/g++.dg/cpp0x/defaulted49.C
Normal file
15
gcc/testsuite/g++.dg/cpp0x/defaulted49.C
Normal file
|
@ -0,0 +1,15 @@
|
|||
// PR c++/60980
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct x0
|
||||
{
|
||||
x0 () = default;
|
||||
};
|
||||
struct x1
|
||||
{
|
||||
x0 x2[2];
|
||||
void x3 ()
|
||||
{
|
||||
x1 ();
|
||||
}
|
||||
};
|
Loading…
Add table
Reference in a new issue