From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@lucon.org (H.J. Lu) To: azure@vvf.fi Cc: jbuck@synopsys.com, egcs@cygnus.com Subject: Re: Required gas version? (was: Re: Results for haifa-disabled egcs-971105 g++ testsuite on i586-pc-linux-gnulibc1) Date: Thu, 13 Nov 1997 10:46:00 -0000 Message-id: References: X-SW-Source: 1997-11/msg00484.html > I also tried my test with egcs-971023 (and gas-970915) without pgcc patches > and it also failed. Here's the code, in case someone is interested to > give it a try: > > --- clip ----------------------------------------------------------------- > > #include > > > class Base { > int a; > > public: > void setValue(int value) {a=value;} > }; > > > class Derived : private Base { > char* ptr; > > public: > void setPV(char* p, int v) {ptr=p; setValue(v);} > }; > > > void a_function(void); > int foobar = 3; > > > int main() > { > try { > a_function(); > } > catch (Derived a) { > cout << 1 << endl; > } > catch (Base a) { > cout << 2 << endl; > } > catch (...) { > cout << 3 << endl; > } > > return 0; > } > > > void a_function(void) > { > Base hmm; > Derived hmm2; > int hmm3; > > if (foobar == 1) { > throw hmm; > } > else if (foobar == 2) { > throw hmm2; > } > else { > throw hmm3; > } > } > > --- clip ----------------------------------------------------------------- > > It's that "throw hmm3;" above that causes a coredump. > > Thanks for your help! > I have no problem with egcs 971105 on linux/x86/libc 5 and linux/x86 glibc 2.1. -- H.J. Lu (hjl@gnu.ai.mit.edu)