Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Flang][OpenMP] Compilation abnormally terminates when specific-procedure-list specified in procedure-stmt of interface-specification is specified in parallel construct with private clause #121720

Open
ohno-fj opened this issue Jan 6, 2025 · 1 comment
Labels
crash Prefer [crash-on-valid] or [crash-on-invalid] flang:ir flang:openmp

Comments

@ohno-fj
Copy link

ohno-fj commented Jan 6, 2025

Version of flang : 20.0.0(c5492e3c65e40cdcab9771b692f9ad437c65aa04)/AArch64

When specific-procedure-list specified in procedure-stmt (procedure) of interface-specification is specified in parallel construct with private clause, a compilation terminates abnormally.
When private clause is removed, the compilation succeeds.

The following are the test program, Flang, Gfortran and ifx compilation/execution result.

snen_prc_s69_2.f90:

subroutine s1
  interface
     function k()
     end function k
  end interface
  procedure(k),pointer::p
!$omp parallel private(p)
  p=> k
  if (p() /= 2) print *,'error'
!$omp end parallel
end subroutine s1

program main
  call s1
  print *,'pass '
end program main

function k()
  k=2
end function k
$ flang -fopenmp snen_prc_s69_2.f90
flang-20: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
LLVM ERROR: unsupported type
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang -fc1 -triple aarch64-unknown-linux-gnu -emit-obj -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu generic -target-feature +outline-atomics -target-feature +v8a -target-feature +fp-armv8 -target-feature +neon -fopenmp -resource-dir /work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/lib/clang/20 -mframe-pointer=non-leaf -o /tmp/snen_prc_s69_2-c1b53d.o -x f95-cpp-input snen_prc_s69_2.f90
 #0 0x00004000381135d0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/work/groups/ssoft/compiler/llvm/aarch64/main-latest/lib/libLLVM.so.20.0git+0x5a035d0)
 #1 0x0000400038111658 llvm::sys::RunSignalHandlers() (/work/groups/ssoft/compiler/llvm/aarch64/main-latest/lib/libLLVM.so.20.0git+0x5a01658)
 #2 0x00004000381117b0 SignalHandler(int) Signals.cpp:0:0
 #3 0x000040002d7707a0 (linux-vdso.so.1+0x7a0)
 #4 0x000040003cf76274 raise (/lib64/libc.so.6+0x36274)
 #5 0x000040003cf60a2c abort (/lib64/libc.so.6+0x20a2c)
 #6 0x0000400038040488 llvm::report_fatal_error(llvm::StringRef, bool) (/work/groups/ssoft/compiler/llvm/aarch64/main-latest/lib/libLLVM.so.20.0git+0x5930488)
 #7 0x00004000380404d8 llvm::install_bad_alloc_error_handler(void (*)(void*, char const*, bool), void*) (/work/groups/ssoft/compiler/llvm/aarch64/main-latest/lib/libLLVM.so.20.0git+0x59304d8)
 #8 0x0000000006ea2c74 fir::getTypeAsString[abi:cxx11](mlir::Type, fir::KindMapping const&, llvm::StringRef) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x6ea2c74)
 #9 0x0000000005d21698 Fortran::lower::omp::DataSharingProcessor::doPrivatize(Fortran::semantics::Symbol const*, mlir::omp::PrivateClauseOps*) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x5d21698)
