Rust-GCC / Rust-GCC/gccrs

ICE in visit, at rust/resolve/rust-ast-resolve-type.cc:635

Open
#3,582 0 comments 0 reactions 1 assignee View on GitHub

@philberty is already working on this.

Since Mar 28, 2025.

bug
Dominant language
C++
Stars
2.9k
Forks
231
Avg merge
19h 55m
Merged PRs (30d)
67

Description

snippet:

fn f() -> impl 'static {} impl 'static {}

fn main() {}

Version information:

34b0a681598d52de442a0a21c3a7df20bf1485bc

Possibly related line of code:
https://github.com/Rust-GCC/gccrs/blob/34b0a681598d52de442a0a21c3a7df20bf1485bc/gcc/rust/resolve/rust-ast-resolve-type.cc#L629-L641

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 visit, at rust/resolve/rust-ast-resolve-type.cc:635
0x868b57 Rust::Resolver::ResolveTypeToCanonicalPath::visit(Rust::AST::TraitObjectType&)
	../../gcc/rust/resolve/rust-ast-resolve-type.cc:635
0xe70bdf Rust::Resolver::ResolveTypeToCanonicalPath::go(Rust::AST::Type&, Rust::Resolver::CanonicalPath&)
	../../gcc/rust/resolve/rust-ast-resolve-type.cc:491
0xe5b459 Rust::Resolver::ResolveItem::visit(Rust::AST::InherentImpl&)
	../../gcc/rust/resolve/rust-ast-resolve-item.cc:584
0xe5ab7c Rust::Resolver::ResolveItem::go(Rust::AST::Item&, Rust::Resolver::CanonicalPath const&, Rust::Resolver::CanonicalPath const&)
	../../gcc/rust/resolve/rust-ast-resolve-item.cc:174
0xe4966d Rust::Resolver::NameResolution::go(Rust::AST::Crate&)
	../../gcc/rust/resolve/rust-ast-resolve.cc:108
0xc5c2d5 Rust::Session::compile_crate(char const*)
	../../gcc/rust/rust-session-manager.cc:650
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.