Bug 121600 - [PATCH] gcc -O/-O2 generate wrong code on structure modification
Summary: [PATCH] gcc -O/-O2 generate wrong code on structure modification
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc
Version: 3.0
Hardware: ia32e
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL: http://gcc.gnu.org/bugzilla/show_bug....
Whiteboard:
Depends On:
Blocks: 116727
TreeView+ depends on / blocked
 
Reported: 2004-04-23 18:02 UTC by Suresh Siddha
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-03 01:30:13 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:385 0 normal SHIPPED_LIVE Updated gcc packages 2004-08-02 04:00:00 UTC

Description Suresh Siddha 2004-04-23 18:02:02 UTC
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 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15084

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):
gcc-3.2.3-32

How reproducible:
Always

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

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 --
host=x86_64-redhat-linux
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 19:33:43 UTC
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 14:03:07 UTC
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 15:56:26 UTC
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
branch?

Comment 4 Jakub Jelinek 2004-05-10 16:16:57 UTC
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 15:39:17 UTC
This fix will appear in gcc-3.2.3-35.

Comment 8 Jay Turner 2004-08-03 01:30:13 UTC
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.

http://rhn.redhat.com/errata/RHBA-2004-385.html



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