Skip to content

ICE in visit, at rust/typecheck/rust-tyty-variance-analysis-private.h:165 #3583

@matthiaskrgr

Description

@matthiaskrgr

auto-reduced (treereduce-rust):

struct Test10 {
    a: _,

    b: (_, _),
}

original:

struct Test10 {
    a: _,
    //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
    b: (_, _),
}

fn main() {}

Version information:

34b0a68

Possibly related line of code:

ctx.add_constraints_from_ty (type.get_return_type (), variance);
}
void visit (ErrorType &type) override {}
void visit (PlaceholderType &type) override { rust_unreachable (); }
void visit (InferType &type) override { rust_unreachable (); }
void visit (DynamicObjectType &type) override
{
// TODO
}

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/typecheck/rust-tyty-variance-analysis-private.h:165
0x869e64 Rust::TyTy::VarianceAnalysis::VisitorBase<Rust::TyTy::VarianceAnalysis::Term>::visit(Rust::TyTy::InferType&)
	../../gcc/rust/typecheck/rust-tyty-variance-analysis-private.h:165
0xec3fc2 Rust::TyTy::VarianceAnalysis::GenericTyVisitorCtx::add_constraints_from_ty(Rust::TyTy::BaseType*, Rust::TyTy::VarianceAnalysis::Term)
	../../gcc/rust/typecheck/rust-tyty-variance-analysis.cc:400
0xec7789 Rust::TyTy::VarianceAnalysis::GenericTyVisitorCtx::process_type(Rust::TyTy::ADTType&)
	../../gcc/rust/typecheck/rust-tyty-variance-analysis.cc:250
0xec7789 Rust::TyTy::VarianceAnalysis::GenericTyPerCrateCtx::process_type(Rust::TyTy::ADTType&)
	../../gcc/rust/typecheck/rust-tyty-variance-analysis.cc:131
0xec7789 Rust::TyTy::VarianceAnalysis::CrateCtx::add_type_constraints(Rust::TyTy::ADTType&)
	../../gcc/rust/typecheck/rust-tyty-variance-analysis.cc:26
0xefb98c Rust::Resolver::TypeCheckItem::visit(Rust::HIR::StructStruct&)
	../../gcc/rust/typecheck/rust-hir-type-check-item.cc:331
0xeed5f7 Rust::Resolver::TypeCheckItem::Resolve(Rust::HIR::Item&)
	../../gcc/rust/typecheck/rust-hir-type-check-item.cc:59
0xe84f0b Rust::Resolver::TypeResolution::Resolve(Rust::HIR::Crate&)
	../../gcc/rust/typecheck/rust-hir-type-check.cc:75
0xc5c313 Rust::Session::compile_crate(char const*)
	../../gcc/rust/rust-session-manager.cc:685
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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions