1 ! RUN: %flang_fc1 -fdebug-pre-fir-tree %s | FileCheck %s
3 ! Test Pre-FIR Tree captures all the coarray related statements
5 ! CHECK: Subroutine test_coarray
6 Subroutine test_coarray
7 use iso_fortran_env
, only
: team_type
, event_type
, lock_type
9 type(event_type
) :: done
[*]
10 type(lock_type
) :: alock
[*]
14 ! CHECK: <<ChangeTeamConstruct>>
15 change
team(t
, x
[5,*] => y
)
16 ! CHECK: AssignmentStmt
19 ! CHECK: <<End ChangeTeamConstruct>>
23 ! CHECK: <<IfConstruct>>
24 if (this_image() == 1) then
25 ! CHECK: EventPostStmt
28 ! CHECK: EventWaitStmt
31 ! CHECK: <<End IfConstruct>>
33 ! CHECK: <<CriticalConstruct>>
35 ! CHECK: AssignmentStmt
36 counter
[1] = counter
[1] + 1
38 ! CHECK: <<End CriticalConstruct>>
43 print *, "I have the lock"
49 ! CHECK: SyncMemoryStmt
54 ! CHECK: <<IfConstruct>>
55 if (this_image() == 1) then
56 ! CHECK: SyncImagesStmt
59 ! CHECK: SyncImagesStmt
62 ! CHECK: <<End IfConstruct>>
64 ! CHECK: <<IfConstruct!>>
66 ! CHECK: FailImageStmt
69 ! CHECK: <<End IfConstruct!>>