Debian Codegraph @

gcc/testsuite/gfortran.dg/coarray_collectives_8.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-fcoarray=lib" }
3 !
4 ! As SOURCE is INTENT(INOUT), it must be definable,
5 ! cf. J3/14-147
6 !
7
8 intrinsic :: co_sum, co_min, co_max
9 integer :: vec(3), idx(3)
10
11 call co_sum(vec(idx)) ! { dg-error "Argument 'A' with INTENT\\(INOUT\\) at .1. of the intrinsic subroutine co_sum shall not have a vector subscript" }
12 call co_min(vec([1,3,2])) ! { dg-error "Argument 'A' with INTENT\\(INOUT\\) at .1. of the intrinsic subroutine co_min shall not have a vector subscript" }
13 call co_sum(vec([1,1,1])) ! { dg-error "Elements with the same value at .1. and .2. in vector subscript in a variable definition context \\(argument 'A' with INTENT\\(INOUT\\)\\)" }
14 end