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

Internal compiler error: trait B < A > { fn a() -> A { self.a} } #5099

Closed
nielsle opened this issue Feb 24, 2013 · 2 comments
Closed

Internal compiler error: trait B < A > { fn a() -> A { self.a} } #5099

nielsle opened this issue Feb 24, 2013 · 2 comments
Labels
A-traits Area: Trait system I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Milestone

Comments

@nielsle
Copy link
Contributor

nielsle commented Feb 24, 2013

The following program causes a compiler error

trait B < A > { fn a() -> A { self.a} }

niels@ellegaard:~/slettes $ rustc --version
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/rustc 0.5
(8554d5e 2012-12-19 21:52:03 -0700)
host: x86_64-unknown-linux-gnu

niels@ellegaard:~/slettes $ cat tests.rs
trait B < A > { fn a() -> A { self.a} }

niels@ellegaard:~/slettes $ rustc tests.rs
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues

niels@ellegaard:/slettes $ export RUST_LOG=rustc=1,::rt::backtrace
niels@ellegaard:
/slettes $ rustc tests.rs
rust: task failed at 'index out of bounds: the len is 0 but the index is 0', /home/rustbuild/src/rustbot/workspace-snap-stage3-x86_64-unknown-linux-gnu/src/src/librustc/middle/ty.rs:1582
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4f)[0x7f1fa8d5583f]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(+0x2bb11)[0x7f1fa8d68b11]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(upcall_fail+0x1d3)[0x7f1fa8d58d93]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0xa1f3b)[0x7f1faa504f3b]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x3724e)[0x7f1faa49a24e]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(_ZN2rt20rt_fail_bounds_check17_6e1eda81bf4aba343_05E+0x19b)[0x7f1faa4a1bab]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2e721b)[0x7f1fa927f21b]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty19fold_regions_and_ty16_f54a62363da4ac23_05E+0x695)[0x7f1fa927ce05]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2e7204)[0x7f1fa927f204]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty5subst17_4427afe6803fad763_05E+0x2fb)[0x7f1fa914dc8b]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle6typeck5check14__extensions__10meth_4779315write_ty_substs15_620eddf78c942c3_05E+0x7c)[0x7f1fa937dcec]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle6typeck5check6method14__extensions__10meth_4774817confirm_candidate16_bbe5853d7f2b55e3_05E+0x62e)[0x7f1fa937c9ce]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle6typeck5check6method14__extensions__10meth_4765419consider_candidates14_c9c86cccf1c843_05E+0x6bf)[0x7f1fa937b2ef]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle6typeck5check6method14__extensions__10meth_4759117search_for_method16_42b4bf4d3be0b423_05E+0x339)[0x7f1fa9379099]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle6typeck5check6method14__extensions__10meth_4732328search_for_autoderefd_method17_1b1643c6e428ad6f3_05E+0x74)[0x7f1fa9370604]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle6typeck5check6method14__extensions__10meth_472739do_lookup16_42b4bf4d3be0b423_05E+0x745)[0x7f1fa936ed25]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x7834ec)[0x7f1fa971b4ec]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle6typeck5check6method6lookup17_e4249ed78bca28f23_05E+0x179)[0x7f1fa936dc49]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x43a704)[0x7f1fa93d2704]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x426fe4)[0x7f1fa93befe4]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x7834ec)[0x7f1fa971b4ec]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x38e4dd)[0x7f1fa93264dd]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x3edcb9)[0x7f1fa9385cb9]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x3ec237)[0x7f1fa9384237]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x3f2234)[0x7f1fa938a234]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x3ea9dc)[0x7f1fa93829dc]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libsyntax-84efebcb12c867a2-0.5.so(+0xb7da5)[0x7f1fa9bf8da5]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libsyntax-84efebcb12c867a2-0.5.so(+0xb7a04)[0x7f1fa9bf8a04]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle6typeck5check16check_item_types16_ef87a212ee1c1893_05E+0x447)[0x7f1fa9381447]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle6typeck11check_crate16_233d7ed98ff43893_05E+0x1b9)[0x7f1fa948c509]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x7834ec)[0x7f1fa971b4ec]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6driver6driver12compile_upto16_2b485a272c743d53_05E+0x1726)[0x7f1fa96e14b6]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x7834ec)[0x7f1fa971b4ec]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6driver6driver13compile_input17_14b7675443fceb433_05E+0xbb)[0x7f1fa96e47eb]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN12run_compiler16_2977651ce4ea1243_05E+0x2459)[0x7f1fa9714269]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x7834ec)[0x7f1fa971b4ec]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x782203)[0x7f1fa971a203]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x78126c)[0x7f1fa971926c]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x7b360)[0x7f1faa4de360]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0xb2650)[0x7f1faa515650]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7f1fa8d56864]
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /home/rustbuild/src/rustbot/workspace-snap-stage3-x86_64-unknown-linux-gnu/src/src/librustc/rustc.rc:425
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4f)[0x7f1fa8d5583f]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(+0x2bb11)[0x7f1fa8d68b11]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(upcall_fail+0x1d3)[0x7f1fa8d58d93]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0xa1f3b)[0x7f1faa504f3b]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x3724e)[0x7f1faa49a24e]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0xb2650)[0x7f1faa515650]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN7monitor17_b0fffbf1e4d4325c3_05E+0x29de)[0x7f1fa971822e]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(+0x7834ec)[0x7f1fa971b4ec]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN4main16_2fb85b4a659c4103_05E+0x86)[0x7f1fa971b0f6]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7f1fa8d56864]
rust: domain main @0x6541f0 root task failed
rust: task failed at 'killed', /home/rustbuild/src/rustbot/workspace-snap-stage3-x86_64-unknown-linux-gnu/src/src/libcore/task/mod.rs:570
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4f)[0x7f1fa8d5583f]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(+0x2bb11)[0x7f1fa8d68b11]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(upcall_fail+0x1d3)[0x7f1fa8d58d93]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0xa1f3b)[0x7f1faa504f3b]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x3724e)[0x7f1faa49a24e]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(_ZN4task5yield17_56812fae66173efd3_05E+0xbd)[0x7f1faa4c6f5d]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x90d06)[0x7f1faa4f3d06]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0xb2650)[0x7f1faa515650]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(_ZN7private11weaken_task16_d215ceff51755b63_05E+0xd9)[0x7f1faa4f3b49]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x90a3b)[0x7f1faa4f3a3b]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x8b61e)[0x7f1faa4ee61e]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0x7b360)[0x7f1faa4de360]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(+0xb2650)[0x7f1faa515650]
/home/niels/local/src/rust/build/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7f1fa8d56864]

@catamorphism
Copy link
Contributor

Still ICEs as of 33e7a1f

@ghost ghost assigned catamorphism Feb 28, 2013
@catamorphism
Copy link
Contributor

Appears to have been fixed; I queued up a test case to add. Closing.

bors added a commit to rust-lang-ci/rust that referenced this issue May 2, 2020
…lip1995

Split up `non_copy_const` ui test

Part of rust-lang#2038
Maybe there is a better way to avoid duplications of constants.

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-traits Area: Trait system I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants