Re: bug in redhat gcc 2.96

2001-05-09 Thread Matt Wilson

This is because Jakub fixed it in GCC 3.0 CVS at the same time that he
fixed it in 2.96-82, which was on the same day it was reported.  It
was broken in GCC CVS until that moment.

Cheers,

Matt

On Wed, May 09, 2001 at 09:56:24AM +0100, Alan Cox wrote:
> > As this is with Red Hat's version of gcc, I'm not sending
> > this to the gcc folks.  RPMs of gcc with this problem
> 
> (If you have the time check 3.0 CVS doesnt show the same problem, the RH tree
>  diverges from it so may well be unique in having the bug but many bugs are
>  shared)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread Bernhard Rosenkraenzer

On Wed, 9 May 2001, Dan Kegel wrote:

> OH.  I kept looking for a package called 'kgcc'.  Silly me.
>
> Guess it's time for a "How to compile a kernel on Red Hat 7.1" FAQ.

The answer is that you can safely use gcc 2.96. No need to install kgcc or
any other old compiler.

LLaP
bero


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread Dan Kegel

Stefan Hoffmeister wrote:
> >Since there is no kgcc in RH71,
> 
> There is an compat-egcs RPM (on CD2?) that contains kgcc. Took me a while
> to find that.

OH.  I kept looking for a package called 'kgcc'.  Silly me.

Guess it's time for a "How to compile a kernel on Red Hat 7.1" FAQ.
- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread Jeremy Hogan

This bug is fixed in gcc-2.96-82 and higher, as per
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=37054. I've posted
gcc-2.96-84.src.rpm at your enterprise ftp folder.

--jeremy


Jim Wright wrote:
> 
> We believe we have found a bug in gcc.  We have been trying to track
> down why the .../drivers/scsi/sym53c8xx.c driver oopses with a divide
> by zero when initializing at line 5265, which reads:
> 
> period = (4 * div_10M[0] + np->clock_khz - 1) / np->clock_khz;
> 
> We believe the bug is that gcc is generating incorrect code for this:
> 
> if  (f1 < 55000)f1 =  4;
> elsef1 =  8;
> 
> Here is the test code to demonstrate this:
> 
> % cat bug.c
> int main (int argc, char *argv[])
> {
> unsigned f1;
> 
> f1 = (unsigned)argc;
> 
> if (f1 < 5) {
> f1 = 4;
> } else {
> f1 = 8;
> }
> exit (f1);
> }
> 
> And here are commands to exhibit the problem.
> 
> % for i in 0 1 2 3 4 5 6 ; do ln bug.c bug$i.c ; done
> % for i in 0 1 2 3 4 5 6 ; do gcc -save-temps -O$i -o bug$i bug$i.c ; done
> % for i in 0 1 2 3 4 5 6 ; do ./bug$i 1 2 ; echo $? ; done
> % for i in 0 1 2 3 4 5 6 ; do ./bug$i 1 2 3 4 5 6 7 ; echo $? ; done
> 
> The level 0 optimization assembly code appears correct.  For level 1 and
> above, the compiler emits a long-subtract-with-borrow statement which
> leaves EAX either 0 filled or 1 filled, based on the carry flag.
> 
> As this is with Red Hat's version of gcc, I'm not sending
> this to the gcc folks.  RPMs of gcc with this problem
> include gcc-2.96-69 and gcc-2.96-81.  This has been logged
> as http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=39764.
> Any suggestions for a way to cope with this?  We have a
> customer who's system fails due to this.
> 
> --
> Jim Wright   Software Engineer   Penguin Computing
> [EMAIL PROTECTED]   v:415-358-2609   f:415-358-2646
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread Stefan Hoffmeister

: On Wed, 9 May 2001 11:09:14 +0200 (CEST), Tobias Ringstrom wrote:

>On Wed, 9 May 2001, Alan Cox wrote:
>> > Any suggestions for a way to cope with this?  We have a
>> > customer who's system fails due to this.
>>
>> You can build 2.4 quite sanely with egcs-1.1.2 (aka kgcc)
>
>Since there is no kgcc in RH71, 

There is an compat-egcs RPM (on CD2?) that contains kgcc. Took me a while
to find that.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread David Woodhouse


[EMAIL PROTECTED] said:
> This was fixed in 2.96-82, see:
> http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=37054
> It was a bug in the if conversion optimization. 

So if I run up2date, will I get the fixed version?

--
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread Tobias Ringstrom

On Wed, 9 May 2001, Alan Cox wrote:
> > Any suggestions for a way to cope with this?  We have a
> > customer who's system fails due to this.
>
> You can build 2.4 quite sanely with egcs-1.1.2 (aka kgcc)

Since there is no kgcc in RH71, will you be releasing an updated gcc
rpm, or is the best solution to download and compile egcs-1.1.2 from
source?

IMHO, it is best not to revert to an old egcs version, but instead
continue to find bugs in the upcoming 3.0 release.  I'm assuming that
your fixes for your gcc-2.96 are propagated to the pre-3.0 branch.

/Tobias

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread Alan Cox

> As this is with Red Hat's version of gcc, I'm not sending
> this to the gcc folks.  RPMs of gcc with this problem

(If you have the time check 3.0 CVS doesnt show the same problem, the RH tree
 diverges from it so may well be unique in having the bug but many bugs are
 shared)

> include gcc-2.96-69 and gcc-2.96-81.  This has been logged
> as http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=39764.

Thanks.

> Any suggestions for a way to cope with this?  We have a
> customer who's system fails due to this.

