Closed
Description
When compiling this program (cut down as much as possible to isolate the failure) with rust-0.9:
#[deriving(Clone)]
enum Noun
{
Atom(int),
Cell(~Noun, ~Noun)
}
fn fas(n: &Noun) -> Noun
{
match n
{
&Cell(~Atom(2), ~Cell(ref a, _)) => (**a).clone(),
_ => fail!("Invalid fas pattern")
}
}
fn main() {
fas(&Cell(~Atom(1), ~Atom(2)));
}
I get the following failure:
rustc: /home/martin/rust-0.9/src/llvm/include/llvm/IR/Instructions.h:702: llvm::Type* llvm::checkGEPType(llvm::Type*): Assertion `Ty && "Invalid GetElementPtrInst indices for type!"' failed.
Aborted (core dumped)