From: amoss@cs.huji.ac.il (Amos Shapira)
Newsgroups: gnu.g++.bug
Subject: cc1plus dumps core on SGI Indigo while compiling groff-1.06
Date: 15 Sep 92 18:20:18 GMT
Distribution: gnu
Organization: GNUs Not Usenet

Hello.

My platform:  SGI Indigo with IP12 CPU running under Irix 4.0.4

Gcc: 2.2.2, recompiled with by itself twice and passed all tests (according
to the man who installed it).

I ran "configure" in the groff-1.06 source tree and "gmake", everythings
seems to run fine (except some warnnings in other directories) until Make
attempts to run the following line:

gcc -O -I. -I. -I../include -I./../include -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1
-DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_CC_LIMITS_H=1 -DHAVE_CC_UNISTD_H=1
-DSTDLIB_H_DECLARES_PUTENV=1 -DHAVE_MMAP=1 -Dvfork=fork -DHAVE_RENAME=1
-DHAVE_MKS TEMP=1 -DHAVE_SYS_SIGLIST=1 -DCOOKIE_BUG=1 -DWCOREFLAG=0200 -g
-c main.cc

And after a while outputs the following lines:

gcc: Internal compiler error: program cc1plus got fatal signal 11
gmake[2]: *** [main.o] Error 1
gmake[1]: *** [tbl] Error 1
gmake: *** [all] Error 1

dbx output:
----------------------------------------------------------------------
Script started on Tue Sep 15 16:56:52 1992
Warning: no access to tty (Inappropriate IOCTL operation).
Thus no job control in this shell.
|Fugue| dbx /usr/local/lib/gcc-lib/mips-sgi-irix4.0.1/2.2.2/cc1plus \
            ../groff-1.06/tbl/core
dbx version 2.40 3/7/92 1:12
Type 'help' for help.
Reading symbolic information of `/usr/local/lib/gcc-lib/mips-sgi-irix4.0.1\
/2.2.2/cc1plus' . . .
Process name from core dump: cc1plus
Process died at pc 0x4a931c of signal : Segmentation fault
[using memory image in ../groff-1.06/tbl/core]
(dbx) where
>  0 emit_store_flag(target = 0x100f84e0, code = LE, op0 = 0x1005e130,
     op1 = 0x1005e138, mode = VOIDmode, unsignedp = 0, normalizep = 1)
     ["expmed.c":2745, 0x4a9318]
   1 jump_optimize(f = 0x100b82b0, cross_jump = 0, noop_moves = 268820784,
     after_regscan = 0) ["jump.c":892, 0x4caba0]
   2 emit_store_flag(target = (nil), code = LE, op0 = 0x100f36a8,
     op1 = 0x1005e138, mode = 269142704, unsignedp = 40, normalizep = 0)
     ["expmed.c":2745, 0x4a9314]
   3 emit_barrier() ["emit-rtl.c":2232, 0x4be1b0]
   4 <past end of a.out text>(0x2d, 0x1005e130, 0x1005e138, 0x1005e130,
      0xffffffff, 0xffffffff) [0x100acab0]

warning: address 0xfffffffc for 4 bytes is not in the core file

warning: address 0xfffffffc for 4 bytes is not in the core file
(dbx) list
> 2746        if (GET_CODE (comparison) == CONST_INT)
  2747  	return (comparison == const0_rtx ? const0_rtx
  2748  		: normalizep == 1 ? const1_rtx
  2749  		: normalizep == -1 ? constm1_rtx
  2750  		: const_true_rtx);
  2751  
  2752        /* Get a reference to the target in the proper mode for this insn.  */
  2753        compare_mode = insn_operand_mode[(int) icode][0];
  2754        subtarget = target;
  2755        if (preserve_subexpressions_p ()
(dbx) print comparison
(nil) 
(dbx) quit
|Fugue| exit

script done on Tue Sep 15 16:58:12 1992
----------------------------------------------------------------------

It seems that compare_from_rtx (who's value is assigned to comparison in the
line 2745 (not listed)) returns the value of a couple of functions which
in certain conditions return 0.  That's from a shallow invertigation, I can't
dive deeper than that.

Hope this info is enough.  I'll keep the core file around in case you want
more details.

--Amos Shapira

CS System Group, Hebrew University, Jerusalem, Israel
amoss@cs.huji.ac.il
Newsgroups: gnu.g++.bug