| ! RUN: %flang_fc1 -fopenmp-version=51 -fopenmp -fdebug-unparse-no-sema %s 2>&1 | FileCheck %s |
| ! RUN: %flang_fc1 -fopenmp-version=51 -fopenmp -fdebug-dump-parse-tree-no-sema %s 2>&1 | FileCheck %s --check-prefix="PARSE-TREE" |
| |
| ! Compilation-time diagnostics are covered by Semantics/OpenMP/error.f90. |
| program main |
| character(*), parameter :: message = "This is an error" |
| !CHECK: !$OMP ERROR AT(COMPILATION) SEVERITY(WARNING) MESSAGE("some message here") |
| !PARSE-TREE: DeclarationConstruct -> SpecificationConstruct -> OpenMPDeclarativeConstruct -> OmpUtilityDirective -> OmpErrorDirective -> OmpDirectiveSpecification |
| !PARSE-TREE: OmpDirectiveName -> llvm::omp::Directive = error |
| !PARSE-TREE: OmpClauseList -> OmpClause -> At -> OmpAtClause -> ActionTime = Compilation |
| !PARSE-TREE: OmpClause -> Severity -> OmpSeverityClause -> SevLevel = Warning |
| !PARSE-TREE: OmpClause -> Message -> OmpMessageClause -> Expr -> LiteralConstant -> CharLiteralConstant |
| !PARSE-TREE: string = 'some message here' |
| !$omp error at(compilation) severity(warning) message("some message here") |
| !CHECK: !$OMP ERROR AT(COMPILATION) SEVERITY(FATAL) MESSAGE(message) |
| !PARSE-TREE: DeclarationConstruct -> SpecificationConstruct -> OpenMPDeclarativeConstruct -> OmpUtilityDirective -> OmpErrorDirective -> OmpDirectiveSpecification |
| !PARSE-TREE: OmpDirectiveName -> llvm::omp::Directive = error |
| !PARSE-TREE: OmpClauseList -> OmpClause -> At -> OmpAtClause -> ActionTime = Compilation |
| !PARSE-TREE: OmpClause -> Severity -> OmpSeverityClause -> SevLevel = Fatal |
| !PARSE-TREE: OmpClause -> Message -> OmpMessageClause -> Expr -> Designator -> DataRef -> Name = 'message' |
| !$omp error at(compilation) severity(fatal) message(message) |
| !CHECK: !$OMP ERROR AT(EXECUTION) SEVERITY(FATAL) MESSAGE(message) |
| !PARSE-TREE: DeclarationConstruct -> SpecificationConstruct -> OpenMPDeclarativeConstruct -> OmpUtilityDirective -> OmpErrorDirective -> OmpDirectiveSpecification |
| !PARSE-TREE: OmpDirectiveName -> llvm::omp::Directive = error |
| !PARSE-TREE: OmpClauseList -> OmpClause -> At -> OmpAtClause -> ActionTime = Execution |
| !PARSE-TREE: OmpClause -> Severity -> OmpSeverityClause -> SevLevel = Fatal |
| !PARSE-TREE: OmpClause -> Message -> OmpMessageClause -> Expr -> Designator -> DataRef -> Name = 'message' |
| !$omp error at(EXECUTION) severity(fatal) message(message) |
| !CHECK: !$OMP ERROR AT(EXECUTION) SEVERITY(WARNING) MESSAGE("a warning") |
| !PARSE-TREE: DeclarationConstruct -> SpecificationConstruct -> OpenMPDeclarativeConstruct -> OmpUtilityDirective -> OmpErrorDirective -> OmpDirectiveSpecification |
| !PARSE-TREE: OmpDirectiveName -> llvm::omp::Directive = error |
| !PARSE-TREE: OmpClauseList -> OmpClause -> At -> OmpAtClause -> ActionTime = Execution |
| !PARSE-TREE: OmpClause -> Severity -> OmpSeverityClause -> SevLevel = Warning |
| !PARSE-TREE: OmpClause -> Message -> OmpMessageClause -> Expr -> LiteralConstant -> CharLiteralConstant |
| !PARSE-TREE: string = 'a warning' |
| !$omp error at(execution) severity(warning) message("a warning") |
| end program main |