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] fatal internal error: CHECK(*shapeArgSize >= 0) failed at /root/llvm-project/flang/lib/Evaluate/intrinsics.cpp(2136) #121979

Open
yype opened this issue Jan 7, 2025 · 1 comment · May be fixed by #122187
Assignees
Labels
crash Prefer [crash-on-valid] or [crash-on-invalid] flang:frontend generated by fuzzer

Comments

@yype
Copy link

yype commented Jan 7, 2025

Hi there, flang crashes from an assertion failure on the following test case:

SUBROUTINE sub00(a,b,n,m)
integer(16), parameter :: a(100000,100000) = SUM(a(i,j) - reshape((/1, 2, 3, 4/), [2,2]))
i = n ** a
a = reshape([a, a], [a, a])
10   PRINT *, g
END SUBROUTINE sub00

Tested version(s): 19.1.0, trunk.

Example: https://godbolt.org/z/59KqEY8qh

Stack dump:

Click me

fatal internal error: CHECK(*shapeArgSize >= 0) failed at /root/llvm-project/flang/lib/Evaluate/intrinsics.cpp(2136)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang -fc1 -triple x86_64-unknown-linux-gnu -S -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu x86-64 -mllvm -x86-asm-syntax=intel -resource-dir /opt/compiler-explorer/clang-llvmflang-trunk-20250107/lib/clang/20 -mframe-pointer=all -o /app/output.s -x f95-cpp-input /app/example.f90
 #0 0x00000000039ffa18 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x39ffa18)
 #1 0x00000000039fd5dc SignalHandler(int) Signals.cpp:0:0
 #2 0x000077ef63e42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x000077ef63e969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x000077ef63e42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x000077ef63e287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x00000000053ed959 (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x53ed959)
 #7 0x0000000004f2e77d Fortran::evaluate::IntrinsicInterface::Match(Fortran::evaluate::CallCharacteristics const&, Fortran::common::IntrinsicTypeDefaultKinds const&, std::vector<std::optional<Fortran::evaluate::ActualArgument>, std::allocator<std::optional<Fortran::evaluate::ActualArgument>>>&, Fortran::evaluate::FoldingContext&, Fortran::semantics::Scope const*) const (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4f2e77d)
 #8 0x0000000004f2f458 Fortran::evaluate::IntrinsicProcTable::Implementation::Probe(Fortran::evaluate::CallCharacteristics const&, std::vector<std::optional<Fortran::evaluate::ActualArgument>, std::allocator<std::optional<Fortran::evaluate::ActualArgument>>>&, Fortran::evaluate::FoldingContext&) const::'lambda'(Fortran::evaluate::IntrinsicInterface const&, Fortran::parser::Messages&)::operator()(Fortran::evaluate::IntrinsicInterface const&, Fortran::parser::Messages&) const intrinsics.cpp:0:0
 #9 0x0000000004f31f96 Fortran::evaluate::IntrinsicProcTable::Implementation::Probe(Fortran::evaluate::CallCharacteristics const&, std::vector<std::optional<Fortran::evaluate::ActualArgument>, std::allocator<std::optional<Fortran::evaluate::ActualArgument>>>&, Fortran::evaluate::FoldingContext&) const (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4f31f96)
