The split_nonconstant_init piece is the only one necessary to fix the testcase, but it occurred to me that we might as well not split when -fno-exceptions. * typeck2.c (split_nonconstant_init): Unshare non-decl. * cp-gimplify.c (cp_gimplify_init_expr): Only split if -fexceptions. From-SVN: r279871
21 lines
160 B
C
21 lines
160 B
C
// PR c++/93033
|
|
// { dg-do compile { target c++11 } }
|
|
|
|
struct A {
|
|
A ();
|
|
~A ();
|
|
};
|
|
|
|
A f();
|
|
|
|
struct B {
|
|
A a;
|
|
bool b;
|
|
};
|
|
|
|
void
|
|
foo ()
|
|
{
|
|
B i[] { f() };
|
|
}
|