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

Reply via email to