[PATCH, Fortran] Wrong invocation of caf_atomic_op

Alessandro Fanfarillo fanfarillo.gcc@gmail.com
Tue Sep 23 03:29:00 GMT 2014

Thanks a lot. I'm moving and I didn't have time to make a test case.

2014-09-20 8:14 GMT-06:00 Tobias Burnus <burnus@net-b.de>:
> Hi Alessandro et al.,
> I have now committed (Rev. 215421) the attached patch, which includes a test
> case for it.
> Thanks for the report and the patch Alessandro!
> Tobias
> On 15.09.2014 23:29, Tobias Burnus wrote:
>> On 15.09.2014 22:23, Alessandro Fanfarillo wrote:
>>> In attachment a test case which fails with the current gcc-trunk
>>> version but works when the patch is applied. coarray_35.f90 is my
>>> attempt to write a gcc test case.
>>> The problem is related with atomic_add.
>> Well, if it is a "dg-do compile" test, it won't exercise the issue: Even
>> without the patch, it was compiling.
>> It should either be a run test (dg-do run) – and then under
>> gfortran.dg/coarray/ - which will automatically link libcaf_single to it.
>> (And do another run with -fcoarray=single). – Or you have to additionally
>> use -fdump-tree-original and scan for the strings, using "dg-final {
>> scan-tree-dump-times ... or scan-tree-dump-not. See other test cases there.
>> I think ATOMIC_ADD should also fail without the patch, i.e. the run test
>> really would test whether it works. Thus, that might be the simpler option.
>> Or you do both – but the dump one shouldn't be under gfortran.dg/coarray/ as
>> that is also run with -fcoarray=single, but under gfortran.dg/ directly.
>> Tobias

More information about the Gcc-patches mailing list