Issue |
127226
|
Summary |
[flang] x86 backend ICE when the frontend should probably reject the source
|
Labels |
bug,
flang
|
Assignees |
|
Reporter |
ashermancinelli
|
```
> cat t.f90
use,intrinsic::ieee_arithmetic
integer,parameter::k=ieee_selected_real_kind(3)
real(k)::x,y
y=ieee_rint(x,ieee_other)
end
> nvfortran t.f90
NVFORTRAN-S-0155-Could not resolve generic procedure ieee_rint (t.f90: 4)
0 inform, 0 warnings, 1 severes, 0 fatal for MAIN
> gfortran t.f90
t.f90:4:2:
4 | y=ieee_rint(x,ieee_other)
| 1
Error: There is no specific function for the generic ‘ieee_rint’ at (1)
> ngflang t.f90
> ngflang t.f90 -O1
rounding mode is not supported by X86 hardware
UNREACHABLE executed at
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.
1. Code generation
2. Running pass 'Function Pass Manager' on module 't.f90.ll'.
3. Running pass 'X86 DAG->DAG Instruction Selection' on function '@_QQmain'
#0 0x0000562f339d583b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (
#1 0x0000562f339d337c llvm::sys::CleanupOnSignal(unsigned long) (
#2 0x0000562f33918e98 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#3 0x00007f3a40c3e730 __restore_rt (/lib64/libc.so.6+0x3e730)
#4 0x00007f3a40c8ba6c __pthread_kill_implementation (/lib64/libc.so.6+0x8ba6c)
#5 0x00007f3a40c3e686 gsignal (/lib64/libc.so.6+0x3e686)
#6 0x00007f3a40c28833 abort (/lib64/libc.so.6+0x28833)
#7 0x0000562f33922f9a (
#8 0x0000562f32463cef llvm::X86TargetLowering::LowerSET_ROUNDING(llvm::SDValue, llvm::SelectionDAG&) const X86ISelLowering.cpp:0:0
#9 0x0000562f32561949 llvm::X86TargetLowering::LowerOperation(llvm::SDValue, llvm::SelectionDAG&) const X86ISelLowering.cpp:0:0
#10 0x0000562f34fdebe0 (anonymous namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*) (.part.0) LegalizeDAG.cpp:0:0
#11 0x0000562f34fe2926 llvm::SelectionDAG::Legalize() (
#12 0x0000562f350dfb6e llvm::SelectionDAGISel::CodeGenAndEmitDAG() (
#13 0x0000562f350e32b5 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (
#14 0x0000562f350e4578 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (
#15 0x0000562f350d47af llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (
#16 0x0000562f32c9cea2 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#17 0x0000562f33385a1f llvm::FPPassManager::runOnFunction(llvm::Function&) (
#18 0x0000562f33385de1 llvm::FPPassManager::runOnModule(llvm::Module&) (
#19 0x0000562f333866e1 llvm::legacy::PassManagerImpl::run(llvm::Module&) (
#20 0x0000562f34464d0a clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (
#21 0x0000562f345d3237 clang::CodeGenAction::ExecuteAction() (
#22 0x0000562f349e1ea5 clang::FrontendAction::Execute() (
#23 0x0000562f34961c0e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (
#24 0x0000562f34ae8d6e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (
#25 0x0000562f3227b337 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (
#26 0x0000562f322727da ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#27 0x0000562f34752769 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#28 0x0000562f33919364 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (
#29 0x0000562f34752d6f clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#30 0x0000562f34710c50 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (
#31 0x0000562f34711cee clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (
#32 0x0000562f3471a315 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (
#33 0x0000562f32277b1b clang_main(int, char**, llvm::ToolContext const&) (
#34 0x0000562f3228a7b7 main (
#35 0x00007f3a40c295d0 __libc_start_call_main (/lib64/libc.so.6+0x295d0)
#36 0x00007f3a40c29680 __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x29680)
#37 0x0000562f3227226e _start (
clang++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
clang version 21.0.0git (https://github.com/llvm/llvm-project 083f099a345f02390d00a8196d4ffa36ae71c82f)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
Build config: +assertions
clang++: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs