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]

Bug in haifa scheduler ?



	Hello,

I'm a newbie on this list. However I want to post a bug report
which happens with (at least) the 5 or 6 last egcs snapshots when
compiling the vger linux kernel for PPC. 

The message is quite explicit:

[root@corh01 fs]# gcc -D__KERNEL__ -I/usr/src/cvslinux/linux/include -Wall
-Wstrict-prototypes -O2 -fomit-frame-pointer -D__powerpc__ -fsigned-char
-msoft-float -fno-builtin -ffixed-r2 -Wno-uninitialized -mmultiple
-mstring   -c -o super.o super.c -save-temps -da 
../../gcc/haifa-sched.c:7605: Internal compiler error in function
schedule_region

so this must qualify as a compiler bug. I have trimmed to find the
offending function whic happens to be sys_ustat and is fairly short.
Unfortunately the gzipped .i file is too large to send
here (44kB). I can send it privately to anybody interested in tracking it.

FYI the preprocessor output of the function body follows:

  int sys_ustat(dev_t dev, struct ustat * ubuf)
{
        struct super_block *s;
        struct ustat tmp;
        struct statfs sbuf;
        mm_segment_t old_fs;
	int err = - 22 ;

	do { } while (0) ;
        s = get_super(to_kdev_t(dev));
        if (s == ((void *) 0) )
                goto out;
	err = - 38 ;
        if (!(s->s_op->statfs))
                goto out;

        old_fs = (current->tss.fs) ;
        (current->tss.fs = ( (((mm_segment_t) { 0 }) )  )) ;
        s->s_op->statfs(s,&sbuf,sizeof(struct statfs));
        (current->tss.fs = ( old_fs )) ;

        memset(&tmp,0,sizeof(struct ustat));
        tmp.f_tfree = sbuf.f_bfree;
        tmp.f_tinode = sbuf.f_ffree;

        err = copy_to_user(ubuf,&tmp,sizeof(struct ustat)) ? - 14  : 0;
out:
	do { } while (0) ;
	return err;
}

the great mystery (for me) is that the compiler succesfully compiles
itself but aborts on this innocent-looking simple code ;) At least 
such an example is hopefully relatively easy to analyze for the experts. 

	Gabriel.

P.S: for now I recompile this file (and only this file) with egcs-2.91.07
and everything seems to work fine. 



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