gcc-11-20220108 is now available

2022-01-08 Thread GCC Administrator via Gcc
Snapshot gcc-11-20220108 is now available on https://gcc.gnu.org/pub/gcc/snapshots/11-20220108/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 11 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

Re: reordering of trapping operations and volatile

2022-01-08 Thread Martin Uecker via Gcc
Am Samstag, den 08.01.2022, 10:35 -0800 schrieb Andrew Pinski: > On Sat, Jan 8, 2022 at 12:33 AM Martin Uecker via Gcc wrote: > > > > Hi Richard, > > > > I have a question regarding reodering of volatile > > accesses and trapping operations. My initial > > assumption (and hope) was that compile

Re: reordering of trapping operations and volatile

2022-01-08 Thread Andrew Pinski via Gcc
On Sat, Jan 8, 2022 at 12:33 AM Martin Uecker via Gcc wrote: > > > Hi Richard, > > I have a question regarding reodering of volatile > accesses and trapping operations. My initial > assumption (and hope) was that compilers take > care to avoid creating traps that are incorrectly > ordered relativ

Re: reordering of trapping operations and volatile

2022-01-08 Thread Eric Botcazou
> Most C programmers would assume that volatile accesses already > provides this guarantee, so actually doing so would be good. I'm a little skeptical of this statement: if it was true, how come the most recent version of the standard does not provide it 30 years after the language was first sta

Re: reordering of trapping operations and volatile

2022-01-08 Thread Martin Uecker via Gcc
Am Samstag, den 08.01.2022, 16:03 +0100 schrieb David Brown: > On 08/01/2022 09:32, Martin Uecker via Gcc wrote: > > Hi Richard, > > > > I have a question regarding reodering of volatile > > accesses and trapping operations. My initial > > assumption (and hope) was that compilers take > > care to

Re: Help with an ABI peculiarity

2022-01-08 Thread Jeff Law via Gcc
On 1/7/2022 2:55 PM, Paul Koning via Gcc wrote: On Jan 7, 2022, at 4:06 PM, Iain Sandoe wrote: Hi Folks, In the aarch64 Darwin ABI we have an unusual (OK, several unusual) feature of the calling convention. When an argument is passed *in a register* and it is integral and less than SI

Re: reordering of trapping operations and volatile

2022-01-08 Thread Martin Uecker via Gcc
Am Samstag, den 08.01.2022, 15:41 +0100 schrieb Eric Botcazou: > > Yes, although I think potentially trapping ops > > are not moved before calls (as this would be > > incorrect). So do you think it would be feasable > > to prevent this for volatile too? > > Feasible probably, but why would this b

Re: reordering of trapping operations and volatile

2022-01-08 Thread David Brown
On 08/01/2022 09:32, Martin Uecker via Gcc wrote: > > Hi Richard, > > I have a question regarding reodering of volatile > accesses and trapping operations. My initial > assumption (and hope) was that compilers take > care to avoid creating traps that are incorrectly > ordered relative to observa

Re: reordering of trapping operations and volatile

2022-01-08 Thread Eric Botcazou
> Yes, although I think potentially trapping ops > are not moved before calls (as this would be > incorrect). So do you think it would be feasable > to prevent this for volatile too? Feasible probably, but why would this be desirable in C? It's not Java! -- Eric Botcazou

Re: reordering of trapping operations and volatile

2022-01-08 Thread Marc Glisse
On Sat, 8 Jan 2022, Martin Uecker via Gcc wrote: Am Samstag, den 08.01.2022, 13:41 +0100 schrieb Richard Biener: On January 8, 2022 9:32:24 AM GMT+01:00, Martin Uecker wrote: Hi Richard, thank you for your quick response! I have a question regarding reodering of volatile accesses and tra

Re: reordering of trapping operations and volatile

2022-01-08 Thread Martin Uecker via Gcc
Am Samstag, den 08.01.2022, 13:41 +0100 schrieb Richard Biener: > On January 8, 2022 9:32:24 AM GMT+01:00, Martin Uecker > wrote: > > Hi Richard, thank you for your quick response! > > I have a question regarding reodering of volatile > > accesses and trapping operations. My initial > > assumpt

Re: reordering of trapping operations and volatile

2022-01-08 Thread Richard Biener via Gcc
On January 8, 2022 9:32:24 AM GMT+01:00, Martin Uecker wrote: > >Hi Richard, > >I have a question regarding reodering of volatile >accesses and trapping operations. My initial >assumption (and hope) was that compilers take >care to avoid creating traps that are incorrectly >ordered relative to o

reordering of trapping operations and volatile

2022-01-08 Thread Martin Uecker via Gcc
Hi Richard, I have a question regarding reodering of volatile accesses and trapping operations. My initial assumption (and hope) was that compilers take care to avoid creating traps that are incorrectly ordered relative to observable behavior. I had trouble finding examples, and my cursory gla