brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 1ed6779 Raw
42 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! Ensure standard-conforming image_index function references are3! accepted, based on the 16.9.107 section of the Fortran 2023 standard4 5program image_index_test6  use iso_fortran_env, only: team_type7  implicit none8 9  integer n, array(1), team_num10  integer scalar_coarray[*], array_coarray(1)[*], coarray_corank3[10, 0:9, 0:*]11  integer subscripts_corank1(1), subscripts_corank3(3)12  type(team_type) :: home, league(2)13 14  !___ standard-conforming statements - IMAGE_INDEX(COARRAY, SUB) ___15  n = image_index(scalar_coarray, [1])16  n = image_index(scalar_coarray, subscripts_corank1)17  n = image_index(array_coarray, [1])18  n = image_index(array_coarray, subscripts_corank1)19  n = image_index(coarray=scalar_coarray, sub=subscripts_corank1)20  n = image_index(coarray_corank3, subscripts_corank3)21  n = image_index(sub=subscripts_corank1, coarray=scalar_coarray)22 23  !___ standard-conforming statements - IMAGE_INDEX(COARRAY, SUB, TEAM) ___24  n = image_index(scalar_coarray, [1], home)25  n = image_index(scalar_coarray, subscripts_corank1, league(1))26  n = image_index(array_coarray, [1], home)27  n = image_index(array_coarray, subscripts_corank1, league(1))28  n = image_index(coarray_corank3, subscripts_corank3, league(1))29  n = image_index(coarray=scalar_coarray, sub=subscripts_corank1, team=home)30  n = image_index(team=home, sub=[1], coarray=scalar_coarray)31 32  !___ standard-conforming statements - IMAGE_INDEX(COARRAY, SUB, TEAM_NUMBER) ___33  n = image_index(scalar_coarray, [1], team_num)34  n = image_index(scalar_coarray, subscripts_corank1, team_number=team_num)35  n = image_index(array_coarray, [1], team_num)36  n = image_index(array_coarray, subscripts_corank1, array(1))37  n = image_index(coarray_corank3, subscripts_corank3, team_num)38  n = image_index(coarray=scalar_coarray, sub=subscripts_corank1, team_number=team_num)39  n = image_index(team_number=team_num, sub=[1], coarray=scalar_coarray)40 41end program image_index_test42