Closed
Description
The following sample crashed rustc:
fn main() {
return;
while io::stdin().read_line() != ~"quit" { };
}
Removing the return;
, or unwrapping the while
(leaving only io::stdin().read_line() != ~"quit";
), or replacing the predicate (leaving while 2 != 3 { };
), solves the crash.
Reproduced on Windows 64-bit, Fedora 32-bit, Ubuntu 64-bit.
Full crash log (thanks to dbaupp
) @ https://gist.github.com/dbaupp/5318920
Short crash message:
rustc: /home/huon/rust/src/llvm/include/llvm/Support/Casting.h:197:
typename llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&)
[with X = llvm::SequentialType; Y = llvm::Type*;
typename llvm::cast_retty<To, From>::ret_type = llvm::SequentialType*]:
Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.