[gnu.g++.bug] g++ 1.36.3 dumps core on an InterViews file

cooper@nunki.crd.ge.com (Clark Cooper) (01/17/90)

System:	g++ 1.36.3 (downloaded from prep.ai.mit.edu morning of Jan 16)
Hardware:	Sun 3/75
OS:		SunOS 4.0.3

Problem:

	While attempting to build the InterViews 2.6 libraries, g++ 1.36.3
dumped core with a signal 6. The file being compiled was libgraphic/base.c.

Script:
================================================================
Script started on Tue Jan 16 16:30:20 1990
nunki% pwd
/tmp_mnt/home/kreskin/u0/gnu/InterViews/src/libgraphic/SUN3
nunki% make CDEBUGFLAGS="-v -O" base.o
compiling ../base.c
rm -f base.o
g++ -c  -v -O  -I.. -I../Generated -I../../.././src/InterViews/Std -I../../.././src -D__cplusplus   ../base.c
g++ version 1.36.3 (based on GCC 1.36.92)
 /home/kreskin/u0/gnu/targets/sun3/os4/lib/gcc-cpp -+ -v -D__cplusplus -I.. -I../Generated -I../../.././src/InterViews/Std -I../../.././src -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__OPTIMIZE__ -D__HAVE_68881__ -Dmc68020 ../base.c /usr/tmp/cca22620.cpp
GNU CPP version 1.36
 /home/kreskin/u0/gnu/targets/sun3/os4/lib/gcc-cc1plus /usr/tmp/cca22620.cpp -quiet -dumpbase ../base.c -O -version -o /usr/tmp/cca22620.s
GNU C++ version 1.36.3 (based on GCC 1.36.92) (68k, MIT syntax) compiled by GNU C version 1.36.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
g++: Program cc1plus got fatal signal 6.
*** Error code 1
make: Fatal error: Command failed for target `base.o'
nunki% gdb /home/kreskin/u0/gnu/targets/sun3/os4/lib/gcc-cc1plus core
GDB 3.4, Copyright (C) 1989 Free Software Foundation, Inc.
There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details.
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "info copying" to see the conditions.
Reading symbol data from /home/kreskin/u0/gnu/targets/sun3/os4/lib/gcc-cc1plus...done.
Core file is from "gcc-cc1plus".
Program terminated with signal 6, Abort.
Type "help" for a list of commands.
(gdb) directory /home/kreskin/u0/gnu/src/g++-1.36.3
Source directories searched: /tmp_mnt/home/kreskin/u0/gnu/InterViews/src/libgraphic/SUN3:/home/kreskin/u0/gnu/src/g++-1.36.3
(gdb) where
#0  0xb2f6c in kill ()
#1  0xad352 in abort ()
#2  0x567ce in emit_move_insn (...) (...)
#3  0x57384 in store_expr (...) (...)
#4  0x57650 in store_field (...) (...)
#5  0x571b6 in expand_assignment (...) (...)
#6  0x5959a in expand_expr (...) (...)
#7  0x5ceb8 in expand_expr_stmt (...) (...)
#8  0x3ca8a in expand_cplus_expr_stmt (...) (...)
#9  0xcc34 in yyparse (...) (...)
#10 0x4a8e6 in compile_file (...) (...)
#11 0x4bf46 in main (...) (...)
(gdb) up
#1  0xad352 in abort ()
(gdb) up
Reading in symbols for expr.c...done.
#2  0x567ce in emit_move_insn (x=(rtx) 0x1a7464, y=(rtx) 0xcaaa4) (expr.c line 1055)
1055	    abort ();
(gdb) p *x
$1 = {code = MEM, mode = BLKmode, jump = 0, call = 0, unchanging = 0, volatil = 0, in_struct = 1, used = 0, integrated = 0, fld = {{rtint = 1733720, rtstr = 0x1a7458 , rtx = 0x1a7458, rtvec = 0x1a7458, rttype = 1733720}}}
(gdb) p *y
$2 = {code = CONST_INT, mode = VOIDmode, jump = 0, call = 0, unchanging = 0, volatil = 0, in_struct = 0, used = 0, integrated = 0, fld = {{rtint = 0, rtstr = 0x0, rtx = 0x0, rtvec = 0x0, rttype = VOIDmode}}}
(gdb) up
#3  0x57384 in store_expr (exp=(tree) 0xcc468, target=(rtx) 0x1a7464, suggest_reg=0) (expr.c line 1856)
1856		emit_move_insn (target, temp);
(gdb) up
#4  0x57650 in store_field (target=(rtx) 0x1a7448, bitsize=32, bitpos=32, mode=BLKmode, exp=(tree) 0xcc468, value_mode=VOIDmode, unsignedp=0, align=2) (expr.c line 2024)
2024	      return store_expr (exp, to_rtx, value_mode != VOIDmode);
(gdb) up
#5  0x571b6 in expand_assignment (to=(tree) 0xcc434, from=(tree) 0xcc468, want_value=0, suggest_reg=0) (expr.c line 1754)
1754				  TYPE_ALIGN (TREE_TYPE (tem)) / BITS_PER_UNIT);
(gdb) up
#6  0x5959a in expand_expr (exp=(tree) 0xcc480, target=(rtx) 0xcaaa4, tmode=VOIDmode, modifier=EXPAND_NORMAL) (expr.c line 3338)
3338		temp = expand_assignment (lhs, rhs, ! ignore, original_target != 0);
(gdb) up
Reading in symbols for stmt.c...done.
#7  0x5ceb8 in expand_expr_stmt (exp=(tree) 0xcc480) (stmt.c line 1054)
1054					   VOIDmode, 0);
(gdb) up
Reading in symbols for cplus-init.c...done.
#8  0x3ca8a in expand_cplus_expr_stmt (exp=(tree) 0xcc480) (cplus-init.c line 3650)
3650	      expand_expr_stmt (exp);
(gdb) up
Reading in symbols for cplus-tab.c...done.
#9  0xcc34 in yyparse () (cplus-parse.y line 2204)
2204			  expand_cplus_expr_stmt ($1);
(gdb) p input_filename
Reading in symbols for toplev.c...done.
$3 = (char *) 0x1a38f4 "../base.c"
(gdb) p lineno
$4 = 237
(gdb) quit
nunki% sed -n '227,247p' ../base.c
    }
}

void Graphic::setParent (Graphic* g, Graphic* parent) {
    if (!g->parent.Valid()) {	    // a graphic can have only one parent
	g->parent = Ref(parent);
    }
}

void Graphic::unsetParent (Graphic* g) {
    g->parent = (Graphic*)nil;
    g->invalidateCaches();
}

boolean Graphic::read (PFile* f) {
    int test;
    float a[6];
    Ref dummy;		/* dummy origin ref for backward compatibility */
    boolean ok = 
	Persistent::read(f) && parent.Read(f) && dummy.Read(f) &&
	f->Read(fillBg) && fg.Read(f) && bg.Read(f) &&
nunki% ^D
script done on Tue Jan 16 16:40:15 1990
================================================================
--
===================================================================
Clark Cooper	 GE Corporate R&D	  cooper@nunki.crd.ge.com
(518) 387-5887	 P.O. Box 8 / K-1 4C31	  coopercc@crdgw1.ge.com
		 Schenectady, NY  12301	  ...!uunet!crdgw1!coopercc