xref: /llvm-project/flang/test/Semantics/doconcurrent02.f90 (revision 96d229c9abdfb2836e18a554bfb63b5d52aeebfa)
164ab3302SCarolineConcatto! when the loops are not DO CONCURRENT
264ab3302SCarolineConcatto
3*96d229c9SAndrzej Warzynski! RUN: not %flang_fc1 -fdebug-unparse-with-symbols %s 2>&1 | FileCheck %s
464ab3302SCarolineConcatto! CHECK-NOT: image control statement not allowed in DO CONCURRENT
564ab3302SCarolineConcatto! CHECK-NOT: RETURN not allowed in DO CONCURRENT
664ab3302SCarolineConcatto! CHECK-NOT: call to impure procedure in DO CONCURRENT not allowed
764ab3302SCarolineConcatto! CHECK-NOT: IEEE_GET_FLAG not allowed in DO CONCURRENT
864ab3302SCarolineConcatto! CHECK-NOT: ADVANCE specifier not allowed in DO CONCURRENT
964ab3302SCarolineConcatto! CHECK-NOT: SYNC ALL
1064ab3302SCarolineConcatto! CHECK-NOT: SYNC IMAGES
1164ab3302SCarolineConcatto
1264ab3302SCarolineConcattomodule ieee_exceptions
1364ab3302SCarolineConcatto  interface
1464ab3302SCarolineConcatto     subroutine ieee_get_flag(i, j)
1564ab3302SCarolineConcatto       integer :: i, j
1664ab3302SCarolineConcatto     end subroutine ieee_get_flag
1764ab3302SCarolineConcatto  end interface
1864ab3302SCarolineConcattoend module ieee_exceptions
1964ab3302SCarolineConcatto
2064ab3302SCarolineConcattosubroutine do_concurrent_test1(i,n)
2164ab3302SCarolineConcatto  implicit none
2264ab3302SCarolineConcatto  integer :: i, n
2364ab3302SCarolineConcatto  do 10 i = 1,n
2464ab3302SCarolineConcatto     SYNC ALL
2564ab3302SCarolineConcatto     SYNC IMAGES (*)
2664ab3302SCarolineConcatto     return
2764ab3302SCarolineConcatto10 continue
2864ab3302SCarolineConcattoend subroutine do_concurrent_test1
2964ab3302SCarolineConcatto
3064ab3302SCarolineConcattosubroutine do_concurrent_test2(i,j,n,flag)
3164ab3302SCarolineConcatto  use ieee_exceptions
3264ab3302SCarolineConcatto  implicit none
3364ab3302SCarolineConcatto  integer :: i, j, n, flag, flag2
3464ab3302SCarolineConcatto  do i = 1,n
3564ab3302SCarolineConcatto    change team (j)
3664ab3302SCarolineConcatto      call ieee_get_flag(flag, flag2)
3764ab3302SCarolineConcatto    end team
3864ab3302SCarolineConcatto    write(*,'(a35)',advance='no')
3964ab3302SCarolineConcatto  end do
4064ab3302SCarolineConcattoend subroutine do_concurrent_test2
41