FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.dg / eh / synth1.C
blobac3cab8b166f2ce726a542b383ec6df542df0fd2
1 // PR c++/6179
3 // Bug: we tried to look at the fields of 'const A' to determine the proper
4 // exception specification for the synthesized copy constructor, but
5 // TYPE_FIELDS hadn't been set yet, so we incorrectly got a throw() spec.
7 struct B
9   B () {}
10   B (const B&) { throw 1; }
13 struct A;
14 void f (const A &) {}
15 struct A
17   B b;
20 int main ()
22   A a;  
23   try
24     { A a2 (a); }
25   catch (...)
26     { }