Page MenuHomePhabricator

[clang][OpenMP] Initial parsing/sema for 'align' clause
ClosedPublic

Authored by ddpagan on Oct 26 2021, 2:43 PM.

Details

Summary

[OPENMP51] Added basic parsing/sema/serialization support for 'align' clause for use with 'allocate' directive.

Diff Detail

Event Timeline

ddpagan created this revision.Oct 26 2021, 2:43 PM
ddpagan requested review of this revision.Oct 26 2021, 2:43 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 26 2021, 2:43 PM
ABataev added inline comments.Oct 27 2021, 5:50 AM
clang/include/clang/AST/OpenMPClause.h
334

final

362–364

Also worth to make it private

377–382

IIRC, must return same as children here

ddpagan updated this revision to Diff 382701.Oct 27 2021, 9:54 AM

Thanks for the review, Alexey.

Made the requested changes except for modifying "used_children". After looking over other clause classes, for example, OMPNumThreadsClause, we're being consistent in how we're declaring these. Let me know if I'm missing something there.

This revision is now accepted and ready to land.Oct 27 2021, 9:58 AM
aaron.ballman added inline comments.Oct 27 2021, 10:23 AM
clang/include/clang/AST/OpenMPClause.h
362–364

I agree, I think these constructors should have their access reduced to at least protected.

369

I have a preference for improved const-correctness with this sort of thing, where I'd rather see an overloaded pair of functions:

const Expr *getAlignment() const { return cast_or_null<Expr>(Alignment); }
Expr *getAlignment() { return cast_or_null<Expr>(Alignment); }
clang/lib/AST/OpenMPClause.cpp
1634

getAlignment() can return nullptr and it looks like the vast majority of the calls to it are unprotected like this. Would it make sense to ensure that OMPAlignClause can never have a nonnull alignment expression?

ddpagan updated this revision to Diff 383428.EditedOct 29 2021, 1:13 PM

Thanks for the review, Aaron! I neglected to submit my responses that I made inline, but you can still see them.

ddpagan added inline comments.Oct 29 2021, 1:19 PM
clang/include/clang/AST/OpenMPClause.h
362–364

Agreed. I made them private, then created a function to build the clause rather than reference the constructor directly. This is similar to what we do for some other clauses.

369

Agreed. Unfortunately, OpenMP code isn't set up well for this. A few clauses are, but not this one. So, trying to make this change led to an ugly rat's nest of other changes outside the scope of this fix. I'd like to see new clauses follow this pattern, though.

clang/lib/AST/OpenMPClause.cpp
1634

This particular code is only called when a legitimate align clause has been used, so we are guaranteed a non-nullptr. I looked over other references to getAlignment (most from other classes) and it didn't appear that any of them were unsafe.

aaron.ballman accepted this revision.Tue, Nov 2, 10:13 AM

LGTM aside from some possible nits.

clang/lib/Serialization/ASTWriter.cpp
5029

This can potentially add a null statement to emit to the serialized form.

6235

Same for this one, maybe?

Thanks for reviewing the code, Aaron.

clang/lib/Serialization/ASTWriter.cpp
5029

The same thing can occur with A->getAllocator(). However, it's expected behavior. When these values are read in later, the allocator and alignment values are use to set the appropriate fields in the allocate directive. Null values are okay as they indicate whether or not a field has been specified (via an align or allocator clause).

6235

This is called only when an align clause has been specified, so it's guaranteed to not be null.

Ah, thank you for the explanations! Then this continues to LGTM. Do you need someone to commit on your behalf? If so, what name and email address would you like me to use for patch attribution in git?

ddpagan updated this revision to Diff 385098.Fri, Nov 5, 9:14 AM

Successfully rebased, built, and tested.

Before I land this, it looks like precommit CI is failing with what possibly is a related failure:

