|
| 1 | +!RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=52 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s |
| 2 | +!RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=52 %s | FileCheck --check-prefix="PARSE-TREE" %s |
| 3 | + |
| 4 | +subroutine f00() |
| 5 | + integer :: x |
| 6 | + !$omp metadirective when(user={condition(.true.)}: flush seq_cst (x)) |
| 7 | +end |
| 8 | + |
| 9 | +!UNPARSE: SUBROUTINE f00 |
| 10 | +!UNPARSE: INTEGER x |
| 11 | +!UNPARSE: !$OMP METADIRECTIVE WHEN(USER={CONDITION(.true._4)}: FLUSH SEQ_CST(x)) |
| 12 | +!UNPARSE: END SUBROUTINE |
| 13 | + |
| 14 | +!PARSE-TREE: OmpMetadirectiveDirective |
| 15 | +!PARSE-TREE: | OmpClauseList -> OmpClause -> When -> OmpWhenClause |
| 16 | +!PARSE-TREE: | | Modifier -> OmpContextSelectorSpecification -> OmpTraitSetSelector |
| 17 | +!PARSE-TREE: | | | OmpTraitSetSelectorName -> Value = User |
| 18 | +!PARSE-TREE: | | | OmpTraitSelector |
| 19 | +!PARSE-TREE: | | | | OmpTraitSelectorName -> Value = Condition |
| 20 | +!PARSE-TREE: | | | | Properties |
| 21 | +!PARSE-TREE: | | | | | OmpTraitProperty -> Scalar -> Expr = '.true._4' |
| 22 | +!PARSE-TREE: | | | | | | LiteralConstant -> LogicalLiteralConstant |
| 23 | +!PARSE-TREE: | | | | | | | bool = 'true' |
| 24 | +!PARSE-TREE: | | OmpDirectiveSpecification |
| 25 | +!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = flush |
| 26 | +!PARSE-TREE: | | | OmpArgument -> OmpLocator -> OmpObject -> Designator -> DataRef -> Name = 'x' |
| 27 | +!PARSE-TREE: | | | OmpClauseList -> OmpClause -> SeqCst |
| 28 | +!PARSE-TREE: | | | Flags = DeprecatedSyntax |
| 29 | + |
| 30 | +subroutine f01() |
| 31 | + integer :: x |
| 32 | + !$omp metadirective when(user={condition(.true.)}: flush(x) seq_cst) |
| 33 | +end |
| 34 | + |
| 35 | +!UNPARSE: SUBROUTINE f01 |
| 36 | +!UNPARSE: INTEGER x |
| 37 | +!UNPARSE: !$OMP METADIRECTIVE WHEN(USER={CONDITION(.true._4)}: FLUSH(x) SEQ_CST) |
| 38 | +!UNPARSE: END SUBROUTINE |
| 39 | + |
| 40 | +!PARSE-TREE: OmpMetadirectiveDirective |
| 41 | +!PARSE-TREE: | OmpClauseList -> OmpClause -> When -> OmpWhenClause |
| 42 | +!PARSE-TREE: | | Modifier -> OmpContextSelectorSpecification -> OmpTraitSetSelector |
| 43 | +!PARSE-TREE: | | | OmpTraitSetSelectorName -> Value = User |
| 44 | +!PARSE-TREE: | | | OmpTraitSelector |
| 45 | +!PARSE-TREE: | | | | OmpTraitSelectorName -> Value = Condition |
| 46 | +!PARSE-TREE: | | | | Properties |
| 47 | +!PARSE-TREE: | | | | | OmpTraitProperty -> Scalar -> Expr = '.true._4' |
| 48 | +!PARSE-TREE: | | | | | | LiteralConstant -> LogicalLiteralConstant |
| 49 | +!PARSE-TREE: | | | | | | | bool = 'true' |
| 50 | +!PARSE-TREE: | | OmpDirectiveSpecification |
| 51 | +!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = flush |
| 52 | +!PARSE-TREE: | | | OmpArgument -> OmpLocator -> OmpObject -> Designator -> DataRef -> Name = 'x' |
| 53 | +!PARSE-TREE: | | | OmpClauseList -> OmpClause -> SeqCst |
| 54 | +!PARSE-TREE: | | | Flags = None |
0 commit comments