Required gas version? (was: Re: Results for haifa-disabled egcs-971105 g++ testsuite on i586-pc-linux-gnulibc1)

H.J. Lu hjl@lucon.org
Thu Nov 13 10:46:00 GMT 1997


> 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)



More information about the Gcc mailing list