Bug 106900 - gcc miscompiles postfix increment on structure member when used as array index
Summary: gcc miscompiles postfix increment on structure member when used as array index
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc
Version: 3.0
Hardware: powerpc
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Richard Henderson
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-13 07:05 UTC by Suhua Ding
Modified: 2007-11-30 22:06 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-19 19:33:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Test case (205 bytes, text/plain)
2003-10-13 07:06 UTC, Suhua Ding
no flags Details

Description Suhua Ding 2003-10-13 07:05:27 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20031010
Mozilla Firebird/0.6.1

Description of problem:
(manish.singh reporting)

gcc miscompiles the following attachment on ppc with -O1 or higher, in both 32
and 64-bit mode.

A similar case in real world code trips up ia64 as well, but works fine with
this simple test case. I'm hoping a fix will address the problems on both targets.

x86 and amd64 are not affected.

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

How reproducible:
Always

Steps to Reproduce:
1. gcc -O2 -o gccbug gccbug.c
2. ./gccbug


Actual Results:  prints 0

Expected Results:  should've printed 1

Additional info:

Comment 1 Suhua Ding 2003-10-13 07:06:15 UTC
Created attachment 95127 [details]
Test case

Comment 2 Richard Henderson 2004-10-04 05:35:44 UTC
Testing with cross-compiler from i686:
Fails with head-of-branch of gcc-3.2-rh as of 20041002.
Succeeds with head-of-branch of gcc-3.3.

Compilation goes wonky during .15.life.  Without digging too deeply,
it looks like it might be pre-subreg-rationalization confusion.  If
true, it's likely that the hinted ia64 problem is different, as this
would only affect big-endian targets.

Comment 3 RHEL Program Management 2007-10-19 19:33:58 UTC
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
 
For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/
 
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.


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