This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
large struct offsets fail on MIPS
- To: egcs-bugs at cygnus dot com
- Subject: large struct offsets fail on MIPS
- From: Castor Fu <castor at geocast dot net>
- Date: Thu, 22 Oct 1998 08:05:06 -0700 (PDT)
/*
* bug.c: generates internal compiler error with egcs-1.1 release
* and egcs-19981019 snapshots in cross compilation with a MIPS target
* on an x86 host. Works on egcs-1.0.2 in same environment.
*
* Castor Fu
* castor@geocast.com
*/
struct biggy {
char buf[32800]; /* len cannot be accessed as a 16 bit offset */
char len [10 ];
};
static
void f ( struct biggy * s, int v)
{
s->len[v] = 13 ;
}
/*
* Output of
*
* ./xgcc -v bug.c
Reading specs from /geo/src/netbsd-1.3/src/buildenv/lib/gcc-lib/mips-geocast-elfbsd/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
/geo/src/netbsd-1.3/src/buildenv/lib/gcc-lib/mips-geocast-elfbsd/egcs-2.91.57/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=91 -D__ANSI_COMPAT -DMIPSEB -DR4000 -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__NetBSD__ -D__ELF__ -Dmips -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ -D_R3000 -D__ANSI_COMPAT -D__MIPSEB__ -D__R4000__ -D__R3000__ -D__SYSTYPE_BSD__ -D_SYSTYPE_BSD -D__NetBSD__ -D__ELF__ -D__mips__ -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ -D_R3000 -D__MIPSEB -D__R4000 -D__R3000 -D__SYSTYPE_BSD -D__mips -Asystem(unix) -Asystem(NetBSD) -Amachine(mips) -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int bug.c bug.i
GNU CPP version egcs-2.91.57 19980901 (egcs-1.1 release) [AL 1.1, MM 40] BSD Mips
#include "..." search starts here:
#include <...> search starts here:
/geo/src/netbsd-1.3/src/buildenv/lib/gcc-lib/mips-geocast-elfbsd/egcs-2.91.57/include
/geo/src/netbsd-1.3/src/buildenv/mips-geocast-elfbsd/sys-include
/geo/src/netbsd-1.3/src/buildenv/mips-geocast-elfbsd/include
End of search list.
/geo/src/netbsd-1.3/src/buildenv/lib/gcc-lib/mips-geocast-elfbsd/egcs-2.91.57/cc1 bug.i -mabicalls -quiet -dumpbase bug.c -version -o bug.s
GNU C version egcs-2.91.57 19980901 (egcs-1.1 release) (mips-geocast-elfbsd) compiled by GNU C version egcs-2.90.27 980315 (egcs-1.0.2 release).
bug.c: In function `f':
bug.c:10: internal error--unrecognizable insn:
(insn 14 12 16 (set (reg:SI 81)
(plus:SI (reg:SI 80)
(const_int 32800))) -1 (nil)
(nil))
/geo/src/netbsd-1.3/src/usr/src/gnu/dist/gcc/toplev.c:1360: Internal compiler error in function fatal_insn
*/