2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / coarray_atomic_5.f90
blob005f3e5eae8df6e6dbd59a3c42ce6e7fa6f4ac76
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original -fcoarray=lib" }
4 ! Argument passing was wrong
7 program atomic
8 use iso_fortran_env
9 implicit none
11 integer :: me
12 integer(atomic_int_kind) :: atom[*]
13 me = this_image()
14 call atomic_define(atom[1],0)
15 sync all
16 call ATOMIC_ADD (atom[1], me)
17 if(me == 1) call atomic_ref(me,atom[1])
18 sync all
19 write(*,*) me
20 end program
22 ! { dg-final { scan-tree-dump-times "value.. = 0;" 1 "original" } }
23 ! { dg-final { scan-tree-dump-times "_gfortran_caf_atomic_define \\(caf_token.0, 0, 1, &value.., 0B, 1, 4\\);" 1 "original" } }
24 ! { dg-final { scan-tree-dump-times "_gfortran_caf_atomic_op \\(1, caf_token.0, 0, 1, &me, 0B, 0B, 1, 4\\);" 1 "original" } }
25 ! { dg-final { scan-tree-dump-times "_gfortran_caf_atomic_ref \\(caf_token.0, 0, 1, &me, 0B, 1, 4\\);" 1 "original" } }