Subject: Re: expr.c: large structure problems
To: Castor Fu <castor@geocast.net>
From: Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
List: tech-toolchain
Date: 10/27/1998 20:24:28
Castor Fu wrote :
>
> The delta introduced in revision 1.76 of egcs/gcc/expr.c causes an
> internal compiler error in cc1 built with a target of mips-dec-netbsd
> and a host of i386-unknown-freebsd on the following code fragment:
>
> struct biggy {
> char buf[32800]; /* len > 16 bit offset */
> char len [10 ];
> };
>
> static
> void f ( struct biggy * s, int v)
> {
> s->len[v] = 13 ;
> }
>
> I haven't sorted out exactly why, and apparently this problem does not
> show up in native mips environments. Since your name is listed in
> the ChangeLog file, I would appreciate it if you could look into this.
>
> It appears that the code is very localized, so it's easy to workaround,
> but I'm not familiar enough with GCC to sort out the fix quickly myself.
>
> Regards,
> Castor Fu
Hello,
I debugged the code and found the problem in the mips.h file. If I compile
the program with '-mdebuga bug.c' it works fine. It seems the macro
GO_IF_LEGITIMATE_ADDRESS is not correct. I don't know how to fix this
because I don't know how the mips works. Compiling with -O, -O2, -O3 also
did fix this problem.
Herman.
--
-------------------------------------------------------------------------
Herman ten Brugge Email: Haj.Ten.Brugge@net.HCC.nl