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

function is a global #61

Closed
ZuseZ4 opened this issue Nov 7, 2023 · 1 comment
Closed

function is a global #61

ZuseZ4 opened this issue Nov 7, 2023 · 1 comment

Comments

@ZuseZ4
Copy link
Member

ZuseZ4 commented Nov 7, 2023

@_ZN4sin223primal_cos_inplace_fwd217h4372d8ca57db688fE = internal unnamed_addr alias void (ptr, ptr), ptr @_ZN4sin223primal_cos_inplace_fwd117h63b2ed0dfe283893E

!70222 = distinct !{!70222, !70219, !"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h85bc0a79623e6914E: argument 2"}
thread 'coordinator' panicked at compiler/rustc_codegen_llvm/src/back/write.rs:844:9:
assertion failed: res.is_ok()
stack backtrace:
   0:     0x7f717d551f2b - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h699c2eda1c25947d
   1:     0x7f717d5f4c10 - core::fmt::write::hbd0a2102da3b23ad
   2:     0x7f717d55b5be - std::io::Write::write_fmt::had1d9773e09f96e7
   3:     0x7f717d551d04 - std::sys_common::backtrace::print::hea2679286c7cd7bf
   4:     0x7f717d5b3e13 - std::panicking::default_hook::{{closure}}::hdf3eb728a3cfee15
   5:     0x7f717d5b3b19 - std::panicking::default_hook::h43acb4c83e8b8570
error: failed to prepare AutoDiff: src: _ZN4sin223primal_cos_inplace_fwd217h4372d8ca57db688fE, target: _ZN4sin216cos_inplace_fwd217h7d9928179656fa54E, could not find src function

   6:     0x7f717dec4c8a - std[6b4a5321ca999280]::panicking::update_hook::<alloc[8bd0fa26b0019945]::boxed::Box<rustc_driver_impl[3bb1b3f2e578b797]::install_ice_hook::{closure#0}>>::{closure#0}
   7:     0x7f717d5b468d - std::panicking::rust_panic_with_hook::h850b58927fbd9732
   8:     0x7f717d552686 - std::panicking::begin_panic_handler::{{closure}}::h24e1c0b6dc790f97
   9:     0x7f717d552136 - std::sys_common::backtrace::__rust_end_short_backtrace::h932b911a72b93ea1
  10:     0x7f717d5b4232 - rust_begin_unwind
  11:     0x7f717d549e05 - core::panicking::panic_fmt::he50bb7b3440a7688
  12:     0x7f717d549ea3 - core::panicking::panic::hdb059e898064af1e
  13:     0x7f717e17e26c - rustc_codegen_llvm[e72c960f46b30f4d]::back::write::differentiate
  14:     0x7f717e192516 - rustc_codegen_ssa[72bf011a4be81bab]::back::write::generate_lto_work::<rustc_codegen_llvm[e72c960f46b30f4d]::LlvmCodegenBackend>
  15:     0x7f717e17036c - std[6b4a5321ca999280]::sys_common::backtrace::__rust_begin_short_backtrace::<<rustc_codegen_llvm[e72c960f46b30f4d]::LlvmCodegenBackend as rustc_codegen_ssa[72bf011a4be81bab]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[72bf011a4be81bab]::back::write::start_executing_work<rustc_codegen_llvm[e72c960f46b30f4d]::LlvmCodegenBackend>::{closure#5}, core[ab080d8868199e65]::result::Result<rustc_codegen_ssa[72bf011a4be81bab]::back::write::CompiledModules, ()>>::{closure#0}, core[ab080d8868199e65]::result::Result<rustc_codegen_ssa[72bf011a4be81bab]::back::write::CompiledModules, ()>>
  16:     0x7f717e17396c - <<std[6b4a5321ca999280]::thread::Builder>::spawn_unchecked_<<rustc_codegen_llvm[e72c960f46b30f4d]::LlvmCodegenBackend as rustc_codegen_ssa[72bf011a4be81bab]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[72bf011a4be81bab]::back::write::start_executing_work<rustc_codegen_llvm[e72c960f46b30f4d]::LlvmCodegenBackend>::{closure#5}, core[ab080d8868199e65]::result::Result<rustc_codegen_ssa[72bf011a4be81bab]::back::write::CompiledModules, ()>>::{closure#0}, core[ab080d8868199e65]::result::Result<rustc_codegen_ssa[72bf011a4be81bab]::back::write::CompiledModules, ()>>::{closure#1} as core[ab080d8868199e65]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  17:     0x7f717d553115 - std::sys::unix::thread::Thread::new::thread_start::he77f3e9c20282189
  18:     0x7f7174bcf609 - start_thread
                               at /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477:8
  19:     0x7f717d3fa133 - clone
                               at /build/glibc-SzIz7B/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
  20:                0x0 - <unknown>

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please attach the file at `/h/344/drehwald/prog/rust/library/autodiff/rustc-ice-2023-11-07T04_12_42-2990359.txt` to your bug report

note: compiler flags: -C opt-level=3 -C lto=fat

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `autodiff` (example "sin2" test) due to previous error
@ZuseZ4 ZuseZ4 changed the title Could not deduce type of function is a global Nov 7, 2023
@ZuseZ4
Copy link
Member Author

ZuseZ4 commented Aug 5, 2024

works with the latest master.

@ZuseZ4 ZuseZ4 closed this as completed Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant