Bug 37054 - GCC optimizer bug; miscompiles kernel sym53c8xx driver
Summary: GCC optimizer bug; miscompiles kernel sym53c8xx driver
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.1
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
: 39764 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-04-22 14:38 UTC by Krzysztof Halasa
Modified: 2007-04-18 16:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-22 19:03:30 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 04:00:00 UTC

Description Krzysztof Halasa 2001-04-22 14:38:44 UTC
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
sym53c8xx.o.

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;
        else
                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 18:26:41 UTC
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 19:03:25 UTC
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-09 03:24:15 UTC
*** 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.