Bug 173764

Summary: gcc 4.01 generates incorrect i386 code with -Os
Product: [Fedora] Fedora Reporter: Krzysztof Halasa <khalasa>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 4CC: davej, peter
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-25 13:30:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
A C program which tests for this gcc problem none

Description Krzysztof Halasa 2005-11-20 19:41:55 UTC
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 19:41:56 UTC
Created attachment 121276 [details]
A C program which tests for this gcc problem

Comment 2 Krzysztof Halasa 2005-12-29 00:00:50 UTC
gcc 4.0.2 20051125 (Red Hat 4.0.2-8) = current FC4 still has this bug.

Comment 3 Krzysztof Halasa 2006-03-25 13:30:26 UTC
gcc 4.1 in Fedora Core 5 doesn't have this problem.