Closed
Description
Testcase:
fn main() {
unsafe {
static BLOCK_UNSAFE_SAFE_PTR: &'static int = &*(0xdeadbeef as *int);
}
}
Output:
rustc: /build/rust-git/src/rust/src/llvm/include/llvm/Support/Casting.h:237: typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X = llvm::GlobalVariable; Y = llvm::Value; typename llvm::cast_retty<X, Y*>::ret_type = llvm::GlobalVariable*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
fish: Job 1, “rustc bug_generic_static_function_ptr.rs ” terminated by signal SIGABRT (Abort)