Closed
Description
STR
Using a rustc
that includes #37672
$ rustc --target msp430 src/libcore/lib.rs
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'unsupported target word size', /shared/rust/checkouts/msp430/src/librustc_trans/mir/rvalue.rs:739
stack backtrace:
1: 0x7fdfb5f681c3 - std::sys::imp::backtrace::tracing::imp::write::h0064f77c206681f1
2: 0x7fdfb5f7a7dd - std::panicking::default_hook::{{closure}}::hce6e6da7884521df
3: 0x7fdfb5f770b7 - std::panicking::default_hook::h08b777dd112812ee
4: 0x7fdfb5f777b8 - std::panicking::rust_panic_with_hook::h8aaf423b79a723ce
5: 0x7fdfb4a8dc0f - std::panicking::begin_panic::h80813978ef3663c6
6: 0x7fdfb4b6973e - rustc_trans::mir::rvalue::<impl rustc_trans::mir::MirContext<'bcx, 'tcx>>::trans_rvalue_operand::h78e9fde934aa9d95
7: 0x7fdfb4b54b8e - rustc_trans::mir::block::<impl rustc_trans::mir::MirContext<'bcx, 'tcx>>::trans_block::habef79617cb513b5
8: 0x7fdfb4b53068 - rustc_trans::mir::trans_mir::h7d5b1fcd394860ce
9: 0x7fdfb4af4790 - rustc_trans::base::trans_closure::h01b35e781bad1851
10: 0x7fdfb4b72a51 - rustc_trans::trans_item::TransItem::define::hb3a0bebc734605dd
11: 0x7fdfb4af7cfa - rustc_trans::base::trans_crate::h4b27c7ef3f8bd9b5
12: 0x7fdfb62cd677 - rustc_driver::driver::phase_4_translate_to_llvm::h30e5bcfd6c9e90e1
13: 0x7fdfb6306c9a - rustc_driver::driver::compile_input::{{closure}}::hff8e6ebec23ef81d
14: 0x7fdfb62f892e - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::hd235265215af038a
15: 0x7fdfb62c5e05 - rustc_driver::driver::phase_3_run_analysis_passes::h58f5a849bb0812c0
16: 0x7fdfb62b23bd - rustc_driver::driver::compile_input::h9100f1ce0cf239dd
17: 0x7fdfb62df0fb - rustc_driver::run_compiler::h5d2f6d5267af76f1
18: 0x7fdfb620d2fb - std::panicking::try::do_call::hd0d49d99f786a858
19: 0x7fdfb5f80a96 - __rust_maybe_catch_panic
20: 0x7fdfb622cc91 - <F as alloc::boxed::FnBox<A>>::call_box::h5dfdb4de795e60b4
21: 0x7fdfb5f763b0 - std::sys::imp::thread::Thread::new::thread_start::hdf824b927fe0aa16
22: 0x7fdfaef66709 - start_thread
23: 0x7fdfb5c3382c - clone
24: 0x0 - <unknown>
With this custom target definition:
{
"arch": "msp430",
"data-layout": "",
"executables": true,
"data-layout": "e-m:e-p:16:16-i32:16:32-a:16-n8:16",
"linker": "msp430-gcc",
"llvm-target": "msp430",
"os": "none",
"relocation-model": "static",
"target-endian": "little",
"target-pointer-width": "16"
}
Note that for this target/architecture pointer size is 16 bit.
Meta
# HEAD is PR #37672
$ git rev-parse HEAD~
966c70085adc69eecf9c8cd1f128872e8d90614d
cc @eddyb