Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 106900 - gcc miscompiles postfix increment on structure member when used as array index
gcc miscompiles postfix increment on structure member when used as array index
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc (Show other bugs)
powerpc Linux
medium Severity medium
: ---
: ---
Assigned To: Richard Henderson
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2003-10-13 03:05 EDT by Suhua Ding
Modified: 2007-11-30 17:06 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-19 15:33:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Suhua Ding 2003-10-13 03:05:27 EDT
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@oracle.com 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):

How reproducible:

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 03:06:15 EDT
Created attachment 95127 [details]
Test case
Comment 2 Richard Henderson 2004-10-04 01:35:44 EDT
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 Product and Program Management 2007-10-19 15:33:58 EDT
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:
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.