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]

GCC-current ICE in reload1.c


Compiling the following code with gcc -O -fgcse -c results in:
reload1.c:1279: Internal compiler error in function reload

Compiling with just -O does not show the problem. 

#############################

Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.32/specs
gcc version egcs-2.91.32 19980525 (gcc2 ss-980502 experimental)
 /usr/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.32/cc1 /tmp/cc8nw8AA.i -quiet -dumpbase bm.c -O -fgcse -version -o /tmp/cc8nw8AA.s
GNU C version egcs-2.91.32 19980525 (gcc2 ss-980502 experimental) (i586-pc-linux-gnu) compiled by GNU C version egcs-2.91.32 19980525 (gcc2 ss-980502 experimental).
reload1.c:1279: Internal compiler error in function reload

########################
struct task_struct {
    int timeout;
};

static inline struct task_struct * get_current(void)
{
	struct task_struct *current;
	__asm__("andl %%esp,%0; ":"=r" (current) : "0" (~8191UL));
	return current;
 }
extern unsigned long jiffies;

void do_mtd_request(int req)
{
    int tries;
    for (tries = 0; tries < 20; tries++) {
	switch (req) {
	case 0x00 :
	     
	    get_current() ->timeout =     jiffies;
	    break;
	}
	if (signal_pending(get_current() ))
	        printk  ("<5>"  "cs: do_mtd_request interrupted!\n");
    }
}  
-- 
Matthias Urlichs
noris network GmbH


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