This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/15850] extra load with volatilable variables
- From: "schwab at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jun 2004 22:17:28 -0000
- Subject: [Bug c/15850] extra load with volatilable variables
- References: <20040606151231.15850.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From schwab at suse dot de 2004-06-15 22:17 -------
The standard says in 6.5.16#3: "... An assignment expression has the value of
the left operand _after_ the assignment, ..." (emphasis mine). A volatile
variable can change its value any time, so the compiler must reload the value
before it can be used further.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15850