-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorflang:frontend
Description
This is an issue from Fujitsu testsuite.
Flang-new terminates abnormally when compiling a wrong argument in MAX0 and so on.
Gfortran emits correct error messages.
The following are the test program, Flang-new and gfortran compilation result.
! test.f90
character(kind=1) cha
cha="1"
call sub(max(cha,cha))
call sub(max0(cha,cha))
call sub(amax1(cha,cha))
call sub(dmax1(cha,cha))
call sub(qmax1(cha,cha))
call sub(amax0(cha,cha))
end$ flang-new -v test.f90
flang-new version 18.0.0git (https://github.com/llvm/llvm-project.git 0e93d04001e45f39cabf0ffb5093512a7f622cc0)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /path/to/install/bin
Found candidate GCC installation: /opt/rh/gcc-toolset-12/root/usr/lib/gcc/aarch64-redhat-linux/12
Selected GCC installation: /opt/rh/gcc-toolset-12/root/usr/lib/gcc/aarch64-redhat-linux/12
Candidate multilib: .;@m64
Selected multilib: .;@m64
"/path/to/install/bin/flang-new" -fc1 -triple aarch64-unknown-linux-gnu -emit-obj -fcolor-diagnostics -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu generic -target-feature +neon -target-feature +v8a -mframe-pointer=non-leaf -o /tmp/test-bb4fbf.o -x f95-cpp-input test.f03
fatal internal error: nullptr dereference at /path/to/llvm-project/flang/lib/Evaluate/fold-implementation.h(1133)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /path/to/install/bin/flang-new -fc1 -triple aarch64-unknown-linux-gnu -emit-obj -fcolor-diagnostics -mrelocation-model pic -pic-level 2 -pic-is-pie -target-cpu generic -target-feature +neon -target-feature +v8a -mframe-pointer=non-leaf -o /tmp/test-bb4fbf.o -x f95-cpp-input test.f03
#0 0x0000ffffa5db4f08 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/path/to/build/lib/libLLVMSupport.so.18git+0x1a4f08)
#1 0x0000ffffa5db2e38 llvm::sys::RunSignalHandlers() (/path/to/build/lib/libLLVMSupport.so.18git+0x1a2e38)
#2 0x0000ffffa5db2fbc SignalHandler(int) Signals.cpp:0:0
#3 0x0000ffffa86d07a0 (linux-vdso.so.1+0x7a0)
#4 0x0000ffffa5806274 raise (/lib64/libc.so.6+0x36274)
#5 0x0000ffffa57f0a2c abort (/lib64/libc.so.6+0x20a2c)
#6 0x0000ffff9cda241c (/path/to/build/lib/libFortranCommon.so.18git+0x241c)
#7 0x0000ffff9e5fff6c Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>> Fortran::evaluate::RewriteSpecificMINorMAX<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>(Fortran::evaluate::FoldingContext&, Fortran::evaluate::FunctionRef<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>&&) (/path/to/build/lib/libFortranEvaluate.so.18git+0x131ff6c)
#8 0x0000ffff9e677ecc Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>> Fortran::evaluate::FoldIntrinsicFunction<4>(Fortran::evaluate::FoldingContext&, Fortran::evaluate::FunctionRef<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>&&) (/path/to/build/lib/libFortranEvaluate.so.18git+0x1397ecc)
#9 0x0000ffff9e679ce4 Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>> Fortran::evaluate::FoldOperation<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>(Fortran::evaluate::FoldingContext&, Fortran::evaluate::FunctionRef<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>&&) (/path/to/build/lib/libFortranEvaluate.so.18git+0x1399ce4)
#10 0x0000ffff9e679d20 std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>> (*)(Fortran::evaluate::ExpressionBase<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>::Rewrite(Fortran::evaluate::FoldingContext&, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>&&)::'lambda'(auto&&)&&, std::variant<Fortran::evaluate::Parentheses<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Negate<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Add<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Subtract<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Multiply<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Divide<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Power<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Extremum<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Convert<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>, (Fortran::common::TypeCategory)0>, Fortran::evaluate::Convert<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>, (Fortran::common::TypeCategory)1>, Fortran::evaluate::Constant<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::ArrayConstructor<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Designator<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::FunctionRef<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>>&&)>, std::tuple<std::variant<Fortran::evaluate::Parentheses<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Negate<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Add<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Subtract<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Multiply<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Divide<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Power<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Extremum<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Convert<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>, (Fortran::common::TypeCategory)0>, Fortran::evaluate::Convert<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>, (Fortran::common::TypeCategory)1>, Fortran::evaluate::Constant<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::ArrayConstructor<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Designator<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::FunctionRef<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>>&&>, std::integer_sequence<unsigned long, 13ul>>::__visit_invoke(Fortran::evaluate::ExpressionBase<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>::Rewrite(Fortran::evaluate::FoldingContext&, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>&&)::'lambda'(auto&&)&&, std::variant<Fortran::evaluate::Parentheses<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Negate<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Add<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Subtract<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Multiply<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Divide<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Power<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Extremum<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Convert<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>, (Fortran::common::TypeCategory)0>, Fortran::evaluate::Convert<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>, (Fortran::common::TypeCategory)1>, Fortran::evaluate::Constant<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::ArrayConstructor<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Designator<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::FunctionRef<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>>&&) (/path/to/build/lib/libFortranEvaluate.so.18git+0x1399d20)
#11 0x0000ffff9e5ba0c0 Fortran::evaluate::ExpressionBase<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>::Rewrite(Fortran::evaluate::FoldingContext&, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>&&) (/path/to/build/lib/libFortranEvaluate.so.18git+0x12da0c0)
#12 0x0000ffff9e5ba238 std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)0>> (*)(Fortran::evaluate::ExpressionBase<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)0>>::Rewrite(Fortran::evaluate::FoldingContext&, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)0>>&&)::'lambda'(auto&&)&&, std::variant<Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 1>>, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 2>>, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 8>>, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 16>>>&&)>, std::tuple<std::variant<Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 1>>, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 2>>, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 8>>, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 16>>>&&>, std::integer_sequence<unsigned long, 2ul>>::__visit_invoke(Fortran::evaluate::ExpressionBase<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)0>>::Rewrite(Fortran::evaluate::FoldingContext&, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)0>>&&)::'lambda'(auto&&)&&, std::variant<Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 1>>, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 2>>, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 4>>, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 8>>, Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 16>>>&&) (/path/to/build/lib/libFortranEvaluate.so.18git+0x12da238)
#13 0x0000ffff9e5ba750 Fortran::evaluate::ExpressionBase<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)0>>::Rewrite(Fortran::evaluate::FoldingContext&, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)0>>&&) (/path/to/build/lib/libFortranEvaluate.so.18git+0x12da750)
#14 0x0000ffff9e4cc338 std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<Fortran::evaluate::Expr<Fortran::evaluate::SomeType> (*)(Fortran::evaluate::ExpressionBase<Fortran::evaluate::SomeType>::Rewrite(Fortran::evaluate::FoldingContext&, Fortran::evaluate::Expr<Fortran::evaluate::SomeType>&&)::'lambda'(auto&&)&&, std::variant<Fortran::evaluate::value::Integer<128, true, 32, unsigned int, unsigned long>, Fortran::evaluate::NullPointer, Fortran::evaluate::ProcedureDesignator, Fortran::evaluate::ProcedureRef, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)0>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)1>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)2>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)3>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)4>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)5>>>&&)>, std::tuple<std::variant<Fortran::evaluate::value::Integer<128, true, 32, unsigned int, unsigned long>, Fortran::evaluate::NullPointer, Fortran::evaluate::ProcedureDesignator, Fortran::evaluate::ProcedureRef, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)0>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)1>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)2>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)3>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)4>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)5>>>&&>, std::integer_sequence<unsigned long, 4ul>>::__visit_invoke(Fortran::evaluate::ExpressionBase<Fortran::evaluate::SomeType>::Rewrite(Fortran::evaluate::FoldingContext&, Fortran::evaluate::Expr<Fortran::evaluate::SomeType>&&)::'lambda'(auto&&)&&, std::variant<Fortran::evaluate::value::Integer<128, true, 32, unsigned int, unsigned long>, Fortran::evaluate::NullPointer, Fortran::evaluate::ProcedureDesignator, Fortran::evaluate::ProcedureRef, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)0>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)1>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)2>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)3>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)4>>, Fortran::evaluate::Expr<Fortran::evaluate::SomeKind<(Fortran::common::TypeCategory)5>>>&&) (/path/to/build/lib/libFortranEvaluate.so.18git+0x11ec338)
#15 0x0000ffff9e4cd3e0 Fortran::evaluate::ExpressionBase<Fortran::evaluate::SomeType>::Rewrite(Fortran::evaluate::FoldingContext&, Fortran::evaluate::Expr<Fortran::evaluate::SomeType>&&) (/path/to/build/lib/libFortranEvaluate.so.18git+0x11ed3e0)
#16 0x0000ffffa0b469a0 std::optional<Fortran::evaluate::Expr<Fortran::evaluate::SomeType>> Fortran::evaluate::ExpressionAnalyzer::ExprOrVariable<Fortran::parser::Expr>(Fortran::parser::Expr const&, Fortran::parser::CharBlock) (/path/to/build/lib/libFortranSemantics.so.18git+0x1fa69a0)
#17 0x0000ffffa0b46f84 Fortran::evaluate::ExpressionAnalyzer::IterativelyAnalyzeSubexpressions(Fortran::parser::Expr const&) (/path/to/build/lib/libFortranSemantics.so.18git+0x1fa6f84)
#18 0x0000ffffa0b47160 Fortran::evaluate::ExpressionAnalyzer::Analyze(Fortran::parser::Expr const&) (/path/to/build/lib/libFortranSemantics.so.18git+0x1fa7160)
#19 0x0000ffffa0b47aec Fortran::evaluate::ArgumentAnalyzer::AnalyzeExprOrWholeAssumedSizeArray(Fortran::parser::Expr const&) (/path/to/build/lib/libFortranSemantics.so.18git+0x1fa7aec)
#20 0x0000ffffa0b47d20 Fortran::evaluate::ArgumentAnalyzer::AnalyzeExpr(Fortran::parser::Expr const&) (/path/to/build/lib/libFortranSemantics.so.18git+0x1fa7d20)
#21 0x0000ffffa0b47f7c std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<void (*)(Fortran::common::visitors<Fortran::evaluate::ArgumentAnalyzer::Analyze(Fortran::parser::ActualArgSpec const&, bool)::'lambda'(Fortran::common::Indirection<Fortran::parser::Expr, false> const&), Fortran::evaluate::ArgumentAnalyzer::Analyze(Fortran::parser::ActualArgSpec const&, bool)::'lambda0'(Fortran::parser::AltReturnSpec const&), Fortran::evaluate::ArgumentAnalyzer::Analyze(Fortran::parser::ActualArgSpec const&, bool)::'lambda1'(Fortran::parser::ActualArg::PercentRef const&), Fortran::evaluate::ArgumentAnalyzer::Analyze(Fortran::parser::ActualArgSpec const&, bool)::'lambda2'(Fortran::parser::ActualArg::PercentVal const&)>&&, std::variant<Fortran::common::Indirection<Fortran::parser::Expr, false>, Fortran::parser::AltReturnSpec, Fortran::parser::ActualArg::PercentRef, Fortran::parser::ActualArg::PercentVal> const&)>, std::tuple<std::variant<Fortran::common::Indirection<Fortran::parser::Expr, false>, Fortran::parser::AltReturnSpec, Fortran::parser::ActualArg::PercentRef, Fortran::parser::ActualArg::PercentVal> const&>, std::integer_sequence<unsigned long, 0ul>>::__visit_invoke(Fortran::common::visitors<Fortran::evaluate::ArgumentAnalyzer::Analyze(Fortran::parser::ActualArgSpec const&, bool)::'lambda'(Fortran::common::Indirection<Fortran::parser::Expr, false> const&), Fortran::evaluate::ArgumentAnalyzer::Analyze(Fortran::parser::ActualArgSpec const&, bool)::'lambda0'(Fortran::parser::AltReturnSpec const&), Fortran::evaluate::ArgumentAnalyzer::Analyze(Fortran::parser::ActualArgSpec const&, bool)::'lambda1'(Fortran::parser::ActualArg::PercentRef const&), Fortran::evaluate::ArgumentAnalyzer::Analyze(Fortran::parser::ActualArgSpec const&, bool)::'lambda2'(Fortran::parser::ActualArg::PercentVal const&)>&&, std::variant<Fortran::common::Indirection<Fortran::parser::Expr, false>, Fortran::parser::AltReturnSpec, Fortran::parser::ActualArg::PercentRef, Fortran::parser::ActualArg::PercentVal> const&) expression.cpp:0:0
#22 0x0000ffffa0b22bf0 Fortran::evaluate::ArgumentAnalyzer::Analyze(Fortran::parser::ActualArgSpec const&, bool) (/path/to/build/lib/libFortranSemantics.so.18git+0x1f82bf0)
#23 0x0000ffffa0b60800 Fortran::evaluate::ExpressionAnalyzer::Analyze(Fortran::parser::CallStmt const&) (/path/to/build/lib/libFortranSemantics.so.18git+0x1fc0800)
#24 0x0000ffffa0b07158 std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<void (*)(void Fortran::parser::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&)>, std::tuple<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&>, std::integer_sequence<unsigned long, 0ul>>::__visit_invoke(void Fortran::parser::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&) (/path/to/build/lib/libFortranSemantics.so.18git+0x1f67158)
#25 0x0000ffffa0b028fc std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<void (*)(void Fortran::parser::Walk<Fortran::semantics::ExprChecker, Fortran::parser::ExecutableConstruct, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::FormatStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::EntryStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::DataStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::NamelistStmt, false>>, Fortran::parser::ErrorRecovery>(std::variant<Fortran::parser::ExecutableConstruct, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::FormatStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::EntryStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::DataStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::NamelistStmt, false>>, Fortran::parser::ErrorRecovery> const&, Fortran::semantics::ExprChecker&)::'lambda'(Fortran::semantics::ExprChecker const&)&&, std::variant<Fortran::parser::ExecutableConstruct, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::FormatStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::EntryStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::DataStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::NamelistStmt, false>>, Fortran::parser::ErrorRecovery> const&)>, std::tuple<std::variant<Fortran::parser::ExecutableConstruct, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::FormatStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::EntryStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::DataStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::NamelistStmt, false>>, Fortran::parser::ErrorRecovery> const&>, std::integer_sequence<unsigned long, 0ul>>::__visit_invoke(void Fortran::parser::Walk<Fortran::semantics::ExprChecker, Fortran::parser::ExecutableConstruct, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::FormatStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::EntryStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::DataStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::NamelistStmt, false>>, Fortran::parser::ErrorRecovery>(std::variant<Fortran::parser::ExecutableConstruct, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::FormatStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::EntryStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::DataStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::NamelistStmt, false>>, Fortran::parser::ErrorRecovery> const&, Fortran::semantics::ExprChecker&)::'lambda'(Fortran::semantics::ExprChecker const&)&&, std::variant<Fortran::parser::ExecutableConstruct, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::FormatStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::EntryStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::DataStmt, false>>, Fortran::parser::Statement<Fortran::common::Indirection<Fortran::parser::NamelistStmt, false>>, Fortran::parser::ErrorRecovery> const&) (/path/to/build/lib/libFortranSemantics.so.18git+0x1f628fc)
#26 0x0000ffffa0b61cb8 std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<void (*)(void Fortran::parser::Walk<Fortran::semantics::ExprChecker, Fortran::common::Indirection<Fortran::parser::MainProgram, false>, Fortran::common::Indirection<Fortran::parser::FunctionSubprogram, false>, Fortran::common::Indirection<Fortran::parser::SubroutineSubprogram, false>, Fortran::common::Indirection<Fortran::parser::Module, false>, Fortran::common::Indirection<Fortran::parser::Submodule, false>, Fortran::common::Indirection<Fortran::parser::BlockData, false>, Fortran::common::Indirection<Fortran::parser::CompilerDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenACCRoutineConstruct, false>>(std::variant<Fortran::common::Indirection<Fortran::parser::MainProgram, false>, Fortran::common::Indirection<Fortran::parser::FunctionSubprogram, false>, Fortran::common::Indirection<Fortran::parser::SubroutineSubprogram, false>, Fortran::common::Indirection<Fortran::parser::Module, false>, Fortran::common::Indirection<Fortran::parser::Submodule, false>, Fortran::common::Indirection<Fortran::parser::BlockData, false>, Fortran::common::Indirection<Fortran::parser::CompilerDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenACCRoutineConstruct, false>> const&, Fortran::semantics::ExprChecker&)::'lambda'(Fortran::semantics::ExprChecker const&)&&, std::variant<Fortran::common::Indirection<Fortran::parser::MainProgram, false>, Fortran::common::Indirection<Fortran::parser::FunctionSubprogram, false>, Fortran::common::Indirection<Fortran::parser::SubroutineSubprogram, false>, Fortran::common::Indirection<Fortran::parser::Module, false>, Fortran::common::Indirection<Fortran::parser::Submodule, false>, Fortran::common::Indirection<Fortran::parser::BlockData, false>, Fortran::common::Indirection<Fortran::parser::CompilerDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenACCRoutineConstruct, false>> const&)>, std::tuple<std::variant<Fortran::common::Indirection<Fortran::parser::MainProgram, false>, Fortran::common::Indirection<Fortran::parser::FunctionSubprogram, false>, Fortran::common::Indirection<Fortran::parser::SubroutineSubprogram, false>, Fortran::common::Indirection<Fortran::parser::Module, false>, Fortran::common::Indirection<Fortran::parser::Submodule, false>, Fortran::common::Indirection<Fortran::parser::BlockData, false>, Fortran::common::Indirection<Fortran::parser::CompilerDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenACCRoutineConstruct, false>> const&>, std::integer_sequence<unsigned long, 0ul>>::__visit_invoke(void Fortran::parser::Walk<Fortran::semantics::ExprChecker, Fortran::common::Indirection<Fortran::parser::MainProgram, false>, Fortran::common::Indirection<Fortran::parser::FunctionSubprogram, false>, Fortran::common::Indirection<Fortran::parser::SubroutineSubprogram, false>, Fortran::common::Indirection<Fortran::parser::Module, false>, Fortran::common::Indirection<Fortran::parser::Submodule, false>, Fortran::common::Indirection<Fortran::parser::BlockData, false>, Fortran::common::Indirection<Fortran::parser::CompilerDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenACCRoutineConstruct, false>>(std::variant<Fortran::common::Indirection<Fortran::parser::MainProgram, false>, Fortran::common::Indirection<Fortran::parser::FunctionSubprogram, false>, Fortran::common::Indirection<Fortran::parser::SubroutineSubprogram, false>, Fortran::common::Indirection<Fortran::parser::Module, false>, Fortran::common::Indirection<Fortran::parser::Submodule, false>, Fortran::common::Indirection<Fortran::parser::BlockData, false>, Fortran::common::Indirection<Fortran::parser::CompilerDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenACCRoutineConstruct, false>> const&, Fortran::semantics::ExprChecker&)::'lambda'(Fortran::semantics::ExprChecker const&)&&, std::variant<Fortran::common::Indirection<Fortran::parser::MainProgram, false>, Fortran::common::Indirection<Fortran::parser::FunctionSubprogram, false>, Fortran::common::Indirection<Fortran::parser::SubroutineSubprogram, false>, Fortran::common::Indirection<Fortran::parser::Module, false>, Fortran::common::Indirection<Fortran::parser::Submodule, false>, Fortran::common::Indirection<Fortran::parser::BlockData, false>, Fortran::common::Indirection<Fortran::parser::CompilerDirective, false>, Fortran::common::Indirection<Fortran::parser::OpenACCRoutineConstruct, false>> const&) (/path/to/build/lib/libFortranSemantics.so.18git+0x1fc1cb8)
#27 0x0000ffffa0b1ad78 Fortran::semantics::ExprChecker::Walk(Fortran::parser::Program const&) (/path/to/build/lib/libFortranSemantics.so.18git+0x1f7ad78)
#28 0x0000ffffa0cc8904 Fortran::semantics::Semantics::Perform() (/path/to/build/lib/libFortranSemantics.so.18git+0x2128904)
#29 0x0000ffffa6c10c6c Fortran::frontend::FrontendAction::runSemanticChecks() (/path/to/build/lib/libflangFrontend.so.18git+0x190c6c)
#30 0x0000ffffa6ccd24c Fortran::frontend::CodeGenAction::beginSourceFileAction() (/path/to/build/lib/libflangFrontend.so.18git+0x24d24c)
#31 0x0000ffffa6c102b8 Fortran::frontend::FrontendAction::beginSourceFile(Fortran::frontend::CompilerInstance&, Fortran::frontend::FrontendInputFile const&) (/path/to/build/lib/libflangFrontend.so.18git+0x1902b8)
#32 0x0000ffffa6c043d8 Fortran::frontend::CompilerInstance::executeAction(Fortran::frontend::FrontendAction&) (/path/to/build/lib/libflangFrontend.so.18git+0x1843d8)
#33 0x0000ffffa7165020 Fortran::frontend::executeCompilerInvocation(Fortran::frontend::CompilerInstance*) (/path/to/build/lib/libflangFrontendTool.so.18git+0x5020)
#34 0x0000000000405eb8 fc1_main(llvm::ArrayRef<char const*>, char const*) (/path/to/install/bin/flang-new+0x405eb8)
#35 0x0000000000404ae0 main (/path/to/install/bin/flang-new+0x404ae0)
#36 0x0000ffffa57f4384 __libc_start_main (/lib64/libc.so.6+0x24384)
#37 0x0000000000404d28 _start (/path/to/install/bin/flang-new+0x404d28)
flang-new: error: unable to execute command: Aborted (core dumped)
flang-new: error: flang frontend command failed due to signal (use -v to see invocation)
flang-new version 18.0.0git (https://github.com/llvm/llvm-project.git 0e93d04001e45f39cabf0ffb5093512a7f622cc0)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /path/to/install/bin
flang-new: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
flang-new: note: diagnostic msg: /tmp/test-551b56
flang-new: note: diagnostic msg: /tmp/test-551b56.sh
flang-new: note: diagnostic msg:
********************$ gfortran -v test.f90
Driving: gfortran -v test.f90 -l gfortran -l m -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-redhat-linux/8/lto-wrapper
Target: aarch64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-gnu-indirect-function --build=aarch64-redhat-linux
Thread model: posix
gcc version 8.5.0 20210514 (Red Hat 8.5.0-18) (GCC)
:
test.f03:5:14:
call sub(max0(cha,cha))
1
Error: ‘a1’ argument of ‘max0’ intrinsic at (1) must be INTEGER(4)
test.f03:6:15:
call sub(amax1(cha,cha))
1
Error: ‘a1’ argument of ‘amax1’ intrinsic at (1) must be REAL(4)
test.f03:7:15:
call sub(dmax1(cha,cha))
1
Error: ‘a1’ argument of ‘dmax1’ intrinsic at (1) must be REAL(8)
test.f03:9:15:
call sub(amax0(cha,cha))
1
Error: ‘a1’ argument of ‘amax0’ intrinsic at (1) must be INTEGER(4)Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorflang:frontend
Type
Projects
Status
Done