#10 0x0000000004f32c22 Fortran::evaluate::IntrinsicProcTable::Probe(Fortran::evaluate::CallCharacteristics const&, std::vector<std::optional<Fortran::evaluate::ActualArgument>, std::allocator<std::optional<Fortran::evaluate::ActualArgument>>>&, Fortran::evaluate::FoldingContext&) const (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4f32c22)
#11 0x00000000043c9f74 Fortran::evaluate::ExpressionAnalyzer::ResolveGeneric(Fortran::semantics::Symbol const&, std::vector<std::optional<Fortran::evaluate::ActualArgument>, std::allocator<std::optional<Fortran::evaluate::ActualArgument>>> const&, std::optional<std::function<bool (Fortran::semantics::Symbol const&, std::vector<std::optional<Fortran::evaluate::ActualArgument>, std::allocator<std::optional<Fortran::evaluate::ActualArgument>>>&)>> const&, bool, bool) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43c9f74)
#12 0x00000000043cab8e Fortran::evaluate::ExpressionAnalyzer::GetCalleeAndArguments(Fortran::parser::Name const&, std::vector<std::optional<Fortran::evaluate::ActualArgument>, std::allocator<std::optional<Fortran::evaluate::ActualArgument>>>&&, bool, bool) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43cab8e)
#13 0x0000000004403a7a Fortran::evaluate::ExpressionAnalyzer::GetCalleeAndArguments(Fortran::parser::ProcedureDesignator const&, std::vector<std::optional<Fortran::evaluate::ActualArgument>, std::allocator<std::optional<Fortran::evaluate::ActualArgument>>>&&, bool, bool) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4403a7a)
#14 0x0000000004403bcc Fortran::evaluate::ExpressionAnalyzer::Analyze(Fortran::parser::FunctionReference const&, std::optional<Fortran::parser::StructureConstructor>*) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4403bcc)
#15 0x00000000043f65d9 std::optional<Fortran::evaluate::Expr<Fortran::evaluate::SomeType>> Fortran::evaluate::ExpressionAnalyzer::ExprOrVariable<Fortran::parser::Expr>(Fortran::parser::Expr const&, Fortran::parser::CharBlock) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43f65d9)
#16 0x00000000043f702f Fortran::evaluate::ExpressionAnalyzer::IterativelyAnalyzeSubexpressions(Fortran::parser::Expr const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43f702f)
#17 0x00000000043f73c5 Fortran::evaluate::ExpressionAnalyzer::Analyze(Fortran::parser::Expr const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43f73c5)
#18 0x00000000043f74e7 Fortran::evaluate::ArgumentAnalyzer::AnalyzeExprOrWholeAssumedSizeArray(Fortran::parser::Expr const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43f74e7)
#19 0x00000000043f76bb Fortran::evaluate::ArgumentAnalyzer::AnalyzeExpr(Fortran::parser::Expr const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43f76bb)
#20 0x00000000043f7d41 Fortran::evaluate::ArgumentAnalyzer::Analyze(Fortran::parser::Expr const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43f7d41)
#21 0x00000000044062fc Fortran::evaluate::ExpressionAnalyzer::Analyze(Fortran::parser::AssignmentStmt const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x44062fc)
#22 0x00000000044116b3 void Fortran::common::log2visit::Log2VisitHelper<0ul, 41ul, void, void Fortran::parser::detail::ParseTreeVisitorLookupScope::Walk<Fortran::semantics::ExprChecker, Fortran::common::Indirection<Fortran::parser::AllocateStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignmentStmt, false>, Fortran::common::Indirection<Fortran::parser::BackspaceStmt, false>, Fortran::common::Indirection<Fortran::parser::CallStmt, false>, Fortran::common::Indirection<Fortran::parser::CloseStmt, false>, Fortran::parser::ContinueStmt, Fortran::common::Indirection<Fortran::parser::CycleStmt, false>, Fortran::common::Indirection<Fortran::parser::DeallocateStmt, false>, Fortran::common::Indirection<Fortran::parser::EndfileStmt, false>, Fortran::common::Indirection<Fortran::parser::EventPostStmt, false>, Fortran::common::Indirection<Fortran::parser::EventWaitStmt, false>, Fortran::common::Indirection<Fortran::parser::ExitStmt, false>, Fortran::parser::FailImageStmt, Fortran::common::Indirection<Fortran::parser::FlushStmt, false>, Fortran::common::Indirection<Fortran::parser::FormTeamStmt, false>, Fortran::common::Indirection<Fortran::parser::GotoStmt, false>, Fortran::common::Indirection<Fortran::parser::IfStmt, false>, Fortran::common::Indirection<Fortran::parser::InquireStmt, false>, Fortran::common::Indirection<Fortran::parser::LockStmt, false>, Fortran::common::Indirection<Fortran::parser::NotifyWaitStmt, false>, Fortran::common::Indirection<Fortran::parser::NullifyStmt, false>, Fortran::common::Indirection<Fortran::parser::OpenStmt, false>, Fortran::common::Indirection<Fortran::parser::PointerAssignmentStmt, false>, Fortran::common::Indirection<Fortran::parser::PrintStmt, false>, Fortran::common::Indirection<Fortran::parser::ReadStmt, false>, Fortran::common::Indirection<Fortran::parser::ReturnStmt, false>, Fortran::common::Indirection<Fortran::parser::RewindStmt, false>, Fortran::common::Indirection<Fortran::parser::StopStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncAllStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncImagesStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncMemoryStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncTeamStmt, false>, Fortran::common::Indirection<Fortran::parser::UnlockStmt, false>, Fortran::common::Indirection<Fortran::parser::WaitStmt, false>, Fortran::common::Indirection<Fortran::parser::WhereStmt, false>, Fortran::common::Indirection<Fortran::parser::WriteStmt, false>, Fortran::common::Indirection<Fortran::parser::ComputedGotoStmt, false>, Fortran::common::Indirection<Fortran::parser::ForallStmt, false>, Fortran::common::Indirection<Fortran::parser::ArithmeticIfStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignedGotoStmt, false>, Fortran::common::Indirection<Fortran::parser::PauseStmt, false>>(std::variant<Fortran::common::Indirection<Fortran::parser::AllocateStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignmentStmt, false>, Fortran::common::Indirection<Fortran::parser::BackspaceStmt, false>, Fortran::common::Indirection<Fortran::parser::CallStmt, false>, Fortran::common::Indirection<Fortran::parser::CloseStmt, false>, Fortran::parser::ContinueStmt, Fortran::common::Indirection<Fortran::parser::CycleStmt, false>, Fortran::common::Indirection<Fortran::parser::DeallocateStmt, false>, Fortran::common::Indirection<Fortran::parser::EndfileStmt, false>, Fortran::common::Indirection<Fortran::parser::EventPostStmt, false>, Fortran::common::Indirection<Fortran::parser::EventWaitStmt, false>, Fortran::common::Indirection<Fortran::parser::ExitStmt, false>, Fortran::parser::FailImageStmt, Fortran::common::Indirection<Fortran::parser::FlushStmt, false>, Fortran::common::Indirection<Fortran::parser::FormTeamStmt, false>, Fortran::common::Indirection<Fortran::parser::GotoStmt, false>, Fortran::common::Indirection<Fortran::parser::IfStmt, false>, Fortran::common::Indirection<Fortran::parser::InquireStmt, false>, Fortran::common::Indirection<Fortran::parser::LockStmt, false>, Fortran::common::Indirection<Fortran::parser::NotifyWaitStmt, false>, Fortran::common::Indirection<Fortran::parser::NullifyStmt, false>, Fortran::common::Indirection<Fortran::parser::OpenStmt, false>, Fortran::common::Indirection<Fortran::parser::PointerAssignmentStmt, false>, Fortran::common::Indirection<Fortran::parser::PrintStmt, false>, Fortran::common::Indirection<Fortran::parser::ReadStmt, false>, Fortran::common::Indirection<Fortran::parser::ReturnStmt, false>, Fortran::common::Indirection<Fortran::parser::RewindStmt, false>, Fortran::common::Indirection<Fortran::parser::StopStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncAllStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncImagesStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncMemoryStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncTeamStmt, false>, Fortran::common::Indirection<Fortran::parser::UnlockStmt, false>, Fortran::common::Indirection<Fortran::parser::WaitStmt, false>, Fortran::common::Indirection<Fortran::parser::WhereStmt, false>, Fortran::common::Indirection<Fortran::parser::WriteStmt, false>, Fortran::common::Indirection<Fortran::parser::ComputedGotoStmt, false>, Fortran::common::Indirection<Fortran::parser::ForallStmt, false>, Fortran::common::Indirection<Fortran::parser::ArithmeticIfStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignedGotoStmt, false>, Fortran::common::Indirection<Fortran::parser::PauseStmt, false>> const&, Fortran::semantics::ExprChecker&)::'lambda'(Fortran::semantics::ExprChecker const&), std::variant<Fortran::common::Indirection<Fortran::parser::AllocateStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignmentStmt, false>, Fortran::common::Indirection<Fortran::parser::BackspaceStmt, false>, Fortran::common::Indirection<Fortran::parser::CallStmt, false>, Fortran::common::Indirection<Fortran::parser::CloseStmt, false>, Fortran::parser::ContinueStmt, Fortran::common::Indirection<Fortran::parser::CycleStmt, false>, Fortran::common::Indirection<Fortran::parser::DeallocateStmt, false>, Fortran::common::Indirection<Fortran::parser::EndfileStmt, false>, Fortran::common::Indirection<Fortran::parser::EventPostStmt, false>, Fortran::common::Indirection<Fortran::parser::EventWaitStmt, false>, Fortran::common::Indirection<Fortran::parser::ExitStmt, false>, Fortran::parser::FailImageStmt, Fortran::common::Indirection<Fortran::parser::FlushStmt, false>, Fortran::common::Indirection<Fortran::parser::FormTeamStmt, false>, Fortran::common::Indirection<Fortran::parser::GotoStmt, false>, Fortran::common::Indirection<Fortran::parser::IfStmt, false>, Fortran::common::Indirection<Fortran::parser::InquireStmt, false>, Fortran::common::Indirection<Fortran::parser::LockStmt, false>, Fortran::common::Indirection<Fortran::parser::NotifyWaitStmt, false>, Fortran::common::Indirection<Fortran::parser::NullifyStmt, false>, Fortran::common::Indirection<Fortran::parser::OpenStmt, false>, Fortran::common::Indirection<Fortran::parser::PointerAssignmentStmt, false>, Fortran::common::Indirection<Fortran::parser::PrintStmt, false>, Fortran::common::Indirection<Fortran::parser::ReadStmt, false>, Fortran::common::Indirection<Fortran::parser::ReturnStmt, false>, Fortran::common::Indirection<Fortran::parser::RewindStmt, false>, Fortran::common::Indirection<Fortran::parser::StopStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncAllStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncImagesStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncMemoryStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncTeamStmt, false>, Fortran::common::Indirection<Fortran::parser::UnlockStmt, false>, Fortran::common::Indirection<Fortran::parser::WaitStmt, false>, Fortran::common::Indirection<Fortran::parser::WhereStmt, false>, Fortran::common::Indirection<Fortran::parser::WriteStmt, false>, Fortran::common::Indirection<Fortran::parser::ComputedGotoStmt, false>, Fortran::common::Indirection<Fortran::parser::ForallStmt, false>, Fortran::common::Indirection<Fortran::parser::ArithmeticIfStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignedGotoStmt, false>, Fortran::common::Indirection<Fortran::parser::PauseStmt, false>> const&>(void Fortran::parser::detail::ParseTreeVisitorLookupScope::Walk<Fortran::semantics::ExprChecker, Fortran::common::Indirection<Fortran::parser::AllocateStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignmentStmt, false>, Fortran::common::Indirection<Fortran::parser::BackspaceStmt, false>, Fortran::common::Indirection<Fortran::parser::CallStmt, false>, Fortran::common::Indirection<Fortran::parser::CloseStmt, false>, Fortran::parser::ContinueStmt, Fortran::common::Indirection<Fortran::parser::CycleStmt, false>, Fortran::common::Indirection<Fortran::parser::DeallocateStmt, false>, Fortran::common::Indirection<Fortran::parser::EndfileStmt, false>, Fortran::common::Indirection<Fortran::parser::EventPostStmt, false>, Fortran::common::Indirection<Fortran::parser::EventWaitStmt, false>, Fortran::common::Indirection<Fortran::parser::ExitStmt, false>, Fortran::parser::FailImageStmt, Fortran::common::Indirection<Fortran::parser::FlushStmt, false>, Fortran::common::Indirection<Fortran::parser::FormTeamStmt, false>, Fortran::common::Indirection<Fortran::parser::GotoStmt, false>, Fortran::common::Indirection<Fortran::parser::IfStmt, false>, Fortran::common::Indirection<Fortran::parser::InquireStmt, false>, Fortran::common::Indirection<Fortran::parser::LockStmt, false>, Fortran::common::Indirection<Fortran::parser::NotifyWaitStmt, false>, Fortran::common::Indirection<Fortran::parser::NullifyStmt, false>, Fortran::common::Indirection<Fortran::parser::OpenStmt, false>, Fortran::common::Indirection<Fortran::parser::PointerAssignmentStmt, false>, Fortran::common::Indirection<Fortran::parser::PrintStmt, false>, Fortran::common::Indirection<Fortran::parser::ReadStmt, false>, Fortran::common::Indirection<Fortran::parser::ReturnStmt, false>, Fortran::common::Indirection<Fortran::parser::RewindStmt, false>, Fortran::common::Indirection<Fortran::parser::StopStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncAllStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncImagesStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncMemoryStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncTeamStmt, false>, Fortran::common::Indirection<Fortran::parser::UnlockStmt, false>, Fortran::common::Indirection<Fortran::parser::WaitStmt, false>, Fortran::common::Indirection<Fortran::parser::WhereStmt, false>, Fortran::common::Indirection<Fortran::parser::WriteStmt, false>, Fortran::common::Indirection<Fortran::parser::ComputedGotoStmt, false>, Fortran::common::Indirection<Fortran::parser::ForallStmt, false>, Fortran::common::Indirection<Fortran::parser::ArithmeticIfStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignedGotoStmt, false>, Fortran::common::Indirection<Fortran::parser::PauseStmt, false>>(std::variant<Fortran::common::Indirection<Fortran::parser::AllocateStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignmentStmt, false>, Fortran::common::Indirection<Fortran::parser::BackspaceStmt, false>, Fortran::common::Indirection<Fortran::parser::CallStmt, false>, Fortran::common::Indirection<Fortran::parser::CloseStmt, false>, Fortran::parser::ContinueStmt, Fortran::common::Indirection<Fortran::parser::CycleStmt, false>, Fortran::common::Indirection<Fortran::parser::DeallocateStmt, false>, Fortran::common::Indirection<Fortran::parser::EndfileStmt, false>, Fortran::common::Indirection<Fortran::parser::EventPostStmt, false>, Fortran::common::Indirection<Fortran::parser::EventWaitStmt, false>, Fortran::common::Indirection<Fortran::parser::ExitStmt, false>, Fortran::parser::FailImageStmt, Fortran::common::Indirection<Fortran::parser::FlushStmt, false>, Fortran::common::Indirection<Fortran::parser::FormTeamStmt, false>, Fortran::common::Indirection<Fortran::parser::GotoStmt, false>, Fortran::common::Indirection<Fortran::parser::IfStmt, false>, Fortran::common::Indirection<Fortran::parser::InquireStmt, false>, Fortran::common::Indirection<Fortran::parser::LockStmt, false>, Fortran::common::Indirection<Fortran::parser::NotifyWaitStmt, false>, Fortran::common::Indirection<Fortran::parser::NullifyStmt, false>, Fortran::common::Indirection<Fortran::parser::OpenStmt, false>, Fortran::common::Indirection<Fortran::parser::PointerAssignmentStmt, false>, Fortran::common::Indirection<Fortran::parser::PrintStmt, false>, Fortran::common::Indirection<Fortran::parser::ReadStmt, false>, Fortran::common::Indirection<Fortran::parser::ReturnStmt, false>, Fortran::common::Indirection<Fortran::parser::RewindStmt, false>, Fortran::common::Indirection<Fortran::parser::StopStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncAllStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncImagesStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncMemoryStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncTeamStmt, false>, Fortran::common::Indirection<Fortran::parser::UnlockStmt, false>, Fortran::common::Indirection<Fortran::parser::WaitStmt, false>, Fortran::common::Indirection<Fortran::parser::WhereStmt, false>, Fortran::common::Indirection<Fortran::parser::WriteStmt, false>, Fortran::common::Indirection<Fortran::parser::ComputedGotoStmt, false>, Fortran::common::Indirection<Fortran::parser::ForallStmt, false>, Fortran::common::Indirection<Fortran::parser::ArithmeticIfStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignedGotoStmt, false>, Fortran::common::Indirection<Fortran::parser::PauseStmt, false>> const&, Fortran::semantics::ExprChecker&)::'lambda'(Fortran::semantics::ExprChecker const&)&&, unsigned long, std::variant<Fortran::common::Indirection<Fortran::parser::AllocateStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignmentStmt, false>, Fortran::common::Indirection<Fortran::parser::BackspaceStmt, false>, Fortran::common::Indirection<Fortran::parser::CallStmt, false>, Fortran::common::Indirection<Fortran::parser::CloseStmt, false>, Fortran::parser::ContinueStmt, Fortran::common::Indirection<Fortran::parser::CycleStmt, false>, Fortran::common::Indirection<Fortran::parser::DeallocateStmt, false>, Fortran::common::Indirection<Fortran::parser::EndfileStmt, false>, Fortran::common::Indirection<Fortran::parser::EventPostStmt, false>, Fortran::common::Indirection<Fortran::parser::EventWaitStmt, false>, Fortran::common::Indirection<Fortran::parser::ExitStmt, false>, Fortran::parser::FailImageStmt, Fortran::common::Indirection<Fortran::parser::FlushStmt, false>, Fortran::common::Indirection<Fortran::parser::FormTeamStmt, false>, Fortran::common::Indirection<Fortran::parser::GotoStmt, false>, Fortran::common::Indirection<Fortran::parser::IfStmt, false>, Fortran::common::Indirection<Fortran::parser::InquireStmt, false>, Fortran::common::Indirection<Fortran::parser::LockStmt, false>, Fortran::common::Indirection<Fortran::parser::NotifyWaitStmt, false>, Fortran::common::Indirection<Fortran::parser::NullifyStmt, false>, Fortran::common::Indirection<Fortran::parser::OpenStmt, false>, Fortran::common::Indirection<Fortran::parser::PointerAssignmentStmt, false>, Fortran::common::Indirection<Fortran::parser::PrintStmt, false>, Fortran::common::Indirection<Fortran::parser::ReadStmt, false>, Fortran::common::Indirection<Fortran::parser::ReturnStmt, false>, Fortran::common::Indirection<Fortran::parser::RewindStmt, false>, Fortran::common::Indirection<Fortran::parser::StopStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncAllStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncImagesStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncMemoryStmt, false>, Fortran::common::Indirection<Fortran::parser::SyncTeamStmt, false>, Fortran::common::Indirection<Fortran::parser::UnlockStmt, false>, Fortran::common::Indirection<Fortran::parser::WaitStmt, false>, Fortran::common::Indirection<Fortran::parser::WhereStmt, false>, Fortran::common::Indirection<Fortran::parser::WriteStmt, false>, Fortran::common::Indirection<Fortran::parser::ComputedGotoStmt, false>, Fortran::common::Indirection<Fortran::parser::ForallStmt, false>, Fortran::common::Indirection<Fortran::parser::ArithmeticIfStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignStmt, false>, Fortran::common::Indirection<Fortran::parser::AssignedGotoStmt, false>, Fortran::common::Indirection<Fortran::parser::PauseStmt, false>> const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x44116b3)
#23 0x000000000441edf0 void Fortran::common::log2visit::Log2VisitHelper<0ul, 4ul, void, void Fortran::parser::detail::ParseTreeVisitorLookupScope::Walk<Fortran::semantics::ExprChecker, Fortran::parser::Statement<Fortran::parser::ActionStmt>, Fortran::common::Indirection<Fortran::parser::AssociateConstruct, false>, Fortran::common::Indirection<Fortran::parser::BlockConstruct, false>, Fortran::common::Indirection<Fortran::parser::CaseConstruct, false>, Fortran::common::Indirection<Fortran::parser::ChangeTeamConstruct, false>, Fortran::common::Indirection<Fortran::parser::CriticalConstruct, false>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::LabelDoStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::EndDoStmt, false>>, Fortran::common::Indirection<Fortran::parser::DoConstruct, false>, Fortran::common::Indirection<Fortran::parser::IfConstruct, false>, Fortran::common::Indirection<Fortran::parser::SelectRankConstruct, false>, Fortran::common::Indirection<Fortran::parser::SelectTypeConstruct, false>, Fortran::common::Indirection<Fortran::parser::WhereConstruct, false>, Fortran::common::Indirection<Fortran::parser::ForallConstruct, false>, Fortran::common::Indirection<Fortran::parser::CompilerDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenACCConstruct, false>, Fortran::common::Indirection<Fortran::parser::AccEndCombinedDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenMPConstruct, false>, Fortran::common::Indirection<Fortran::parser::OmpEndLoopDirective, false>, Fortran::common::Indirection<Fortran::parser::CUFKernelDoConstruct, false>>(std::variant<Fortran::parser::Statement<Fortran::parser::ActionStmt>, Fortran::common::Indirection<Fortran::parser::AssociateConstruct, false>, Fortran::common::Indirection<Fortran::parser::BlockConstruct, false>, Fortran::common::Indirection<Fortran::parser::CaseConstruct, false>, Fortran::common::Indirection<Fortran::parser::ChangeTeamConstruct, false>, Fortran::common::Indirection<Fortran::parser::CriticalConstruct, false>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::LabelDoStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::EndDoStmt, false>>, Fortran::common::Indirection<Fortran::parser::DoConstruct, false>, Fortran::common::Indirection<Fortran::parser::IfConstruct, false>, Fortran::common::Indirection<Fortran::parser::SelectRankConstruct, false>, Fortran::common::Indirection<Fortran::parser::SelectTypeConstruct, false>, Fortran::common::Indirection<Fortran::parser::WhereConstruct, false>, Fortran::common::Indirection<Fortran::parser::ForallConstruct, false>, Fortran::common::Indirection<Fortran::parser::CompilerDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenACCConstruct, false>, Fortran::common::Indirection<Fortran::parser::AccEndCombinedDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenMPConstruct, false>, Fortran::common::Indirection<Fortran::parser::OmpEndLoopDirective, false>, Fortran::common::Indirection<Fortran::parser::CUFKernelDoConstruct, false>> const&, Fortran::semantics::ExprChecker&)::'lambda'(Fortran::semantics::ExprChecker const&), std::variant<Fortran::parser::Statement<Fortran::parser::ActionStmt>, Fortran::common::Indirection<Fortran::parser::AssociateConstruct, false>, Fortran::common::Indirection<Fortran::parser::BlockConstruct, false>, Fortran::common::Indirection<Fortran::parser::CaseConstruct, false>, Fortran::common::Indirection<Fortran::parser::ChangeTeamConstruct, false>, Fortran::common::Indirection<Fortran::parser::CriticalConstruct, false>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::LabelDoStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::EndDoStmt, false>>, Fortran::common::Indirection<Fortran::parser::DoConstruct, false>, Fortran::common::Indirection<Fortran::parser::IfConstruct, false>, Fortran::common::Indirection<Fortran::parser::SelectRankConstruct, false>, Fortran::common::Indirection<Fortran::parser::SelectTypeConstruct, false>, Fortran::common::Indirection<Fortran::parser::WhereConstruct, false>, Fortran::common::Indirection<Fortran::parser::ForallConstruct, false>, Fortran::common::Indirection<Fortran::parser::CompilerDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenACCConstruct, false>, Fortran::common::Indirection<Fortran::parser::AccEndCombinedDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenMPConstruct, false>, Fortran::common::Indirection<Fortran::parser::OmpEndLoopDirective, false>, Fortran::common::Indirection<Fortran::parser::CUFKernelDoConstruct, false>> const&>(void Fortran::parser::detail::ParseTreeVisitorLookupScope::Walk<Fortran::semantics::ExprChecker, Fortran::parser::Statement<Fortran::parser::ActionStmt>, Fortran::common::Indirection<Fortran::parser::AssociateConstruct, false>, Fortran::common::Indirection<Fortran::parser::BlockConstruct, false>, Fortran::common::Indirection<Fortran::parser::CaseConstruct, false>, Fortran::common::Indirection<Fortran::parser::ChangeTeamConstruct, false>, Fortran::common::Indirection<Fortran::parser::CriticalConstruct, false>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::LabelDoStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::EndDoStmt, false>>, Fortran::common::Indirection<Fortran::parser::DoConstruct, false>, Fortran::common::Indirection<Fortran::parser::IfConstruct, false>, Fortran::common::Indirection<Fortran::parser::SelectRankConstruct, false>, Fortran::common::Indirection<Fortran::parser::SelectTypeConstruct, false>, Fortran::common::Indirection<Fortran::parser::WhereConstruct, false>, Fortran::common::Indirection<Fortran::parser::ForallConstruct, false>, Fortran::common::Indirection<Fortran::parser::CompilerDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenACCConstruct, false>, Fortran::common::Indirection<Fortran::parser::AccEndCombinedDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenMPConstruct, false>, Fortran::common::Indirection<Fortran::parser::OmpEndLoopDirective, false>, Fortran::common::Indirection<Fortran::parser::CUFKernelDoConstruct, false>>(std::variant<Fortran::parser::Statement<Fortran::parser::ActionStmt>, Fortran::common::Indirection<Fortran::parser::AssociateConstruct, false>, Fortran::common::Indirection<Fortran::parser::BlockConstruct, false>, Fortran::common::Indirection<Fortran::parser::CaseConstruct, false>, Fortran::common::Indirection<Fortran::parser::ChangeTeamConstruct, false>, Fortran::common::Indirection<Fortran::parser::CriticalConstruct, false>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::LabelDoStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::EndDoStmt, false>>, Fortran::common::Indirection<Fortran::parser::DoConstruct, false>, Fortran::common::Indirection<Fortran::parser::IfConstruct, false>, Fortran::common::Indirection<Fortran::parser::SelectRankConstruct, false>, Fortran::common::Indirection<Fortran::parser::SelectTypeConstruct, false>, Fortran::common::Indirection<Fortran::parser::WhereConstruct, false>, Fortran::common::Indirection<Fortran::parser::ForallConstruct, false>, Fortran::common::Indirection<Fortran::parser::CompilerDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenACCConstruct, false>, Fortran::common::Indirection<Fortran::parser::AccEndCombinedDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenMPConstruct, false>, Fortran::common::Indirection<Fortran::parser::OmpEndLoopDirective, false>, Fortran::common::Indirection<Fortran::parser::CUFKernelDoConstruct, false>> const&, Fortran::semantics::ExprChecker&)::'lambda'(Fortran::semantics::ExprChecker const&)&&, unsigned long, std::variant<Fortran::parser::Statement<Fortran::parser::ActionStmt>, Fortran::common::Indirection<Fortran::parser::AssociateConstruct, false>, Fortran::common::Indirection<Fortran::parser::BlockConstruct, false>, Fortran::common::Indirection<Fortran::parser::CaseConstruct, false>, Fortran::common::Indirection<Fortran::parser::ChangeTeamConstruct, false>, Fortran::common::Indirection<Fortran::parser::CriticalConstruct, false>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::LabelDoStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::EndDoStmt, false>>, Fortran::common::Indirection<Fortran::parser::DoConstruct, false>, Fortran::common::Indirection<Fortran::parser::IfConstruct, false>, Fortran::common::Indirection<Fortran::parser::SelectRankConstruct, false>, Fortran::common::Indirection<Fortran::parser::SelectTypeConstruct, false>, Fortran::common::Indirection<Fortran::parser::WhereConstruct, false>, Fortran::common::Indirection<Fortran::parser::ForallConstruct, false>, Fortran::common::Indirection<Fortran::parser::CompilerDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenACCConstruct, false>, Fortran::common::Indirection<Fortran::parser::AccEndCombinedDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenMPConstruct, false>, Fortran::common::Indirection<Fortran::parser::OmpEndLoopDirective, false>, Fortran::common::Indirection<Fortran::parser::CUFKernelDoConstruct, false>> const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x441edf0)
#24 0x000000000441f1bd void Fortran::parser::detail::ParseTreeVisitorLookupScope::Walk<Fortran::semantics::ExprChecker>(std::__cxx11::list<Fortran::parser::ExecutionPartConstruct, std::allocator<Fortran::parser::ExecutionPartConstruct>> const&, Fortran::semantics::ExprChecker&) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x441f1bd)
#25 0x0000000004421e41 Fortran::semantics::ExprChecker::Walk(Fortran::parser::Program const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4421e41)
#26 0x0000000004541f9a Fortran::semantics::Semantics::Perform() (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4541f9a)
#27 0x0000000003a537bd Fortran::frontend::FrontendAction::runSemanticChecks() (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x3a537bd)
#28 0x0000000003de1932 Fortran::frontend::CodeGenAction::beginSourceFileAction() (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x3de1932)
#29 0x0000000003a51f8d Fortran::frontend::FrontendAction::beginSourceFile(Fortran::frontend::CompilerInstance&, Fortran::frontend::FrontendInputFile const&) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x3a51f8d)
#30 0x0000000003a42c27 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x3a42c27)
#31 0x0000000003a59c03 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x3a59c03)
#32 0x0000000001f7cd27 fc1_main(llvm::ArrayRef<char const*>, char const*) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x1f7cd27)
#33 0x0000000001e5068e main (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x1e5068e)
#34 0x000077ef63e29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#35 0x000077ef63e29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#36 0x0000000001f7b795 _start (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x1f7b795)
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 97097958fdf525e8c14fcdde94231bae72ea2673)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin
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/example-ab8af7
flang-20: note: diagnostic msg: /tmp/example-ab8af7.sh
flang-20: note: diagnostic msg: 

