Skip to content

LLVM assertion failure when calling insert on a std::map::Hashmap<(@str, T), T> #4092

Closed
@Dretch

Description

@Dretch

Given this code:

extern mod std;

fn main() {
    let x = std::map::HashMap();
    x.insert((@"abc", 0), 0);
}

rustc produces:

rustc: /home/gareth/projects/rust/src/llvm/lib/VMCore/Instructions.cpp:1062: void  llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.
Aborted (core dumped)

Metadata

Metadata

Assignees

Labels

A-codegenArea: Code generationI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions