Subject: Re: anyone had cc1 core dump on them?
To: Matthew Mjacob <mjacob@nas.nasa.gov>
From: D. J. Vanecek <djv-list@bedford.net>
List: port-i386
Date: 11/12/1997 17:12:47
> Installed yesterday (1.3_ALPHA) tarballs... Trying to build 1.3 source.
>
> cc -O -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -D_MULTI_LIBM -D_POSIX_MODE -DLIBM_SCCS -nostdinc -idirafter /space/NetBSD-1.3/proto/usr/include -c /space/NetBSD-1.3/src/lib/libm/src/e_lgammaf_r.c
> cc: Internal compiler error: program cc1 got fatal signal 6
> *** Error code 1
>
I've seen a certain sequence of source code exercise something like this in
certain versions of cc1. The code in question is:
int
main(void)
{
int i = 0;
return 1 / (i ? 1 : 0);
}
and variations on this theme. (This is a "portable" way of raising a
signal at runtime. Works on CP/M, I guess :/ )
Correct behavior varies from silence during compilation to a message
about the assembler dividing by zero.
Samples:
[djv@lucy djv]$ cc -o bug bug.c
cc: Internal compiler error: program cc1 got fatal signal 6
[djv@lucy djv]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-unknown-linuxlibc1/2.7.2.2.f.2/specs
gcc version 2.7.2.2.f.2
[djv@lucy djv]$ uname -a
Linux lucy.loco.net 2.0.27 #42 Thu Aug 28 02:31:53 EDT 1997 i486
[djv@lucy djv]$
[root@ahab bugg]# cc -o bug bug.c
[root@ahab bugg]# gcc -v
gcc version 2.7.2
[root@ahab bugg]# uname -a
NetBSD ahab.loco.net 1.2.1 NetBSD 1.2.1 (JEZEBEL) #0: Thu Oct 2 12:22:18 EDT 1997 root@jezebel.loco.net:/usr/src/sys/arch/i386/compile/JEZEBEL i386
[root@ahab bugg]#
[root@flask bug]# cc -o bug bug.c
/tmp/ccJmkCOGw141.s: Assembler messages:
/tmp/ccJmkCOGw141.s:37: Warning: Divide by zero.
[root@flask bug]# gcc -v
Reading specs from /usr/lib/gcc-lib/mipsel-unknown-openbsd2.1/2.7.2.1/specs
gcc version 2.7.2.1
[root@flask bug]# uname -a
OpenBSD flask.loco.net 2.1 DS3100#3 pmax
[root@flask bug]#
FSF was informed.
Maybe there's some code laying around in that gamma function that is
triggering something like this?
Dave