Bug 121600 - [PATCH] gcc -O/-O2 generate wrong code on structure modification
[PATCH] gcc -O/-O2 generate wrong code on structure modification
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc (Show other bugs)
ia32e Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
Blocks: 116727
  Show dependency treegraph
Reported: 2004-04-23 14:02 EDT by Suresh Siddha
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-02 21:30:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
A patch (1.71 KB, patch)
2004-04-28 15:33 EDT, H.J. Lu
no flags Details | Diff

  None (edit)
Description Suresh Siddha 2004-04-23 14:02:02 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
More details of this compiler bug are at 

For gcc version 3.2, use the test case acpi-gcc32-bug.c uploaded at 
the above bugzilla.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. compile the test case with -O2

Actual Results:  # gcc -v
Reading specs from /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --
disable-checking --with-system-zlib --enable-__cxa_atexit --
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-32)
# gcc -O2 ./acpi-gcc32-bug.c
# ./a.out 
compiler bug
# gcc -Os ./acpi-gcc32-bug.c
# ./a.out 

Additional info:
Comment 1 H.J. Lu 2004-04-28 15:33:43 EDT
Created attachment 99754 [details]
A patch

This patch has been checked into gcc 3.3 and 3.4. I have verified that
it also fixes gcc 3.2.
Comment 2 Jakub Jelinek 2004-05-10 10:03:07 EDT
I see this patch has been approved by Jan for HEAD (and after a week
on mainline for 3.3/3.4 as well) almost 2 weeks ago.
Are you going to commit it?
RHEL4 will pick it up with the next gcc-3_4-branch merge and RHEL3
will follow.
Comment 3 H.J. Lu 2004-05-10 11:56:26 EDT
I didn't check it into mainline. I thought Jan wanted to use a
slightly different approach in mainline. I did check it into gcc
3.3 and 3.4. Do you want me to check it into gcc 3.2 Red Hat
Comment 4 Jakub Jelinek 2004-05-10 12:16:57 EDT
From what I understood he just wanted to keep the movsi_insv_1_rex64
pattern in i386.md in addition to the new movdi_insv_1_rex64.

I'll check this into gcc-3_2-rhl8-branch myself.
Comment 7 Jakub Jelinek 2004-05-25 11:39:17 EDT
This fix will appear in gcc-3.2.3-35.
Comment 8 Jay Turner 2004-08-02 21:30:13 EDT
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.


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