You can build 2.4 quite sanely with egcs-1.1.2 (aka kgcc)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread Jeremy Hogan

This bug is fixed in gcc-2.96-82 and higher, as per
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=37054. I've posted
gcc-2.96-84.src.rpm at your enterprise ftp folder.

--jeremy


Jim Wright wrote:
 
 We believe we have found a bug in gcc.  We have been trying to track
 down why the .../drivers/scsi/sym53c8xx.c driver oopses with a divide
 by zero when initializing at line 5265, which reads:
 
 period = (4 * div_10M[0] + np-clock_khz - 1) / np-clock_khz;
 
 We believe the bug is that gcc is generating incorrect code for this:
 
 if  (f1  55000)f1 =  4;
 elsef1 =  8;
 
 Here is the test code to demonstrate this:
 
 % cat bug.c
 int main (int argc, char *argv[])
 {
 unsigned f1;
 
 f1 = (unsigned)argc;
 
 if (f1  5) {
 f1 = 4;
 } else {
 f1 = 8;
 }
 exit (f1);
 }
 
 And here are commands to exhibit the problem.
 
 % for i in 0 1 2 3 4 5 6 ; do ln bug.c bug$i.c ; done
 % for i in 0 1 2 3 4 5 6 ; do gcc -save-temps -O$i -o bug$i bug$i.c ; done
 % for i in 0 1 2 3 4 5 6 ; do ./bug$i 1 2 ; echo $? ; done
 % for i in 0 1 2 3 4 5 6 ; do ./bug$i 1 2 3 4 5 6 7 ; echo $? ; done
 
 The level 0 optimization assembly code appears correct.  For level 1 and
 above, the compiler emits a long-subtract-with-borrow statement which
 leaves EAX either 0 filled or 1 filled, based on the carry flag.
 
 As this is with Red Hat's version of gcc, I'm not sending
 this to the gcc folks.  RPMs of gcc with this problem
 include gcc-2.96-69 and gcc-2.96-81.  This has been logged
 as http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=39764.
 Any suggestions for a way to cope with this?  We have a
 customer who's system fails due to this.
 
 --
 Jim Wright   Software Engineer   Penguin Computing
 [EMAIL PROTECTED]   v:415-358-2609   f:415-358-2646
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread Tobias Ringstrom

On Wed, 9 May 2001, Alan Cox wrote:
  Any suggestions for a way to cope with this?  We have a
  customer who's system fails due to this.

 You can build 2.4 quite sanely with egcs-1.1.2 (aka kgcc)

Since there is no kgcc in RH71, will you be releasing an updated gcc
rpm, or is the best solution to download and compile egcs-1.1.2 from
source?

IMHO, it is best not to revert to an old egcs version, but instead
continue to find bugs in the upcoming 3.0 release.  I'm assuming that
your fixes for your gcc-2.96 are propagated to the pre-3.0 branch.

/Tobias

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread Alan Cox

 As this is with Red Hat's version of gcc, I'm not sending
 this to the gcc folks.  RPMs of gcc with this problem

(If you have the time check 3.0 CVS doesnt show the same problem, the RH tree
 diverges from it so may well be unique in having the bug but many bugs are
 shared)

 include gcc-2.96-69 and gcc-2.96-81.  This has been logged
 as http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=39764.

Thanks.

 Any suggestions for a way to cope with this?  We have a
 customer who's system fails due to this.

You can build 2.4 quite sanely with egcs-1.1.2 (aka kgcc)

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread Matt Wilson

This is because Jakub fixed it in GCC 3.0 CVS at the same time that he
fixed it in 2.96-82, which was on the same day it was reported.  It
was broken in GCC CVS until that moment.

Cheers,

Matt

On Wed, May 09, 2001 at 09:56:24AM +0100, Alan Cox wrote:
  As this is with Red Hat's version of gcc, I'm not sending
  this to the gcc folks.  RPMs of gcc with this problem
 
 (If you have the time check 3.0 CVS doesnt show the same problem, the RH tree
  diverges from it so may well be unique in having the bug but many bugs are
  shared)
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread Dan Kegel

Stefan Hoffmeister wrote:
 Since there is no kgcc in RH71,
 
 There is an compat-egcs RPM (on CD2?) that contains kgcc. Took me a while
 to find that.

OH.  I kept looking for a package called 'kgcc'.  Silly me.

Guess it's time for a How to compile a kernel on Red Hat 7.1 FAQ.
- Dan
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread Bernhard Rosenkraenzer

On Wed, 9 May 2001, Dan Kegel wrote:

 OH.  I kept looking for a package called 'kgcc'.  Silly me.

 Guess it's time for a How to compile a kernel on Red Hat 7.1 FAQ.

The answer is that you can safely use gcc 2.96. No need to install kgcc or
any other old compiler.

LLaP
bero


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread David Woodhouse


[EMAIL PROTECTED] said:
 This was fixed in 2.96-82, see:
 http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=37054
 It was a bug in the if conversion optimization. 

So if I run up2date, will I get the fixed version?

--
dwmw2


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: bug in redhat gcc 2.96

2001-05-09 Thread Stefan Hoffmeister

: On Wed, 9 May 2001 11:09:14 +0200 (CEST), Tobias Ringstrom wrote:

On Wed, 9 May 2001, Alan Cox wrote:
  Any suggestions for a way to cope with this?  We have a
  customer who's system fails due to this.

 You can build 2.4 quite sanely with egcs-1.1.2 (aka kgcc)

Since there is no kgcc in RH71, 

There is an compat-egcs RPM (on CD2?) that contains kgcc. Took me a while
to find that.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/