This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/6786: throwing expection on Sparc V9 causes segv

>Number:         6786
>Category:       c++
>Synopsis:       throwing expection on Sparc V9 causes segv
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 23 08:36:00 PDT 2002
>Release:        unknown-1.0
SunOS m4 5.7 Generic_106541-17 sun4u sparc SUNW,Ultra-80
GCC 3.1
The attached file causes a segv if compiled with
g++ -m64 exc.C.
The shared libs look OK:
ldd a.out =>        /sw/gcc3/lib/sparcv9/ =>     /usr/lib/64/ =>         /sw/gcc3/lib/sparcv9/ =>     /usr/lib/64/ =>    /usr/lib/64/
Just compile & run.

Content-Type: text/plain; name="exc.C"
Content-Disposition: inline; filename="exc.C"

#include <exception>
#include <iostream>

using namespace std;

struct A
	struct B : std::exception
		B() {}

	void foo() {
		throw B();

int main()
		A a;;
	catch (const std::exception& e)
		cerr << e.what() << endl;
		return 1;
		return 1;
	return 0;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]