Bug 173764 - gcc 4.01 generates incorrect i386 code with -Os
gcc 4.01 generates incorrect i386 code with -Os
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
4
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-20 14:41 EST by Krzysztof Halasa
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-25 08:30:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A C program which tests for this gcc problem (337 bytes, text/plain)
2005-11-20 14:41 EST, Krzysztof Halasa
no flags Details

  None (edit)
Description Krzysztof Halasa 2005-11-20 14:41:55 EST
Description of problem:
gcc generates incorrect code with -Os

Version-Release number of selected component (if applicable):
gcc-4.0.1-4.fc4

How reproducible:
gcc -W -Wall -Os test.c -o test -Werror && ./test

Actual results:
array: 1 2
array: 1 2

Expected results:
gcc -W -Wall -O2 test.c -o test -Werror && ./test
array: 1 2
array: 2 3

Additional info:
Marked "high" as it miscompiles the Linux kernel.
Comment 1 Krzysztof Halasa 2005-11-20 14:41:56 EST
Created attachment 121276 [details]
A C program which tests for this gcc problem
Comment 2 Krzysztof Halasa 2005-12-28 19:00:50 EST
gcc 4.0.2 20051125 (Red Hat 4.0.2-8) = current FC4 still has this bug.
Comment 3 Krzysztof Halasa 2006-03-25 08:30:26 EST
gcc 4.1 in Fedora Core 5 doesn't have this problem.

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