@@ -1683,7 +1683,6 @@ process_init_constructor_array (tree type, tree init, int nested, int flags,
if (next)
{
if (next != error_mark_node
- && ! seen_error () // Improves error-recovery on anew5.C.
&& (initializer_constant_valid_p (next, TREE_TYPE (next))
!= null_pointer_node))
{
new file mode 100644
@@ -0,0 +1,19 @@
+// PR c++/107198
+// { dg-additional-options -fno-exceptions }
+
+struct A {
+ A() { throw 0; } // { dg-error disabled }
+ A(int i) { throw i; }
+ A(const A&) { throw 10; }
+};
+
+void try_idx (int i)
+{
+ int t = 10;
+ try {
+ struct X {
+ A e1[2], e2;
+ }
+ x2[3] = { { 1, 2, 3 }, { 4, 5, 6 } };
+ } catch (int x) { t = x; } // { dg-prune-output "not declared" }
+}