This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Required gas version? (was: Re: Results for haifa-disabled egcs-971105 g++ testsuite on i586-pc-linux-gnulibc1)
- To: azure at vvf dot fi
- Subject: Re: Required gas version? (was: Re: Results for haifa-disabled egcs-971105 g++ testsuite on i586-pc-linux-gnulibc1)
- From: hjl at lucon dot org (H.J. Lu)
- Date: Thu, 13 Nov 1997 10:36:15 -0800 (PST)
- Cc: jbuck at synopsys dot com, egcs at cygnus dot com
> 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 <iostream.h>
>
>
> 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)