Bug building GIMP, minimal testcase included

G. Sumner Hayes zumner@collegium.adsl.net.cmu.edu
Mon Jan 26 20:33:00 GMT 1998


Hi,  

I'm getting the following error when building the GIMP version 18 with
egcs-1.00 and egcs-1.01:

  % gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/X11R6/include -O -funroll-loops \
      -c gauss_iir.c
  gcc: Internal compiler error: program cc1 got fatal signal 6

This is on gimp-0.99.18/plug-ins/gauss_iir/gauss_iir.c; I got the problem
down to a minimal stand-alone file (test-egcs-bug.c, appended to this
message) that exposes it:

  % gcc -O -funroll-loops -c test-egcs-bug.c
  gcc: Internal compiler error: program cc1 got fatal signal 6 

It's tickled by combining "-O" and "-funroll-loops" or "-funroll-all-loops";
if I don't use -O or don't unroll loops it compiles okay.

It happens with this version:
  % gcc -v
  Reading specs from /usr/lib/gcc-lib/i686-linux/egcs-2.90.21/specs
  gcc version egcs-2.90.21 971202 (egcs-1.00 release) 

which is the 1.00 release compiled with itself on a glibc-2.0.5c system, 
the first egcs originally bootstrapped with gcc-2.7.2.3.

It also happens with Elliot Lee's egcs-1.0.1:
  % gcc -v
  Reading specs from /usr/lib/gcc-lib/i386-linux/egcs-2.90.23/specs
  gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)

using the binaries at ftp.circ.us.eu.org /pub/linux/packages/i386
(which are also linked against glibc).

My system is pretty much all Red Hat 5.0 source RPMs, but the whole
distribution has been compiled with egcs-1.0 (I just upgraded to
1.0.1 when I hit this bug to see if that would help, and to binutils
2.8.1.0.17).  Pentium Pro 180, the glibc 2.0.5c shipped with Red Hat 5.

egcs bug?  

Let me know if there's any other info you need.

-Sumner
 zumner@collegium.adsl.net.cmu.edu

BEGIN test-egcs-bug.c

static void
transfer_pixels (double *src1,
                 double *src2,
                 unsigned char  *dest,
                 int     bytes,
                 int     width)
{
  int b;
  double sum;

  while (width --)
    {
      for (b = 0; b < bytes; b++)
        {
          sum = src1[b] + src2[b];
          if (sum > 255) sum = 255;
          else if (sum < 0) sum = 0;

          dest[b] = (unsigned char) sum;
        }
      src1 += bytes;
      src2 += bytes;
      dest += bytes;
    }
}           



More information about the Gcc mailing list