Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 37054 - GCC optimizer bug; miscompiles kernel sym53c8xx driver
GCC optimizer bug; miscompiles kernel sym53c8xx driver
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
: 39764 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2001-04-22 10:38 EDT by Krzysztof Halasa
Modified: 2007-04-18 12:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-04-22 15:03:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2001:082 high SHIPPED_LIVE New version of GCC 2.96-RH available fixing several bugs 2001-06-14 00:00:00 EDT

  None (edit)
Description Krzysztof Halasa 2001-04-22 10:38:44 EDT
gcc-2.96-81 -O2 miscompiles the attached code. RedHat 7.1 sym53c8xx SCSI
driver is affected, on my system (Tekram 53C860) RH7.1 install program
causes "oops" (non-fatal, but you can't access SCSI) when insmoding

Reproducible: Always
Steps to Reproduce:
1. install Tekram 310U (or possibly other NCR53C8xx-based) SCSI PCI card
2. run RH7.1 install from CD
3. watch the screen

Actual Results:  $ gcc -O2 test.c -o test
$ ./test
x = 0 (should be 8)

int main(void)
        unsigned int x = 8;
        if (x < 5)
                x =  4;
                x =  8;

        printf("x = %u (should be 8)\n", x);
I haven't tested current gcc compilers, possibly the problem should be
corrected there as well.
Comment 1 Jakub Jelinek 2001-04-22 14:26:41 EDT
Verified, looks like a bug in ia32's ix86_expand_int_movcc,
happens in gcc 3.0 and gcc 3.1 as well.
Hope to have this debugged by tomorrow.
Comment 2 Jakub Jelinek 2001-04-22 15:03:25 EDT
Fixed by http://gcc.gnu.org/ml/gcc-patches/2001-04/msg01057.html
and will be included in the upcoming gcc-2.96-82.
Comment 3 Matt Wilson 2001-05-08 23:24:15 EDT
*** Bug 39764 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.