Skip to content

Cannot compile libcore #165

Open
Open
@dylanmckay

Description

@dylanmckay
rustc: /home/dylan/projects/avr-rust/rust/src/llvm-project/llvm/lib/IR/Constants.cpp:1784: static llvm::Constant* llvm::ConstantExpr::getBitCast(llvm::Constant*, llvm::Type*, bool): Assertio
n `CastInst::castIsValid(Instruction::BitCast, C, DstTy) && "Invalid constantexpr bitcast!"' failed.                                                                                          
#0  0x00007fffebbc3ce5 in raise () from /usr/lib/libc.so.6
#1  0x00007fffebbad857 in abort () from /usr/lib/libc.so.6
#2  0x00007fffebbad727 in __assert_fail_base.cold () from /usr/lib/libc.so.6
#3  0x00007fffebbbc426 in __assert_fail () from /usr/lib/libc.so.6
#4  0x00007fffefcf955b in llvm::ConstantExpr::getBitCast (C=0x7fffddb635d8, DstTy=0x7fffe77cc680, OnlyIfReduced=false)
    at /home/dylan/projects/avr-rust/rust/src/llvm-project/llvm/lib/IR/Constants.cpp:1784
#5  0x00007fffefd1ec47 in LLVMConstBitCast (ConstantVal=0x7fffddb635d8, ToType=0x7fffe77cc680) at /home/dylan/projects/avr-rust/rust/src/llvm-project/llvm/lib/IR/Core.cpp:1717
#6  0x00007fffecfa4185 in rustc_codegen_llvm::consts::<impl rustc_codegen_llvm::context::CodegenCx>::const_bitcast (self=<optimized out>, val=0x7fffddb635d8, ty=0x0)
    at src/librustc_codegen_llvm/consts.rs:165
#7  rustc_codegen_llvm::common::<impl rustc_codegen_ssa::traits::consts::ConstMethods for rustc_codegen_llvm::context::CodegenCx>::scalar_to_backend (self=<optimized out>, cv=..., 
    layout=0x7ffff38145a0, llty=0x7fffe77cc680) at src/librustc_codegen_llvm/common.rs:276
#8  0x00007fffece0b606 in rustc_codegen_llvm::consts::const_alloc_to_llvm (cx=0x7fffeb72f868, alloc=0x7fffdd625390) at src/librustc_codegen_llvm/consts.rs:57
#9  0x00007fffecfa6794 in rustc_codegen_llvm::consts::codegen_static_initializer (cx=0x7fffeb72f868, def_id=...) at src/librustc_codegen_llvm/consts.rs:87
#10 rustc_codegen_llvm::consts::<impl rustc_codegen_ssa::traits::statics::StaticMethods for rustc_codegen_llvm::context::CodegenCx>::codegen_static (self=0x7fffeb72f868, def_id=..., 
    is_mutable=false) at src/librustc_codegen_llvm/consts.rs:346
#11 0x00007fffecf9fa2b in <rustc_middle::mir::mono::MonoItem as rustc_codegen_ssa::mono_item::MonoItemExt>::define (self=0x7fffeb72f7f0, cx=0x7fffeb72f868)
    at /home/dylan/projects/avr-rust/rust/src/librustc_codegen_ssa/mono_item.rs:31
#12 0x00007fffeceb069b in rustc_codegen_llvm::base::compile_codegen_unit::module_codegen (tcx=..., cgu_name=...) at src/librustc_codegen_llvm/base.rs:129
#13 0x00007fffeced26a0 in rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl (self=0x7fffeb731998, cx=..., arg=..., no_tcx=false, 
    task=0x7fffeceb0540 <rustc_codegen_llvm::base::compile_codegen_unit::module_codegen>, key=..., create_task=<optimized out>, finish_task_and_alloc_depnode=<optimized out>, 
    hash_result=<optimized out>) at /home/dylan/projects/avr-rust/rust/src/librustc_query_system/dep_graph/graph.rs:303
#14 rustc_query_system::dep_graph::graph::DepGraph<K>::with_task (self=0x7fffeb731998, key=..., cx=..., arg=..., 
    task=0x7fffeceb0540 <rustc_codegen_llvm::base::compile_codegen_unit::module_codegen>, hash_result=<optimized out>)
    at /home/dylan/projects/avr-rust/rust/src/librustc_query_system/dep_graph/graph.rs:200
#15 0x00007fffeceb029b in rustc_codegen_llvm::base::compile_codegen_unit (tcx=..., cgu_name=...) at src/librustc_codegen_llvm/base.rs:108
#16 0x00007fffed025c04 in <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::ExtraBackendMethods>::compile_codegen_unit (self=0x7fffeb730148, tcx=..., 
    cgu_name=...) at src/librustc_codegen_llvm/lib.rs:107
#17 rustc_codegen_ssa::base::codegen_crate (backend=..., tcx=..., metadata=..., need_metadata_module=<optimized out>)
    at /home/dylan/projects/avr-rust/rust/src/librustc_codegen_ssa/base.rs:676
#18 0x00007fffecfdf8f5 in <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate (self=<optimized out>, tcx=..., metadata=..., 
    need_metadata_module=229) at src/librustc_codegen_llvm/lib.rs:257
#19 0x00007fffecbcf5d3 in rustc_interface::passes::start_codegen::{{closure}} () at src/librustc_interface/passes.rs:979
#20 rustc_data_structures::profiling::VerboseTimingGuard::run (f=..., self=...) at /home/dylan/projects/avr-rust/rust/src/librustc_data_structures/profiling.rs:569
#21 rustc_session::utils::<impl rustc_session::session::Session>::time (self=<optimized out>, what=..., f=...) at /home/dylan/projects/avr-rust/rust/src/librustc_session/utils.rs:9
#22 rustc_interface::passes::start_codegen (codegen_backend=..., tcx=..., outputs=0x7fffeb738470) at src/librustc_interface/passes.rs:978
#23 0x00007fffecc1b13a in rustc_interface::queries::Queries::ongoing_codegen::{{closure}}::{{closure}} (tcx=...) at src/librustc_interface/queries.rs:282
#24 rustc_middle::ty::context::tls::enter_global::{{closure}} () at /home/dylan/projects/avr-rust/rust/src/librustc_middle/ty/context.rs:1718
#25 rustc_middle::ty::context::tls::enter_context::{{closure}} () at /home/dylan/projects/avr-rust/rust/src/librustc_middle/ty/context.rs:1695
#26 rustc_middle::ty::context::tls::set_tlv (value=140737143574944, f=...) at /home/dylan/projects/avr-rust/rust/src/librustc_middle/ty/context.rs:1679
#27 rustc_middle::ty::context::tls::enter_context (context=0x7fffeb7311a0, f=...) at /home/dylan/projects/avr-rust/rust/src/librustc_middle/ty/context.rs:1695
#28 rustc_middle::ty::context::tls::enter_global (gcx=0x7fffeb7316f0, f=...) at /home/dylan/projects/avr-rust/rust/src/librustc_middle/ty/context.rs:1718
#29 0x00007fffecbfd802 in rustc_interface::passes::QueryContext::enter (self=0x0, f=...) at src/librustc_interface/passes.rs:710
#30 rustc_interface::queries::Queries::ongoing_codegen::{{closure}} () at src/librustc_interface/queries.rs:273
#31 rustc_interface::queries::Query<T>::compute (self=0x7fffeb7384e8, f=...) at src/librustc_interface/queries.rs:34
#32 rustc_interface::queries::Queries::ongoing_codegen (self=0x7fffeb7316e0) at src/librustc_interface/queries.rs:271
#33 0x00007fffec7edf7d in rustc_driver::run_compiler::{{closure}}::{{closure}} (queries=0x2) at src/librustc_driver/lib.rs:399
#34 rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter (self=0x7fffeb7314d0, f=...) at /home/dylan/projects/avr-rust/rust/src/librustc_interface/queries.rs:385
#35 rustc_driver::run_compiler::{{closure}} (compiler=0x7fffeb7314d0) at src/librustc_driver/lib.rs:289
#36 rustc_interface::interface::run_compiler_in_existing_thread_pool (config=..., f=...) at /home/dylan/projects/avr-rust/rust/src/librustc_interface/interface.rs:199
#37 0x00007fffec8529d4 in rustc_interface::interface::run_compiler::{{closure}} () at /home/dylan/projects/avr-rust/rust/src/librustc_interface/interface.rs:213
#38 rustc_interface::util::spawn_thread_pool::{{closure}}::{{closure}}::{{closure}} () at /home/dylan/projects/avr-rust/rust/src/librustc_interface/util.rs:154
#39 scoped_tls::ScopedKey<T>::set (self=<optimized out>, t=0x7fffeb738570, f=...) at /home/dylan/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137
#40 rustc_interface::util::spawn_thread_pool::{{closure}}::{{closure}} () at /home/dylan/projects/avr-rust/rust/src/librustc_interface/util.rs:150
#41 scoped_tls::ScopedKey<T>::set (self=<optimized out>, t=<optimized out>, f=...) at /home/dylan/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137
#42 rustc_ast::attr::with_globals::{{closure}} () at /home/dylan/projects/avr-rust/rust/src/librustc_ast/attr/mod.rs:44
#43 scoped_tls::ScopedKey<T>::set (self=<optimized out>, t=<optimized out>, f=...) at /home/dylan/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions