Subject: Re: pgp
To: Ben Tober <tober@bbnplanet.com>
From: Berndt Josef Wulf <wulf@ping.net.au>
List: port-alpha
Date: 02/22/1997 16:44:15
Ben Tober wrote
> 
> > 
> > I tried something similar and even with the above options it still
> > bombs out:
> > 
> > /usr/local/bin/make all CC=gcc LD=gcc \
> > CFLAGS=" -O2 -DUNIX -DPORTABLE -DMAX_NAMELEN=255"
> > make[1]: Entering directory `/usr/src/contrib/png/src'
> > gcc -O2 -DUNIX -DPORTABLE -DMAX_NAMELEN=255   -c pgp.c -o pgp.o
> > gcc -O2 -DUNIX -DPORTABLE -DMAX_NAMELEN=255   -c crypto.c -o crypto.o
> > gcc: Internal compiler error: program cc1 got fatal signal 6
> > make[1]: *** [crypto.o] Error 1
> > make[1]: Leaving directory `/usr/src/contrib/png/src'
> > make: *** [netbsd_alpha] Error 2
> > 
> > Has someone any idea...?
> Hmm, looks like you actually found a compiler bug.  One possibility is to
> try removing -O2 from CFLAGS.  In general, the buggiest parts of compilers
> are the optimizers.  Beyond that, since it called abort(), a corefile should
> have been made, so you might try running gdb against it and see if you can
> tell what went awry.  Since this bug is reproducible, you could also try
> running gcc under gdb.  Also, are you using the ECOFF or the ELF toolchain,
> and what compiler version?  Is this under -current, or 1.2, or what?
> -ben

I am running NetBSD-1.2-release. I have tried to reduce optimization
to -O but no go. The package compiles fine without optimization....

Find below the result from gdb....
Please let me know if there is anything I can do to produce some
more detailed output.

hotdog# gdb /usr/local/lib/gcc-lib/alpha-unknown-netbsd1.2A/2.7-95q4/cc1 cc1.core
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
 There is absolutely no warranty for GDB; type "show warranty" for details.
 GDB 4.14-95q4 (alpha-unknown-netbsd1.2A), Copyright 1995 Free Software Foundation, Inc...
 Core was generated by `cc1'.
 Program terminated with signal 6, Abort trap.
 #0  0x120262538 in kill () at kill:2
 kill:2: No such file or directory.
 (gdb) where
 #0  0x120262538 in kill () at kill:2
 #1  0x12025c75c in abort ()
 #2  0x1200ca1cc in extract_bit_field (str_rtx=0x140163e70, bitsize=8, bitnum=0, unsignedp=1, target=0x0, mode=QImode, tmode=QImode, align=1, total_size=1) at
 expmed.c:888
 #3  0x1200aa9b4 in expand_expr (exp=0x1400339b8, target=0x0, tmode=VOIDmode, modifier=EXPAND_NORMAL) at expr.c:5019
 #4  0x1200b0c10 in expand_expr (exp=0x140033a90, target=0x0, tmode=VOIDmode, modifier=EXPAND_NORMAL) at expr.c:6643
 #5  0x1200ba900 in compare (exp=0x140033ae8, signed_code=NE, unsigned_code=NE) at expr.c:9769
 #6  0x1200b9094 in do_jump (exp=0x140033ae8, if_false_label=0x14016e770, if_true_label=0x0) at expr.c:9388
 #7  0x12008da04 in expand_start_cond (cond=0x140033ae8, exitflag=0) at stmt.c:2009
 #8  0x1200060b4 in yyparse () at c-parse.y:1566
 #9  0x12004b1a8 in compile_file (name=0x1fffffb45 "/var/tmp/cc001634.i") at toplev.c:2324
 #10 0x120051b38 in main (argc=9, argv=0x1fffffa28, envp=0x1fffffa78) at toplev.c:4198
 (gdb) 

cheerio Berndt
-- 
Name	: Berndt Josef Wulf
E-Mail	: wulf@ping.net.au
Sysinfo	: DEC AXPpci33+, NetBSD-1.2