'1019 snapshot ICE on alpha-dec-osf4.0e compiling gcc/libgcc2.c(_lshrdi3)

Brown, Rodney rodneybrown@pmsc.com
Tue Oct 19 21:47:00 GMT 1999


Title: '1019 snapshot ICE on alpha-dec-osf4.0e compiling gcc/libgcc2.c(_lshrdi3)





Script started on Wed Oct 20 14:35:09 1999
sh-2.03$ perl ../ice.pl build.log
  ./xgcc -B/usr/local/alpha-dec-osf4.0e/bin/ -B./ -I/usr/local/alpha-dec-osf4.0e/include -O2   -DIN_GCC    -g -W -Wall -I./include   -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I../../egcs-19991019/gcc -I../../egcs-19991019/gcc/config -I../../egcs-19991019/gcc/../include -c -DL${name} \

      -DUSE_COLLECT2 ../../egcs-19991019/gcc/libgcc2.c -o ${name}.o; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  ar rc tmplibgcc2.a ${name}.o; \
  rm -f ${name}.o; \
done
_muldi3
_divdi3
_moddi3
_udivdi3
_umoddi3
_negdi2
_lshrdi3
xgcc: Internal compiler error: program cc1 got fatal signal 11
make[4]: *** [libgcc2.a] Error 1
make[4]: Leaving directory `/user/rand/rdb/src/egcs-19991019.obj/gcc'
make[3]: *** [stmp-multilib-sub] Error 2
make[3]: Leaving directory `/user/rand/rdb/src/egcs-19991019.obj/gcc'
make[2]: *** [stmp-multilib] Error 1
make[2]: Leaving directory `/user/rand/rdb/src/egcs-19991019.obj/gcc'



 ./cc1 libgcc2.i -quiet -dumpbase libgcc2.c -g -g1 -O2 -W -Wall -version -o libgcc2.s
GNU C version 2.96 19991019 (experimental) (alpha-dec-osf4.0e) compiled by GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release).

xgcc: Internal compiler error: program cc1 got fatal signal 11
Breakpoint 1 at 0x3ff800e03a0
Breakpoint 2 at 0x1200f2e58: file ../../egcs-19991019/gcc/rtl.c, line 1145.
Breakpoint 3 at 0x3ff80175210
GNU C version 2.96 19991019 (experimental) (alpha-dec-osf4.0e) compiled by GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release).

Program received signal SIGSEGV, Segmentation fault.
0x12018c60c in mark_set_1 (needed=0x11fffd940, dead=0x11fffd878, x=0x9f400, 
    insn=0xebac0, significant=0x0, flags=1)
    at ../../egcs-19991019/gcc/flow.c:3931
3931              register int blocknum = BLOCK_NUM (insn);
#0  0x12018c60c in mark_set_1 (needed=0x11fffd940, dead=0x11fffd878, 
    x=0x9f400, insn=0xebac0, significant=0x0, flags=1)
    at ../../egcs-19991019/gcc/flow.c:3931
#1  0x12018bfb0 in mark_set_regs (needed=0x11fffd940, dead=0x11fffd878, 
    x=0x9f400, insn=0xebac0, significant=0x0, flags=1)
    at ../../egcs-19991019/gcc/flow.c:3769
#2  0x12018b000 in propagate_block (old=0x11fffd940, first=0xeb280, 
    last=0xe6c80, significant=0x0, bnum=2, flags=1)
    at ../../egcs-19991019/gcc/flow.c:3391
#3  0x120188184 in update_life_info (blocks=0x140064a80, 
    extent=UPDATE_LIFE_GLOBAL_RM_NOTES) at ../../egcs-19991019/gcc/flow.c:2578
#4  0x120196334 in combine_instructions (f=0xeacc0, nregs=106)
    at ../../egcs-19991019/gcc/combine.c:699
#5  0x12003038c in rest_of_compilation (decl=0xe9200)
---Type <return> to continue, or q <return> to quit---
    at ../../egcs-19991019/gcc/toplev.c:4037
#6  0x1202aecc4 in finish_function (nested=0)
    at ../../egcs-19991019/gcc/c-decl.c:6715
#7  0x120293374 in yyparse () at c-parse.y:314
#8  0x12002df28 in compile_file (name=0x332b0 "libgcc2.i")
    at ../../egcs-19991019/gcc/toplev.c:3200
#9  0x120033e30 in main (argc=13, argv=0x11ffffcc8)
    at ../../egcs-19991019/gcc/toplev.c:5552
3926          /* Additional data to record if this is the final pass.  */
3927          if (flags & (PROP_LOG_LINKS | PROP_REG_INFO
3928                       | PROP_DEATH_NOTES | PROP_AUTOINC))
3929            {
3930              register rtx y;
3931              register int blocknum = BLOCK_NUM (insn);
3932    
3933              y = NULL_RTX;
3934              if (flags & (PROP_LOG_LINKS | PROP_AUTOINC))
3935                y = reg_next_use[regno];
(gdb) c
Continuing.


Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
script done on Wed Oct 20 14:35:54 1999


revised ice.pl


 


ice.pl

-------------- next part --------------
# Parse egcs snapshot build.log files for an Internal Compiler Error
# re-run failing compilation with -v -save-temps
# then run the failing gcc subprocess under gdb with a breakpoint at
# the point of the Internal Compiler Error
# Assumes in the snapshot.obj directory

use Cwd;

sub ccv_gdb {
    if ($ccv_output[0] =~ /^\s*(\S+)(\s.*)$/) {
	my($exe, $cmd_args) = ($1, $2);
	my($i, $break_loc, $do_break);
	for ($i = $#ccv_output;
	$i > 0 && $ccv_output[$i] !~ /^\S+: Internal compiler error[ :]/;
	$i--) {
	}
	if ($ccv_output[$i] =~
	/^\S+: Internal compiler error(?: in `\S+', at (\S+:\d+)|: .*)$/) {
	    my($break_loc);
	    $break_loc = $1 if defined($1);
	    open GDB_ICE, ">gdb.ice.$$"
	    or "open gdb.ice.$$ failed $!";
	    if (!(-f '.gdbinit') && $exe =~ m|^(.*/)[^/]+$|) {
		open GCC_GDBINIT, "$obj_dir/gcc/.gdbinit"
		or die "open $obj_dir/gcc/.gdbinit failed $!";
		while (<GCC_GDBINIT>) {
		    print GDB_ICE "dir $obj_dir/gcc/$1\n"
		    if /^dir (.{2,})\n$/;
		}
		close GCC_GDBINIT;
	    }
	    print GDB_ICE "delete\n";
	    print GDB_ICE "break $break_loc\n" if defined($break_loc);
	    print GDB_ICE "run $cmd_args\n";
	    print GDB_ICE "bt\nl\n";
	    close GDB_ICE;
	    # Run gdb on the relevant gcc subprocess,
	    # breaking only at the point of the ICE
	    system("gdb -q -x gdb.ice.$$ $exe\n");
	    unlink "gdb.ice.$$";
	}
    }
}