#10 0x0000000005d25208 Fortran::lower::omp::DataSharingProcessor::processStep1(mlir::omp::PrivateClauseOps*) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x5d25208)
#11 0x0000000005cc01a4 genOMPDispatch(Fortran::lower::AbstractConverter&, Fortran::lower::SymMap&, Fortran::semantics::SemanticsContext&, Fortran::lower::pft::Evaluation&, mlir::Location, llvm::SmallVector<tomp::DirectiveWithClauses<Fortran::lower::omp::Clause>, 0u> const&, tomp::DirectiveWithClauses<Fortran::lower::omp::Clause> const*) OpenMP.cpp:0:0
#12 0x0000000005cc3154 std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<void (*)(genOMP(Fortran::lower::AbstractConverter&, Fortran::lower::SymMap&, Fortran::semantics::SemanticsContext&, Fortran::lower::pft::Evaluation&, Fortran::parser::OpenMPConstruct const&)::'lambda'(auto&&)&&, std::variant<Fortran::parser::OpenMPStandaloneConstruct, Fortran::parser::OpenMPSectionsConstruct, Fortran::parser::OpenMPSectionConstruct, Fortran::parser::OpenMPLoopConstruct, Fortran::parser::OpenMPBlockConstruct, Fortran::parser::OpenMPAtomicConstruct, Fortran::parser::OpenMPDeclarativeAllocate, Fortran::parser::OpenMPErrorConstruct, Fortran::parser::OpenMPExecutableAllocate, Fortran::parser::OpenMPAllocatorsConstruct, Fortran::parser::OpenMPCriticalConstruct> const&)>, std::tuple<std::variant<Fortran::parser::OpenMPStandaloneConstruct, Fortran::parser::OpenMPSectionsConstruct, Fortran::parser::OpenMPSectionConstruct, Fortran::parser::OpenMPLoopConstruct, Fortran::parser::OpenMPBlockConstruct, Fortran::parser::OpenMPAtomicConstruct, Fortran::parser::OpenMPDeclarativeAllocate, Fortran::parser::OpenMPErrorConstruct, Fortran::parser::OpenMPExecutableAllocate, Fortran::parser::OpenMPAllocatorsConstruct, Fortran::parser::OpenMPCriticalConstruct> const&>, std::integer_sequence<unsigned long, 4ul>>::__visit_invoke(genOMP(Fortran::lower::AbstractConverter&, Fortran::lower::SymMap&, Fortran::semantics::SemanticsContext&, Fortran::lower::pft::Evaluation&, Fortran::parser::OpenMPConstruct const&)::'lambda'(auto&&)&&, std::variant<Fortran::parser::OpenMPStandaloneConstruct, Fortran::parser::OpenMPSectionsConstruct, Fortran::parser::OpenMPSectionConstruct, Fortran::parser::OpenMPLoopConstruct, Fortran::parser::OpenMPBlockConstruct, Fortran::parser::OpenMPAtomicConstruct, Fortran::parser::OpenMPDeclarativeAllocate, Fortran::parser::OpenMPErrorConstruct, Fortran::parser::OpenMPExecutableAllocate, Fortran::parser::OpenMPAllocatorsConstruct, Fortran::parser::OpenMPCriticalConstruct> const&) OpenMP.cpp:0:0
#13 0x0000000005ca7904 Fortran::lower::genOpenMPConstruct(Fortran::lower::AbstractConverter&, Fortran::lower::SymMap&, Fortran::semantics::SemanticsContext&, Fortran::lower::pft::Evaluation&, Fortran::parser::OpenMPConstruct const&) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x5ca7904)
#14 0x00000000058e6530 std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<void (*)(Fortran::common::visitors<auto Fortran::lower::pft::ReferenceVariantBase<true, Fortran::parser::AllocateStmt, Fortran::parser::AssignmentStmt, Fortran::parser::BackspaceStmt, Fortran::parser::CallStmt, Fortran::parser::CloseStmt, Fortran::parser::ContinueStmt, Fortran::parser::CycleStmt, Fortran::parser::DeallocateStmt, Fortran::parser::EndfileStmt, Fortran::parser::EventPostStmt, Fortran::parser::EventWaitStmt, Fortran::parser::ExitStmt, Fortran::parser::FailImageStmt, Fortran::parser::FlushStmt, Fortran::parser::FormTeamStmt, Fortran::parser::GotoStmt, Fortran::parser::IfStmt, Fortran::parser::InquireStmt, Fortran::parser::LockStmt, Fortran::parser::NotifyWaitStmt, Fortran::parser::NullifyStmt, Fortran::parser::OpenStmt, Fortran::parser::PointerAssignmentStmt, Fortran::parser::PrintStmt, Fortran::parser::ReadStmt, Fortran::parser::ReturnStmt, Fortran::parser::RewindStmt, Fortran::parser::StopStmt, Fortran::parser::SyncAllStmt, Fortran::parser::SyncImagesStmt, Fortran::parser::SyncMemoryStmt, Fortran::parser::SyncTeamStmt, Fortran::parser::UnlockStmt, Fortran::parser::WaitStmt, Fortran::parser::WhereStmt, Fortran::parser::WriteStmt, Fortran::parser::ComputedGotoStmt, Fortran::parser::ForallStmt, Fortran::parser::ArithmeticIfStmt, Fortran::parser::AssignStmt, Fortran::parser::AssignedGotoStmt, Fortran::parser::PauseStmt, Fortran::parser::EntryStmt, Fortran::parser::FormatStmt, Fortran::parser::AssociateStmt, Fortran::parser::EndAssociateStmt, Fortran::parser::BlockStmt, Fortran::parser::EndBlockStmt, Fortran::parser::SelectCaseStmt, Fortran::parser::CaseStmt, Fortran::parser::EndSelectStmt, Fortran::parser::ChangeTeamStmt, Fortran::parser::EndChangeTeamStmt, Fortran::parser::CriticalStmt, Fortran::parser::EndCriticalStmt, Fortran::parser::NonLabelDoStmt, Fortran::parser::EndDoStmt, Fortran::parser::IfThenStmt, Fortran::parser::ElseIfStmt, Fortran::parser::ElseStmt, Fortran::parser::EndIfStmt, Fortran::parser::SelectRankStmt, Fortran::parser::SelectRankCaseStmt, Fortran::parser::SelectTypeStmt, Fortran::parser::TypeGuardStmt, Fortran::parser::WhereConstructStmt, Fortran::parser::MaskedElsewhereStmt, Fortran::parser::ElsewhereStmt, Fortran::parser::EndWhereStmt, Fortran::parser::ForallConstructStmt, Fortran::parser::EndForallStmt, Fortran::parser::EndProgramStmt, Fortran::parser::EndFunctionStmt, Fortran::parser::EndSubroutineStmt, Fortran::parser::EndMpSubprogramStmt, Fortran::parser::AssociateConstruct, Fortran::parser::BlockConstruct, Fortran::parser::CaseConstruct, Fortran::parser::ChangeTeamConstruct, Fortran::parser::CriticalConstruct, Fortran::parser::DoConstruct, Fortran::parser::IfConstruct, Fortran::parser::SelectRankConstruct, Fortran::parser::SelectTypeConstruct, Fortran::parser::WhereConstruct, Fortran::parser::ForallConstruct, Fortran::parser::CompilerDirective, Fortran::parser::OpenACCConstruct, Fortran::parser::OpenACCRoutineConstruct, Fortran::parser::OpenACCDeclarativeConstruct, Fortran::parser::OpenMPConstruct, Fortran::parser::OpenMPDeclarativeConstruct, Fortran::parser::OmpEndLoopDirective, Fortran::parser::CUFKernelDoConstruct>::visit<(anonymous namespace)::FirConverter::genFIR(Fortran::lower::pft::Evaluation&, bool)::'lambda'(auto const&)>(auto&&) const::'lambda'(auto)>&&, std::variant<Fortran::common::Reference<Fortran::parser::AllocateStmt const>, Fortran::common::Reference<Fortran::parser::AssignmentStmt const>, Fortran::common::Reference<Fortran::parser::BackspaceStmt const>, Fortran::common::Reference<Fortran::parser::CallStmt const>, Fortran::common::Reference<Fortran::parser::CloseStmt const>, Fortran::common::Reference<Fortran::parser::ContinueStmt const>, Fortran::common::Reference<Fortran::parser::CycleStmt const>, Fortran::common::Reference<Fortran::parser::DeallocateStmt const>, Fortran::common::Reference<Fortran::parser::EndfileStmt const>, Fortran::common::Reference<Fortran::parser::EventPostStmt const>, Fortran::common::Reference<Fortran::parser::EventWaitStmt const>, Fortran::common::Reference<Fortran::parser::ExitStmt const>, Fortran::common::Reference<Fortran::parser::FailImageStmt const>, Fortran::common::Reference<Fortran::parser::FlushStmt const>, Fortran::common::Reference<Fortran::parser::FormTeamStmt const>, Fortran::common::Reference<Fortran::parser::GotoStmt const>, Fortran::common::Reference<Fortran::parser::IfStmt const>, Fortran::common::Reference<Fortran::parser::InquireStmt const>, Fortran::common::Reference<Fortran::parser::LockStmt const>, Fortran::common::Reference<Fortran::parser::NotifyWaitStmt const>, Fortran::common::Reference<Fortran::parser::NullifyStmt const>, Fortran::common::Reference<Fortran::parser::OpenStmt const>, Fortran::common::Reference<Fortran::parser::PointerAssignmentStmt const>, Fortran::common::Reference<Fortran::parser::PrintStmt const>, Fortran::common::Reference<Fortran::parser::ReadStmt const>, Fortran::common::Reference<Fortran::parser::ReturnStmt const>, Fortran::common::Reference<Fortran::parser::RewindStmt const>, Fortran::common::Reference<Fortran::parser::StopStmt const>, Fortran::common::Reference<Fortran::parser::SyncAllStmt const>, Fortran::common::Reference<Fortran::parser::SyncImagesStmt const>, Fortran::common::Reference<Fortran::parser::SyncMemoryStmt const>, Fortran::common::Reference<Fortran::parser::SyncTeamStmt const>, Fortran::common::Reference<Fortran::parser::UnlockStmt const>, Fortran::common::Reference<Fortran::parser::WaitStmt const>, Fortran::common::Reference<Fortran::parser::WhereStmt const>, Fortran::common::Reference<Fortran::parser::WriteStmt const>, Fortran::common::Reference<Fortran::parser::ComputedGotoStmt const>, Fortran::common::Reference<Fortran::parser::ForallStmt const>, Fortran::common::Reference<Fortran::parser::ArithmeticIfStmt const>, Fortran::common::Reference<Fortran::parser::AssignStmt const>, Fortran::common::Reference<Fortran::parser::AssignedGotoStmt const>, Fortran::common::Reference<Fortran::parser::PauseStmt const>, Fortran::common::Reference<Fortran::parser::EntryStmt const>, Fortran::common::Reference<Fortran::parser::FormatStmt const>, Fortran::common::Reference<Fortran::parser::AssociateStmt const>, Fortran::common::Reference<Fortran::parser::EndAssociateStmt const>, Fortran::common::Reference<Fortran::parser::BlockStmt const>, Fortran::common::Reference<Fortran::parser::EndBlockStmt const>, Fortran::common::Reference<Fortran::parser::SelectCaseStmt const>, Fortran::common::Reference<Fortran::parser::CaseStmt const>, Fortran::common::Reference<Fortran::parser::EndSelectStmt const>, Fortran::common::Reference<Fortran::parser::ChangeTeamStmt const>, Fortran::common::Reference<Fortran::parser::EndChangeTeamStmt const>, Fortran::common::Reference<Fortran::parser::CriticalStmt const>, Fortran::common::Reference<Fortran::parser::EndCriticalStmt const>, Fortran::common::Reference<Fortran::parser::NonLabelDoStmt const>, Fortran::common::Reference<Fortran::parser::EndDoStmt const>, Fortran::common::Reference<Fortran::parser::IfThenStmt const>, Fortran::common::Reference<Fortran::parser::ElseIfStmt const>, Fortran::common::Reference<Fortran::parser::ElseStmt const>, Fortran::common::Reference<Fortran::parser::EndIfStmt const>, Fortran::common::Reference<Fortran::parser::SelectRankStmt const>, Fortran::common::Reference<Fortran::parser::SelectRankCaseStmt const>, Fortran::common::Reference<Fortran::parser::SelectTypeStmt const>, Fortran::common::Reference<Fortran::parser::TypeGuardStmt const>, Fortran::common::Reference<Fortran::parser::WhereConstructStmt const>, Fortran::common::Reference<Fortran::parser::MaskedElsewhereStmt const>, Fortran::common::Reference<Fortran::parser::ElsewhereStmt const>, Fortran::common::Reference<Fortran::parser::EndWhereStmt const>, Fortran::common::Reference<Fortran::parser::ForallConstructStmt const>, Fortran::common::Reference<Fortran::parser::EndForallStmt const>, Fortran::common::Reference<Fortran::parser::EndProgramStmt const>, Fortran::common::Reference<Fortran::parser::EndFunctionStmt const>, Fortran::common::Reference<Fortran::parser::EndSubroutineStmt const>, Fortran::common::Reference<Fortran::parser::EndMpSubprogramStmt const>, Fortran::common::Reference<Fortran::parser::AssociateConstruct const>, Fortran::common::Reference<Fortran::parser::BlockConstruct const>, Fortran::common::Reference<Fortran::parser::CaseConstruct const>, Fortran::common::Reference<Fortran::parser::ChangeTeamConstruct const>, Fortran::common::Reference<Fortran::parser::CriticalConstruct const>, Fortran::common::Reference<Fortran::parser::DoConstruct const>, Fortran::common::Reference<Fortran::parser::IfConstruct const>, Fortran::common::Reference<Fortran::parser::SelectRankConstruct const>, Fortran::common::Reference<Fortran::parser::SelectTypeConstruct const>, Fortran::common::Reference<Fortran::parser::WhereConstruct const>, Fortran::common::Reference<Fortran::parser::ForallConstruct const>, Fortran::common::Reference<Fortran::parser::CompilerDirective const>, Fortran::common::Reference<Fortran::parser::OpenACCConstruct const>, Fortran::common::Reference<Fortran::parser::OpenACCRoutineConstruct const>, Fortran::common::Reference<Fortran::parser::OpenACCDeclarativeConstruct const>, Fortran::common::Reference<Fortran::parser::OpenMPConstruct const>, Fortran::common::Reference<Fortran::parser::OpenMPDeclarativeConstruct const>, Fortran::common::Reference<Fortran::parser::OmpEndLoopDirective const>, Fortran::common::Reference<Fortran::parser::CUFKernelDoConstruct const>> const&)>, std::tuple<std::variant<Fortran::common::Reference<Fortran::parser::AllocateStmt const>, Fortran::common::Reference<Fortran::parser::AssignmentStmt const>, Fortran::common::Reference<Fortran::parser::BackspaceStmt const>, Fortran::common::Reference<Fortran::parser::CallStmt const>, Fortran::common::Reference<Fortran::parser::CloseStmt const>, Fortran::common::Reference<Fortran::parser::ContinueStmt const>, Fortran::common::Reference<Fortran::parser::CycleStmt const>, Fortran::common::Reference<Fortran::parser::DeallocateStmt const>, Fortran::common::Reference<Fortran::parser::EndfileStmt const>, Fortran::common::Reference<Fortran::parser::EventPostStmt const>, Fortran::common::Reference<Fortran::parser::EventWaitStmt const>, Fortran::common::Reference<Fortran::parser::ExitStmt const>, Fortran::common::Reference<Fortran::parser::FailImageStmt const>, Fortran::common::Reference<Fortran::parser::FlushStmt const>, Fortran::common::Reference<Fortran::parser::FormTeamStmt const>, Fortran::common::Reference<Fortran::parser::GotoStmt const>, Fortran::common::Reference<Fortran::parser::IfStmt const>, Fortran::common::Reference<Fortran::parser::InquireStmt const>, Fortran::common::Reference<Fortran::parser::LockStmt const>, Fortran::common::Reference<Fortran::parser::NotifyWaitStmt const>, Fortran::common::Reference<Fortran::parser::NullifyStmt const>, Fortran::common::Reference<Fortran::parser::OpenStmt const>, Fortran::common::Reference<Fortran::parser::PointerAssignmentStmt const>, Fortran::common::Reference<Fortran::parser::PrintStmt const>, Fortran::common::Reference<Fortran::parser::ReadStmt const>, Fortran::common::Reference<Fortran::parser::ReturnStmt const>, Fortran::common::Reference<Fortran::parser::RewindStmt const>, Fortran::common::Reference<Fortran::parser::StopStmt const>, Fortran::common::Reference<Fortran::parser::SyncAllStmt const>, Fortran::common::Reference<Fortran::parser::SyncImagesStmt const>, Fortran::common::Reference<Fortran::parser::SyncMemoryStmt const>, Fortran::common::Reference<Fortran::parser::SyncTeamStmt const>, Fortran::common::Reference<Fortran::parser::UnlockStmt const>, Fortran::common::Reference<Fortran::parser::WaitStmt const>, Fortran::common::Reference<Fortran::parser::WhereStmt const>, Fortran::common::Reference<Fortran::parser::WriteStmt const>, Fortran::common::Reference<Fortran::parser::ComputedGotoStmt const>, Fortran::common::Reference<Fortran::parser::ForallStmt const>, Fortran::common::Reference<Fortran::parser::ArithmeticIfStmt const>, Fortran::common::Reference<Fortran::parser::AssignStmt const>, Fortran::common::Reference<Fortran::parser::AssignedGotoStmt const>, Fortran::common::Reference<Fortran::parser::PauseStmt const>, Fortran::common::Reference<Fortran::parser::EntryStmt const>, Fortran::common::Reference<Fortran::parser::FormatStmt const>, Fortran::common::Reference<Fortran::parser::AssociateStmt const>, Fortran::common::Reference<Fortran::parser::EndAssociateStmt const>, Fortran::common::Reference<Fortran::parser::BlockStmt const>, Fortran::common::Reference<Fortran::parser::EndBlockStmt const>, Fortran::common::Reference<Fortran::parser::SelectCaseStmt const>, Fortran::common::Reference<Fortran::parser::CaseStmt const>, Fortran::common::Reference<Fortran::parser::EndSelectStmt const>, Fortran::common::Reference<Fortran::parser::ChangeTeamStmt const>, Fortran::common::Reference<Fortran::parser::EndChangeTeamStmt const>, Fortran::common::Reference<Fortran::parser::CriticalStmt const>, Fortran::common::Reference<Fortran::parser::EndCriticalStmt const>, Fortran::common::Reference<Fortran::parser::NonLabelDoStmt const>, Fortran::common::Reference<Fortran::parser::EndDoStmt const>, Fortran::common::Reference<Fortran::parser::IfThenStmt const>, Fortran::common::Reference<Fortran::parser::ElseIfStmt const>, Fortran::common::Reference<Fortran::parser::ElseStmt const>, Fortran::common::Reference<Fortran::parser::EndIfStmt const>, Fortran::common::Reference<Fortran::parser::SelectRankStmt const>, Fortran::common::Reference<Fortran::parser::SelectRankCaseStmt const>, Fortran::common::Reference<Fortran::parser::SelectTypeStmt const>, Fortran::common::Reference<Fortran::parser::TypeGuardStmt const>, Fortran::common::Reference<Fortran::parser::WhereConstructStmt const>, Fortran::common::Reference<Fortran::parser::MaskedElsewhereStmt const>, Fortran::common::Reference<Fortran::parser::ElsewhereStmt const>, Fortran::common::Reference<Fortran::parser::EndWhereStmt const>, Fortran::common::Reference<Fortran::parser::ForallConstructStmt const>, Fortran::common::Reference<Fortran::parser::EndForallStmt const>, Fortran::common::Reference<Fortran::parser::EndProgramStmt const>, Fortran::common::Reference<Fortran::parser::EndFunctionStmt const>, Fortran::common::Reference<Fortran::parser::EndSubroutineStmt const>, Fortran::common::Reference<Fortran::parser::EndMpSubprogramStmt const>, Fortran::common::Reference<Fortran::parser::AssociateConstruct const>, Fortran::common::Reference<Fortran::parser::BlockConstruct const>, Fortran::common::Reference<Fortran::parser::CaseConstruct const>, Fortran::common::Reference<Fortran::parser::ChangeTeamConstruct const>, Fortran::common::Reference<Fortran::parser::CriticalConstruct const>, Fortran::common::Reference<Fortran::parser::DoConstruct const>, Fortran::common::Reference<Fortran::parser::IfConstruct const>, Fortran::common::Reference<Fortran::parser::SelectRankConstruct const>, Fortran::common::Reference<Fortran::parser::SelectTypeConstruct const>, Fortran::common::Reference<Fortran::parser::WhereConstruct const>, Fortran::common::Reference<Fortran::parser::ForallConstruct const>, Fortran::common::Reference<Fortran::parser::CompilerDirective const>, Fortran::common::Reference<Fortran::parser::OpenACCConstruct const>, Fortran::common::Reference<Fortran::parser::OpenACCRoutineConstruct const>, Fortran::common::Reference<Fortran::parser::OpenACCDeclarativeConstruct const>, Fortran::common::Reference<Fortran::parser::OpenMPConstruct const>, Fortran::common::Reference<Fortran::parser::OpenMPDeclarativeConstruct const>, Fortran::common::Reference<Fortran::parser::OmpEndLoopDirective const>, Fortran::common::Reference<Fortran::parser::CUFKernelDoConstruct const>> const&>, std::integer_sequence<unsigned long, 90ul>>::__visit_invoke(Fortran::common::visitors<auto Fortran::lower::pft::ReferenceVariantBase<true, Fortran::parser::AllocateStmt, Fortran::parser::AssignmentStmt, Fortran::parser::BackspaceStmt, Fortran::parser::CallStmt, Fortran::parser::CloseStmt, Fortran::parser::ContinueStmt, Fortran::parser::CycleStmt, Fortran::parser::DeallocateStmt, Fortran::parser::EndfileStmt, Fortran::parser::EventPostStmt, Fortran::parser::EventWaitStmt, Fortran::parser::ExitStmt, Fortran::parser::FailImageStmt, Fortran::parser::FlushStmt, Fortran::parser::FormTeamStmt, Fortran::parser::GotoStmt, Fortran::parser::IfStmt, Fortran::parser::InquireStmt, Fortran::parser::LockStmt, Fortran::parser::NotifyWaitStmt, Fortran::parser::NullifyStmt, Fortran::parser::OpenStmt, Fortran::parser::PointerAssignmentStmt, Fortran::parser::PrintStmt, Fortran::parser::ReadStmt, Fortran::parser::ReturnStmt, Fortran::parser::RewindStmt, Fortran::parser::StopStmt, Fortran::parser::SyncAllStmt, Fortran::parser::SyncImagesStmt, Fortran::parser::SyncMemoryStmt, Fortran::parser::SyncTeamStmt, Fortran::parser::UnlockStmt, Fortran::parser::WaitStmt, Fortran::parser::WhereStmt, Fortran::parser::WriteStmt, Fortran::parser::ComputedGotoStmt, Fortran::parser::ForallStmt, Fortran::parser::ArithmeticIfStmt, Fortran::parser::AssignStmt, Fortran::parser::AssignedGotoStmt, Fortran::parser::PauseStmt, Fortran::parser::EntryStmt, Fortran::parser::FormatStmt, Fortran::parser::AssociateStmt, Fortran::parser::EndAssociateStmt, Fortran::parser::BlockStmt, Fortran::parser::EndBlockStmt, Fortran::parser::SelectCaseStmt, Fortran::parser::CaseStmt, Fortran::parser::EndSelectStmt, Fortran::parser::ChangeTeamStmt, Fortran::parser::EndChangeTeamStmt, Fortran::parser::CriticalStmt, Fortran::parser::EndCriticalStmt, Fortran::parser::NonLabelDoStmt, Fortran::parser::EndDoStmt, Fortran::parser::IfThenStmt, Fortran::parser::ElseIfStmt, Fortran::parser::ElseStmt, Fortran::parser::EndIfStmt, Fortran::parser::SelectRankStmt, Fortran::parser::SelectRankCaseStmt, Fortran::parser::SelectTypeStmt, Fortran::parser::TypeGuardStmt, Fortran::parser::WhereConstructStmt, Fortran::parser::MaskedElsewhereStmt, Fortran::parser::ElsewhereStmt, Fortran::parser::EndWhereStmt, Fortran::parser::ForallConstructStmt, Fortran::parser::EndForallStmt, Fortran::parser::EndProgramStmt, Fortran::parser::EndFunctionStmt, Fortran::parser::EndSubroutineStmt, Fortran::parser::EndMpSubprogramStmt, Fortran::parser::AssociateConstruct, Fortran::parser::BlockConstruct, Fortran::parser::CaseConstruct, Fortran::parser::ChangeTeamConstruct, Fortran::parser::CriticalConstruct, Fortran::parser::DoConstruct, Fortran::parser::IfConstruct, Fortran::parser::SelectRankConstruct, Fortran::parser::SelectTypeConstruct, Fortran::parser::WhereConstruct, Fortran::parser::ForallConstruct, Fortran::parser::CompilerDirective, Fortran::parser::OpenACCConstruct, Fortran::parser::OpenACCRoutineConstruct, Fortran::parser::OpenACCDeclarativeConstruct, Fortran::parser::OpenMPConstruct, Fortran::parser::OpenMPDeclarativeConstruct, Fortran::parser::OmpEndLoopDirective, Fortran::parser::CUFKernelDoConstruct>::visit<(anonymous namespace)::FirConverter::genFIR(Fortran::lower::pft::Evaluation&, bool)::'lambda'(auto const&)>(auto&&) const::'lambda'(auto)>&&, std::variant<Fortran::common::Reference<Fortran::parser::AllocateStmt const>, Fortran::common::Reference<Fortran::parser::AssignmentStmt const>, Fortran::common::Reference<Fortran::parser::BackspaceStmt const>, Fortran::common::Reference<Fortran::parser::CallStmt const>, Fortran::common::Reference<Fortran::parser::CloseStmt const>, Fortran::common::Reference<Fortran::parser::ContinueStmt const>, Fortran::common::Reference<Fortran::parser::CycleStmt const>, Fortran::common::Reference<Fortran::parser::DeallocateStmt const>, Fortran::common::Reference<Fortran::parser::EndfileStmt const>, Fortran::common::Reference<Fortran::parser::EventPostStmt const>, Fortran::common::Reference<Fortran::parser::EventWaitStmt const>, Fortran::common::Reference<Fortran::parser::ExitStmt const>, Fortran::common::Reference<Fortran::parser::FailImageStmt const>, Fortran::common::Reference<Fortran::parser::FlushStmt const>, Fortran::common::Reference<Fortran::parser::FormTeamStmt const>, Fortran::common::Reference<Fortran::parser::GotoStmt const>, Fortran::common::Reference<Fortran::parser::IfStmt const>, Fortran::common::Reference<Fortran::parser::InquireStmt const>, Fortran::common::Reference<Fortran::parser::LockStmt const>, Fortran::common::Reference<Fortran::parser::NotifyWaitStmt const>, Fortran::common::Reference<Fortran::parser::NullifyStmt const>, Fortran::common::Reference<Fortran::parser::OpenStmt const>, Fortran::common::Reference<Fortran::parser::PointerAssignmentStmt const>, Fortran::common::Reference<Fortran::parser::PrintStmt const>, Fortran::common::Reference<Fortran::parser::ReadStmt const>, Fortran::common::Reference<Fortran::parser::ReturnStmt const>, Fortran::common::Reference<Fortran::parser::RewindStmt const>, Fortran::common::Reference<Fortran::parser::StopStmt const>, Fortran::common::Reference<Fortran::parser::SyncAllStmt const>, Fortran::common::Reference<Fortran::parser::SyncImagesStmt const>, Fortran::common::Reference<Fortran::parser::SyncMemoryStmt const>, Fortran::common::Reference<Fortran::parser::SyncTeamStmt const>, Fortran::common::Reference<Fortran::parser::UnlockStmt const>, Fortran::common::Reference<Fortran::parser::WaitStmt const>, Fortran::common::Reference<Fortran::parser::WhereStmt const>, Fortran::common::Reference<Fortran::parser::WriteStmt const>, Fortran::common::Reference<Fortran::parser::ComputedGotoStmt const>, Fortran::common::Reference<Fortran::parser::ForallStmt const>, Fortran::common::Reference<Fortran::parser::ArithmeticIfStmt const>, Fortran::common::Reference<Fortran::parser::AssignStmt const>, Fortran::common::Reference<Fortran::parser::AssignedGotoStmt const>, Fortran::common::Reference<Fortran::parser::PauseStmt const>, Fortran::common::Reference<Fortran::parser::EntryStmt const>, Fortran::common::Reference<Fortran::parser::FormatStmt const>, Fortran::common::Reference<Fortran::parser::AssociateStmt const>, Fortran::common::Reference<Fortran::parser::EndAssociateStmt const>, Fortran::common::Reference<Fortran::parser::BlockStmt const>, Fortran::common::Reference<Fortran::parser::EndBlockStmt const>, Fortran::common::Reference<Fortran::parser::SelectCaseStmt const>, Fortran::common::Reference<Fortran::parser::CaseStmt const>, Fortran::common::Reference<Fortran::parser::EndSelectStmt const>, Fortran::common::Reference<Fortran::parser::ChangeTeamStmt const>, Fortran::common::Reference<Fortran::parser::EndChangeTeamStmt const>, Fortran::common::Reference<Fortran::parser::CriticalStmt const>, Fortran::common::Reference<Fortran::parser::EndCriticalStmt const>, Fortran::common::Reference<Fortran::parser::NonLabelDoStmt const>, Fortran::common::Reference<Fortran::parser::EndDoStmt const>, Fortran::common::Reference<Fortran::parser::IfThenStmt const>, Fortran::common::Reference<Fortran::parser::ElseIfStmt const>, Fortran::common::Reference<Fortran::parser::ElseStmt const>, Fortran::common::Reference<Fortran::parser::EndIfStmt const>, Fortran::common::Reference<Fortran::parser::SelectRankStmt const>, Fortran::common::Reference<Fortran::parser::SelectRankCaseStmt const>, Fortran::common::Reference<Fortran::parser::SelectTypeStmt const>, Fortran::common::Reference<Fortran::parser::TypeGuardStmt const>, Fortran::common::Reference<Fortran::parser::WhereConstructStmt const>, Fortran::common::Reference<Fortran::parser::MaskedElsewhereStmt const>, Fortran::common::Reference<Fortran::parser::ElsewhereStmt const>, Fortran::common::Reference<Fortran::parser::EndWhereStmt const>, Fortran::common::Reference<Fortran::parser::ForallConstructStmt const>, Fortran::common::Reference<Fortran::parser::EndForallStmt const>, Fortran::common::Reference<Fortran::parser::EndProgramStmt const>, Fortran::common::Reference<Fortran::parser::EndFunctionStmt const>, Fortran::common::Reference<Fortran::parser::EndSubroutineStmt const>, Fortran::common::Reference<Fortran::parser::EndMpSubprogramStmt const>, Fortran::common::Reference<Fortran::parser::AssociateConstruct const>, Fortran::common::Reference<Fortran::parser::BlockConstruct const>, Fortran::common::Reference<Fortran::parser::CaseConstruct const>, Fortran::common::Reference<Fortran::parser::ChangeTeamConstruct const>, Fortran::common::Reference<Fortran::parser::CriticalConstruct const>, Fortran::common::Reference<Fortran::parser::DoConstruct const>, Fortran::common::Reference<Fortran::parser::IfConstruct const>, Fortran::common::Reference<Fortran::parser::SelectRankConstruct const>, Fortran::common::Reference<Fortran::parser::SelectTypeConstruct const>, Fortran::common::Reference<Fortran::parser::WhereConstruct const>, Fortran::common::Reference<Fortran::parser::ForallConstruct const>, Fortran::common::Reference<Fortran::parser::CompilerDirective const>, Fortran::common::Reference<Fortran::parser::OpenACCConstruct const>, Fortran::common::Reference<Fortran::parser::OpenACCRoutineConstruct const>, Fortran::common::Reference<Fortran::parser::OpenACCDeclarativeConstruct const>, Fortran::common::Reference<Fortran::parser::OpenMPConstruct const>, Fortran::common::Reference<Fortran::parser::OpenMPDeclarativeConstruct const>, Fortran::common::Reference<Fortran::parser::OmpEndLoopDirective const>, Fortran::common::Reference<Fortran::parser::CUFKernelDoConstruct const>> const&) Bridge.cpp:0:0
#15 0x0000000005949f04 (anonymous namespace)::FirConverter::lowerFunc(Fortran::lower::pft::FunctionLikeUnit&) Bridge.cpp:0:0
#16 0x000000000592f704 Fortran::lower::LoweringBridge::lower(Fortran::parser::Program const&, Fortran::semantics::SemanticsContext const&) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x592f704)
#17 0x00000000058c76d4 Fortran::frontend::CodeGenAction::beginSourceFileAction() (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x58c76d4)
#18 0x00000000057dd30c Fortran::frontend::FrontendAction::beginSourceFile(Fortran::frontend::CompilerInstance&, Fortran::frontend::FrontendInputFile const&) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x57dd30c)
#19 0x00000000057ce3b8 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x57ce3b8)
#20 0x00000000057e1adc Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x57e1adc)
#21 0x00000000057c6b90 fc1_main(llvm::ArrayRef<char const*>, char const*) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x57c6b90)
#22 0x00000000057c65e8 main (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x57c65e8)
#23 0x000040003cf64384 __libc_start_main (/lib64/libc.so.6+0x24384)
#24 0x00000000057c4ab4 _start (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x57c4ab4)
flang-20: error: unable to execute command: Aborted (core dumped)
flang-20: error: flang frontend command failed due to signal (use -v to see invocation)
flang version 20.0.0git (https://github.com/llvm/llvm-project.git c5492e3c65e40cdcab9771b692f9ad437c65aa04)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin
Build config: +assertions
flang-20: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
flang-20: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
flang-20: note: diagnostic msg: /tmp/snen_prc_s69_2-71f72f
flang-20: note: diagnostic msg: /tmp/snen_prc_s69_2-71f72f.sh
flang-20: note: diagnostic msg:

********************
$
$ cat /tmp/snen_prc_s69_2-71f72f
#line "./snen_prc_s69_2.f90" 1
      subroutine s1
      interface
      function k()
      end function k
      end interface
      procedure(k),pointer::p
!$omp parallel private(p)
      p=> k
      if(p() /= 2) print *,'error'
!$omp end parallel
      end subroutine s1

      program main
      call s1
      print *,'pass '
      end program main

      function k()
      k=2
      end function k
$
$ cat /tmp/snen_prc_s69_2-71f72f.sh
# Crash reproducer for clang version 20.0.0git (https://github.com/llvm/llvm-project.git c5492e3c65e40cdcab9771b692f9ad437c65aa04)
# Driver args: "-fopenmp" "snen_prc_s69_2.f90"
# Original command:  "/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang" "-fc1" "-triple" "aarch64-unknown-linux-gnu" "-emit-obj" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-target-cpu" "generic" "-target-feature" "+outline-atomics" "-target-feature" "+v8a" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-fopenmp" "-resource-dir" "/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/lib/clang/20" "-mframe-pointer=non-leaf" "-o" "/tmp/snen_prc_s69_2-c1b53d.o" "-x" "f95-cpp-input" "snen_prc_s69_2.f90"
 "/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang" "-fc1" "-triple" "aarch64-unknown-linux-gnu" "-emit-obj" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-target-cpu" "generic" "-target-feature" "+outline-atomics" "-target-feature" "+v8a" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-fopenmp" "-mframe-pointer=non-leaf" "-x" "f95-cpp-input" "snen_prc_s69_2-71f72f"
$
$ export OMP_NUM_THREADS=2; gfortran -fopenmp snen_prc_s69_2.f90; ./a.out
 pass
$
$ export OMP_NUM_THREADS=2; ifx -qopenmp snen_prc_s69_2.f90; ./a.out
 pass
$
@EugeneZelenko EugeneZelenko added flang:ir crash Prefer [crash-on-valid] or [crash-on-invalid] labels Jan 6, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 6, 2025

@llvm/issue-subscribers-flang-ir

Author: None (ohno-fj)

``` Version of flang : 20.0.0(c5492e3)/AArch64 ```

When specific-procedure-list specified in procedure-stmt (procedure) of interface-specification is specified in parallel construct with private clause, a compilation terminates abnormally.
When private clause is removed, the compilation succeeds.

The following are the test program, Flang, Gfortran and ifx compilation/execution result.

snen_prc_s69_2.f90:

subroutine s1
  interface
     function k()
     end function k
  end interface
  procedure(k),pointer::p
!$omp parallel private(p)
  p=&gt; k
  if (p() /= 2) print *,'error'
!$omp end parallel
end subroutine s1

program main
  call s1
  print *,'pass '
end program main

function k()
  k=2
end function k
$ flang -fopenmp snen_prc_s69_2.f90
flang-20: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
LLVM ERROR: unsupported type
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang -fc1 -triple aarch64-unknown-linux-gnu -emit-obj -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu generic -target-feature +outline-atomics -target-feature +v8a -target-feature +fp-armv8 -target-feature +neon -fopenmp -resource-dir /work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/lib/clang/20 -mframe-pointer=non-leaf -o /tmp/snen_prc_s69_2-c1b53d.o -x f95-cpp-input snen_prc_s69_2.f90
 #<!-- -->0 0x00004000381135d0 llvm::sys::PrintStackTrace(llvm::raw_ostream&amp;, int) (/work/groups/ssoft/compiler/llvm/aarch64/main-latest/lib/libLLVM.so.20.0git+0x5a035d0)
 #<!-- -->1 0x0000400038111658 llvm::sys::RunSignalHandlers() (/work/groups/ssoft/compiler/llvm/aarch64/main-latest/lib/libLLVM.so.20.0git+0x5a01658)
 #<!-- -->2 0x00004000381117b0 SignalHandler(int) Signals.cpp:0:0
 #<!-- -->3 0x000040002d7707a0 (linux-vdso.so.1+0x7a0)
 #<!-- -->4 0x000040003cf76274 raise (/lib64/libc.so.6+0x36274)
 #<!-- -->5 0x000040003cf60a2c abort (/lib64/libc.so.6+0x20a2c)
 #<!-- -->6 0x0000400038040488 llvm::report_fatal_error(llvm::StringRef, bool) (/work/groups/ssoft/compiler/llvm/aarch64/main-latest/lib/libLLVM.so.20.0git+0x5930488)
 #<!-- -->7 0x00004000380404d8 llvm::install_bad_alloc_error_handler(void (*)(void*, char const*, bool), void*) (/work/groups/ssoft/compiler/llvm/aarch64/main-latest/lib/libLLVM.so.20.0git+0x59304d8)
 #<!-- -->8 0x0000000006ea2c74 fir::getTypeAsString[abi:cxx11](mlir::Type, fir::KindMapping const&amp;, llvm::StringRef) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x6ea2c74)
 #<!-- -->9 0x0000000005d21698 Fortran::lower::omp::DataSharingProcessor::doPrivatize(Fortran::semantics::Symbol const*, mlir::omp::PrivateClauseOps*) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x5d21698)
#<!-- -->10 0x0000000005d25208 Fortran::lower::omp::DataSharingProcessor::processStep1(mlir::omp::PrivateClauseOps*) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x5d25208)
#<!-- -->11 0x0000000005cc01a4 genOMPDispatch(Fortran::lower::AbstractConverter&amp;, Fortran::lower::SymMap&amp;, Fortran::semantics::SemanticsContext&amp;, Fortran::lower::pft::Evaluation&amp;, mlir::Location, llvm::SmallVector&lt;tomp::DirectiveWithClauses&lt;Fortran::lower::omp::Clause&gt;, 0u&gt; const&amp;, tomp::DirectiveWithClauses&lt;Fortran::lower::omp::Clause&gt; const*) OpenMP.cpp:0:0
#<!-- -->12 0x0000000005cc3154 std::__detail::__variant::__gen_vtable_impl&lt;std::__detail::__variant::_Multi_array&lt;void (*)(genOMP(Fortran::lower::AbstractConverter&amp;, Fortran::lower::SymMap&amp;, Fortran::semantics::SemanticsContext&amp;, Fortran::lower::pft::Evaluation&amp;, Fortran::parser::OpenMPConstruct const&amp;)::'lambda'(auto&amp;&amp;)&amp;&amp;, std::variant&lt;Fortran::parser::OpenMPStandaloneConstruct, Fortran::parser::OpenMPSectionsConstruct, Fortran::parser::OpenMPSectionConstruct, Fortran::parser::OpenMPLoopConstruct, Fortran::parser::OpenMPBlockConstruct, Fortran::parser::OpenMPAtomicConstruct, Fortran::parser::OpenMPDeclarativeAllocate, Fortran::parser::OpenMPErrorConstruct, Fortran::parser::OpenMPExecutableAllocate, Fortran::parser::OpenMPAllocatorsConstruct, Fortran::parser::OpenMPCriticalConstruct&gt; const&amp;)&gt;, std::tuple&lt;std::variant&lt;Fortran::parser::OpenMPStandaloneConstruct, Fortran::parser::OpenMPSectionsConstruct, Fortran::parser::OpenMPSectionConstruct, Fortran::parser::OpenMPLoopConstruct, Fortran::parser::OpenMPBlockConstruct, Fortran::parser::OpenMPAtomicConstruct, Fortran::parser::OpenMPDeclarativeAllocate, Fortran::parser::OpenMPErrorConstruct, Fortran::parser::OpenMPExecutableAllocate, Fortran::parser::OpenMPAllocatorsConstruct, Fortran::parser::OpenMPCriticalConstruct&gt; const&amp;&gt;, std::integer_sequence&lt;unsigned long, 4ul&gt;&gt;::__visit_invoke(genOMP(Fortran::lower::AbstractConverter&amp;, Fortran::lower::SymMap&amp;, Fortran::semantics::SemanticsContext&amp;, Fortran::lower::pft::Evaluation&amp;, Fortran::parser::OpenMPConstruct const&amp;)::'lambda'(auto&amp;&amp;)&amp;&amp;, std::variant&lt;Fortran::parser::OpenMPStandaloneConstruct, Fortran::parser::OpenMPSectionsConstruct, Fortran::parser::OpenMPSectionConstruct, Fortran::parser::OpenMPLoopConstruct, Fortran::parser::OpenMPBlockConstruct, Fortran::parser::OpenMPAtomicConstruct, Fortran::parser::OpenMPDeclarativeAllocate, Fortran::parser::OpenMPErrorConstruct, Fortran::parser::OpenMPExecutableAllocate, Fortran::parser::OpenMPAllocatorsConstruct, Fortran::parser::OpenMPCriticalConstruct&gt; const&amp;) OpenMP.cpp:0:0
#<!-- -->13 0x0000000005ca7904 Fortran::lower::genOpenMPConstruct(Fortran::lower::AbstractConverter&amp;, Fortran::lower::SymMap&amp;, Fortran::semantics::SemanticsContext&amp;, Fortran::lower::pft::Evaluation&amp;, Fortran::parser::OpenMPConstruct const&amp;) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x5ca7904)
#<!-- -->14 0x00000000058e6530 std::__detail::__variant::__gen_vtable_impl&lt;std::__detail::__variant::_Multi_array&lt;void (*)(Fortran::common::visitors&lt;auto Fortran::lower::pft::ReferenceVariantBase&lt;true, Fortran::parser::AllocateStmt, Fortran::parser::AssignmentStmt, Fortran::parser::BackspaceStmt, Fortran::parser::CallStmt, Fortran::parser::CloseStmt, Fortran::parser::ContinueStmt, Fortran::parser::CycleStmt, Fortran::parser::DeallocateStmt, Fortran::parser::EndfileStmt, Fortran::parser::EventPostStmt, Fortran::parser::EventWaitStmt, Fortran::parser::ExitStmt, Fortran::parser::FailImageStmt, Fortran::parser::FlushStmt, Fortran::parser::FormTeamStmt, Fortran::parser::GotoStmt, Fortran::parser::IfStmt, Fortran::parser::InquireStmt, Fortran::parser::LockStmt, Fortran::parser::NotifyWaitStmt, Fortran::parser::NullifyStmt, Fortran::parser::OpenStmt, Fortran::parser::PointerAssignmentStmt, Fortran::parser::PrintStmt, Fortran::parser::ReadStmt, Fortran::parser::ReturnStmt, Fortran::parser::RewindStmt, Fortran::parser::StopStmt, Fortran::parser::SyncAllStmt, Fortran::parser::SyncImagesStmt, Fortran::parser::SyncMemoryStmt, Fortran::parser::SyncTeamStmt, Fortran::parser::UnlockStmt, Fortran::parser::WaitStmt, Fortran::parser::WhereStmt, Fortran::parser::WriteStmt, Fortran::parser::ComputedGotoStmt, Fortran::parser::ForallStmt, Fortran::parser::ArithmeticIfStmt, Fortran::parser::AssignStmt, Fortran::parser::AssignedGotoStmt, Fortran::parser::PauseStmt, Fortran::parser::EntryStmt, Fortran::parser::FormatStmt, Fortran::parser::AssociateStmt, Fortran::parser::EndAssociateStmt, Fortran::parser::BlockStmt, Fortran::parser::EndBlockStmt, Fortran::parser::SelectCaseStmt, Fortran::parser::CaseStmt, Fortran::parser::EndSelectStmt, Fortran::parser::ChangeTeamStmt, Fortran::parser::EndChangeTeamStmt, Fortran::parser::CriticalStmt, Fortran::parser::EndCriticalStmt, Fortran::parser::NonLabelDoStmt, Fortran::parser::EndDoStmt, Fortran::parser::IfThenStmt, Fortran::parser::ElseIfStmt, Fortran::parser::ElseStmt, Fortran::parser::EndIfStmt, Fortran::parser::SelectRankStmt, Fortran::parser::SelectRankCaseStmt, Fortran::parser::SelectTypeStmt, Fortran::parser::TypeGuardStmt, Fortran::parser::WhereConstructStmt, Fortran::parser::MaskedElsewhereStmt, Fortran::parser::ElsewhereStmt, Fortran::parser::EndWhereStmt, Fortran::parser::ForallConstructStmt, Fortran::parser::EndForallStmt, Fortran::parser::EndProgramStmt, Fortran::parser::EndFunctionStmt, Fortran::parser::EndSubroutineStmt, Fortran::parser::EndMpSubprogramStmt, Fortran::parser::AssociateConstruct, Fortran::parser::BlockConstruct, Fortran::parser::CaseConstruct, Fortran::parser::ChangeTeamConstruct, Fortran::parser::CriticalConstruct, Fortran::parser::DoConstruct, Fortran::parser::IfConstruct, Fortran::parser::SelectRankConstruct, Fortran::parser::SelectTypeConstruct, Fortran::parser::WhereConstruct, Fortran::parser::ForallConstruct, Fortran::parser::CompilerDirective, Fortran::parser::OpenACCConstruct, Fortran::parser::OpenACCRoutineConstruct, Fortran::parser::OpenACCDeclarativeConstruct, Fortran::parser::OpenMPConstruct, Fortran::parser::OpenMPDeclarativeConstruct, Fortran::parser::OmpEndLoopDirective, Fortran::parser::CUFKernelDoConstruct&gt;::visit&lt;(anonymous namespace)::FirConverter::genFIR(Fortran::lower::pft::Evaluation&amp;, bool)::'lambda'(auto const&amp;)&gt;(auto&amp;&amp;) const::'lambda'(auto)&gt;&amp;&amp;, std::variant&lt;Fortran::common::Reference&lt;Fortran::parser::AllocateStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssignmentStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::BackspaceStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CallStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CloseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ContinueStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CycleStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::DeallocateStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndfileStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EventPostStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EventWaitStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ExitStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::FailImageStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::FlushStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::FormTeamStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::GotoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::IfStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::InquireStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::LockStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::NotifyWaitStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::NullifyStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::PointerAssignmentStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::PrintStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ReadStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ReturnStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::RewindStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::StopStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SyncAllStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SyncImagesStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SyncMemoryStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SyncTeamStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::UnlockStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::WaitStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::WhereStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::WriteStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ComputedGotoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ForallStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ArithmeticIfStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssignStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssignedGotoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::PauseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EntryStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::FormatStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssociateStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndAssociateStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::BlockStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndBlockStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectCaseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CaseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndSelectStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ChangeTeamStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndChangeTeamStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CriticalStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndCriticalStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::NonLabelDoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndDoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::IfThenStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ElseIfStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ElseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndIfStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectRankStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectRankCaseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectTypeStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::TypeGuardStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::WhereConstructStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::MaskedElsewhereStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ElsewhereStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndWhereStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ForallConstructStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndForallStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndProgramStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndFunctionStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndSubroutineStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndMpSubprogramStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssociateConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::BlockConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::CaseConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::ChangeTeamConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::CriticalConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::DoConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::IfConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectRankConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectTypeConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::WhereConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::ForallConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::CompilerDirective const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenACCConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenACCRoutineConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenACCDeclarativeConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenMPConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenMPDeclarativeConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OmpEndLoopDirective const&gt;, Fortran::common::Reference&lt;Fortran::parser::CUFKernelDoConstruct const&gt;&gt; const&amp;)&gt;, std::tuple&lt;std::variant&lt;Fortran::common::Reference&lt;Fortran::parser::AllocateStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssignmentStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::BackspaceStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CallStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CloseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ContinueStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CycleStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::DeallocateStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndfileStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EventPostStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EventWaitStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ExitStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::FailImageStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::FlushStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::FormTeamStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::GotoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::IfStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::InquireStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::LockStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::NotifyWaitStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::NullifyStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::PointerAssignmentStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::PrintStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ReadStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ReturnStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::RewindStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::StopStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SyncAllStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SyncImagesStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SyncMemoryStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SyncTeamStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::UnlockStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::WaitStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::WhereStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::WriteStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ComputedGotoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ForallStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ArithmeticIfStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssignStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssignedGotoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::PauseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EntryStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::FormatStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssociateStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndAssociateStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::BlockStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndBlockStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectCaseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CaseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndSelectStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ChangeTeamStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndChangeTeamStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CriticalStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndCriticalStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::NonLabelDoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndDoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::IfThenStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ElseIfStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ElseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndIfStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectRankStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectRankCaseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectTypeStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::TypeGuardStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::WhereConstructStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::MaskedElsewhereStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ElsewhereStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndWhereStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ForallConstructStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndForallStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndProgramStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndFunctionStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndSubroutineStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndMpSubprogramStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssociateConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::BlockConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::CaseConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::ChangeTeamConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::CriticalConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::DoConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::IfConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectRankConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectTypeConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::WhereConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::ForallConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::CompilerDirective const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenACCConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenACCRoutineConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenACCDeclarativeConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenMPConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenMPDeclarativeConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OmpEndLoopDirective const&gt;, Fortran::common::Reference&lt;Fortran::parser::CUFKernelDoConstruct const&gt;&gt; const&amp;&gt;, std::integer_sequence&lt;unsigned long, 90ul&gt;&gt;::__visit_invoke(Fortran::common::visitors&lt;auto Fortran::lower::pft::ReferenceVariantBase&lt;true, Fortran::parser::AllocateStmt, Fortran::parser::AssignmentStmt, Fortran::parser::BackspaceStmt, Fortran::parser::CallStmt, Fortran::parser::CloseStmt, Fortran::parser::ContinueStmt, Fortran::parser::CycleStmt, Fortran::parser::DeallocateStmt, Fortran::parser::EndfileStmt, Fortran::parser::EventPostStmt, Fortran::parser::EventWaitStmt, Fortran::parser::ExitStmt, Fortran::parser::FailImageStmt, Fortran::parser::FlushStmt, Fortran::parser::FormTeamStmt, Fortran::parser::GotoStmt, Fortran::parser::IfStmt, Fortran::parser::InquireStmt, Fortran::parser::LockStmt, Fortran::parser::NotifyWaitStmt, Fortran::parser::NullifyStmt, Fortran::parser::OpenStmt, Fortran::parser::PointerAssignmentStmt, Fortran::parser::PrintStmt, Fortran::parser::ReadStmt, Fortran::parser::ReturnStmt, Fortran::parser::RewindStmt, Fortran::parser::StopStmt, Fortran::parser::SyncAllStmt, Fortran::parser::SyncImagesStmt, Fortran::parser::SyncMemoryStmt, Fortran::parser::SyncTeamStmt, Fortran::parser::UnlockStmt, Fortran::parser::WaitStmt, Fortran::parser::WhereStmt, Fortran::parser::WriteStmt, Fortran::parser::ComputedGotoStmt, Fortran::parser::ForallStmt, Fortran::parser::ArithmeticIfStmt, Fortran::parser::AssignStmt, Fortran::parser::AssignedGotoStmt, Fortran::parser::PauseStmt, Fortran::parser::EntryStmt, Fortran::parser::FormatStmt, Fortran::parser::AssociateStmt, Fortran::parser::EndAssociateStmt, Fortran::parser::BlockStmt, Fortran::parser::EndBlockStmt, Fortran::parser::SelectCaseStmt, Fortran::parser::CaseStmt, Fortran::parser::EndSelectStmt, Fortran::parser::ChangeTeamStmt, Fortran::parser::EndChangeTeamStmt, Fortran::parser::CriticalStmt, Fortran::parser::EndCriticalStmt, Fortran::parser::NonLabelDoStmt, Fortran::parser::EndDoStmt, Fortran::parser::IfThenStmt, Fortran::parser::ElseIfStmt, Fortran::parser::ElseStmt, Fortran::parser::EndIfStmt, Fortran::parser::SelectRankStmt, Fortran::parser::SelectRankCaseStmt, Fortran::parser::SelectTypeStmt, Fortran::parser::TypeGuardStmt, Fortran::parser::WhereConstructStmt, Fortran::parser::MaskedElsewhereStmt, Fortran::parser::ElsewhereStmt, Fortran::parser::EndWhereStmt, Fortran::parser::ForallConstructStmt, Fortran::parser::EndForallStmt, Fortran::parser::EndProgramStmt, Fortran::parser::EndFunctionStmt, Fortran::parser::EndSubroutineStmt, Fortran::parser::EndMpSubprogramStmt, Fortran::parser::AssociateConstruct, Fortran::parser::BlockConstruct, Fortran::parser::CaseConstruct, Fortran::parser::ChangeTeamConstruct, Fortran::parser::CriticalConstruct, Fortran::parser::DoConstruct, Fortran::parser::IfConstruct, Fortran::parser::SelectRankConstruct, Fortran::parser::SelectTypeConstruct, Fortran::parser::WhereConstruct, Fortran::parser::ForallConstruct, Fortran::parser::CompilerDirective, Fortran::parser::OpenACCConstruct, Fortran::parser::OpenACCRoutineConstruct, Fortran::parser::OpenACCDeclarativeConstruct, Fortran::parser::OpenMPConstruct, Fortran::parser::OpenMPDeclarativeConstruct, Fortran::parser::OmpEndLoopDirective, Fortran::parser::CUFKernelDoConstruct&gt;::visit&lt;(anonymous namespace)::FirConverter::genFIR(Fortran::lower::pft::Evaluation&amp;, bool)::'lambda'(auto const&amp;)&gt;(auto&amp;&amp;) const::'lambda'(auto)&gt;&amp;&amp;, std::variant&lt;Fortran::common::Reference&lt;Fortran::parser::AllocateStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssignmentStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::BackspaceStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CallStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CloseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ContinueStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CycleStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::DeallocateStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndfileStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EventPostStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EventWaitStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ExitStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::FailImageStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::FlushStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::FormTeamStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::GotoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::IfStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::InquireStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::LockStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::NotifyWaitStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::NullifyStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::PointerAssignmentStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::PrintStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ReadStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ReturnStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::RewindStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::StopStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SyncAllStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SyncImagesStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SyncMemoryStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SyncTeamStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::UnlockStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::WaitStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::WhereStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::WriteStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ComputedGotoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ForallStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ArithmeticIfStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssignStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssignedGotoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::PauseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EntryStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::FormatStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssociateStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndAssociateStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::BlockStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndBlockStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectCaseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CaseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndSelectStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ChangeTeamStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndChangeTeamStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::CriticalStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndCriticalStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::NonLabelDoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndDoStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::IfThenStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ElseIfStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ElseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndIfStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectRankStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectRankCaseStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectTypeStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::TypeGuardStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::WhereConstructStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::MaskedElsewhereStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ElsewhereStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndWhereStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::ForallConstructStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndForallStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndProgramStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndFunctionStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndSubroutineStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::EndMpSubprogramStmt const&gt;, Fortran::common::Reference&lt;Fortran::parser::AssociateConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::BlockConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::CaseConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::ChangeTeamConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::CriticalConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::DoConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::IfConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectRankConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::SelectTypeConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::WhereConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::ForallConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::CompilerDirective const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenACCConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenACCRoutineConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenACCDeclarativeConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenMPConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OpenMPDeclarativeConstruct const&gt;, Fortran::common::Reference&lt;Fortran::parser::OmpEndLoopDirective const&gt;, Fortran::common::Reference&lt;Fortran::parser::CUFKernelDoConstruct const&gt;&gt; const&amp;) Bridge.cpp:0:0
#<!-- -->15 0x0000000005949f04 (anonymous namespace)::FirConverter::lowerFunc(Fortran::lower::pft::FunctionLikeUnit&amp;) Bridge.cpp:0:0
#<!-- -->16 0x000000000592f704 Fortran::lower::LoweringBridge::lower(Fortran::parser::Program const&amp;, Fortran::semantics::SemanticsContext const&amp;) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x592f704)
#<!-- -->17 0x00000000058c76d4 Fortran::frontend::CodeGenAction::beginSourceFileAction() (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x58c76d4)
#<!-- -->18 0x00000000057dd30c Fortran::frontend::FrontendAction::beginSourceFile(Fortran::frontend::CompilerInstance&amp;, Fortran::frontend::FrontendInputFile const&amp;) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x57dd30c)
#<!-- -->19 0x00000000057ce3b8 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&amp;) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x57ce3b8)
#<!-- -->20 0x00000000057e1adc Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x57e1adc)
#<!-- -->21 0x00000000057c6b90 fc1_main(llvm::ArrayRef&lt;char const*&gt;, char const*) (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x57c6b90)
#<!-- -->22 0x00000000057c65e8 main (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x57c65e8)
#<!-- -->23 0x000040003cf64384 __libc_start_main (/lib64/libc.so.6+0x24384)
#<!-- -->24 0x00000000057c4ab4 _start (/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang+0x57c4ab4)
flang-20: error: unable to execute command: Aborted (core dumped)
flang-20: error: flang frontend command failed due to signal (use -v to see invocation)
flang version 20.0.0git (https://github.com/llvm/llvm-project.git c5492e3c65e40cdcab9771b692f9ad437c65aa04)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin
Build config: +assertions
flang-20: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
flang-20: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
flang-20: note: diagnostic msg: /tmp/snen_prc_s69_2-71f72f
flang-20: note: diagnostic msg: /tmp/snen_prc_s69_2-71f72f.sh
flang-20: note: diagnostic msg:

********************
$
$ cat /tmp/snen_prc_s69_2-71f72f
#line "./snen_prc_s69_2.f90" 1
      subroutine s1
      interface
      function k()
      end function k
      end interface
      procedure(k),pointer::p
!$omp parallel private(p)
      p=&gt; k
      if(p() /= 2) print *,'error'
!$omp end parallel
      end subroutine s1

      program main
      call s1
      print *,'pass '
      end program main

      function k()
      k=2
      end function k
$
$ cat /tmp/snen_prc_s69_2-71f72f.sh
# Crash reproducer for clang version 20.0.0git (https://github.com/llvm/llvm-project.git c5492e3c65e40cdcab9771b692f9ad437c65aa04)
# Driver args: "-fopenmp" "snen_prc_s69_2.f90"
# Original command:  "/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang" "-fc1" "-triple" "aarch64-unknown-linux-gnu" "-emit-obj" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-target-cpu" "generic" "-target-feature" "+outline-atomics" "-target-feature" "+v8a" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-fopenmp" "-resource-dir" "/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/lib/clang/20" "-mframe-pointer=non-leaf" "-o" "/tmp/snen_prc_s69_2-c1b53d.o" "-x" "f95-cpp-input" "snen_prc_s69_2.f90"
 "/work/groups/ssoft/compiler/llvm/aarch64/main-20241223-c5492e3c65e4/bin/flang" "-fc1" "-triple" "aarch64-unknown-linux-gnu" "-emit-obj" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-target-cpu" "generic" "-target-feature" "+outline-atomics" "-target-feature" "+v8a" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-fopenmp" "-mframe-pointer=non-leaf" "-x" "f95-cpp-input" "snen_prc_s69_2-71f72f"
$
$ export OMP_NUM_THREADS=2; gfortran -fopenmp snen_prc_s69_2.f90; ./a.out
 pass
$
$ export OMP_NUM_THREADS=2; ifx -qopenmp snen_prc_s69_2.f90; ./a.out
 pass
$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Prefer [crash-on-valid] or [crash-on-invalid] flang:ir flang:openmp
Projects
Development

No branches or pull requests

3 participants