This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

An egcs bug or linux bug?


> 
> Hellow,
> 
> I met following error while compiling linux kernel-2.1.103 with 
> egcs-19980517 patched with your egcs-980519.ppro.diff and 
> egcs-980519.ll.diff.
> 
> my environment: rh 5.0(glibc-2.0.93+latest patches), your egcs-1.0.3,
>                 binutils-2.9.1.0.4 
>                 ASUS P/I-P55T2P4 rev. 3.1 (bios 0206.004, pipelined-
>                 burst SRAM 512K)
>                 intel pentium MMX 166(changed to 83x2)
>                 64M samsung EDO RAM 
> 
> It might be another problem of egcs-19980517(alias?) or come from
> my overclocked CPU. But, anyhow, I report this to you.
> 
> BTW, egcs-1.0.3 compiles kernel-2.1.103 well.
> 
> .....
> make[2]: Leaving directory `/usr/src/linux-2.1.103/lib'
> make[1]: Leaving directory `/usr/src/linux-2.1.103/lib'
> make[1]: Entering directory `/usr/src/linux-2.1.103/arch/i386/kernel'
> ....
> gcc -D__KERNEL__ -I/usr/src/linux-2.1.103/include -Wall \
> -Wstrict-prototypes -O3 -fomit-frame-pointer -pipe  -mcpu=pentium \
> -march=pentium -malign-loops=0 -malign-jumps=0 -malign-functions=0 \
> -Dpentium -c -o bios32.o bios32.c
> ../../egcs-19980517/gcc/alias.c:475: Internal compiler error \
> in function rtx_equal_for_memref_p
> cpp: output pipe has been closed
> make[1]: *** [bios32.o] Error 1
> make[1]: Leaving directory `/usr/src/linux-2.1.103/arch/i386/kernel'
> make: *** [linuxsubdirs] Error 2
> 
> Thanks,
> 

Here is a small test case.

# gcc -B/home/work/build/bin/egcs/gcc/ -S -O2 foo.c
/home/work/build/src/egcs/gcc/alias.c:474: Internal compiler error in function rtx_equal_for_memref_p

I am also enclosing a patch for Linux kernel 2.1.103. But I am not
if it is an egcs bug or linux kernel bug. Even if it is a linux bug,
egcs should give out a better message.

BTW, you should use -mcpu=pentiumpro -march=pentiumpro with my
PPro patches.

Thanks.

H.J.
----foo.c---
int check_pcibios(void)
{
	unsigned int signature, eax, ebx, ecx;
	unsigned long flags, pcibios_entry;
	__asm__ ("lcall (%%edi)\n\t"
		"jc 1f\n\t"
		"xor %%ah, %%ah\n"
		"1:"
		: "=d" (signature),
		  "=a" (eax),
		  "=b" (ebx),
		  "=c" (ecx)
		: "1" (0xb101 ),
		  "D" (&pcibios_entry)
		: "memory");
	__asm__ __volatile__("pushl %0 ; popfl":   :"g" (  flags  ):"memory")  ;
	if (signature)
		return 1;
	return 0;
}
Index: arch/i386/kernel/bios32.c
===================================================================
RCS file: /home/work/cvs/linux/linux/arch/i386/kernel/bios32.c,v
retrieving revision 1.1.1.18
diff -u -r1.1.1.18 bios32.c
--- bios32.c	1998/05/21 15:10:28	1.1.1.18
+++ bios32.c	1998/05/21 18:23:22
@@ -543,7 +543,7 @@
 		pci_indirect.address = pcibios_entry + PAGE_OFFSET;
 
 		save_flags(flags); cli();
-		__asm__("lcall (%%edi)\n\t"
+		__asm__ __volatile__ ("lcall (%%edi)\n\t"
 			"jc 1f\n\t"
 			"xor %%ah, %%ah\n"
 			"1:"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]