The following code should not abort: struct vbase {}; struct foo : virtual vbase { foo() { throw "exception in foo ctor"; } }; main() { struct bar : public foo {}; try { bar a; } catch ( ... ) { } return 0; }; ---- This is forwarded from: http://gcc.gnu.org/ml/gcc/2005-09/msg00253.html
Confirmed as a bug in: http://gcc.gnu.org/ml/gcc/2005-09/msg00329.html
Wrong-code; showstopper.
Subject: Bug 24580 Author: jason Date: Mon Nov 14 20:07:45 2005 New Revision: 106901 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106901 Log: PR c++/24580 * method.c (locate_ctor): Skip all artificial parms, not just 'this'. Added: trunk/gcc/testsuite/g++.dg/eh/synth2.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/method.c
Subject: Bug 24580 Author: jason Date: Mon Nov 14 20:23:25 2005 New Revision: 106902 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106902 Log: PR c++/24580 * method.c (locate_ctor): Skip all artificial parms, not just 'this'. Added: branches/gcc-4_0-branch/gcc/testsuite/g++.dg/eh/synth2.C - copied unchanged from r106901, trunk/gcc/testsuite/g++.dg/eh/synth2.C Modified: branches/gcc-4_0-branch/gcc/cp/ChangeLog branches/gcc-4_0-branch/gcc/cp/method.c
Fixed in 4.0.3.
Subject: Bug 24580 Author: jason Date: Mon Nov 14 20:48:50 2005 New Revision: 106903 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106903 Log: PR c++/24580 * method.c (locate_ctor): Skip all artificial parms, not just 'this'. Added: branches/gcc-3_4-branch/gcc/testsuite/g++.dg/eh/synth2.C - copied unchanged from r106901, trunk/gcc/testsuite/g++.dg/eh/synth2.C Modified: branches/gcc-3_4-branch/gcc/cp/ChangeLog branches/gcc-3_4-branch/gcc/cp/method.c
Fixed also for 3.4.5.
Subject: Bug 24580 Author: jason Date: Wed Nov 16 20:22:00 2005 New Revision: 107097 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107097 Log: PR c++/24580 * method.c (locate_copy): Also use skip_artificial_parms here. (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking for RECORD_TYPE. (locate_ctor): Abort if we fail to find a default constructor. Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/method.c
Subject: Bug 24580 Author: jason Date: Wed Nov 16 20:26:06 2005 New Revision: 107098 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107098 Log: PR c++/24580 * method.c (locate_copy): Also use skip_artificial_parms here. (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking for RECORD_TYPE. Modified: branches/gcc-4_0-branch/gcc/cp/ChangeLog branches/gcc-4_0-branch/gcc/cp/method.c
Subject: Bug 24580 Author: jason Date: Wed Nov 16 20:27:26 2005 New Revision: 107099 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107099 Log: PR c++/24580 * method.c (locate_copy): Also use skip_artificial_parms here. (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking for RECORD_TYPE. Modified: branches/gcc-3_4-branch/gcc/cp/ChangeLog branches/gcc-3_4-branch/gcc/cp/method.c