Closed
Description
fn main() {
let x = &*~();
}
The issue is quite obvious from the IR of main:
define internal void @_ZN4main20h7189e541f51f5727eaa4v0.0E() unnamed_addr #4 {
entry-block:
%x = alloca {}*
%0 = call i8* @_ZN2rt11global_heap15exchange_malloc20hc8d73652038af38epaa4v0.0E(i64 0)
%1 = bitcast i8* %0 to {}*
store {}* %1, {}** %x
%2 = bitcast {}* %1 to i8*
call void @_ZN2rt11global_heap14exchange_free_20hbb0c3518bc13b1c2gca4v0.0E(i8* %2)
ret void
}