summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/compat/init/array5_x.C
blob: dc138772cdded8e6ebe036da3c7e18172f5fe7fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
extern "C" void abort (void);

extern int count;
extern int num;

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

struct Array
{
  A array[2][2][2];
};

void
array5_x ()
{
  for (num = 0; num <= 8; ++num)
    {
      count = 0;
      try
	{
	  Array A;
	}
      catch (...)
        {
	}
      if (count != 0)
	abort();
    }
}