abort in verify_wide_reg_1(), in 2.96 20000502, simple test case

Jason R Thorpe thorpej@zembu.com
Wed May 3 21:31:00 GMT 2000


Hi folks...

In the process of testing my new NetBSD/i386 ELF configuration (mostly
vanilla ELF i386) for GCC 2.96 20000502, I ran across an abort in
verify_wide_reg_1() when the NetBSD source tree build was building OpenSSL.

In the shar file below is a 19 line `.i' file which trips the bug, as
well as the output of the command used to compile the file.  The CPP
only added one line (the first one).

Ignore the fact that the code that trips the bug is obviously stupid :-)
It still shouldn't kill the compiler.

The file compiles fine with `-O1' or `-O0' (and the resulting assembler
appears correct, from a quick inspection...)

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	gcc-bug.command-output
#	gcc-bug.i
#
echo x - gcc-bug.command-output
sed 's/^X//' >gcc-bug.command-output << 'END-of-gcc-bug.command-output'
Xdr-evil:thorpej 242$ /usr/local/bin/gcc -v --save-temps -O2 gcc-bug.c
XReading specs from /usr/local/lib/gcc-lib/i386-unknown-netbsdelf1.4X/2.96/specs
Xgcc version 2.96 20000502 (experimental)
X /usr/local/lib/gcc-lib/i386-unknown-netbsdelf1.4X/2.96/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__NetBSD__ -D__ELF__ -D__NO_LEADING_UNDERSCORES__ -Di386 -D__NetBSD__ -D__ELF__ -D__NO_LEADING_UNDERSCORES__ -D__i386__ -D__i386 -Asystem(unix) -Asystem(NetBSD) -Acpu(i386) -Amachine(i386) -D__OPTIMIZE__ gcc-bug.c gcc-bug.i
XGNU CPP version 2.96 20000502 (experimental) (cpplib)
X (NetBSD/i386 ELF)
X#include "..." search starts here:
X#include <...> search starts here:
X /usr/local/include
X /usr/local/lib/gcc-lib/i386-unknown-netbsdelf1.4X/2.96/include
X /usr/local/i386-unknown-netbsdelf1.4X/include
X /usr/include
XEnd of search list.
X /usr/local/lib/gcc-lib/i386-unknown-netbsdelf1.4X/2.96/cc1 gcc-bug.i -quiet -dumpbase gcc-bug.c -O2 -version -o gcc-bug.s
XGNU C version 2.96 20000502 (experimental) (i386-unknown-netbsdelf1.4X) compiled by GNU C version 2.96 20000502 (experimental).
Xgcc-bug.c: In function `func':
Xgcc-bug.c:18: Internal compiler error in `verify_wide_reg_1', at flow.c:2593
XPlease submit a full bug report.
XSee <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.
Xdr-evil:thorpej 243$ 
END-of-gcc-bug.command-output
echo x - gcc-bug.i
sed 's/^X//' >gcc-bug.i << 'END-of-gcc-bug.i'
X# 1 "gcc-bug.c"
Xstruct foo {
X	int a;
X	int b;
X};
X
Xint func(struct foo *foo, int a)
X{
X	if (foo->b == 0) {
X		int ret = foo->a = a;
X
X		if (a >= 0)
X			foo->a = a;
X
X		return (ret);
X 	}
X
X	return (0);
X}
END-of-gcc-bug.i
exit



More information about the Gcc-bugs mailing list