On Mon, Jun 20, 2011 at 1:24 AM, Eric Botcazou <ebotca...@adacore.com> wrote:
>> if T is a non-volatile composite type with volatile components, and O is an
>> object of type T, are the optimizers allowed to remove the assignment "O :=
>> O"?
>
> Good question, that I'm not really qualified to answer.  Any language lawyer?

Optimizers will test the TREE_THIS_VOLATILE flag on the expression
codes performing the load/store.  So if O is not TREE_THIS_VOLATILE
they won't care.  If frontends want something different in the above case
they have to make sure to properly set TREE_THIS_VOLATILE.

Richard.

> --
> Eric Botcazou
>

Reply via email to