********************
Compiler returned: 254

The test case was generated by a fuzzer.

@llvmbot llvmbot added the flang Flang issues not falling into any other category label Jan 7, 2025
@EugeneZelenko EugeneZelenko added flang:frontend crash Prefer [crash-on-valid] or [crash-on-invalid] and removed flang Flang issues not falling into any other category labels Jan 7, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 7, 2025

@llvm/issue-subscribers-flang-frontend

Author: yype (yype)

Hi there, flang crashes from an assertion failure on the following test case:
SUBROUTINE sub00(a,b,n,m)
integer(16), parameter :: a(100000,100000) = SUM(a(i,j) - reshape((/1, 2, 3, 4/), [2,2]))
i = n ** a
a = reshape([a, a], [a, a])
10   PRINT *, g
END SUBROUTINE sub00

Tested version(s): 19.1.0, trunk.

Example: https://godbolt.org/z/59KqEY8qh

Stack dump:

<details>
<summary>Click me</summary>


fatal internal error: CHECK(*shapeArgSize &gt;= 0) failed at /root/llvm-project/flang/lib/Evaluate/intrinsics.cpp(2136)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang -fc1 -triple x86_64-unknown-linux-gnu -S -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu x86-64 -mllvm -x86-asm-syntax=intel -resource-dir /opt/compiler-explorer/clang-llvmflang-trunk-20250107/lib/clang/20 -mframe-pointer=all -o /app/output.s -x f95-cpp-input /app/example.f90
 #<!-- -->0 0x00000000039ffa18 llvm::sys::PrintStackTrace(llvm::raw_ostream&amp;, int) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x39ffa18)
 #<!-- -->1 0x00000000039fd5dc SignalHandler(int) Signals.cpp:0:0
 #<!-- -->2 0x000077ef63e42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #<!-- -->3 0x000077ef63e969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #<!-- -->4 0x000077ef63e42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #<!-- -->5 0x000077ef63e287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #<!-- -->6 0x00000000053ed959 (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x53ed959)
 #<!-- -->7 0x0000000004f2e77d Fortran::evaluate::IntrinsicInterface::Match(Fortran::evaluate::CallCharacteristics const&amp;, Fortran::common::IntrinsicTypeDefaultKinds const&amp;, std::vector&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;, std::allocator&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;&gt;&gt;&amp;, Fortran::evaluate::FoldingContext&amp;, Fortran::semantics::Scope const*) const (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4f2e77d)
 #<!-- -->8 0x0000000004f2f458 Fortran::evaluate::IntrinsicProcTable::Implementation::Probe(Fortran::evaluate::CallCharacteristics const&amp;, std::vector&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;, std::allocator&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;&gt;&gt;&amp;, Fortran::evaluate::FoldingContext&amp;) const::'lambda'(Fortran::evaluate::IntrinsicInterface const&amp;, Fortran::parser::Messages&amp;)::operator()(Fortran::evaluate::IntrinsicInterface const&amp;, Fortran::parser::Messages&amp;) const intrinsics.cpp:0:0
 #<!-- -->9 0x0000000004f31f96 Fortran::evaluate::IntrinsicProcTable::Implementation::Probe(Fortran::evaluate::CallCharacteristics const&amp;, std::vector&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;, std::allocator&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;&gt;&gt;&amp;, Fortran::evaluate::FoldingContext&amp;) const (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4f31f96)
#<!-- -->10 0x0000000004f32c22 Fortran::evaluate::IntrinsicProcTable::Probe(Fortran::evaluate::CallCharacteristics const&amp;, std::vector&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;, std::allocator&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;&gt;&gt;&amp;, Fortran::evaluate::FoldingContext&amp;) const (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4f32c22)
#<!-- -->11 0x00000000043c9f74 Fortran::evaluate::ExpressionAnalyzer::ResolveGeneric(Fortran::semantics::Symbol const&amp;, std::vector&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;, std::allocator&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;&gt;&gt; const&amp;, std::optional&lt;std::function&lt;bool (Fortran::semantics::Symbol const&amp;, std::vector&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;, std::allocator&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;&gt;&gt;&amp;)&gt;&gt; const&amp;, bool, bool) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43c9f74)
#<!-- -->12 0x00000000043cab8e Fortran::evaluate::ExpressionAnalyzer::GetCalleeAndArguments(Fortran::parser::Name const&amp;, std::vector&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;, std::allocator&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;&gt;&gt;&amp;&amp;, bool, bool) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43cab8e)
#<!-- -->13 0x0000000004403a7a Fortran::evaluate::ExpressionAnalyzer::GetCalleeAndArguments(Fortran::parser::ProcedureDesignator const&amp;, std::vector&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;, std::allocator&lt;std::optional&lt;Fortran::evaluate::ActualArgument&gt;&gt;&gt;&amp;&amp;, bool, bool) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4403a7a)
#<!-- -->14 0x0000000004403bcc Fortran::evaluate::ExpressionAnalyzer::Analyze(Fortran::parser::FunctionReference const&amp;, std::optional&lt;Fortran::parser::StructureConstructor&gt;*) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4403bcc)
#<!-- -->15 0x00000000043f65d9 std::optional&lt;Fortran::evaluate::Expr&lt;Fortran::evaluate::SomeType&gt;&gt; Fortran::evaluate::ExpressionAnalyzer::ExprOrVariable&lt;Fortran::parser::Expr&gt;(Fortran::parser::Expr const&amp;, Fortran::parser::CharBlock) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43f65d9)
#<!-- -->16 0x00000000043f702f Fortran::evaluate::ExpressionAnalyzer::IterativelyAnalyzeSubexpressions(Fortran::parser::Expr const&amp;) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43f702f)
#<!-- -->17 0x00000000043f73c5 Fortran::evaluate::ExpressionAnalyzer::Analyze(Fortran::parser::Expr const&amp;) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43f73c5)
#<!-- -->18 0x00000000043f74e7 Fortran::evaluate::ArgumentAnalyzer::AnalyzeExprOrWholeAssumedSizeArray(Fortran::parser::Expr const&amp;) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43f74e7)
#<!-- -->19 0x00000000043f76bb Fortran::evaluate::ArgumentAnalyzer::AnalyzeExpr(Fortran::parser::Expr const&amp;) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43f76bb)
#<!-- -->20 0x00000000043f7d41 Fortran::evaluate::ArgumentAnalyzer::Analyze(Fortran::parser::Expr const&amp;) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x43f7d41)
#<!-- -->21 0x00000000044062fc Fortran::evaluate::ExpressionAnalyzer::Analyze(Fortran::parser::AssignmentStmt const&amp;) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x44062fc)
#<!-- -->22 0x00000000044116b3 void Fortran::common::log2visit::Log2VisitHelper&lt;0ul, 41ul, void, void Fortran::parser::detail::ParseTreeVisitorLookupScope::Walk&lt;Fortran::semantics::ExprChecker, Fortran::common::Indirection&lt;Fortran::parser::AllocateStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignmentStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::BackspaceStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CallStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CloseStmt, false&gt;, Fortran::parser::ContinueStmt, Fortran::common::Indirection&lt;Fortran::parser::CycleStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::DeallocateStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EndfileStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EventPostStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EventWaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ExitStmt, false&gt;, Fortran::parser::FailImageStmt, Fortran::common::Indirection&lt;Fortran::parser::FlushStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::FormTeamStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::GotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::IfStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::InquireStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::LockStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::NotifyWaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::NullifyStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PointerAssignmentStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PrintStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ReadStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ReturnStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::RewindStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::StopStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncAllStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncImagesStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncMemoryStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncTeamStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::UnlockStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WhereStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WriteStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ComputedGotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ForallStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ArithmeticIfStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignedGotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PauseStmt, false&gt;&gt;(std::variant&lt;Fortran::common::Indirection&lt;Fortran::parser::AllocateStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignmentStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::BackspaceStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CallStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CloseStmt, false&gt;, Fortran::parser::ContinueStmt, Fortran::common::Indirection&lt;Fortran::parser::CycleStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::DeallocateStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EndfileStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EventPostStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EventWaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ExitStmt, false&gt;, Fortran::parser::FailImageStmt, Fortran::common::Indirection&lt;Fortran::parser::FlushStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::FormTeamStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::GotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::IfStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::InquireStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::LockStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::NotifyWaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::NullifyStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PointerAssignmentStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PrintStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ReadStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ReturnStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::RewindStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::StopStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncAllStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncImagesStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncMemoryStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncTeamStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::UnlockStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WhereStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WriteStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ComputedGotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ForallStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ArithmeticIfStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignedGotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PauseStmt, false&gt;&gt; const&amp;, Fortran::semantics::ExprChecker&amp;)::'lambda'(Fortran::semantics::ExprChecker const&amp;), std::variant&lt;Fortran::common::Indirection&lt;Fortran::parser::AllocateStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignmentStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::BackspaceStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CallStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CloseStmt, false&gt;, Fortran::parser::ContinueStmt, Fortran::common::Indirection&lt;Fortran::parser::CycleStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::DeallocateStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EndfileStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EventPostStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EventWaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ExitStmt, false&gt;, Fortran::parser::FailImageStmt, Fortran::common::Indirection&lt;Fortran::parser::FlushStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::FormTeamStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::GotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::IfStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::InquireStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::LockStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::NotifyWaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::NullifyStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PointerAssignmentStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PrintStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ReadStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ReturnStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::RewindStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::StopStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncAllStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncImagesStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncMemoryStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncTeamStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::UnlockStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WhereStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WriteStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ComputedGotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ForallStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ArithmeticIfStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignedGotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PauseStmt, false&gt;&gt; const&amp;&gt;(void Fortran::parser::detail::ParseTreeVisitorLookupScope::Walk&lt;Fortran::semantics::ExprChecker, Fortran::common::Indirection&lt;Fortran::parser::AllocateStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignmentStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::BackspaceStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CallStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CloseStmt, false&gt;, Fortran::parser::ContinueStmt, Fortran::common::Indirection&lt;Fortran::parser::CycleStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::DeallocateStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EndfileStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EventPostStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EventWaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ExitStmt, false&gt;, Fortran::parser::FailImageStmt, Fortran::common::Indirection&lt;Fortran::parser::FlushStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::FormTeamStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::GotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::IfStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::InquireStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::LockStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::NotifyWaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::NullifyStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PointerAssignmentStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PrintStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ReadStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ReturnStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::RewindStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::StopStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncAllStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncImagesStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncMemoryStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncTeamStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::UnlockStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WhereStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WriteStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ComputedGotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ForallStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ArithmeticIfStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignedGotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PauseStmt, false&gt;&gt;(std::variant&lt;Fortran::common::Indirection&lt;Fortran::parser::AllocateStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignmentStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::BackspaceStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CallStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CloseStmt, false&gt;, Fortran::parser::ContinueStmt, Fortran::common::Indirection&lt;Fortran::parser::CycleStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::DeallocateStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EndfileStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EventPostStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EventWaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ExitStmt, false&gt;, Fortran::parser::FailImageStmt, Fortran::common::Indirection&lt;Fortran::parser::FlushStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::FormTeamStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::GotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::IfStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::InquireStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::LockStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::NotifyWaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::NullifyStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PointerAssignmentStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PrintStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ReadStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ReturnStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::RewindStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::StopStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncAllStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncImagesStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncMemoryStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncTeamStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::UnlockStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WhereStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WriteStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ComputedGotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ForallStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ArithmeticIfStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignedGotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PauseStmt, false&gt;&gt; const&amp;, Fortran::semantics::ExprChecker&amp;)::'lambda'(Fortran::semantics::ExprChecker const&amp;)&amp;&amp;, unsigned long, std::variant&lt;Fortran::common::Indirection&lt;Fortran::parser::AllocateStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignmentStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::BackspaceStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CallStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CloseStmt, false&gt;, Fortran::parser::ContinueStmt, Fortran::common::Indirection&lt;Fortran::parser::CycleStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::DeallocateStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EndfileStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EventPostStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::EventWaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ExitStmt, false&gt;, Fortran::parser::FailImageStmt, Fortran::common::Indirection&lt;Fortran::parser::FlushStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::FormTeamStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::GotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::IfStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::InquireStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::LockStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::NotifyWaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::NullifyStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PointerAssignmentStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PrintStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ReadStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ReturnStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::RewindStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::StopStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncAllStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncImagesStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncMemoryStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SyncTeamStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::UnlockStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WaitStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WhereStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WriteStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ComputedGotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ForallStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ArithmeticIfStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssignedGotoStmt, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::PauseStmt, false&gt;&gt; const&amp;) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x44116b3)
#<!-- -->23 0x000000000441edf0 void Fortran::common::log2visit::Log2VisitHelper&lt;0ul, 4ul, void, void Fortran::parser::detail::ParseTreeVisitorLookupScope::Walk&lt;Fortran::semantics::ExprChecker, Fortran::parser::Statement&lt;Fortran::parser::ActionStmt&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssociateConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::BlockConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CaseConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ChangeTeamConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CriticalConstruct, false&gt;, Fortran::parser::Statement&lt;Fortran::common::Indirection&lt;Fortran::parser::LabelDoStmt, false&gt;&gt;, Fortran::parser::Statement&lt;Fortran::common::Indirection&lt;Fortran::parser::EndDoStmt, false&gt;&gt;, Fortran::common::Indirection&lt;Fortran::parser::DoConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::IfConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SelectRankConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SelectTypeConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WhereConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ForallConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CompilerDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenACCConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AccEndCombinedDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenMPConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OmpEndLoopDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CUFKernelDoConstruct, false&gt;&gt;(std::variant&lt;Fortran::parser::Statement&lt;Fortran::parser::ActionStmt&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssociateConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::BlockConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CaseConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ChangeTeamConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CriticalConstruct, false&gt;, Fortran::parser::Statement&lt;Fortran::common::Indirection&lt;Fortran::parser::LabelDoStmt, false&gt;&gt;, Fortran::parser::Statement&lt;Fortran::common::Indirection&lt;Fortran::parser::EndDoStmt, false&gt;&gt;, Fortran::common::Indirection&lt;Fortran::parser::DoConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::IfConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SelectRankConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SelectTypeConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WhereConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ForallConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CompilerDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenACCConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AccEndCombinedDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenMPConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OmpEndLoopDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CUFKernelDoConstruct, false&gt;&gt; const&amp;, Fortran::semantics::ExprChecker&amp;)::'lambda'(Fortran::semantics::ExprChecker const&amp;), std::variant&lt;Fortran::parser::Statement&lt;Fortran::parser::ActionStmt&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssociateConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::BlockConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CaseConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ChangeTeamConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CriticalConstruct, false&gt;, Fortran::parser::Statement&lt;Fortran::common::Indirection&lt;Fortran::parser::LabelDoStmt, false&gt;&gt;, Fortran::parser::Statement&lt;Fortran::common::Indirection&lt;Fortran::parser::EndDoStmt, false&gt;&gt;, Fortran::common::Indirection&lt;Fortran::parser::DoConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::IfConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SelectRankConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SelectTypeConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WhereConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ForallConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CompilerDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenACCConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AccEndCombinedDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenMPConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OmpEndLoopDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CUFKernelDoConstruct, false&gt;&gt; const&amp;&gt;(void Fortran::parser::detail::ParseTreeVisitorLookupScope::Walk&lt;Fortran::semantics::ExprChecker, Fortran::parser::Statement&lt;Fortran::parser::ActionStmt&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssociateConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::BlockConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CaseConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ChangeTeamConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CriticalConstruct, false&gt;, Fortran::parser::Statement&lt;Fortran::common::Indirection&lt;Fortran::parser::LabelDoStmt, false&gt;&gt;, Fortran::parser::Statement&lt;Fortran::common::Indirection&lt;Fortran::parser::EndDoStmt, false&gt;&gt;, Fortran::common::Indirection&lt;Fortran::parser::DoConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::IfConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SelectRankConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SelectTypeConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WhereConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ForallConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CompilerDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenACCConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AccEndCombinedDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenMPConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OmpEndLoopDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CUFKernelDoConstruct, false&gt;&gt;(std::variant&lt;Fortran::parser::Statement&lt;Fortran::parser::ActionStmt&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssociateConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::BlockConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CaseConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ChangeTeamConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CriticalConstruct, false&gt;, Fortran::parser::Statement&lt;Fortran::common::Indirection&lt;Fortran::parser::LabelDoStmt, false&gt;&gt;, Fortran::parser::Statement&lt;Fortran::common::Indirection&lt;Fortran::parser::EndDoStmt, false&gt;&gt;, Fortran::common::Indirection&lt;Fortran::parser::DoConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::IfConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SelectRankConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SelectTypeConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WhereConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ForallConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CompilerDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenACCConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AccEndCombinedDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenMPConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OmpEndLoopDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CUFKernelDoConstruct, false&gt;&gt; const&amp;, Fortran::semantics::ExprChecker&amp;)::'lambda'(Fortran::semantics::ExprChecker const&amp;)&amp;&amp;, unsigned long, std::variant&lt;Fortran::parser::Statement&lt;Fortran::parser::ActionStmt&gt;, Fortran::common::Indirection&lt;Fortran::parser::AssociateConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::BlockConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CaseConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ChangeTeamConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CriticalConstruct, false&gt;, Fortran::parser::Statement&lt;Fortran::common::Indirection&lt;Fortran::parser::LabelDoStmt, false&gt;&gt;, Fortran::parser::Statement&lt;Fortran::common::Indirection&lt;Fortran::parser::EndDoStmt, false&gt;&gt;, Fortran::common::Indirection&lt;Fortran::parser::DoConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::IfConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SelectRankConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::SelectTypeConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::WhereConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::ForallConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CompilerDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenACCConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::AccEndCombinedDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OpenMPConstruct, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::OmpEndLoopDirective, false&gt;, Fortran::common::Indirection&lt;Fortran::parser::CUFKernelDoConstruct, false&gt;&gt; const&amp;) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x441edf0)
#<!-- -->24 0x000000000441f1bd void Fortran::parser::detail::ParseTreeVisitorLookupScope::Walk&lt;Fortran::semantics::ExprChecker&gt;(std::__cxx11::list&lt;Fortran::parser::ExecutionPartConstruct, std::allocator&lt;Fortran::parser::ExecutionPartConstruct&gt;&gt; const&amp;, Fortran::semantics::ExprChecker&amp;) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x441f1bd)
#<!-- -->25 0x0000000004421e41 Fortran::semantics::ExprChecker::Walk(Fortran::parser::Program const&amp;) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4421e41)
#<!-- -->26 0x0000000004541f9a Fortran::semantics::Semantics::Perform() (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x4541f9a)
#<!-- -->27 0x0000000003a537bd Fortran::frontend::FrontendAction::runSemanticChecks() (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x3a537bd)
#<!-- -->28 0x0000000003de1932 Fortran::frontend::CodeGenAction::beginSourceFileAction() (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x3de1932)
#<!-- -->29 0x0000000003a51f8d Fortran::frontend::FrontendAction::beginSourceFile(Fortran::frontend::CompilerInstance&amp;, Fortran::frontend::FrontendInputFile const&amp;) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x3a51f8d)
#<!-- -->30 0x0000000003a42c27 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&amp;) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x3a42c27)
#<!-- -->31 0x0000000003a59c03 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x3a59c03)
#<!-- -->32 0x0000000001f7cd27 fc1_main(llvm::ArrayRef&lt;char const*&gt;, char const*) (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x1f7cd27)
#<!-- -->33 0x0000000001e5068e main (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x1e5068e)
#<!-- -->34 0x000077ef63e29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#<!-- -->35 0x000077ef63e29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#<!-- -->36 0x0000000001f7b795 _start (/opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin/flang+0x1f7b795)
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 97097958fdf525e8c14fcdde94231bae72ea2673)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/compiler-explorer/clang-llvmflang-trunk-20250107/bin
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/example-ab8af7
flang-20: note: diagnostic msg: /tmp/example-ab8af7.sh
flang-20: note: diagnostic msg: 

********************
Compiler returned: 254

</details>

The test case was generated by a fuzzer.

klausler added a commit to klausler/llvm-project that referenced this issue Jan 8, 2025
An integer overflowed in an erroneous test.  Fix, and improve the
error messages a bit.

Fixes llvm#121979.
@klausler klausler linked a pull request Jan 8, 2025 that will close this issue
@klausler klausler self-assigned this Jan 8, 2025
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:frontend generated by fuzzer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants