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

2011-06-20 Thread Michael Matz
Hi, On Sun, 19 Jun 2011, Mike Stump 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 >

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

2011-06-20 Thread Richard Guenther
On Mon, Jun 20, 2011 at 1:24 AM, Eric Botcazou 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 lawye

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

2011-06-19 Thread Mike Stump
On Jun 19, 2011, at 4:24 PM, Eric Botcazou 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?

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

2011-06-19 Thread Eric Botcazou
> 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? -- Eric Botcazou

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

2011-06-19 Thread Duncan Sands
Hi Eric, This is the usual problem of volatile accesses not preserved under (heavy) optimization. In Ada, we can put pragma Volatile on components of composite types without putting it on the enclosing type itself, if T is a non-volatile composite type with volatile components, and O is an ob