aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/eh/array1.C
blob: 43e5bc02449d812853e46ee9bcbe2deb2b73dc81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Test that we have one EH cleanup region for the whole array
// rather than one for each element.
// { dg-options "-fdump-tree-gimple" }

struct A
{
  A();
  ~A();
};

void f()
{
  A a[10] = { };
}

// { dg-final { scan-tree-dump-times "catch" 1 "gimple" } }
// { dg-final { cleanup-tree-dump "gimple" } }