ICE in lower_generic_args, at rust/hir/rust-ast-lower-base.cc:660
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 231
- Avg merge
- 19h 55m
- Merged PRs (30d)
- 67
Description
auto-reduced (treereduce-rust):
trait Common {}
impl<'t, T> Common for (T, &'t T) {
fn provider(&self) -> &AdaptedMatrixProvider<MP> {}
}
original:
// check-pass
// pretty-expanded FIXME #23616
trait Common { fn _38(&self) { } }
impl<'t, T> Common for (T, &'t T) {
fn provider(&self) -> &'adapted_matrix_provider AdaptedMatrixProvider</*'original_data,*/ MP> {
self.provider
}
}
impl<'t, T> Common for (&'t T, T) {}
fn main() {}
Version information:
a988708b4ba2b5a27715ea34c09ccfd3ed5143ca
Command:
crab1 -Warray-bounds -mtune=generic -march=x86-64 -O0 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -frust-incomplete-and-experimental-compiler-do-not-use
Program output
crab1: internal compiler error: in lower_generic_args, at rust/hir/rust-ast-lower-base.cc:660
0x866851 Rust::HIR::ASTLoweringBase::lower_generic_args(Rust::AST::GenericArgs&)
../../gcc/rust/hir/rust-ast-lower-base.cc:660
0xe01066 Rust::HIR::ASTLowerTypePath::visit(Rust::AST::TypePathSegmentGeneric&)
../../gcc/rust/hir/rust-ast-lower-type.cc:98
0xdff8e7 Rust::HIR::ASTLowerTypePath::visit(Rust::AST::TypePath&)
../../gcc/rust/hir/rust-ast-lower-type.cc:133
0xdff839 Rust::HIR::ASTLowerTypePath::translate(Rust::AST::TypePath&)
../../gcc/rust/hir/rust-ast-lower-type.cc:33
0xdff839 Rust::HIR::ASTLoweringType::visit(Rust::AST::TypePath&)
../../gcc/rust/hir/rust-ast-lower-type.cc:312
0xe01ae6 Rust::HIR::ASTLoweringType::translate(Rust::AST::Type&, bool)
../../gcc/rust/hir/rust-ast-lower-type.cc:216
0xe01bd9 Rust::HIR::ASTLoweringType::visit(Rust::AST::ReferenceType&)
../../gcc/rust/hir/rust-ast-lower-type.cc:347
0xe01ae6 Rust::HIR::ASTLoweringType::translate(Rust::AST::Type&, bool)
../../gcc/rust/hir/rust-ast-lower-type.cc:216
0xdf0294 Rust::HIR::ASTLowerImplItem::visit(Rust::AST::Function&)
../../gcc/rust/hir/rust-ast-lower-implitem.cc:141
0xdf1649 Rust::HIR::ASTLowerImplItem::translate(Rust::AST::AssociatedItem&, unsigned int)
../../gcc/rust/hir/rust-ast-lower-implitem.cc:34
0xde93de Rust::HIR::ASTLoweringItem::visit(Rust::AST::TraitImpl&)
../../gcc/rust/hir/rust-ast-lower-item.cc:693
0xde225e Rust::HIR::ASTLoweringItem::translate(Rust::AST::Item&)
../../gcc/rust/hir/rust-ast-lower-item.cc:38
0xdcfd27 Rust::HIR::ASTLowering::go()
../../gcc/rust/hir/rust-ast-lower.cc:81
0xdd0221 Rust::HIR::ASTLowering::Resolve(Rust::AST::Crate&)
../../gcc/rust/hir/rust-ast-lower.cc:71
0xc5c218 Rust::Session::compile_crate(char const*)
../../gcc/rust/rust-session-manager.cc:663
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reduced Rust reproducer and the ICE at rust/hir/rust-ast-lower-base.cc:660, then read the callers in rust/hir/rust-ast-lower-type.cc. Run the supplied crab1 command to reproduce the failure; done means this input no longer triggers an internal compiler error during generic-argument lowering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100