This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/14470] [3.3/3.4/3.5 regression] trouble with post-increment
- From: "jsm at polyomino dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Mar 2004 10:13:19 -0000
- Subject: [Bug optimization/14470] [3.3/3.4/3.5 regression] trouble with post-increment
- References: <20040307221314.14470.lvoge@cs.vu.nl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jsm at polyomino dot org dot uk 2004-03-08 10:13 -------
Subject: Re: x86 optimizer error (?)
On Mon, 8 Mar 2004, zack at gcc dot gnu dot org wrote:
> In the line
>
> d = t[d]++;
>
> the postincrement is applied to t[d], not d. This code is valid; it should
> print 1024 and set t[0] to 1025.
The question is whether the access to d on the RHS is only to determine
the value to be stored. An analysis of what some or all of N925, N926,
N927 (linked to from readings.html), N993, N1001, N1008, N1013 (some of
which may supplement or supersede earlier papers) and Norrish's thesis say
on this question would be useful in determining whether this is a bug -
and if any of them differ, this bug report is an indication that cleaning
up these matters in the C standard is of genuine real-world relevance.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14470