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] error during interning #72372

Closed
leonardo-m opened this issue May 20, 2020 · 1 comment · Fixed by #73130
Closed

[ICE] error during interning #72372

leonardo-m opened this issue May 20, 2020 · 1 comment · Fixed by #73130
Labels
A-mir-opt Area: MIR optimizations C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@leonardo-m
Copy link

This code:

fn main() {
    let foo = "1\n2".lines().map(|_| [1]);
    let _ = foo.filter(|_| true);
}

Compiling it with rustc -Z mir-opt-level=2 test.rs gives:

error: internal compiler error: error during interning should later cause validation failure
 --> test.rs:3:13
  |
3 |     let _ = foo.filter(|_| true);
  |             ^^^

error: internal compiler error: error during interning should later cause validation failure
   --> ...\lib/rustlib/src/rust\src\libcore\iter\traits\iterator.rs:730:21
    |
730 |         Filter::new(self, predicate)
    |                     ^^^^

error: internal compiler error: error during interning should later cause validation failure
   --> ...\lib/rustlib/src/rust\src\libcore\iter\adapters\mod.rs:912:18
    |
912 |         Filter { iter, predicate }
    |                  ^^^^

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src\librustc_errors\lib.rs:366:17
stack backtrace:
 ...

Using:

rustc 1.45.0-nightly (3a7dfda40 2020-05-19)
binary: rustc
commit-hash: 3a7dfda40a3e798bf086bd58cc7e5e09deb808b5
commit-date: 2020-05-19
host: x86_64-pc-windows-gnu
release: 1.45.0-nightly
LLVM version: 9.0
@leonardo-m leonardo-m added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 20, 2020
@jonas-schievink jonas-schievink added A-mir-opt Area: MIR optimizations requires-nightly This issue requires a nightly compiler in some way. labels May 20, 2020
@matthiaskrgr
Copy link
Member

This bug also triggers on src/test/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs with -Z mir-opt-level=2

@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label May 20, 2020
RalfJung added a commit to RalfJung/rust that referenced this issue Jun 19, 2020
…ndirects, r=oli-obk

Remove const prop for indirects

This was only used by one mir-opt test and since it causes buggy behavior under `-Zmir-opt-level=2`, it seems like we should remove it.

This was split out from rust-lang#71946.

Closes rust-lang#72679
Closes rust-lang#72372
Closes rust-lang#72285
@bors bors closed this as completed in 1e88f13 Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mir-opt Area: MIR optimizations C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants