Skip to content

Commit

Permalink
Fix ICE stemming from use of unique pointers in unreachable blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed Oct 21, 2012
1 parent 191d162 commit 7c79801
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/rustc/middle/trans/base.rs
Expand Up @@ -267,7 +267,7 @@ fn malloc_raw_dyn(bcx: block, t: ty::t, heap: heap,
fn non_gc_box_cast(bcx: block, val: ValueRef) -> ValueRef {
debug!("non_gc_box_cast");
add_comment(bcx, ~"non_gc_box_cast");
assert(llvm::LLVMGetPointerAddressSpace(val_ty(val)) == gc_box_addrspace);
assert(llvm::LLVMGetPointerAddressSpace(val_ty(val)) == gc_box_addrspace || bcx.unreachable);
let non_gc_t = T_ptr(llvm::LLVMGetElementType(val_ty(val)));
PointerCast(bcx, val, non_gc_t)
}
Expand Down
5 changes: 5 additions & 0 deletions src/test/run-fail/doublefail.rs
@@ -0,0 +1,5 @@
//error-pattern:One
fn main() {
fail ~"One";
fail ~"Two";
}

0 comments on commit 7c79801

Please sign in to comment.