This is the mail archive of the gcc-bugs@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]

ICE on MIPS (and Sparc)


Hi,

I am compiling for MIPS with the CVS of GCC 2.96 as of today.  This
testcase produces an ICE when I compile with -O2.  It works with -O1,
-O0 or even with -O2 and -fno-gcse.  This is the same problem as the
one reported by Keith M Wesolowski a few days ago with sysctl.c in the
Linux kernel.

#define dirty(x)	__asm__ ("":"=r" (x))

void foo(void)
{
	char byte;
	int word;
	do {
		dirty(byte); dirty(word);
	} while (word || byte);
}

$ mips-linux-gcc -O2 -c -o bug.o bug.c
bug.c: In function `foo':
bug.c:10: Unrecognizable insn:
(insn 42 18 21 (set (reg:QI 85)
        (reg/v:SI 82)) -1 (nil)
    (nil))
bug.c:10: Internal compiler error in `extract_insn', at recog.c:2048

This does however not produce an ICE:

#define dirty(x)	__asm__ ("":"=r" (x))

void foo(void)
{
	char byte;
	int word;
	do {
		dirty(byte);
		dirty(word);
	} while (word || byte);
}

Ulf

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