[Ada] Fix bugs with volatile and components of aggregate types

Richard Guenther richard.guenther@gmail.com
Mon Jun 20 11:46:00 GMT 2011

On Mon, Jun 20, 2011 at 1:24 AM, Eric Botcazou <ebotcazou@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.


> --
> Eric Botcazou

More information about the Gcc-patches mailing list