-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Description
Bugzilla Link | 1629 |
Resolution | FIXED |
Resolved on | Dec 12, 2007 20:10 |
Version | trunk |
OS | Linux |
Reporter | LLVM Bugzilla Contributor |
Extended Description
The following piece of code causes lli to crash when -force-interpreter is set.For Jit, it's okay.
class X {
unsigned v;
public:
X(int val) : v(val) {}
};
int main() {
static X a(0);
return 0;
}
Assertion info:
lli: /developer/home2/zsth/projects/commit/llvm/lib/Support/APInt.cpp:101: llvm::APInt::APInt(const llvm::APInt&): Assertion `BitWidth <= IntegerType::MAX_INT_BITS && "bitwidth too large"' failed.
The .ll file :
; ModuleID = ''
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
target triple = "i686-pc-linux-gnu"
%struct.X = type { i32 }
@_ZGVZ4mainE1a = internal global i64 0, align 8 ; <i64*> [#uses=3]
define i32 @main() {
entry:
%tmp2 = load i8* bitcast (i64* @_ZGVZ4mainE1a to i8*), align 8 ; [#uses=1]
%tmp3 = icmp eq i8 %tmp2, 0 ; [#uses=1]
br i1 %tmp3, label %cond_true, label %UnifiedReturnBlock
cond_true: ; preds = %entry
%tmp5 = tail call i32 @__cxa_guard_acquire( i64* @_ZGVZ4mainE1a ) ; [#uses=1]
%tmp6 = icmp eq i32 %tmp5, 0 ; [#uses=1]
br i1 %tmp6, label %UnifiedReturnBlock, label %cond_true10
cond_true10: ; preds = %cond_true
tail call void @__cxa_guard_release( i64* @_ZGVZ4mainE1a )
ret i32 0
UnifiedReturnBlock: ; preds = %cond_true, %entry
ret i32 0
}
declare i32 @__cxa_guard_acquire(i64*)
declare void @__cxa_guard_release(i64*)