The compiler generates the error: a.cpp: In function ‘int main()’: a.cpp:6: internal compiler error: in stabilize_call, at cp/tree.c:2248 For this code: class A {}; class B : public A {}; int main() { throw (A) B(); return 0; } Info: gcc version 4.1.1 Target: i686-pc-linux-gnu Configured with: ../gcc-4.1.1-src/configure Thread model: posix Command line: g++ -Wall -ansi -pedantic a.cpp
Confirmed.
Subject: Bug 28523 Author: mmitchel Date: Tue Aug 1 20:04:57 2006 New Revision: 115862 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115862 Log: PR c++/28523 * tree.c (stabilize_expr): Tweak documentation. Add assertion. (stabilize_call): Tweak documentation. (stabilize_init): Only call stabilize_call for calls. PR c++/28523 * g++.dg/eh/cast1.C: New test. Added: trunk/gcc/testsuite/g++.dg/eh/cast1.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/tree.c trunk/gcc/testsuite/ChangeLog
Subject: Bug 28523 Author: mmitchel Date: Tue Aug 1 20:05:49 2006 New Revision: 115863 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115863 Log: PR c++/28523 * tree.c (stabilize_expr): Tweak documentation. Add assertion. (stabilize_call): Tweak documentation. (stabilize_init): Only call stabilize_call for calls. PR c++/28523 * g++.dg/eh/cast1.C: New test. Added: branches/gcc-4_1-branch/gcc/testsuite/g++.dg/eh/cast1.C Modified: branches/gcc-4_1-branch/gcc/cp/ChangeLog branches/gcc-4_1-branch/gcc/cp/tree.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
Fixed in 4.1.2.
Fixed in GCC-4.1.2