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

ICE with codegen-units=0 #32191

Closed
tomaka opened this issue Mar 11, 2016 · 1 comment · Fixed by #32212
Closed

ICE with codegen-units=0 #32191

tomaka opened this issue Mar 11, 2016 · 1 comment · Fixed by #32212
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@tomaka
Copy link
Contributor

tomaka commented Mar 11, 2016

Invoking Rustc with rustc -C codegen-units=0 foo.rs triggers an ICE:

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/m
aster/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'index out of bounds: the len is 0 but the index is 0
', ../src/libcollections\vec.rs:1179
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Probably easy to fix.

@steveklabnik steveklabnik added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Mar 11, 2016
@Manishearth
Copy link
Member

The actual ICE is from SharedCrateContext assuming that local_ccxs contains something. But it should always contain something, best to catch this early when constructing options.

Manishearth added a commit to Manishearth/rust that referenced this issue Mar 13, 2016
Don't allow values for codegen-units less than 1

r? @eddyb

fixes rust-lang#32191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants