This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/14470] x86 optimizer error (?)
- From: "amodra at bigpond dot net dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Mar 2004 01:47:17 -0000
- Subject: [Bug c/14470] x86 optimizer error (?)
- References: <20040307221314.14470.lvoge@cs.vu.nl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From amodra at bigpond dot net dot au 2004-03-08 01:47 -------
tree-ssa behaviour shouldn't be taken as gospel truth. I'm not a language
lawyer, so the following should perhaps be taken with a grain of salt.
Here are some relevant quotes from ISO/IEC 9899:1999 (E)
6.5 item 2 "Between the previous and next sequence point an object shall have
its stored value modified at most once by the evaluation of an expression.
Furthermore, the prior value shall be read only to determine the value to be
stored."
6.5.2.4 item 2 "The result of the postfix ++ operator is the value of the
operand. After the result is obtained, the value of the operand is incremented."
I can't see that the expression is running foul of 6.5 item 2; d is modified
once, t[0] is modified once. I think tree-ssa is miscalculating "the value of
the operand" referred to in 6.5.2.4 item 2.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14470