c++/6350: GCC crash with mixed exceptions+virtual

veksler@il.ibm.com veksler@il.ibm.com
Thu Apr 18 04:56:00 GMT 2002


>Number:         6350
>Category:       c++
>Synopsis:       3.1 crash on multiple-catch + overriden virtual functions
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 18 03:46:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     veksler
>Release:        3.1 20020416 (prerelease)
>Organization:
>Environment:
System: Linux lnx12.haifa.ibm.com 2.2.16-22.c4eb #1 SMP Tue Apr 3 09:32:12 IST 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.1/configure --prefix=/home2/veksler/gnu2 --enable-languages=c++
>Description:
GCC crashes when the following (simple) code is compiled:
$ /home2/veksler/gnu2/bin/g++ -O -c t.cpp             t.cpp: In member function `virtual void SubClass::f()':
t.cpp:20: Internal compiler error in remove_eh_handler, at except.c:2696
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

In the example there are no pre-processor directives, so temp files
are not sent with the report.

----- t.cpp start ----
// Run this with g++ -O -c t.cpp
class Base
{
public:
  virtual void f( );
};

class SubClass : public Base
{
public:
  void f();
};

void SubClass::f()
{
    try {
    } catch(int) { 
    } catch(...) {
    }
}
----- t.cpp end ----
>How-To-Repeat:
	
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list