egcs-19980517 and 19980508 (at least) crash on linux-2.1.103/i386

Horst von Brand vonbrand@sleipnir.valparaiso.cl
Thu May 21 12:30:00 GMT 1998


i586-pc-linux-gnu, glibc-2.0.93 (different snapshots used for building
egcs), linux-2.1.102 used for building 19980517, binutils-2.9.1.0.4

Both compilers (run from the drivers for 1980517) crash on the file
arch/i386/kernel/bios32.c:check_pcibios with:

../../egcs-19980517/gcc/alias.c:475: Internal compiler error in function rtx_equal_for_memref_p

A cut down version of that file that shows the same problem follows.
Adding __volatile__ to the first __asm__() sidesteps the problem.  Compile
with "gcc -O2" and watch the fireworks.

int bug(void)
{
	unsigned long a, b;
   
	__asm__(""
		: "=d" (a)
		:
		: "memory");
	__asm__ __volatile__(""
			     :
			     : "g" (b)
			     : "memory");
	return a;
}
-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viña del Mar, Chile                               +56 32 672616



More information about the Gcc-bugs mailing list