$obj_dir = cwd();
while (<>) {
    if (/^(stage\d|\S+|  \.)\/xgcc\s/) {
	$#cc_output = -1;
	$cc_seen = 1;
    }
    if ($cc_seen) {
	push @cc_output, $_;
	$ICE_seen = 1 if /^\S+: Internal compiler error[ :]/;
	if ($ICE_seen && /^make\[2\]: Leaving directory `([^']+)'$/) {
	    $cc_dir = $1;
	    # Should do better, wrapping long lines etc here
	    print @cc_output;
	    if (chdir $cc_dir) {
		my($tmp, $i);
		$tmp = $cc_output[0];
		$tmp =~ s/^\s*(\S+\s)/$1-v -save-temps /;
		if ($tmp =~ /\\\s*\n$/) {
		    for ($i = 1; $i < $#cc_output; $i++) {
			$tmp =~ s/\\\s*\n/ /;
			$tmp .= $cc_output[$i];
			last if $tmp !~ /\\\s*\n$/;
		    }
		}
		chop($tmp);
		if ($tmp =~ /\$\{name\}\s.*\/gcc\/libgcc2\.c\s/) {
		    for ($i = $#cc_output - 2;
		    $i > 0 && $cc_output[$i] !~ /^_\w+\n$/;
		    $i--) {
		    }
		    if ($i > 0) {
			my($name) = $cc_output[$i];
			chop($name);
			$tmp =~ s/\$\{name\}/$name/g;
			$tmp =~ s/;.*$//;
		    }
		}
		$tmp = $tmp . ' 2>&1 |';
		#print $cc_dir, "\t",  $tmp, "\n";
		open CC_V, $tmp or die "pipe from $tmp failed $!";
		while ($l = <CC_V>) {
		    if ($l =~ /^ ((?:stage\d|\S+)\/\w+)\s/ && -f $1 && -x $1) {
			$#ccv_output = -1;
			$ccv_seen = 1;
		    }
		    if ($ccv_seen) {
			push @ccv_output, $l;
			if ($l =~ /^Please submit a full bug report\.\n/) {
			    # Should do better, wrapping long lines etc here
			    print "\n\n", @ccv_output;
			    undef $ccv_seen;
			    &ccv_gdb;
			}
		    }
		}
		if (defined($ccv_seen)) {
		    print "\n\n", @ccv_output;
		    &ccv_gdb;
		}
	    }
	}
    }
}


More information about the Gcc-bugs mailing list