This is the mail archive of the
mailing list for the GCC project.
Re: [gimple] assignments to volatile
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: Mark Mitchell <mark at codesourcery dot com>, Michael Matz <matz at suse dot de>, Richard Guenther <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 09 Jul 2010 08:20:23 +0100
- Subject: Re: [gimple] assignments to volatile
- References: <4C1F5380.firstname.lastname@example.org> <AANLkTimzBtuWYWnzMkmDyM6Y490EIwQJxaDI_higMvJs@mail.gmail.com> <Pine.LNX.email@example.com> <4C20D40B.firstname.lastname@example.org> <Pine.LNX.email@example.com> <4C20D891.firstname.lastname@example.org> <4C21E361.email@example.com> <4C220762.firstname.lastname@example.org> <025B27D1-E620-4BA2-A113-FD28747E2762@comcast.net> <4C231176.email@example.com> <798730F0-AFFA-4812-AA49-E41A23A02D21@comcast.net> <4C244E2C.firstname.lastname@example.org> <7F30721E-1B2E-41B7-B7BF-F66C936690D9@comcast.net> <4C2840FB.email@example.com> <7069549D-C414-4357-AA66-093F4B73F7E1@comcast.net> <4C319FAD.firstname.lastname@example.org> <8BCB8222-AAA2-4F81-B6D2-3AF6DE697D7E@comcast.net>
On 07/09/10 06:14, Mike Stump wrote:
On Jul 5, 2010, at 2:02 AM, Nathan Sidwell wrote:
On 07/01/10 02:02, Mike Stump wrote:
On Jun 27, 2010, at 11:28 PM, Nathan Sidwell wrote:
On 06/25/10 17:41, Mike Stump wrote:
On Jun 24, 2010, at 11:35 PM, Nathan Sidwell wrote:
The current G++ behaviour is not to re-read the assigned-to value.
Here, g++ in fact does re-read the assigned to value.
Yes I would expect this
Above you say that it doesn't re-read, then you agree with me that it does re-read... :-)
As I said, the two examples are different. Your modified example inserts a
sequence point (but you've snipped my sentence explaining that).
Anyway, we're on the same page now with respect to this part of the subthread. I suppose that if we defined re-read to be the process by which the value when used is re-fetched from memory instead of a cached value of the rhs then with that definition gcc always (barring stupid bugs under discussion) re-reads and never doesn't (or at least, if one agreed with me that the result is the value of the lhs). For those that go with, the value is the converted value of the rhs, then we'd say that gcc never re-reads.
No, we are not.
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery