gccrs icon indicating copy to clipboard operation
gccrs copied to clipboard

ICE in visit, at rust/checks/errors/rust-hir-pattern-analysis.cc:404 match on ouroboros type

Open matthiaskrgr opened this issue 1 year ago • 0 comments

auto-reduced (treereduce-rust):

//@compile-flags: -frust-incomplete-and-experimental-compiler-do-not-use
type A = A;

fn main() {
    match A {}
}

original:

struct S(u8, u16);
type A = A;

fn main() {
    let main = A(0, 1); //~ ERROR expected function
    match A {
        A(..) => {} //~ ERROR expected function
    }
}

Version information:

765121736dfe3f5b319bbe9837880deda326394e

Possibly related line of code: https://github.com/Rust-GCC/gccrs/blob/765121736dfe3f5b319bbe9837880deda326394e/gcc/rust/checks/errors/rust-hir-pattern-analysis.cc#L398-L410

Command: /home/matthias/vcs/github/gccrs/gccrs-build/gcc/crab1 -frust-incomplete-and-experimental-compiler-do-not-use

Program output

crab1: internal compiler error: in visit, at rust/checks/errors/rust-hir-pattern-analysis.cc:404
0x89483f Rust::Analysis::PatternChecker::visit(Rust::HIR::MatchExpr&)
	../../gcc/rust/checks/errors/rust-hir-pattern-analysis.cc:404
0x10446d3 Rust::Analysis::PatternChecker::go(Rust::HIR::Crate&)
	../../gcc/rust/checks/errors/rust-hir-pattern-analysis.cc:48
0xce8fa8 Rust::Session::compile_crate(char const*)
	../../gcc/rust/rust-session-manager.cc:692
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.

matthiaskrgr avatar Mar 30 '25 17:03 matthiaskrgr