This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, Fortran] Wrong invocation of caf_atomic_op
- From: Alessandro Fanfarillo <fanfarillo dot gcc at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 22 Sep 2014 21:29:42 -0600
- Subject: Re: [PATCH, Fortran] Wrong invocation of caf_atomic_op
- Authentication-results: sourceware.org; auth=none
- References: <CAHqFgjXx_T=wG88mTAcCT2xK01XkZG3CTCBm44moELAYBMbJmg at mail dot gmail dot com> <540E9E97 dot 6040602 at net-b dot de> <CAHqFgjW=Gs4kOAwNb=Hciqd3v9S=YhsLeHPSWLAh=XQobvV+yA at mail dot gmail dot com> <54173607 dot 7010008 at net-b dot de> <CAHqFgjX18JYyVpbn0-45dmFc1VP7N2viNFqW_KJptPu5ja56Aw at mail dot gmail dot com> <54175A3D dot 1000103 at net-b dot de> <541D8BC3 dot 8030602 at net-b dot de>
Thanks a lot. I'm moving and I didn't have time to make a test case.
Regards
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
>>
>