|
| 1 | +!RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=60 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s |
| 2 | +!RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=60 %s | FileCheck --check-prefix="PARSE-TREE" %s |
| 3 | + |
| 4 | +subroutine f00 |
| 5 | + integer :: x, v |
| 6 | + !$omp atomic read |
| 7 | + v = x |
| 8 | + !$omp end atomic |
| 9 | +end |
| 10 | + |
| 11 | +!UNPARSE: SUBROUTINE f00 |
| 12 | +!UNPARSE: INTEGER x, v |
| 13 | +!UNPARSE: !$OMP ATOMIC READ |
| 14 | +!UNPARSE: v=x |
| 15 | +!UNPARSE: !$OMP END ATOMIC |
| 16 | +!UNPARSE: END SUBROUTINE |
| 17 | + |
| 18 | +!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPAtomicConstruct |
| 19 | +!PARSE-TREE: | OmpDirectiveSpecification |
| 20 | +!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = atomic |
| 21 | +!PARSE-TREE: | | OmpClauseList -> OmpClause -> Read |
| 22 | +!PARSE-TREE: | | Flags = None |
| 23 | +!PARSE-TREE: | Block |
| 24 | +!PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> AssignmentStmt = 'v=x' |
| 25 | +!PARSE-TREE: | | | Variable = 'v' |
| 26 | +!PARSE-TREE: | | | | Designator -> DataRef -> Name = 'v' |
| 27 | +!PARSE-TREE: | | | Expr = 'x' |
| 28 | +!PARSE-TREE: | | | | Designator -> DataRef -> Name = 'x' |
| 29 | +!PARSE-TREE: | OmpDirectiveSpecification |
| 30 | +!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = atomic |
| 31 | +!PARSE-TREE: | | OmpClauseList -> |
| 32 | +!PARSE-TREE: | | Flags = None |
| 33 | + |
| 34 | + |
| 35 | +subroutine f01 |
| 36 | + integer :: x, v |
| 37 | + !$omp atomic read |
| 38 | + v = x |
| 39 | + !$omp endatomic |
| 40 | +end |
| 41 | + |
| 42 | +!UNPARSE: SUBROUTINE f01 |
| 43 | +!UNPARSE: INTEGER x, v |
| 44 | +!UNPARSE: !$OMP ATOMIC READ |
| 45 | +!UNPARSE: v=x |
| 46 | +!UNPARSE: !$OMP END ATOMIC |
| 47 | +!UNPARSE: END SUBROUTINE |
| 48 | + |
| 49 | +!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPAtomicConstruct |
| 50 | +!PARSE-TREE: | OmpDirectiveSpecification |
| 51 | +!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = atomic |
| 52 | +!PARSE-TREE: | | OmpClauseList -> OmpClause -> Read |
| 53 | +!PARSE-TREE: | | Flags = None |
| 54 | +!PARSE-TREE: | Block |
| 55 | +!PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> AssignmentStmt = 'v=x' |
| 56 | +!PARSE-TREE: | | | Variable = 'v' |
| 57 | +!PARSE-TREE: | | | | Designator -> DataRef -> Name = 'v' |
| 58 | +!PARSE-TREE: | | | Expr = 'x' |
| 59 | +!PARSE-TREE: | | | | Designator -> DataRef -> Name = 'x' |
| 60 | +!PARSE-TREE: | OmpDirectiveSpecification |
| 61 | +!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = atomic |
| 62 | +!PARSE-TREE: | | OmpClauseList -> |
| 63 | +!PARSE-TREE: | | Flags = None |
0 commit comments