This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with reordering of memory accesses
> Date: Tue, 17 Oct 2000 19:15:36 +0200
> From: Michael Schwingen <michaels@stochastik.rwth-aachen.de>
> Cc: Michael Schwingen <michaels@stochastik.rwth-aachen.de>, gcc@gcc.gnu.org
>
> On Tue, Oct 17, 2000 at 09:51:34AM -0700, Geoff Keating wrote:
> > 'volatile' should be the solution you need. If you declare everything
> > whose ordering you care about 'volatile', then those variables should
> > be changed in the exact order you specify. If not, it's a bug.
>
> Hm. I tried this first, and gcc still reordered them. Only declaring the
> pointer to the struct volatile helped in my "real" code. In the small test
> case, declaring the elements of the struct volatile was sufficient, though.
If you can provide an example, it might be able to be fixed...
--
- Geoffrey Keating <geoffk@cygnus.com>