diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -2146,7 +2146,7 @@ def fobjc_sender_dependent_dispatch : Flag<["-"], "fobjc-sender-dependent-dispatch">, Group; def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group; -def fopenmp : Flag<["-"], "fopenmp">, Group, Flags<[CC1Option, NoArgumentUnused]>, +def fopenmp : Flag<["-"], "fopenmp">, Group, Flags<[CC1Option, NoArgumentUnused, FlangOption, FC1Option]>, HelpText<"Parse OpenMP pragmas and generate parallel code.">, MarshallingInfoFlag, "0u">, Normalizer<"makeFlagToValueNormalizer(50u)">; def fno_openmp : Flag<["-"], "fno-openmp">, Group, Flags<[NoArgumentUnused]>; @@ -4222,6 +4222,8 @@ DocBrief<[{Set column after which characters are ignored in typical fixed-form lines in the source file}]>; def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-length-">, Group, Alias; +def fopenacc : Flag<["-"], "fopenacc">, Group, + HelpText<"Parse OpenACC pragmas and generate parallel code.">; } diff --git a/clang/lib/Driver/ToolChains/Flang.cpp b/clang/lib/Driver/ToolChains/Flang.cpp --- a/clang/lib/Driver/ToolChains/Flang.cpp +++ b/clang/lib/Driver/ToolChains/Flang.cpp @@ -22,7 +22,8 @@ void Flang::AddFortranDialectOptions(const ArgList &Args, ArgStringList &CmdArgs) const { Args.AddAllArgs(CmdArgs, {options::OPT_ffixed_form, options::OPT_ffree_form, - options::OPT_ffixed_line_length_EQ}); + options::OPT_ffixed_line_length_EQ, + options::OPT_fopenmp, options::OPT_fopenacc}); } void Flang::AddPreprocessingOptions(const ArgList &Args, diff --git a/flang/include/flang/Frontend/CompilerInstance.h b/flang/include/flang/Frontend/CompilerInstance.h --- a/flang/include/flang/Frontend/CompilerInstance.h +++ b/flang/include/flang/Frontend/CompilerInstance.h @@ -30,8 +30,6 @@ std::shared_ptr parsing_; - std::unique_ptr semanticsContext_; - /// The stream for diagnostics from Semantics llvm::raw_ostream *semaOutputStream_ = &llvm::errs(); @@ -102,9 +100,6 @@ /// } /// @name Semantic analysis /// { - Fortran::semantics::SemanticsContext &semanticsContext() const { - return *semanticsContext_; - } /// Replace the current stream for verbose output. void set_semaOutputStream(llvm::raw_ostream &Value); diff --git a/flang/include/flang/Frontend/CompilerInvocation.h b/flang/include/flang/Frontend/CompilerInvocation.h --- a/flang/include/flang/Frontend/CompilerInvocation.h +++ b/flang/include/flang/Frontend/CompilerInvocation.h @@ -61,6 +61,9 @@ // of options. Fortran::parser::Options parserOpts_; + // Semantics context + std::unique_ptr semanticsContext_; + /// Semantic options // TODO: Merge with or translate to frontendOpts_. We shouldn't need two sets // of options. @@ -75,6 +78,13 @@ Fortran::parser::Options &fortranOpts() { return parserOpts_; } const Fortran::parser::Options &fortranOpts() const { return parserOpts_; } + Fortran::semantics::SemanticsContext &semanticsContext() { + return *semanticsContext_; + } + const Fortran::semantics::SemanticsContext &semanticsContext() const { + return *semanticsContext_; + } + std::string &moduleDir() { return moduleDir_; } const std::string &moduleDir() const { return moduleDir_; } @@ -93,12 +103,15 @@ // compiler driver options in libclangDriver. void SetDefaultFortranOpts(); + /// Set the default predefinitions. + void setDefaultPredefinitions(); + /// Set the Fortran options to user-specified values. /// These values are found in the preprocessor options. void setFortranOpts(); /// Set the Semantic Options - void setSemanticsOpts(Fortran::semantics::SemanticsContext &); + void setSemanticsOpts(Fortran::parser::AllCookedSources &); }; } // end namespace Fortran::frontend diff --git a/flang/include/flang/Frontend/FrontendOptions.h b/flang/include/flang/Frontend/FrontendOptions.h --- a/flang/include/flang/Frontend/FrontendOptions.h +++ b/flang/include/flang/Frontend/FrontendOptions.h @@ -8,6 +8,7 @@ #ifndef LLVM_FLANG_FRONTEND_FRONTENDOPTIONS_H #define LLVM_FLANG_FRONTEND_FRONTENDOPTIONS_H +#include "flang/Common/Fortran-features.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/MemoryBuffer.h" @@ -178,6 +179,9 @@ // source file. int fixedFormColumns_ = 72; + // Language features + common::LanguageFeatureControl features_; + public: FrontendOptions() : showHelp_(false), showVersion_(false) {} diff --git a/flang/lib/Frontend/CompilerInstance.cpp b/flang/lib/Frontend/CompilerInstance.cpp --- a/flang/lib/Frontend/CompilerInstance.cpp +++ b/flang/lib/Frontend/CompilerInstance.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "flang/Frontend/CompilerInstance.h" +#include "flang/Common/Fortran-features.h" #include "flang/Frontend/CompilerInvocation.h" #include "flang/Frontend/TextDiagnosticPrinter.h" #include "flang/Parser/parsing.h" @@ -24,10 +25,7 @@ : invocation_(new CompilerInvocation()), allSources_(new Fortran::parser::AllSources()), allCookedSources_(new Fortran::parser::AllCookedSources(*allSources_)), - parsing_(new Fortran::parser::Parsing(*allCookedSources_)), - semanticsContext_(new Fortran::semantics::SemanticsContext( - *(new Fortran::common::IntrinsicTypeDefaultKinds()), - *(new common::LanguageFeatureControl()), *allCookedSources_)) { + parsing_(new Fortran::parser::Parsing(*allCookedSources_)) { // TODO: This is a good default during development, but ultimately we should // give the user the opportunity to specify this. allSources_->set_encoding(Fortran::parser::Encoding::UTF_8); @@ -144,10 +142,11 @@ // Set some sane defaults for the frontend. invoc.SetDefaultFortranOpts(); + invoc.setDefaultPredefinitions(); // Update the fortran options based on user-based input. invoc.setFortranOpts(); - // Set semantic options - invoc.setSemanticsOpts(this->semanticsContext()); + // Create the semantics context and set semantic options. + invoc.setSemanticsOpts(*this->allCookedSources_); // Run the frontend action `act` for every input file. for (const FrontendInputFile &fif : frontendOpts().inputs_) { diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -7,7 +7,9 @@ //===----------------------------------------------------------------------===// #include "flang/Frontend/CompilerInvocation.h" +#include "flang/Common/Fortran-features.h" #include "flang/Frontend/PreprocessorOptions.h" +#include "flang/Semantics/semantics.h" #include "flang/Version.inc" #include "clang/Basic/AllDiagnostics.h" #include "clang/Basic/DiagnosticDriver.h" @@ -21,6 +23,7 @@ #include "llvm/Option/OptTable.h" #include "llvm/Support/Process.h" #include "llvm/Support/raw_ostream.h" +#include using namespace Fortran::frontend; @@ -196,6 +199,14 @@ opts.fixedFormColumns_ = columns; } } + + // Fortran dialect options + if (args.hasArg(clang::driver::options::OPT_fopenacc)) { + opts.features_.Enable(Fortran::common::LanguageFeature::OpenACC); + } + if (args.hasArg(clang::driver::options::OPT_fopenmp)) { + opts.features_.Enable(Fortran::common::LanguageFeature::OpenMP); + } return dashX; } @@ -322,6 +333,7 @@ // TODO: When expanding this list of standard predefinitions, consider // creating a dedicated API for this. Also at some point we will need to // differentiate between different targets. + // TODO: Move to setDefaultPredefinitions fortranOptions.predefinitions.emplace_back("__flang__", "1"); fortranOptions.predefinitions.emplace_back( "__flang_major__", FLANG_VERSION_MAJOR_STRING); @@ -331,6 +343,21 @@ "__flang_patchlevel__", FLANG_VERSION_PATCHLEVEL_STRING); } +void CompilerInvocation::setDefaultPredefinitions() { + auto &fortranOptions = fortranOpts(); + const auto &frontendOptions = frontendOpts(); + + // Add predefinitions based on language features enabled + if (frontendOptions.features_.IsEnabled( + Fortran::common::LanguageFeature::OpenACC)) { + fortranOptions.predefinitions.emplace_back("_OPENACC", "202011"); + } + if (frontendOptions.features_.IsEnabled( + Fortran::common::LanguageFeature::OpenMP)) { + fortranOptions.predefinitions.emplace_back("_OPENMP", "201511"); + } +} + void CompilerInvocation::setFortranOpts() { auto &fortranOptions = fortranOpts(); const auto &frontendOptions = frontendOpts(); @@ -343,6 +370,8 @@ } fortranOptions.fixedFormColumns = frontendOptions.fixedFormColumns_; + fortranOptions.features = frontendOptions.features_; + collectMacroDefinitions(preprocessorOptions, fortranOptions); fortranOptions.searchDirectories.insert( @@ -357,10 +386,14 @@ } void CompilerInvocation::setSemanticsOpts( - Fortran::semantics::SemanticsContext &semaCtxt) { - auto &fortranOptions = fortranOpts(); + Fortran::parser::AllCookedSources &allCookedSources) { + const auto &fortranOptions = fortranOpts(); + + semanticsContext_ = std::make_unique( + *(new Fortran::common::IntrinsicTypeDefaultKinds()), + fortranOptions.features, allCookedSources); + auto &moduleDirJ = moduleDir(); - semaCtxt.set_moduleDirectory(moduleDirJ) + semanticsContext_->set_moduleDirectory(moduleDirJ) .set_searchDirectories(fortranOptions.searchDirectories); - return; } diff --git a/flang/lib/Frontend/FrontendActions.cpp b/flang/lib/Frontend/FrontendActions.cpp --- a/flang/lib/Frontend/FrontendActions.cpp +++ b/flang/lib/Frontend/FrontendActions.cpp @@ -133,8 +133,8 @@ auto &parseTree{*ci.parsing().parseTree()}; // Prepare semantics - Fortran::semantics::Semantics semantics{ - ci.semanticsContext(), parseTree, ci.parsing().cooked().AsCharBlock()}; + Fortran::semantics::Semantics semantics{ci.invocation().semanticsContext(), + parseTree, ci.parsing().cooked().AsCharBlock()}; // Run semantic checks semantics.Perform(); diff --git a/flang/test/Flang-Driver/driver-help-hidden.f90 b/flang/test/Flang-Driver/driver-help-hidden.f90 --- a/flang/test/Flang-Driver/driver-help-hidden.f90 +++ b/flang/test/Flang-Driver/driver-help-hidden.f90 @@ -28,6 +28,8 @@ ! CHECK-NEXT: Use as character line width in fixed mode ! CHECK-NEXT: -ffree-form Process source files in free form ! CHECK-NEXT: -fno-color-diagnostics Disable colors in diagnostics +! CHECK-NEXT: -fopenacc Parse OpenACC pragmas and generate parallel code. +! CHECK-NEXT: -fopenmp Parse OpenMP pragmas and generate parallel code. ! CHECK-NEXT: -help Display available options ! CHECK-NEXT: -I Add directory to the end of the list of include search paths ! CHECK-NEXT: -module-dir Put MODULE files in diff --git a/flang/test/Flang-Driver/driver-help.f90 b/flang/test/Flang-Driver/driver-help.f90 --- a/flang/test/Flang-Driver/driver-help.f90 +++ b/flang/test/Flang-Driver/driver-help.f90 @@ -28,6 +28,8 @@ ! HELP-NEXT: Use as character line width in fixed mode ! HELP-NEXT: -ffree-form Process source files in free form ! HELP-NEXT: -fno-color-diagnostics Disable colors in diagnostics +! HELP-NEXT: -fopenacc Parse OpenACC pragmas and generate parallel code. +! HELP-NEXT: -fopenmp Parse OpenMP pragmas and generate parallel code. ! HELP-NEXT: -help Display available options ! HELP-NEXT: -I Add directory to the end of the list of include search paths ! HELP-NEXT: -module-dir Put MODULE files in @@ -48,6 +50,8 @@ ! HELP-FC1-NEXT: -ffixed-line-length= ! HELP-FC1-NEXT: Use as character line width in fixed mode ! HELP-FC1-NEXT: -ffree-form Process source files in free form +! HELP-FC1-NEXT: -fopenacc Parse OpenACC pragmas and generate parallel code. +! HELP-FC1-NEXT: -fopenmp Parse OpenMP pragmas and generate parallel code. ! HELP-FC1-NEXT: -help Display available options ! HELP-FC1-NEXT: -I Add directory to the end of the list of include search paths ! HELP-FC1-NEXT: -module-dir Put MODULE files in diff --git a/flang/test/Semantics/OpenACC/acc-atomic-validity.f90 b/flang/test/Semantics/OpenACC/acc-atomic-validity.f90 --- a/flang/test/Semantics/OpenACC/acc-atomic-validity.f90 +++ b/flang/test/Semantics/OpenACC/acc-atomic-validity.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.12 Atomic diff --git a/flang/test/Semantics/OpenACC/acc-branch.f90 b/flang/test/Semantics/OpenACC/acc-branch.f90 --- a/flang/test/Semantics/OpenACC/acc-branch.f90 +++ b/flang/test/Semantics/OpenACC/acc-branch.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC restruction in branch in and out of some construct ! diff --git a/flang/test/Semantics/OpenACC/acc-cache-validity.f90 b/flang/test/Semantics/OpenACC/acc-cache-validity.f90 --- a/flang/test/Semantics/OpenACC/acc-cache-validity.f90 +++ b/flang/test/Semantics/OpenACC/acc-cache-validity.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.10 Cache diff --git a/flang/test/Semantics/OpenACC/acc-canonicalization-validity.f90 b/flang/test/Semantics/OpenACC/acc-canonicalization-validity.f90 --- a/flang/test/Semantics/OpenACC/acc-canonicalization-validity.f90 +++ b/flang/test/Semantics/OpenACC/acc-canonicalization-validity.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC canonalization validity for the construct defined below: ! 2.9 Loop diff --git a/flang/test/Semantics/OpenACC/acc-data.f90 b/flang/test/Semantics/OpenACC/acc-data.f90 --- a/flang/test/Semantics/OpenACC/acc-data.f90 +++ b/flang/test/Semantics/OpenACC/acc-data.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.6.5 Data diff --git a/flang/test/Semantics/OpenACC/acc-declare-validity.f90 b/flang/test/Semantics/OpenACC/acc-declare-validity.f90 --- a/flang/test/Semantics/OpenACC/acc-declare-validity.f90 +++ b/flang/test/Semantics/OpenACC/acc-declare-validity.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.13 Declare diff --git a/flang/test/Semantics/OpenACC/acc-host-data.f90 b/flang/test/Semantics/OpenACC/acc-host-data.f90 --- a/flang/test/Semantics/OpenACC/acc-host-data.f90 +++ b/flang/test/Semantics/OpenACC/acc-host-data.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.8 host_data diff --git a/flang/test/Semantics/OpenACC/acc-init-validity.f90 b/flang/test/Semantics/OpenACC/acc-init-validity.f90 --- a/flang/test/Semantics/OpenACC/acc-init-validity.f90 +++ b/flang/test/Semantics/OpenACC/acc-init-validity.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.14.1 Init diff --git a/flang/test/Semantics/OpenACC/acc-kernels-loop.f90 b/flang/test/Semantics/OpenACC/acc-kernels-loop.f90 --- a/flang/test/Semantics/OpenACC/acc-kernels-loop.f90 +++ b/flang/test/Semantics/OpenACC/acc-kernels-loop.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.11 Kernels Loop diff --git a/flang/test/Semantics/OpenACC/acc-kernels.f90 b/flang/test/Semantics/OpenACC/acc-kernels.f90 --- a/flang/test/Semantics/OpenACC/acc-kernels.f90 +++ b/flang/test/Semantics/OpenACC/acc-kernels.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.5.3 Kernels diff --git a/flang/test/Semantics/OpenACC/acc-loop.f90 b/flang/test/Semantics/OpenACC/acc-loop.f90 --- a/flang/test/Semantics/OpenACC/acc-loop.f90 +++ b/flang/test/Semantics/OpenACC/acc-loop.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.9 Loop diff --git a/flang/test/Semantics/OpenACC/acc-parallel-loop-validity.f90 b/flang/test/Semantics/OpenACC/acc-parallel-loop-validity.f90 --- a/flang/test/Semantics/OpenACC/acc-parallel-loop-validity.f90 +++ b/flang/test/Semantics/OpenACC/acc-parallel-loop-validity.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.11 Parallel Loop diff --git a/flang/test/Semantics/OpenACC/acc-parallel.f90 b/flang/test/Semantics/OpenACC/acc-parallel.f90 --- a/flang/test/Semantics/OpenACC/acc-parallel.f90 +++ b/flang/test/Semantics/OpenACC/acc-parallel.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.5.1 Parallel diff --git a/flang/test/Semantics/OpenACC/acc-resolve01.f90 b/flang/test/Semantics/OpenACC/acc-resolve01.f90 --- a/flang/test/Semantics/OpenACC/acc-resolve01.f90 +++ b/flang/test/Semantics/OpenACC/acc-resolve01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Data-Mapping Attribute Clauses ! 2.15.14 default Clause diff --git a/flang/test/Semantics/OpenACC/acc-resolve02.f90 b/flang/test/Semantics/OpenACC/acc-resolve02.f90 --- a/flang/test/Semantics/OpenACC/acc-resolve02.f90 +++ b/flang/test/Semantics/OpenACC/acc-resolve02.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc subroutine compute() integer :: a(3), c, i diff --git a/flang/test/Semantics/OpenACC/acc-routine-validity.f90 b/flang/test/Semantics/OpenACC/acc-routine-validity.f90 --- a/flang/test/Semantics/OpenACC/acc-routine-validity.f90 +++ b/flang/test/Semantics/OpenACC/acc-routine-validity.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.15.1 routine diff --git a/flang/test/Semantics/OpenACC/acc-serial-loop.f90 b/flang/test/Semantics/OpenACC/acc-serial-loop.f90 --- a/flang/test/Semantics/OpenACC/acc-serial-loop.f90 +++ b/flang/test/Semantics/OpenACC/acc-serial-loop.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.11 Serial Loop diff --git a/flang/test/Semantics/OpenACC/acc-serial.f90 b/flang/test/Semantics/OpenACC/acc-serial.f90 --- a/flang/test/Semantics/OpenACC/acc-serial.f90 +++ b/flang/test/Semantics/OpenACC/acc-serial.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.5.2 Serial diff --git a/flang/test/Semantics/OpenACC/acc-set-validity.f90 b/flang/test/Semantics/OpenACC/acc-set-validity.f90 --- a/flang/test/Semantics/OpenACC/acc-set-validity.f90 +++ b/flang/test/Semantics/OpenACC/acc-set-validity.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.14.3 Set diff --git a/flang/test/Semantics/OpenACC/acc-shutdown-validity.f90 b/flang/test/Semantics/OpenACC/acc-shutdown-validity.f90 --- a/flang/test/Semantics/OpenACC/acc-shutdown-validity.f90 +++ b/flang/test/Semantics/OpenACC/acc-shutdown-validity.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.14.2 Shutdown diff --git a/flang/test/Semantics/OpenACC/acc-update-validity.f90 b/flang/test/Semantics/OpenACC/acc-update-validity.f90 --- a/flang/test/Semantics/OpenACC/acc-update-validity.f90 +++ b/flang/test/Semantics/OpenACC/acc-update-validity.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.14.4 Update diff --git a/flang/test/Semantics/OpenACC/acc-wait-validity.f90 b/flang/test/Semantics/OpenACC/acc-wait-validity.f90 --- a/flang/test/Semantics/OpenACC/acc-wait-validity.f90 +++ b/flang/test/Semantics/OpenACC/acc-wait-validity.f90 @@ -1,4 +1,4 @@ -! RUN: %S/../test_errors.sh %s %t %f18 -fopenacc +! RUN: %S/../test_errors.sh %s %t %flang -fopenacc ! Check OpenACC clause validity for the following construct and directive: ! 2.16.13 Wait diff --git a/flang/test/Semantics/omp-atomic.f90 b/flang/test/Semantics/omp-atomic.f90 --- a/flang/test/Semantics/omp-atomic.f90 +++ b/flang/test/Semantics/omp-atomic.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp use omp_lib ! Check OpenMP 2.13.6 atomic Construct diff --git a/flang/test/Semantics/omp-combined-constructs.f90 b/flang/test/Semantics/omp-combined-constructs.f90 --- a/flang/test/Semantics/omp-combined-constructs.f90 +++ b/flang/test/Semantics/omp-combined-constructs.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp program main implicit none diff --git a/flang/test/Semantics/omp-copyin01.f90 b/flang/test/Semantics/omp-copyin01.f90 --- a/flang/test/Semantics/omp-copyin01.f90 +++ b/flang/test/Semantics/omp-copyin01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.4.1 copyin Clause ! A list item that appears in a copyin clause must be threadprivate diff --git a/flang/test/Semantics/omp-copyin02.f90 b/flang/test/Semantics/omp-copyin02.f90 --- a/flang/test/Semantics/omp-copyin02.f90 +++ b/flang/test/Semantics/omp-copyin02.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.4.1 copyin Clause ! A common block name that appears in a copyin clause must be declared to be diff --git a/flang/test/Semantics/omp-copyin03.f90 b/flang/test/Semantics/omp-copyin03.f90 --- a/flang/test/Semantics/omp-copyin03.f90 +++ b/flang/test/Semantics/omp-copyin03.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.4.1 copyin Clause ! A list item that appears in a copyin clause must be threadprivate. diff --git a/flang/test/Semantics/omp-copyin04.f90 b/flang/test/Semantics/omp-copyin04.f90 --- a/flang/test/Semantics/omp-copyin04.f90 +++ b/flang/test/Semantics/omp-copyin04.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.4.1 copyin Clause ! A list item that appears in a copyin clause must be threadprivate diff --git a/flang/test/Semantics/omp-copyin05.f90 b/flang/test/Semantics/omp-copyin05.f90 --- a/flang/test/Semantics/omp-copyin05.f90 +++ b/flang/test/Semantics/omp-copyin05.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.4.1 copyin Clause ! A common block name that appears in a copyin clause must be declared to be diff --git a/flang/test/Semantics/omp-declarative-directive.f90 b/flang/test/Semantics/omp-declarative-directive.f90 --- a/flang/test/Semantics/omp-declarative-directive.f90 +++ b/flang/test/Semantics/omp-declarative-directive.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! Check OpenMP declarative directives diff --git a/flang/test/Semantics/omp-default.f90 b/flang/test/Semantics/omp-default.f90 --- a/flang/test/Semantics/omp-default.f90 +++ b/flang/test/Semantics/omp-default.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.3.1 default Clause program omp_default diff --git a/flang/test/Semantics/omp-default02.f90 b/flang/test/Semantics/omp-default02.f90 --- a/flang/test/Semantics/omp-default02.f90 +++ b/flang/test/Semantics/omp-default02.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.3.1 default Clause - a positive test case. diff --git a/flang/test/Semantics/omp-depend01.f90 b/flang/test/Semantics/omp-depend01.f90 --- a/flang/test/Semantics/omp-depend01.f90 +++ b/flang/test/Semantics/omp-depend01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.13.9 Depend Clause ! List items used in depend clauses cannot be zero-length array sections. diff --git a/flang/test/Semantics/omp-depend02.f90 b/flang/test/Semantics/omp-depend02.f90 --- a/flang/test/Semantics/omp-depend02.f90 +++ b/flang/test/Semantics/omp-depend02.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.13.9 Depend Clause ! A variable that is part of another variable diff --git a/flang/test/Semantics/omp-depend03.f90 b/flang/test/Semantics/omp-depend03.f90 --- a/flang/test/Semantics/omp-depend03.f90 +++ b/flang/test/Semantics/omp-depend03.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.13.9 Depend Clause ! Coarrays are not supported in depend clause diff --git a/flang/test/Semantics/omp-device-constructs.f90 b/flang/test/Semantics/omp-device-constructs.f90 --- a/flang/test/Semantics/omp-device-constructs.f90 +++ b/flang/test/Semantics/omp-device-constructs.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! Check OpenMP clause validity for the following directives: ! 2.10 Device constructs program main diff --git a/flang/test/Semantics/omp-do-collapse-positivecases.f90 b/flang/test/Semantics/omp-do-collapse-positivecases.f90 --- a/flang/test/Semantics/omp-do-collapse-positivecases.f90 +++ b/flang/test/Semantics/omp-do-collapse-positivecases.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.1 Collapse Clause Positive cases diff --git a/flang/test/Semantics/omp-do-collapse.f90 b/flang/test/Semantics/omp-do-collapse.f90 --- a/flang/test/Semantics/omp-do-collapse.f90 +++ b/flang/test/Semantics/omp-do-collapse.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.1 Collapse Clause program omp_doCollapse diff --git a/flang/test/Semantics/omp-do-cycle.f90 b/flang/test/Semantics/omp-do-cycle.f90 --- a/flang/test/Semantics/omp-do-cycle.f90 +++ b/flang/test/Semantics/omp-do-cycle.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! Check for cycle statements leaving an OpenMP structured block diff --git a/flang/test/Semantics/omp-do-ordered-positivecases.f90 b/flang/test/Semantics/omp-do-ordered-positivecases.f90 --- a/flang/test/Semantics/omp-do-ordered-positivecases.f90 +++ b/flang/test/Semantics/omp-do-ordered-positivecases.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.1 Ordered Clause positive cases. diff --git a/flang/test/Semantics/omp-do-ordered.f90 b/flang/test/Semantics/omp-do-ordered.f90 --- a/flang/test/Semantics/omp-do-ordered.f90 +++ b/flang/test/Semantics/omp-do-ordered.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.1 Ordered Clause diff --git a/flang/test/Semantics/omp-do-schedule01.f90 b/flang/test/Semantics/omp-do-schedule01.f90 --- a/flang/test/Semantics/omp-do-schedule01.f90 +++ b/flang/test/Semantics/omp-do-schedule01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.1 Schedule Clause program omp_doSchedule diff --git a/flang/test/Semantics/omp-do-schedule02.f90 b/flang/test/Semantics/omp-do-schedule02.f90 --- a/flang/test/Semantics/omp-do-schedule02.f90 +++ b/flang/test/Semantics/omp-do-schedule02.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.1 Schedule Clause program omp_doSchedule diff --git a/flang/test/Semantics/omp-do01.f90 b/flang/test/Semantics/omp-do01.f90 --- a/flang/test/Semantics/omp-do01.f90 +++ b/flang/test/Semantics/omp-do01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.1 Loop Construct ! The loop iteration variable may not appear in a firstprivate directive. diff --git a/flang/test/Semantics/omp-do02.f90 b/flang/test/Semantics/omp-do02.f90 --- a/flang/test/Semantics/omp-do02.f90 +++ b/flang/test/Semantics/omp-do02.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! XFAIL: * ! OpenMP Version 4.5 diff --git a/flang/test/Semantics/omp-do03.f90 b/flang/test/Semantics/omp-do03.f90 --- a/flang/test/Semantics/omp-do03.f90 +++ b/flang/test/Semantics/omp-do03.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.1 Loop Construct diff --git a/flang/test/Semantics/omp-do04.f90 b/flang/test/Semantics/omp-do04.f90 --- a/flang/test/Semantics/omp-do04.f90 +++ b/flang/test/Semantics/omp-do04.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! XFAIL: * ! OpenMP Version 4.5 diff --git a/flang/test/Semantics/omp-do05.f90 b/flang/test/Semantics/omp-do05.f90 --- a/flang/test/Semantics/omp-do05.f90 +++ b/flang/test/Semantics/omp-do05.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.1 Loop Construct restrictions on single directive. diff --git a/flang/test/Semantics/omp-do06.f90 b/flang/test/Semantics/omp-do06.f90 --- a/flang/test/Semantics/omp-do06.f90 +++ b/flang/test/Semantics/omp-do06.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! XFAIL:* ! OpenMP Version 4.5 diff --git a/flang/test/Semantics/omp-do07.f90 b/flang/test/Semantics/omp-do07.f90 --- a/flang/test/Semantics/omp-do07.f90 +++ b/flang/test/Semantics/omp-do07.f90 @@ -1,4 +1,4 @@ -! RUN: not %f18 -fparse-only -fopenmp %s 2>&1 | FileCheck %s +! RUN: not %flang -fsyntax-only -fopenmp %s 2>&1 | FileCheck %s ! OpenMP Version 4.5 ! 2.7.1 Loop Construct ! No statement in the associated loops other than the DO statements diff --git a/flang/test/Semantics/omp-do08.f90 b/flang/test/Semantics/omp-do08.f90 --- a/flang/test/Semantics/omp-do08.f90 +++ b/flang/test/Semantics/omp-do08.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! XFAIL: * ! OpenMP Version 4.5 diff --git a/flang/test/Semantics/omp-do09.f90 b/flang/test/Semantics/omp-do09.f90 --- a/flang/test/Semantics/omp-do09.f90 +++ b/flang/test/Semantics/omp-do09.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! XFAIL: * ! OpenMP Version 4.5 diff --git a/flang/test/Semantics/omp-do10.f90 b/flang/test/Semantics/omp-do10.f90 --- a/flang/test/Semantics/omp-do10.f90 +++ b/flang/test/Semantics/omp-do10.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! XFAIL: * ! OpenMP Version 4.5 diff --git a/flang/test/Semantics/omp-flush01.f90 b/flang/test/Semantics/omp-flush01.f90 --- a/flang/test/Semantics/omp-flush01.f90 +++ b/flang/test/Semantics/omp-flush01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! 2.17.8 Flush construct [OpenMP 5.0] ! memory-order-clause -> diff --git a/flang/test/Semantics/omp-invalid-branch.f90 b/flang/test/Semantics/omp-invalid-branch.f90 --- a/flang/test/Semantics/omp-invalid-branch.f90 +++ b/flang/test/Semantics/omp-invalid-branch.f90 @@ -1,4 +1,4 @@ -! RUN: not %f18 -fparse-only -fopenmp %s 2>&1 | FileCheck %s +! RUN: not %flang -fsyntax-only -fopenmp %s 2>&1 | FileCheck %s ! OpenMP Version 4.5 ! Check invalid branches into or out of OpenMP structured blocks. diff --git a/flang/test/Semantics/omp-loop-association.f90 b/flang/test/Semantics/omp-loop-association.f90 --- a/flang/test/Semantics/omp-loop-association.f90 +++ b/flang/test/Semantics/omp-loop-association.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! Check the association between OpenMPLoopConstruct and DoConstruct diff --git a/flang/test/Semantics/omp-loop-simd01.f90 b/flang/test/Semantics/omp-loop-simd01.f90 --- a/flang/test/Semantics/omp-loop-simd01.f90 +++ b/flang/test/Semantics/omp-loop-simd01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.8.3 Loop simd Construct diff --git a/flang/test/Semantics/omp-nested01.f90 b/flang/test/Semantics/omp-nested01.f90 --- a/flang/test/Semantics/omp-nested01.f90 +++ b/flang/test/Semantics/omp-nested01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! Check OpenMP 2.17 Nesting of Regions diff --git a/flang/test/Semantics/omp-no-dowhile-in-parallel.f90 b/flang/test/Semantics/omp-no-dowhile-in-parallel.f90 --- a/flang/test/Semantics/omp-no-dowhile-in-parallel.f90 +++ b/flang/test/Semantics/omp-no-dowhile-in-parallel.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp subroutine bug48308(x,i) real :: x(:) diff --git a/flang/test/Semantics/omp-parallel-private01.f90 b/flang/test/Semantics/omp-parallel-private01.f90 --- a/flang/test/Semantics/omp-parallel-private01.f90 +++ b/flang/test/Semantics/omp-parallel-private01.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.3.3 parallel private Clause program omp_parallel_private diff --git a/flang/test/Semantics/omp-parallel-private02.f90 b/flang/test/Semantics/omp-parallel-private02.f90 --- a/flang/test/Semantics/omp-parallel-private02.f90 +++ b/flang/test/Semantics/omp-parallel-private02.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.3.3 parallel private Clause program omp_parallel_private diff --git a/flang/test/Semantics/omp-parallel-private03.f90 b/flang/test/Semantics/omp-parallel-private03.f90 --- a/flang/test/Semantics/omp-parallel-private03.f90 +++ b/flang/test/Semantics/omp-parallel-private03.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.3.3 parallel private Clause program omp_parallel_private diff --git a/flang/test/Semantics/omp-parallel-private04.f90 b/flang/test/Semantics/omp-parallel-private04.f90 --- a/flang/test/Semantics/omp-parallel-private04.f90 +++ b/flang/test/Semantics/omp-parallel-private04.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.3.3 parallel private Clause program omp_parallel_private diff --git a/flang/test/Semantics/omp-parallel-shared01.f90 b/flang/test/Semantics/omp-parallel-shared01.f90 --- a/flang/test/Semantics/omp-parallel-shared01.f90 +++ b/flang/test/Semantics/omp-parallel-shared01.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.3.2 parallel shared Clause program omp_parallel_shared diff --git a/flang/test/Semantics/omp-parallel-shared02.f90 b/flang/test/Semantics/omp-parallel-shared02.f90 --- a/flang/test/Semantics/omp-parallel-shared02.f90 +++ b/flang/test/Semantics/omp-parallel-shared02.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.3.2 parallel shared Clause program omp_parallel_shared diff --git a/flang/test/Semantics/omp-parallel-shared03.f90 b/flang/test/Semantics/omp-parallel-shared03.f90 --- a/flang/test/Semantics/omp-parallel-shared03.f90 +++ b/flang/test/Semantics/omp-parallel-shared03.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.3.2 parallel shared Clause program omp_parallel_shared diff --git a/flang/test/Semantics/omp-parallel-shared04.f90 b/flang/test/Semantics/omp-parallel-shared04.f90 --- a/flang/test/Semantics/omp-parallel-shared04.f90 +++ b/flang/test/Semantics/omp-parallel-shared04.f90 @@ -1,4 +1,4 @@ -!RUN: %S/test_errors.sh %s %t %f18 -fopenmp +!RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.3.2 parallel shared Clause program omp_parallel_shared diff --git a/flang/test/Semantics/omp-parallel01.f90 b/flang/test/Semantics/omp-parallel01.f90 --- a/flang/test/Semantics/omp-parallel01.f90 +++ b/flang/test/Semantics/omp-parallel01.f90 @@ -1,4 +1,4 @@ -! RUN: not %f18 -fparse-only -fopenmp %s 2>&1 | FileCheck %s +! RUN: not %flang -fsyntax-only -fopenmp %s 2>&1 | FileCheck %s ! OpenMP Version 4.5 ! 2.5 parallel construct. ! A program that branches into or out of a parallel region diff --git a/flang/test/Semantics/omp-parallel02.f90 b/flang/test/Semantics/omp-parallel02.f90 --- a/flang/test/Semantics/omp-parallel02.f90 +++ b/flang/test/Semantics/omp-parallel02.f90 @@ -1,4 +1,4 @@ -! RUN: not %f18 -fparse-only -fopenmp %s 2>&1 | FileCheck %s +! RUN: not %flang -fsyntax-only -fopenmp %s 2>&1 | FileCheck %s ! OpenMP Version 4.5 ! 2.5 parallel construct. ! A program that branches into or out of a parallel region diff --git a/flang/test/Semantics/omp-private01.f90 b/flang/test/Semantics/omp-private01.f90 --- a/flang/test/Semantics/omp-private01.f90 +++ b/flang/test/Semantics/omp-private01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.3.3 private Clause ! Pointers with the INTENT(IN) attribute may not appear in a private clause. diff --git a/flang/test/Semantics/omp-private02.f90 b/flang/test/Semantics/omp-private02.f90 --- a/flang/test/Semantics/omp-private02.f90 +++ b/flang/test/Semantics/omp-private02.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.15.3.3 private Clause ! Variables that appear in namelist statements may not appear in a private clause. diff --git a/flang/test/Semantics/omp-private03.f90 b/flang/test/Semantics/omp-private03.f90 --- a/flang/test/Semantics/omp-private03.f90 +++ b/flang/test/Semantics/omp-private03.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! Variables that appear in expressions for statement function definitions ! may not appear in private, firstprivate or lastprivate clauses. diff --git a/flang/test/Semantics/omp-resolve01.f90 b/flang/test/Semantics/omp-resolve01.f90 --- a/flang/test/Semantics/omp-resolve01.f90 +++ b/flang/test/Semantics/omp-resolve01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! 2.4 An array section designates a subset of the elements in an array. Although ! Substring shares similar syntax but cannot be treated as valid array section. diff --git a/flang/test/Semantics/omp-resolve02.f90 b/flang/test/Semantics/omp-resolve02.f90 --- a/flang/test/Semantics/omp-resolve02.f90 +++ b/flang/test/Semantics/omp-resolve02.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! Test the effect to name resolution from illegal clause diff --git a/flang/test/Semantics/omp-resolve03.f90 b/flang/test/Semantics/omp-resolve03.f90 --- a/flang/test/Semantics/omp-resolve03.f90 +++ b/flang/test/Semantics/omp-resolve03.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! 2.15.3 Although variables in common blocks can be accessed by use association ! or host association, common block names cannot. As a result, a common block diff --git a/flang/test/Semantics/omp-resolve04.f90 b/flang/test/Semantics/omp-resolve04.f90 --- a/flang/test/Semantics/omp-resolve04.f90 +++ b/flang/test/Semantics/omp-resolve04.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! 2.15.3 Data-Sharing Attribute Clauses ! A list item that specifies a given variable may not appear in more than diff --git a/flang/test/Semantics/omp-resolve05.f90 b/flang/test/Semantics/omp-resolve05.f90 --- a/flang/test/Semantics/omp-resolve05.f90 +++ b/flang/test/Semantics/omp-resolve05.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! 2.15.3 Data-Sharing Attribute Clauses ! 2.15.3.1 default Clause diff --git a/flang/test/Semantics/omp-sections01.f90 b/flang/test/Semantics/omp-sections01.f90 --- a/flang/test/Semantics/omp-sections01.f90 +++ b/flang/test/Semantics/omp-sections01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.2 sections Construct diff --git a/flang/test/Semantics/omp-simd01.f90 b/flang/test/Semantics/omp-simd01.f90 --- a/flang/test/Semantics/omp-simd01.f90 +++ b/flang/test/Semantics/omp-simd01.f90 @@ -1,4 +1,4 @@ -! RUN: not %f18 -fparse-only -fopenmp %s 2>&1 | FileCheck %s +! RUN: not %flang -fsyntax-only -fopenmp %s 2>&1 | FileCheck %s ! OpenMP Version 4.5 ! 2.8.1 simd Construct ! A program that branches into or out of a simd region is non-conforming. diff --git a/flang/test/Semantics/omp-simd02.f90 b/flang/test/Semantics/omp-simd02.f90 --- a/flang/test/Semantics/omp-simd02.f90 +++ b/flang/test/Semantics/omp-simd02.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.8.1 simd Construct diff --git a/flang/test/Semantics/omp-simd03.f90 b/flang/test/Semantics/omp-simd03.f90 --- a/flang/test/Semantics/omp-simd03.f90 +++ b/flang/test/Semantics/omp-simd03.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! XFAIL: * ! OpenMP Version 4.5 diff --git a/flang/test/Semantics/omp-single01.f90 b/flang/test/Semantics/omp-single01.f90 --- a/flang/test/Semantics/omp-single01.f90 +++ b/flang/test/Semantics/omp-single01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! XFAIL: * ! OpenMP Version 4.5 diff --git a/flang/test/Semantics/omp-single02.f90 b/flang/test/Semantics/omp-single02.f90 --- a/flang/test/Semantics/omp-single02.f90 +++ b/flang/test/Semantics/omp-single02.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! XFAIL: * ! OpenMP Version 4.5 diff --git a/flang/test/Semantics/omp-task01.f90 b/flang/test/Semantics/omp-task01.f90 --- a/flang/test/Semantics/omp-task01.f90 +++ b/flang/test/Semantics/omp-task01.f90 @@ -1,4 +1,4 @@ -! RUN: not %f18 -fparse-only -fopenmp %s 2>&1 | FileCheck %s +! RUN: not %flang -fsyntax-only -fopenmp %s 2>&1 | FileCheck %s ! OpenMP Version 4.5 ! 2.9.1 task Construct ! Invalid entry to OpenMP structured block. diff --git a/flang/test/Semantics/omp-taskloop-simd01.f90 b/flang/test/Semantics/omp-taskloop-simd01.f90 --- a/flang/test/Semantics/omp-taskloop-simd01.f90 +++ b/flang/test/Semantics/omp-taskloop-simd01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! XFAIL: * ! OpenMP Version 4.5 diff --git a/flang/test/Semantics/omp-taskloop01.f90 b/flang/test/Semantics/omp-taskloop01.f90 --- a/flang/test/Semantics/omp-taskloop01.f90 +++ b/flang/test/Semantics/omp-taskloop01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.9.2 taskloop Construct diff --git a/flang/test/Semantics/omp-taskloop02.f90 b/flang/test/Semantics/omp-taskloop02.f90 --- a/flang/test/Semantics/omp-taskloop02.f90 +++ b/flang/test/Semantics/omp-taskloop02.f90 @@ -1,4 +1,4 @@ -! RUN: not %f18 -fparse-only -fopenmp %s 2>&1 | FileCheck %s +! RUN: not %flang -fsyntax-only -fopenmp %s 2>&1 | FileCheck %s ! OpenMP Version 4.5 ! 2.9.2 taskloop Construct ! Invalid entry to OpenMP structured block. diff --git a/flang/test/Semantics/omp-taskloop03.f90 b/flang/test/Semantics/omp-taskloop03.f90 --- a/flang/test/Semantics/omp-taskloop03.f90 +++ b/flang/test/Semantics/omp-taskloop03.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! XFAIL: * ! OpenMP Version 4.5 diff --git a/flang/test/Semantics/omp-workshare01.f90 b/flang/test/Semantics/omp-workshare01.f90 --- a/flang/test/Semantics/omp-workshare01.f90 +++ b/flang/test/Semantics/omp-workshare01.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.4 workshare Construct ! Invalid do construct inside !$omp workshare diff --git a/flang/test/Semantics/omp-workshare02.f90 b/flang/test/Semantics/omp-workshare02.f90 --- a/flang/test/Semantics/omp-workshare02.f90 +++ b/flang/test/Semantics/omp-workshare02.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.4 workshare Construct ! The !omp workshare construct must not contain any user defined diff --git a/flang/test/Semantics/omp-workshare03.f90 b/flang/test/Semantics/omp-workshare03.f90 --- a/flang/test/Semantics/omp-workshare03.f90 +++ b/flang/test/Semantics/omp-workshare03.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.4 workshare Construct ! All array assignments, scalar assignments, and masked array assignments diff --git a/flang/test/Semantics/omp-workshare04.f90 b/flang/test/Semantics/omp-workshare04.f90 --- a/flang/test/Semantics/omp-workshare04.f90 +++ b/flang/test/Semantics/omp-workshare04.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.4 workshare Construct ! Checks for OpenMP Workshare construct diff --git a/flang/test/Semantics/omp-workshare05.f90 b/flang/test/Semantics/omp-workshare05.f90 --- a/flang/test/Semantics/omp-workshare05.f90 +++ b/flang/test/Semantics/omp-workshare05.f90 @@ -1,4 +1,4 @@ -! RUN: %S/test_errors.sh %s %t %f18 -fopenmp +! RUN: %S/test_errors.sh %s %t %flang -fopenmp ! OpenMP Version 4.5 ! 2.7.4 workshare Construct ! Checks for OpenMP Parallel constructs enclosed in Workshare constructs