public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Bug building GIMP, minimal testcase included
@ 1998-01-26 20:33 G. Sumner Hayes
  1998-01-27 10:26 ` Joe Buck
  0 siblings, 1 reply; 4+ messages in thread
From: G. Sumner Hayes @ 1998-01-26 20:33 UTC (permalink / raw)
  To: egcs

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;
    }
}           

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug building GIMP, minimal testcase included
  1998-01-26 20:33 Bug building GIMP, minimal testcase included G. Sumner Hayes
@ 1998-01-27 10:26 ` Joe Buck
  1998-01-27 10:52   ` G. Sumner Hayes
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Buck @ 1998-01-27 10:26 UTC (permalink / raw)
  To: zumner; +Cc: egcs

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

[ on i686-linux or i386-linux ]

>   % 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
> ... 
> egcs bug?  

Yes; to quote the manual:

"If the compiler gets a fatal signal, for any input whatever, that is a
 compiler bug.  Reliable compilers never crash."



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug building GIMP, minimal testcase included
  1998-01-27 10:26 ` Joe Buck
@ 1998-01-27 10:52   ` G. Sumner Hayes
  1998-01-27 13:09     ` Joe Buck
  0 siblings, 1 reply; 4+ messages in thread
From: G. Sumner Hayes @ 1998-01-27 10:52 UTC (permalink / raw)
  To: Joe Buck; +Cc: egcs

On Tue, Jan 27, 1998 at 10:24:57AM -0800, Joe Buck wrote:
> I wrote:
> > egcs bug?  
> 
> Yes; to quote the manual:
> 
> "If the compiler gets a fatal signal, for any input whatever, that is a
>  compiler bug.  Reliable compilers never crash."

Okay, just wanted to make sure it wasn't a hardware problem on my end (bad
cache and/or RAM can often show up as signal 11s under Linux, but that tends
to be random whereas this is perfectly reproduceable so I figured it was
an egcs problem)

Can other people reproduce this?

-Sumner

-- 
c'est ne pas un .sig

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug building GIMP, minimal testcase included
  1998-01-27 10:52   ` G. Sumner Hayes
@ 1998-01-27 13:09     ` Joe Buck
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Buck @ 1998-01-27 13:09 UTC (permalink / raw)
  To: sumner; +Cc: jbuck, egcs

The gcc manual says:

> > "If the compiler gets a fatal signal, for any input whatever, that is a
> >  compiler bug.  Reliable compilers never crash."
> 
> Okay, just wanted to make sure it wasn't a hardware problem on my end (bad
> cache and/or RAM can often show up as signal 11s under Linux ...

Yes, the manual passage quoted above was written in the days where
everyone had reliable ECC memory, not the junk sold by today's PC clone
shops.  But this one appears to be a real bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-01-27 13:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-26 20:33 Bug building GIMP, minimal testcase included G. Sumner Hayes
1998-01-27 10:26 ` Joe Buck
1998-01-27 10:52   ` G. Sumner Hayes
1998-01-27 13:09     ` Joe Buck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).