egcs-2.90.1[5-7] crash on __asm__, i586-pc-linux-gnulibc1

Horst von Brand vonbrand@sleipnir.valparaiso.cl
Sun Nov 16 16:37:00 GMT 1997


I've got the above egcs versions (sorry, no earlier ones to check here),
compiled with -O2 -fomit-frame-pointer -mpentium.

The compiler crashes on the file .../arch/i386/kernel/process.c from
linux-2.1.64, but doesn't on linux-2.1.63-VGER-CVS971112. I've managed to
strip down the files to the following minimal examples, which crash
"gcc -c testfile.c". In the original, pa is gdt and the offending function
is flush_thread:

#ifdef DONT_CRASH
extern int pa[256];
#else
extern int *pa;
#endif

void f(void)
{
	int i;
	{
		for (i = 1; i < 512; i++) {
		  __asm__(""
                        :
                        : "m" (* pa),
                          "m" (* (pa+1)),
			  "m" (* (pa+2)),
                          "m" (* (pa+3)),
                          "m" (* (pa+4)),
                          "m" (* (pa+5)),
                          "m" (* (pa+6)));
		}	
	}
}
-- 
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