[9094/9117] Linking CXX executable tools/flang/unittests/Frontend/FlangFrontendTests
FAILED: tools/flang/unittests/Frontend/FlangFrontendTests
: && /usr/bin/clang++ -gmlt -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-unused-command-line-argument -Wstring-conversion           -Wcovered-switch-default -Wno-nested-anon-types -O3 -DNDEBUG -fuse-ld=lld -Wl,--color-diagnostics    -Wl,-O3 -Wl,--gc-sections tools/flang/unittests/Frontend/CMakeFiles/FlangFrontendTests.dir/CompilerInstanceTest.cpp.o tools/flang/unittests/Frontend/CMakeFiles/FlangFrontendTests.dir/FrontendActionTest.cpp.o -o tools/flang/unittests/Frontend/FlangFrontendTests  lib/libLLVMSupport.a  -lpthread  lib/libgtest_main.a  lib/libgtest.a  -lpthread  lib/libclangBasic.a  lib/libflangFrontend.a  lib/libflangFrontendTool.a  lib/libFortranParser.a  lib/libFortranSemantics.a  lib/libFortranCommon.a  lib/libFortranEvaluate.a  -lpthread  lib/libflangFrontend.a  lib/libFortranLower.a  lib/libFortranSemantics.a  lib/libFortranEvaluate.a  lib/libFortranParser.a  lib/libFortranCommon.a  lib/libFortranDecimal.a  lib/libFIRTransforms.a  lib/libFIRDialect.a  lib/libMLIROpenMPToLLVM.a  lib/libMLIRMemRefToLLVM.a  lib/libFIRSupport.a  lib/libMLIROpenMPToLLVMIRTranslation.a  lib/libMLIRAffineTransforms.a  lib/libMLIRAsyncTransforms.a  lib/libMLIREmitC.a  lib/libMLIRGPUTransforms.a  lib/libMLIRAsync.a  lib/libMLIRGPUOps.a  lib/libMLIRDLTI.a  lib/libMLIRLLVMToLLVMIRTranslation.a  lib/libLLVMNVPTXCodeGen.a  lib/libLLVMNVPTXDesc.a  lib/libLLVMNVPTXInfo.a  lib/libLLVMAMDGPUAsmParser.a  lib/libLLVMAMDGPUCodeGen.a  lib/libLLVMAsmPrinter.a  lib/libLLVMDebugInfoDWARF.a  lib/libLLVMDebugInfoMSF.a  lib/libLLVMPasses.a  lib/libLLVMCoroutines.a  lib/libLLVMipo.a  lib/libLLVMVectorize.a  lib/libLLVMIRReader.a  lib/libLLVMLinker.a  lib/libLLVMInstrumentation.a  lib/libLLVMObjCARCOpts.a  lib/libLLVMGlobalISel.a  lib/libLLVMSelectionDAG.a  lib/libLLVMMIRParser.a  lib/libLLVMCodeGen.a  lib/libLLVMTarget.a  lib/libLLVMAMDGPUDesc.a  lib/libLLVMAMDGPUUtils.a  lib/libLLVMAMDGPUInfo.a  lib/libMLIRNVVMIR.a  lib/libMLIRROCDLIR.a  lib/libMLIRVectorToLLVM.a  lib/libMLIRArmNeon.a  lib/libMLIRArmSVETransforms.a  lib/libMLIRArmSVE.a  lib/libMLIRAMXTransforms.a  lib/libMLIRAMX.a  lib/libMLIRTargetLLVMIRExport.a  lib/libMLIRLLVMIRTransforms.a  lib/libMLIRTranslation.a  lib/libMLIRMathTransforms.a  lib/libMLIRMemRefTransforms.a  lib/libMLIROpenACC.a  lib/libMLIROpenMP.a  lib/libMLIRShapeOpsTransforms.a  lib/libMLIRShape.a  lib/libMLIRSparseTensorTransforms.a  lib/libMLIRLinalgTransforms.a  lib/libMLIRComplex.a  lib/libMLIRLinalgAnalysis.a  lib/libMLIRComprehensiveBufferize.a  lib/libMLIRBufferizableOpInterface.a  lib/libMLIRLinalgUtils.a  lib/libMLIRSCFTransforms.a  lib/libMLIRStandardToLLVM.a  lib/libMLIRArithmeticToLLVM.a  lib/libMLIRVectorToSCF.a  lib/libMLIRSparseTensor.a  lib/libMLIRSparseTensorUtils.a  lib/libMLIRSPIRVModuleCombiner.a  lib/libMLIRSPIRVTransforms.a  lib/libMLIRSPIRVConversion.a  lib/libMLIRSPIRVUtils.a  lib/libMLIRSPIRV.a  lib/libMLIRStandardOpsTransforms.a  lib/libMLIRArithmeticTransforms.a  lib/libMLIRTensorTransforms.a  lib/libMLIRTosaTransforms.a  lib/libMLIRX86VectorTransforms.a  lib/libMLIRX86Vector.a  lib/libMLIRLLVMCommonConversion.a  lib/libMLIRLLVMIR.a  lib/libLLVMAsmParser.a  lib/libLLVMBitWriter.a  lib/libMLIRTosaTestPasses.a  lib/libMLIRTosa.a  lib/libMLIRQuant.a  lib/libMLIRAffineToStandard.a  lib/libMLIRSCFToStandard.a  lib/libMLIRTransforms.a  lib/libMLIRVector.a  lib/libMLIRAffineUtils.a  lib/libMLIRLinalg.a  lib/libMLIRMath.a  lib/libMLIRParser.a  lib/libMLIRTilingInterface.a  lib/libMLIRTransformUtils.a  lib/libMLIRLoopAnalysis.a  lib/libMLIRAffine.a  lib/libMLIRSCF.a  lib/libMLIRMemRef.a  lib/libMLIRMemRefUtils.a  lib/libMLIRTensor.a  lib/libMLIRDialectUtils.a  lib/libMLIRStandard.a  lib/libMLIRArithmetic.a  lib/libMLIRDialect.a  lib/libMLIRCastInterfaces.a  lib/libMLIRVectorInterfaces.a  lib/libMLIRLoopLikeInterface.a  lib/libMLIRPresburger.a  lib/libMLIRRewrite.a  lib/libMLIRPDLToPDLInterp.a  lib/libMLIRPDLInterp.a  lib/libMLIRPDL.a  lib/libMLIRPass.a  lib/libMLIRAnalysis.a  lib/libMLIRSideEffectInterfaces.a  lib/libMLIRDataLayoutInterfaces.a  lib/libMLIRInferTypeOpInterface.a  lib/libMLIRViewLikeInterface.a  lib/libMLIRCallInterfaces.a  lib/libMLIRControlFlowInterfaces.a  lib/libMLIRCopyOpInterface.a  lib/libMLIRIR.a  lib/libMLIRSupport.a  lib/libLLVMFrontendOpenACC.a  lib/libLLVMFrontendOpenMP.a  lib/libLLVMScalarOpts.a  lib/libLLVMAggressiveInstCombine.a  lib/libLLVMInstCombine.a  lib/libLLVMTransformUtils.a  lib/libLLVMAnalysis.a  lib/libLLVMObject.a  lib/libLLVMMCParser.a  lib/libLLVMBitReader.a  lib/libLLVMTextAPI.a  lib/libclangDriver.a  lib/libclangBasic.a  lib/libLLVMMC.a  lib/libLLVMDebugInfoCodeView.a  lib/libLLVMProfileData.a  lib/libLLVMCore.a  lib/libLLVMBinaryFormat.a  lib/libLLVMRemarks.a  lib/libLLVMBitstreamReader.a  lib/libLLVMOption.a  lib/libLLVMSupport.a  -lrt  -ldl  -lpthread  -lm  /usr/lib/x86_64-linux-gnu/libz.so  /usr/lib/x86_64-linux-gnu/libtinfo.so  lib/libLLVMDemangle.a && :
ld.lld: error: undefined symbol: Fortran::semantics::OmpStructureChecker::Enter(Fortran::parser::OmpClause::Align const&)
>>> referenced by semantics.cpp:83 (/var/lib/buildkite-agent/builds/llvm-project/flang/lib/Semantics/semantics.cpp:83)
>>>               semantics.cpp.o:(std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(void Fortran::parser::Walk<Fortran::semantics::SemanticsVisitor<Fortran::semantics::AccStructureChecker, Fortran::semantics::AllocateChecker, Fortran::semantics::ArithmeticIfStmtChecker, Fortran::semantics::AssignmentChecker, Fortran::semantics::CaseChecker, Fortran::semantics::CoarrayChecker, Fortran::semantics::DataChecker, Fortran::semantics::DeallocateChecker, Fortran::semantics::DoForallChecker, Fortran::semantics::IfStmtChecker, Fortran::semantics::IoChecker, Fortran::semantics::MiscChecker, Fortran::semantics::NamelistChecker, Fortran::semantics::NullifyChecker, Fortran::semantics::OmpStructureChecker, Fortran::semantics::PurityChecker, Fortran::semantics::ReturnStmtChecker, Fortran::semantics::SelectRankConstructChecker, Fortran::semantics::SelectTypeChecker, Fortran::semantics::StopChecker>, Fortran::parser::OmpClause::AcqRel, Fortran::parser::OmpClause::Acquire, Fortran::parser::OmpClause::AdjustArgs, Fortran::parser::OmpClause::Affinity, Fortran::parser::OmpClause::Align, Fortran::parser::OmpClause::Aligned, Fortran::parser::OmpClause::Allocate, Fortran::parser::OmpClause::Allocator, Fortran::parser::OmpClause::AppendArgs, Fortran::parser::OmpClause::AtomicDefaultMemOrder, Fortran::parser::OmpClause::Bind, Fortran::parser::OmpClause::Capture, Fortran::parser::OmpClause::Collapse, Fortran::parser::OmpClause::Copyprivate, Fortran::parser::OmpClause::Copyin, Fortran::parser::OmpClause::Default, Fortran::parser::OmpClause::Defaultmap, Fortran::parser::OmpClause::Depend, Fortran::parser::OmpClause::Depobj, Fortran::parser::OmpClause::Destroy, Fortran::parser::OmpClause::Detach, Fortran::parser::OmpClause::Device, Fortran::parser::OmpClause::DeviceType, Fortran::parser::OmpClause::DistSchedule, Fortran::parser::OmpClause::DynamicAllocators, Fortran::parser::OmpClause::Exclusive, Fortran::parser::OmpClause::Filter, Fortran::parser::OmpClause::Final, Fortran::parser::OmpClause::Firstprivate, Fortran::parser::OmpClause::Flush, Fortran::parser::OmpClause::From, Fortran::parser::OmpClause::Full, Fortran::parser::OmpClause::Grainsize, Fortran::parser::OmpClause::Hint, Fortran::parser::OmpClause::If, Fortran::parser::OmpClause::InReduction, Fortran::parser::OmpClause::Inbranch, Fortran::parser::OmpClause::Inclusive, Fortran::parser::OmpClause::Init, Fortran::parser::OmpClause::IsDevicePtr, Fortran::parser::OmpClause::Lastprivate, Fortran::parser::OmpClause::Linear, Fortran::parser::OmpClause::Link, Fortran::parser::OmpClause::Map, Fortran::parser::OmpClause::Match, Fortran::parser::OmpClause::MemoryOrder, Fortran::parser::OmpClause::Mergeable, Fortran::parser::OmpClause::Nogroup, Fortran::parser::OmpClause::Nowait, Fortran::parser::OmpClause::Nocontext, Fortran::parser::OmpClause::Nontemporal, Fortran::parser::OmpClause::Notinbranch, Fortran::parser::OmpClause::Novariants, Fortran::parser::OmpClause::NumTasks, Fortran::parser::OmpClause::NumTeams, Fortran::parser::OmpClause::NumThreads, Fortran::parser::OmpClause::Order, Fortran::parser::OmpClause::Ordered, Fortran::parser::OmpClause::Partial, Fortran::parser::OmpClause::Priority, Fortran::parser::OmpClause::Private, Fortran::parser::OmpClause::ProcBind, Fortran::parser::OmpClause::Read, Fortran::parser::OmpClause::Reduction, Fortran::parser::OmpClause::Relaxed, Fortran::parser::OmpClause::Release, Fortran::parser::OmpClause::ReverseOffload, Fortran::parser::OmpClause::Safelen, Fortran::parser::OmpClause::Schedule, Fortran::parser::OmpClause::SeqCst, Fortran::parser::OmpClause::Shared, Fortran::parser::OmpClause::Simd, Fortran::parser::OmpClause::Simdlen, Fortran::parser::OmpClause::Sizes, Fortran::parser::OmpClause::TaskReduction, Fortran::parser::OmpClause::ThreadLimit, Fortran::parser::OmpClause::Threadprivate, Fortran::parser::OmpClause::Threads, Fortran::parser::OmpClause::To, Fortran::parser::OmpClause::UnifiedAddress, Fortran::parser::OmpClause::UnifiedSharedMemory, Fortran::parser::OmpClause::Uniform, Fortran::parser::OmpClause::Unknown, Fortran::parser::OmpClause::Untied, Fortran::parser::OmpClause::Update, Fortran::parser::OmpClause::Use, Fortran::parser::OmpClause::UseDeviceAddr, Fortran::parser::OmpClause::UseDevicePtr, Fortran::parser::OmpClause::UsesAllocators, Fortran::parser::OmpClause::When, Fortran::parser::OmpClause::Write>(std::variant<Fortran::parser::OmpClause::AcqRel, Fortran::parser::OmpClause::Acquire, Fortran::parser::OmpClause::AdjustArgs, Fortran::parser::OmpClause::Affinity, Fortran::parser::OmpClause::Align, Fortran::parser::OmpClause::Aligned, Fortran::parser::OmpClause::Allocate, Fortran::parser::OmpClause::Allocator, Fortran::parser::OmpClause::AppendArgs, Fortran::parser::OmpClause::AtomicDefaultMemOrder, Fortran::parser::OmpClause::Bind, Fortran::parser::OmpClause::Capture, Fortran::parser::OmpClause::Collapse, Fortran::parser::OmpClause::Copyprivate, Fortran::parser::OmpClause::Copyin, Fortran::parser::OmpClause::Default, Fortran::parser::OmpClause::Defaultmap, Fortran::parser::OmpClause::Depend, Fortran::parser::OmpClause::Depobj, Fortran::parser::OmpClause::Destroy, Fortran::parser::OmpClause::Detach, Fortran::parser::OmpClause::Device, Fortran::parser::OmpClause::DeviceType, Fortran::parser::OmpClause::DistSchedule, Fortran::parser::OmpClause::DynamicAllocators, Fortran::parser::OmpClause::Exclusive, Fortran::parser::OmpClause::Filter, Fortran::parser::OmpClause::Final, Fortran::parser::OmpClause::Firstprivate, Fortran::parser::OmpClause::Flush, Fortran::parser::OmpClause::From, Fortran::parser::OmpClause::Full, Fortran::parser::OmpClause::Grainsize, Fortran::parser::OmpClause::Hint, Fortran::parser::OmpClause::If, Fortran::parser::OmpClause::InReduction, Fortran::parser::OmpClause::Inbranch, Fortran::parser::OmpClause::Inclusive, Fortran::parser::OmpClause::Init, Fortran::parser::OmpClause::IsDevicePtr, Fortran::parser::OmpClause::Lastprivate, Fortran::parser::OmpClause::Linear, Fortran::parser::OmpClause::Link, Fortran::parser::OmpClause::Map, Fortran::parser::OmpClause::Match, Fortran::parser::OmpClause::MemoryOrder, Fortran::parser::OmpClause::Mergeable, Fortran::parser::OmpClause::Nogroup, Fortran::parser::OmpClause::Nowait, Fortran::parser::OmpClause::Nocontext, Fortran::parser::OmpClause::Nontemporal, Fortran::parser::OmpClause::Notinbranch, Fortran::parser::OmpClause::Novariants, Fortran::parser::OmpClause::NumTasks, Fortran::parser::OmpClause::NumTeams, Fortran::parser::OmpClause::NumThreads, Fortran::parser::OmpClause::Order, Fortran::parser::OmpClause::Ordered, Fortran::parser::OmpClause::Partial, Fortran::parser::OmpClause::Priority, Fortran::parser::OmpClause::Private, Fortran::parser::OmpClause::ProcBind, Fortran::parser::OmpClause::Read, Fortran::parser::OmpClause::Reduction, Fortran::parser::OmpClause::Relaxed, Fortran::parser::OmpClause::Release, Fortran::parser::OmpClause::ReverseOffload, Fortran::parser::OmpClause::Safelen, Fortran::parser::OmpClause::Schedule, Fortran::parser::OmpClause::SeqCst, Fortran::parser::OmpClause::Shared, Fortran::parser::OmpClause::Simd, Fortran::parser::OmpClause::Simdlen, Fortran::parser::OmpClause::Sizes, Fortran::parser::OmpClause::TaskReduction, Fortran::parser::OmpClause::ThreadLimit, Fortran::parser::OmpClause::Threadprivate, Fortran::parser::OmpClause::Threads, Fortran::parser::OmpClause::To, Fortran::parser::OmpClause::UnifiedAddress, Fortran::parser::OmpClause::UnifiedSharedMemory, Fortran::parser::OmpClause::Uniform, Fortran::parser::OmpClause::Unknown, Fortran::parser::OmpClause::Untied, Fortran::parser::OmpClause::Update, Fortran::parser::OmpClause::Use, Fortran::parser::OmpClause::UseDeviceAddr, Fortran::parser::OmpClause::UseDevicePtr, Fortran::parser::OmpClause::UsesAllocators, Fortran::parser::OmpClause::When, Fortran::parser::OmpClause::Write> const&, Fortran::semantics::SemanticsVisitor<Fortran::semantics::AccStructureChecker, Fortran::semantics::AllocateChecker, Fortran::semantics::ArithmeticIfStmtChecker, Fortran::semantics::AssignmentChecker, Fortran::semantics::CaseChecker, Fortran::semantics::CoarrayChecker, Fortran::semantics::DataChecker, Fortran::semantics::DeallocateChecker, Fortran::semantics::DoForallChecker, Fortran::semantics::IfStmtChecker, Fortran::semantics::IoChecker, Fortran::semantics::MiscChecker, Fortran::semantics::NamelistChecker, Fortran::semantics::NullifyChecker, Fortran::semantics::OmpStructureChecker, Fortran::semantics::PurityChecker, Fortran::semantics::ReturnStmtChecker, Fortran::semantics::SelectRankConstructChecker, Fortran::semantics::SelectTypeChecker, Fortran::semantics::StopChecker>&)::'lambda'(Fortran::semantics::SemanticsVisitor<Fortran::semantics::AccStructureChecker, Fortran::semantics::AllocateChecker, Fortran::semantics::ArithmeticIfStmtChecker, Fortran::semantics::AssignmentChecker, Fortran::semantics::CaseChecker, Fortran::semantics::CoarrayChecker, Fortran::semantics::DataChecker, Fortran::semantics::DeallocateChecker, Fortran::semantics::DoForallChecker, Fortran::semantics::IfStmtChecker, Fortran::semantics::IoChecker, Fortran::semantics::MiscChecker, Fortran::semantics::NamelistChecker, Fortran::semantics::NullifyChecker, Fortran::semantics::OmpStructureChecker, Fortran::semantics::PurityChecker, Fortran::semantics::ReturnStmtChecker, Fortran::semantics::SelectRankConstructChecker, Fortran::semantics::SelectTypeChecker, Fortran::semantics::StopChecker> const&)&&, std::variant<Fortran::parser::OmpClause::AcqRel, Fortran::parser::OmpClause::Acquire, Fortran::parser::OmpClause::AdjustArgs, Fortran::parser::OmpClause::Affinity, Fortran::parser::OmpClause::Align, Fortran::parser::OmpClause::Aligned, Fortran::parser::OmpClause::Allocate, Fortran::parser::OmpClause::Allocator, Fortran::parser::OmpClause::AppendArgs, Fortran::parser::OmpClause::AtomicDefaultMemOrder, Fortran::parser::OmpClause::Bind, Fortran::parser::OmpClause::Capture, Fortran::parser::OmpClause::Collapse, Fortran::parser::OmpClause::Copyprivate, Fortran::parser::OmpClause::Copyin, Fortran::parser::OmpClause::Default, Fortran::parser::OmpClause::Defaultmap, Fortran::parser::OmpClause::Depend, Fortran::parser::OmpClause::Depobj, Fortran::parser::OmpClause::Destroy, Fortran::parser::OmpClause::Detach, Fortran::parser::OmpClause::Device, Fortran::parser::OmpClause::DeviceType, Fortran::parser::OmpClause::DistSchedule, Fortran::parser::OmpClause::DynamicAllocators, Fortran::parser::OmpClause::Exclusive, Fortran::parser::OmpClause::Filter, Fortran::parser::OmpClause::Final, Fortran::parser::OmpClause::Firstprivate, Fortran::parser::OmpClause::Flush, Fortran::parser::OmpClause::From, Fortran::parser::OmpClause::Full, Fortran::parser::OmpClause::Grainsize, Fortran::parser::OmpClause::Hint, Fortran::parser::OmpClause::If, Fortran::parser::OmpClause::InReduction, Fortran::parser::OmpClause::Inbranch, Fortran::parser::OmpClause::Inclusive, Fortran::parser::OmpClause::Init, Fortran::parser::OmpClause::IsDevicePtr, Fortran::parser::OmpClause::Lastprivate, Fortran::parser::OmpClause::Linear, Fortran::parser::OmpClause::Link, Fortran::parser::OmpClause::Map, Fortran::parser::OmpClause::Match, Fortran::parser::OmpClause::MemoryOrder, Fortran::parser::OmpClause::Mergeable, Fortran::parser::OmpClause::Nogroup, Fortran::parser::OmpClause::Nowait, Fortran::parser::OmpClause::Nocontext, Fortran::parser::OmpClause::Nontemporal, Fortran::parser::OmpClause::Notinbranch, Fortran::parser::OmpClause::Novariants, Fortran::parser::OmpClause::NumTasks, Fortran::parser::OmpClause::NumTeams, Fortran::parser::OmpClause::NumThreads, Fortran::parser::OmpClause::Order, Fortran::parser::OmpClause::Ordered, Fortran::parser::OmpClause::Partial, Fortran::parser::OmpClause::Priority, Fortran::parser::OmpClause::Private, Fortran::parser::OmpClause::ProcBind, Fortran::parser::OmpClause::Read, Fortran::parser::OmpClause::Reduction, Fortran::parser::OmpClause::Relaxed, Fortran::parser::OmpClause::Release, Fortran::parser::OmpClause::ReverseOffload, Fortran::parser::OmpClause::Safelen, Fortran::parser::OmpClause::Schedule, Fortran::parser::OmpClause::SeqCst, Fortran::parser::OmpClause::Shared, Fortran::parser::OmpClause::Simd, Fortran::parser::OmpClause::Simdlen, Fortran::parser::OmpClause::Sizes, Fortran::parser::OmpClause::TaskReduction, Fortran::parser::OmpClause::ThreadLimit, Fortran::parser::OmpClause::Threadprivate, Fortran::parser::OmpClause::Threads, Fortran::parser::OmpClause::To, Fortran::parser::OmpClause::UnifiedAddress, Fortran::parser::OmpClause::UnifiedSharedMemory, Fortran::parser::OmpClause::Uniform, Fortran::parser::OmpClause::Unknown, Fortran::parser::OmpClause::Untied, Fortran::parser::OmpClause::Update, Fortran::parser::OmpClause::Use, Fortran::parser::OmpClause::UseDeviceAddr, Fortran::parser::OmpClause::UseDevicePtr, Fortran::parser::OmpClause::UsesAllocators, Fortran::parser::OmpClause::When, Fortran::parser::OmpClause::Write> const&)>, std::integer_sequence<unsigned long, 4ul> >::__visit_invoke(void Fortran::parser::Walk<Fortran::semantics::SemanticsVisitor<Fortran::semantics::AccStructureChecker, Fortran::semantics::AllocateChecker, Fortran::semantics::ArithmeticIfStmtChecker, Fortran::semantics::AssignmentChecker, Fortran::semantics::CaseChecker, Fortran::semantics::CoarrayChecker, Fortran::semantics::DataChecker, Fortran::semantics::DeallocateChecker, Fortran::semantics::DoForallChecker, Fortran::semantics::IfStmtChecker, Fortran::semantics::IoChecker, Fortran::semantics::MiscChecker, Fortran::semantics::NamelistChecker, Fortran::semantics::NullifyChecker, Fortran::semantics::OmpStructureChecker, Fortran::semantics::PurityChecker, Fortran::semantics::ReturnStmtChecker, Fortran::semantics::SelectRankConstructChecker, Fortran::semantics::SelectTypeChecker, Fortran::semantics::StopChecker>, Fortran::parser::OmpClause::AcqRel, Fortran::parser::OmpClause::Acquire, Fortran::parser::OmpClause::AdjustArgs, Fortran::parser::OmpClause::Affinity, Fortran::parser::OmpClause::Align, Fortran::parser::OmpClause::Aligned, Fortran::parser::OmpClause::Allocate, Fortran::parser::OmpClause::Allocator, Fortran::parser::OmpClause::AppendArgs, Fortran::parser::OmpClause::AtomicDefaultMemOrder, Fortran::parser::OmpClause::Bind, Fortran::parser::OmpClause::Capture, Fortran::parser::OmpClause::Collapse, Fortran::parser::OmpClause::Copyprivate, Fortran::parser::OmpClause::Copyin, Fortran::parser::OmpClause::Default, Fortran::parser::OmpClause::Defaultmap, Fortran::parser::OmpClause::Depend, Fortran::parser::OmpClause::Depobj, Fortran::parser::OmpClause::Destroy, Fortran::parser::OmpClause::Detach, Fortran::parser::OmpClause::Device, Fortran::parser::OmpClause::DeviceType, Fortran::parser::OmpClause::DistSchedule, Fortran::parser::OmpClause::DynamicAllocators, Fortran::parser::OmpClause::Exclusive, Fortran::parser::OmpClause::Filter, Fortran::parser::OmpClause::Final, Fortran::parser::OmpClause::Firstprivate, Fortran::parser::OmpClause::Flush, Fortran::parser::OmpClause::From, Fortran::parser::OmpClause::Full, Fortran::parser::OmpClause::Grainsize, Fortran::parser::OmpClause::Hint, Fortran::parser::OmpClause::If, Fortran::parser::OmpClause::InReduction, Fortran::parser::OmpClause::Inbranch, Fortran::parser::OmpClause::Inclusive, Fortran::parser::OmpClause::Init, Fortran::parser::OmpClause::IsDevicePtr, Fortran::parser::OmpClause::Lastprivate, Fortran::parser::OmpClause::Linear, Fortran::parser::OmpClause::Link, Fortran::parser::OmpClause::Map, Fortran::parser::OmpClause::Match, Fortran::parser::OmpClause::MemoryOrder, Fortran::parser::OmpClause::Mergeable, Fortran::parser::OmpClause::Nogroup, Fortran::parser::OmpClause::Nowait, Fortran::parser::OmpClause::Nocontext, Fortran::parser::OmpClause::Nontemporal, Fortran::parser::OmpClause::Notinbranch, Fortran::parser::OmpClause::Novariants, Fortran::parser::OmpClause::NumTasks, Fortran::parser::OmpClause::NumTeams, Fortran::parser::OmpClause::NumThreads, Fortran::parser::OmpClause::Order, Fortran::parser::OmpClause::Ordered, Fortran::parser::OmpClause::Partial, Fortran::parser::OmpClause::Priority, Fortran::parser::OmpClause::Private, Fortran::parser::OmpClause::ProcBind, Fortran::parser::OmpClause::Read, Fortran::parser::OmpClause::Reduction, Fortran::parser::OmpClause::Relaxed, Fortran::parser::OmpClause::Release, Fortran::parser::OmpClause::ReverseOffload, Fortran::parser::OmpClause::Safelen, Fortran::parser::OmpClause::Schedule, Fortran::parser::OmpClause::SeqCst, Fortran::parser::OmpClause::Shared, Fortran::parser::OmpClause::Simd, Fortran::parser::OmpClause::Simdlen, Fortran::parser::OmpClause::Sizes, Fortran::parser::OmpClause::TaskReduction, Fortran::parser::OmpClause::ThreadLimit, Fortran::parser::OmpClause::Threadprivate, Fortran::parser::OmpClause::Threads, Fortran::parser::OmpClause::To, Fortran::parser::OmpClause::UnifiedAddress, Fortran::parser::OmpClause::UnifiedSharedMemory, Fortran::parser::OmpClause::Uniform, Fortran::parser::OmpClause::Unknown, Fortran::parser::OmpClause::Untied, Fortran::parser::OmpClause::Update, Fortran::parser::OmpClause::Use, Fortran::parser::OmpClause::UseDeviceAddr, Fortran::parser::OmpClause::UseDevicePtr, Fortran::parser::OmpClause::UsesAllocators, Fortran::parser::OmpClause::When, Fortran::parser::OmpClause::Write>(std::variant<Fortran::parser::OmpClause::AcqRel, Fortran::parser::OmpClause::Acquire, Fortran::parser::OmpClause::AdjustArgs, Fortran::parser::OmpClause::Affinity, Fortran::parser::OmpClause::Align, Fortran::parser::OmpClause::Aligned, Fortran::parser::OmpClause::Allocate, Fortran::parser::OmpClause::Allocator, Fortran::parser::OmpClause::AppendArgs, Fortran::parser::OmpClause::AtomicDefaultMemOrder, Fortran::parser::OmpClause::Bind, Fortran::parser::OmpClause::Capture, Fortran::parser::OmpClause::Collapse, Fortran::parser::OmpClause::Copyprivate, Fortran::parser::OmpClause::Copyin, Fortran::parser::OmpClause::Default, Fortran::parser::OmpClause::Defaultmap, Fortran::parser::OmpClause::Depend, Fortran::parser::OmpClause::Depobj, Fortran::parser::OmpClause::Destroy, Fortran::parser::OmpClause::Detach, Fortran::parser::OmpClause::Device, Fortran::parser::OmpClause::DeviceType, Fortran::parser::OmpClause::DistSchedule, Fortran::parser::OmpClause::DynamicAllocators, Fortran::parser::OmpClause::Exclusive, Fortran::parser::OmpClause::Filter, Fortran::parser::OmpClause::Final, Fortran::parser::OmpClause::Firstprivate, Fortran::parser::OmpClause::Flush, Fortran::parser::OmpClause::From, Fortran::parser::OmpClause::Full, Fortran::parser::OmpClause::Grainsize, Fortran::parser::OmpClause::Hint, Fortran::parser::OmpClause::If, Fortran::parser::OmpClause::InReduction, Fortran::parser::OmpClause::Inbranch, Fortran::parser::OmpClause::Inclusive, Fortran::parser::OmpClause::Init, Fortran::parser::OmpClause::IsDevicePtr, Fortran::parser::OmpClause::Lastprivate, Fortran::parser::OmpClause::Linear, Fortran::parser::OmpClause::Link, Fortran::parser::OmpClause::Map, Fortran::parser::OmpClause::Match, Fortran::parser::OmpClause::MemoryOrder, Fortran::parser::OmpClause::Mergeable, Fortran::parser::OmpClause::Nogroup, Fortran::parser::OmpClause::Nowait, Fortran::parser::OmpClause::Nocontext, Fortran::parser::OmpClause::Nontemporal, Fortran::parser::OmpClause::Notinbranch, Fortran::parser::OmpClause::Novariants, Fortran::parser::OmpClause::NumTasks, Fortran::parser::OmpClause::NumTeams, Fortran::parser::OmpClause::NumThreads, Fortran::parser::OmpClause::Order, Fortran::parser::OmpClause::Ordered, Fortran::parser::OmpClause::Partial, Fortran::parser::OmpClause::Priority, Fortran::parser::OmpClause::Private, Fortran::parser::OmpClause::ProcBind, Fortran::parser::OmpClause::Read, Fortran::parser::OmpClause::Reduction, Fortran::parser::OmpClause::Relaxed, Fortran::parser::OmpClause::Release, Fortran::parser::OmpClause::ReverseOffload, Fortran::parser::OmpClause::Safelen, Fortran::parser::OmpClause::Schedule, Fortran::parser::OmpClause::SeqCst, Fortran::parser::OmpClause::Shared, Fortran::parser::OmpClause::Simd, Fortran::parser::OmpClause::Simdlen, Fortran::parser::OmpClause::Sizes, Fortran::parser::OmpClause::TaskReduction, Fortran::parser::OmpClause::ThreadLimit, Fortran::parser::OmpClause::Threadprivate, Fortran::parser::OmpClause::Threads, Fortran::parser::OmpClause::To, Fortran::parser::OmpClause::UnifiedAddress, Fortran::parser::OmpClause::UnifiedSharedMemory, Fortran::parser::OmpClause::Uniform, Fortran::parser::OmpClause::Unknown, Fortran::parser::OmpClause::Untied, Fortran::parser::OmpClause::Update, Fortran::parser::OmpClause::Use, Fortran::parser::OmpClause::UseDeviceAddr, Fortran::parser::OmpClause::UseDevicePtr, Fortran::parser::OmpClause::UsesAllocators, Fortran::parser::OmpClause::When, Fortran::parser::OmpClause::Write> const&, Fortran::semantics::SemanticsVisitor<Fortran::semantics::AccStructureChecker, Fortran::semantics::AllocateChecker, Fortran::semantics::ArithmeticIfStmtChecker, Fortran::semantics::AssignmentChecker, Fortran::semantics::CaseChecker, Fortran::semantics::CoarrayChecker, Fortran::semantics::DataChecker, Fortran::semantics::DeallocateChecker, Fortran::semantics::DoForallChecker, Fortran::semantics::IfStmtChecker, Fortran::semantics::IoChecker, Fortran::semantics::MiscChecker, Fortran::semantics::NamelistChecker, Fortran::semantics::NullifyChecker, Fortran::semantics::OmpStructureChecker, Fortran::semantics::PurityChecker, Fortran::semantics::ReturnStmtChecker, Fortran::semantics::SelectRankConstructChecker, Fortran::semantics::SelectTypeChecker, Fortran::semantics::StopChecker>&)::'lambda'(Fortran::semantics::SemanticsVisitor<Fortran::semantics::AccStructureChecker, Fortran::semantics::AllocateChecker, Fortran::semantics::ArithmeticIfStmtChecker, Fortran::semantics::AssignmentChecker, Fortran::semantics::CaseChecker, Fortran::semantics::CoarrayChecker, Fortran::semantics::DataChecker, Fortran::semantics::DeallocateChecker, Fortran::semantics::DoForallChecker, Fortran::semantics::IfStmtChecker, Fortran::semantics::IoChecker, Fortran::semantics::MiscChecker, Fortran::semantics::NamelistChecker, Fortran::semantics::NullifyChecker, Fortran::semantics::OmpStructureChecker, Fortran::semantics::PurityChecker, Fortran::semantics::ReturnStmtChecker, Fortran::semantics::SelectRankConstructChecker, Fortran::semantics::SelectTypeChecker, Fortran::semantics::StopChecker> const&)&&, std::variant<Fortran::parser::OmpClause::AcqRel, Fortran::parser::OmpClause::Acquire, Fortran::parser::OmpClause::AdjustArgs, Fortran::parser::OmpClause::Affinity, Fortran::parser::OmpClause::Align, Fortran::parser::OmpClause::Aligned, Fortran::parser::OmpClause::Allocate, Fortran::parser::OmpClause::Allocator, Fortran::parser::OmpClause::AppendArgs, Fortran::parser::OmpClause::AtomicDefaultMemOrder, Fortran::parser::OmpClause::Bind, Fortran::parser::OmpClause::Capture, Fortran::parser::OmpClause::Collapse, Fortran::parser::OmpClause::Copyprivate, Fortran::parser::OmpClause::Copyin, Fortran::parser::OmpClause::Default, Fortran::parser::OmpClause::Defaultmap, Fortran::parser::OmpClause::Depend, Fortran::parser::OmpClause::Depobj, Fortran::parser::OmpClause::Destroy, Fortran::parser::OmpClause::Detach, Fortran::parser::OmpClause::Device, Fortran::parser::OmpClause::DeviceType, Fortran::parser::OmpClause::DistSchedule, Fortran::parser::OmpClause::DynamicAllocators, Fortran::parser::OmpClause::Exclusive, Fortran::parser::OmpClause::Filter, Fortran::parser::OmpClause::Final, Fortran::parser::OmpClause::Firstprivate, Fortran::parser::OmpClause::Flush, Fortran::parser::OmpClause::From, Fortran::parser::OmpClause::Full, Fortran::parser::OmpClause::Grainsize, Fortran::parser::OmpClause::Hint, Fortran::parser::OmpClause::If, Fortran::parser::OmpClause::InReduction, Fortran::parser::OmpClause::Inbranch, Fortran::parser::OmpClause::Inclusive, Fortran::parser::OmpClause::Init, Fortran::parser::OmpClause::IsDevicePtr, Fortran::parser::OmpClause::Lastprivate, Fortran::parser::OmpClause::Linear, Fortran::parser::OmpClause::Link, Fortran::parser::OmpClause::Map, Fortran::parser::OmpClause::Match, Fortran::parser::OmpClause::MemoryOrder, Fortran::parser::OmpClause::Mergeable, Fortran::parser::OmpClause::Nogroup, Fortran::parser::OmpClause::Nowait, Fortran::parser::OmpClause::Nocontext, Fortran::parser::OmpClause::Nontemporal, Fortran::parser::OmpClause::Notinbranch, Fortran::parser::OmpClause::Novariants, Fortran::parser::OmpClause::NumTasks, Fortran::parser::OmpClause::NumTeams, Fortran::parser::OmpClause::NumThreads, Fortran::parser::OmpClause::Order, Fortran::parser::OmpClause::Ordered, Fortran::parser::OmpClause::Partial, Fortran::parser::OmpClause::Priority, Fortran::parser::OmpClause::Private, Fortran::parser::OmpClause::ProcBind, Fortran::parser::OmpClause::Read, Fortran::parser::OmpClause::Reduction, Fortran::parser::OmpClause::Relaxed, Fortran::parser::OmpClause::Release, Fortran::parser::OmpClause::ReverseOffload, Fortran::parser::OmpClause::Safelen, Fortran::parser::OmpClause::Schedule, Fortran::parser::OmpClause::SeqCst, Fortran::parser::OmpClause::Shared, Fortran::parser::OmpClause::Simd, Fortran::parser::OmpClause::Simdlen, Fortran::parser::OmpClause::Sizes, Fortran::parser::OmpClause::TaskReduction, Fortran::parser::OmpClause::ThreadLimit, Fortran::parser::OmpClause::Threadprivate, Fortran::parser::OmpClause::Threads, Fortran::parser::OmpClause::To, Fortran::parser::OmpClause::UnifiedAddress, Fortran::parser::OmpClause::UnifiedSharedMemory, Fortran::parser::OmpClause::Uniform, Fortran::parser::OmpClause::Unknown, Fortran::parser::OmpClause::Untied, Fortran::parser::OmpClause::Update, Fortran::parser::OmpClause::Use, Fortran::parser::OmpClause::UseDeviceAddr, Fortran::parser::OmpClause::UseDevicePtr, Fortran::parser::OmpClause::UsesAllocators, Fortran::parser::OmpClause::When, Fortran::parser::OmpClause::Write> const&)) in archive lib/libFortranSemantics.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Can you investigate to make sure this change isn't accidentally breaking flang?

Thanks, Aaron. I'll check this out.

ddpagan updated this revision to Diff 385692.Mon, Nov 8, 8:35 PM

Fixed build problem (found during build of flang). Added align clause to simple clause check.