This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g++ egcs-1.1a internal compiler error
- To: Stefan dot Meixner at emskopp dot a dot shuttle dot de
- Subject: Re: g++ egcs-1.1a internal compiler error
- From: JHB NIJHOF <j dot h dot b dot nijhof at aston dot ac dot uk>
- Date: Thu, 3 Sep 1998 16:35:40 +0100
- CC: oliva at dcc dot unicamp dot br, egcs-bugs at cygnus dot com
- References: <199809030749.JAA02379@emskopp.a.shuttle.de>
> > JHB NIJHOF <j.h.b.nijhof@aston.ac.uk> writes:
> >
> > > Version of g++ (g++ -V): egcs-2.91.57
> > > Operating system: Debian Linux 1.3
> >
> > I couldn't reproduce your problem with the 1.1-pre-release on neither
> > RedHat Linux 4.0/x86 nor 5.0/x86, and, AFAIK, no x86-related change
> > was done between the pre-release and the final release. Did you run
> > the compiler with any argument other than the source file name?
> > I tried with and without optimization.
>
> I was able to reproduce the problem on
>
> i486-pc-linux-gnulibc1
>
> on a mixed Slackware / Debian Linux 1.3 system.
I checked again, and it can't be the #include <math.h> or
#include <stdlib.h> : I could minimalise the file to
// bug2.cc // 1
// 2
#include <fstream.h> // 3
// 4
void bug() // 5
{ // 6
ifstream infile("kww"); // 7
int npts = 1; // 8
float floatarray[4 * npts + 1]; // 9
char scratch[28]; // 10
infile.read(scratch,28); // 11
int arraylength = 20; // 12
if (!arraylength) // 13
; // 14
infile.read(floatarray,arraylength); // 15
return; // 16
} // 17
Still with egcs-1.1a (i686-pc-linux-gnulibc1, egcs-2.91.57),
I get the same error: g++ -c bug2.cc => Internal compliler error on line 15.
Comment out line 11, `infile.read(scratch, 28);', and the error disappears;
Comment out line 13, `if (!arraylength)', and the error changes to
sorry, not implemented: testing field_decl for template parms.
Change line 9 to `float floatarray[5];' and all goes well (hardly surprising).
I have reproduced this error on egcs-1.1a compiled on a Sun,
sparc-sun-solaris2.5 , with egcs configured as follows: [=config.status]:
#!/bin/sh
# This file was generated automatically by configure. Do not edit.
# This directory was configured as follows:
../egcs-1.1a/configure --with-gcc-version-trigger=/net/dibble/export/home/nijhojhb/egcs-compile/egcs-1.1a/gcc/version.c --host=sparc-sun-solaris2.5 --prefix=/net/dibble/export/home/nijhojhb/egcs --enable-version-specific-runtime-libs --enable-shared --norecursion
# using "mh-frag" and "mt-frag"
(i.e. compiled again using --prefix, --enable-version-specific-runtime-libs,
and --enable-shared).
Now the error message is:
bug2.cc:15: Internal compiler error 274.
That might narrow down the search a bit further.
Yours,
Jeroen Nijhof