[flang][driver] Add support for -fopenmp and -fopenacc

Add support for the following options:
* -fopenmp
* -fopenacc

Update OpenMP and OpenACC semantics tests to use the new driver if it is built, otherwise use f18.
OpenMP tests that include `use omp_lib` or run `test_symbols.sh` have not been updated as they require options `-intrinsic-module-directory` and `-funparse-with-symbols` which are currently not implemented in the new driver.
Similarly OpenACC tests that run `test_symbols.sh` have not been updated.

This patch also moves semanticsContext to CompilerInvocation and creates it in CompilerInvocation#setSemanticsOpts so that the semantics context can use Fortran::parser::Options#features.

Summary of changes:
- Move semanticsContext to CompilerInvocation.h
- Update OpenMP and OpenACC semantics tests that do not rely on `-intrinsic-module-directory` and `-funparse-with-symbols` to use %flang

Differential Revision: https://reviews.llvm.org/D96032
This commit is contained in:
Faris Rehman 2021-02-10 09:24:45 +00:00
parent a7d01772ac
commit 6d48a1a53f
103 changed files with 166 additions and 113 deletions

View File

@ -2157,7 +2157,7 @@ def fno_objc_nonfragile_abi : Flag<["-"], "fno-objc-nonfragile-abi">, Group<f_Gr
def fobjc_sender_dependent_dispatch : Flag<["-"], "fobjc-sender-dependent-dispatch">, Group<f_Group>;
def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group<f_Group>;
def fopenmp : Flag<["-"], "fopenmp">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>,
def fopenmp : Flag<["-"], "fopenmp">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, FlangOption, FC1Option]>,
HelpText<"Parse OpenMP pragmas and generate parallel code.">;
def fno_openmp : Flag<["-"], "fno-openmp">, Group<f_Group>, Flags<[NoArgumentUnused]>;
def fopenmp_version_EQ : Joined<["-"], "fopenmp-version=">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>;
@ -4232,6 +4232,8 @@ def ffixed_line_length_EQ : Joined<["-"], "ffixed-line-length=">, Group<f_Group>
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<f_Group>, Alias<ffixed_line_length_EQ>;
def fopenacc : Flag<["-"], "fopenacc">, Group<f_Group>,
HelpText<"Enable OpenACC">;
}

View File

@ -22,7 +22,8 @@ using namespace llvm::opt;
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,

View File

@ -30,8 +30,6 @@ class CompilerInstance {
std::shared_ptr<Fortran::parser::Parsing> parsing_;
std::unique_ptr<Fortran::semantics::SemanticsContext> semanticsContext_;
/// The stream for diagnostics from Semantics
llvm::raw_ostream *semaOutputStream_ = &llvm::errs();
@ -102,9 +100,6 @@ public:
/// }
/// @name Semantic analysis
/// {
Fortran::semantics::SemanticsContext &semanticsContext() const {
return *semanticsContext_;
}
/// Replace the current stream for verbose output.
void set_semaOutputStream(llvm::raw_ostream &Value);

View File

@ -61,6 +61,9 @@ class CompilerInvocation : public CompilerInvocationBase {
// of options.
Fortran::parser::Options parserOpts_;
// Semantics context
std::unique_ptr<Fortran::semantics::SemanticsContext> semanticsContext_;
/// Semantic options
// TODO: Merge with or translate to frontendOpts_. We shouldn't need two sets
// of options.
@ -75,6 +78,13 @@ public:
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 @@ public:
// 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

View File

@ -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 @@ public:
// source file.
int fixedFormColumns_ = 72;
// Language features
common::LanguageFeatureControl features_;
public:
FrontendOptions() : showHelp_(false), showVersion_(false) {}

View File

@ -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 @@ CompilerInstance::CompilerInstance()
: 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 @@ bool CompilerInstance::ExecuteAction(FrontendAction &act) {
// 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_) {

View File

@ -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 <memory>
using namespace Fortran::frontend;
@ -196,6 +199,14 @@ static InputKind ParseFrontendArgs(FrontendOptions &opts,
opts.fixedFormColumns_ = columns;
}
}
// Extensions
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 @@ void CompilerInvocation::SetDefaultFortranOpts() {
// 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 @@ void CompilerInvocation::SetDefaultFortranOpts() {
"__flang_patchlevel__", FLANG_VERSION_PATCHLEVEL_STRING);
}
void CompilerInvocation::setDefaultPredefinitions() {
auto &fortranOptions = fortranOpts();
const auto &frontendOptions = frontendOpts();
// Add predefinitions based on extensions 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 @@ void CompilerInvocation::setFortranOpts() {
}
fortranOptions.fixedFormColumns = frontendOptions.fixedFormColumns_;
fortranOptions.features = frontendOptions.features_;
collectMacroDefinitions(preprocessorOptions, fortranOptions);
fortranOptions.searchDirectories.insert(
@ -357,10 +386,14 @@ void CompilerInvocation::setFortranOpts() {
}
void CompilerInvocation::setSemanticsOpts(
Fortran::semantics::SemanticsContext &semaCtxt) {
auto &fortranOptions = fortranOpts();
Fortran::parser::AllCookedSources &allCookedSources) {
const auto &fortranOptions = fortranOpts();
semanticsContext_ = std::make_unique<semantics::SemanticsContext>(
*(new Fortran::common::IntrinsicTypeDefaultKinds()),
fortranOptions.features, allCookedSources);
auto &moduleDirJ = moduleDir();
semaCtxt.set_moduleDirectory(moduleDirJ)
semanticsContext_->set_moduleDirectory(moduleDirJ)
.set_searchDirectories(fortranOptions.searchDirectories);
return;
}

View File

@ -133,8 +133,8 @@ void ParseSyntaxOnlyAction::ExecuteAction() {
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();

View File

@ -28,6 +28,8 @@
! CHECK-NEXT: Use <value> 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 Enable OpenACC
! CHECK-NEXT: -fopenmp Parse OpenMP pragmas and generate parallel code.
! CHECK-NEXT: -help Display available options
! CHECK-NEXT: -I <dir> Add directory to the end of the list of include search paths
! CHECK-NEXT: -module-dir <dir> Put MODULE files in <dir>

View File

@ -28,6 +28,8 @@
! HELP-NEXT: Use <value> 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 Enable OpenACC
! HELP-NEXT: -fopenmp Parse OpenMP pragmas and generate parallel code.
! HELP-NEXT: -help Display available options
! HELP-NEXT: -I <dir> Add directory to the end of the list of include search paths
! HELP-NEXT: -module-dir <dir> Put MODULE files in <dir>
@ -48,6 +50,8 @@
! HELP-FC1-NEXT: -ffixed-line-length=<value>
! HELP-FC1-NEXT: Use <value> as character line width in fixed mode
! HELP-FC1-NEXT: -ffree-form Process source files in free form
! HELP-FC1-NEXT: -fopenacc Enable OpenACC
! HELP-FC1-NEXT: -fopenmp Parse OpenMP pragmas and generate parallel code.
! HELP-FC1-NEXT: -help Display available options
! HELP-FC1-NEXT: -I <dir> Add directory to the end of the list of include search paths
! HELP-FC1-NEXT: -module-dir <dir> Put MODULE files in <dir>

View File

@ -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

View File

@ -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
!

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 ->

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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(:)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More