diff options
Diffstat (limited to 'test/Other/lint.ll')
-rw-r--r-- | test/Other/lint.ll | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/Other/lint.ll b/test/Other/lint.ll index 78bbbe9..20d7ff9 100644 --- a/test/Other/lint.ll +++ b/test/Other/lint.ll @@ -19,11 +19,11 @@ define i32 @foo() noreturn { ; CHECK: Null pointer dereference store i32 0, i32* null ; CHECK: Null pointer dereference - %t = load i32* null + %t = load i32, i32* null ; CHECK: Undef pointer dereference store i32 0, i32* undef ; CHECK: Undef pointer dereference - %u = load i32* undef + %u = load i32, i32* undef ; CHECK: All-ones pointer dereference store i32 0, i32* inttoptr (i64 -1 to i32*) ; CHECK: Address one pointer dereference @@ -31,7 +31,7 @@ define i32 @foo() noreturn { ; CHECK: Memory reference address is misaligned store i8 0, i8* %buf, align 2 ; CHECK: Memory reference address is misaligned - %gep = getelementptr {i8, i8}* %buf2, i32 0, i32 1 + %gep = getelementptr {i8, i8}, {i8, i8}* %buf2, i32 0, i32 1 store i8 0, i8* %gep, align 2 ; CHECK: Division by zero %sd = sdiv i32 2, 0 @@ -61,7 +61,7 @@ define i32 @foo() noreturn { ; CHECK: Write to text section store i32 8, i32* bitcast (i32()* @foo to i32*) ; CHECK: Load from block address - %lb = load i32* bitcast (i8* blockaddress(@foo, %next) to i32*) + %lb = load i32, i32* bitcast (i8* blockaddress(@foo, %next) to i32*) ; CHECK: Call to block address call void()* bitcast (i8* blockaddress(@foo, %next) to void()*)() ; CHECK: Undefined behavior: Null pointer dereference @@ -84,11 +84,11 @@ define i32 @foo() noreturn { %wider = bitcast i8* %buf to i16* store i16 0, i16* %wider ; CHECK: Undefined behavior: Buffer overflow - %inner = getelementptr {i8, i8}* %buf2, i32 0, i32 1 + %inner = getelementptr {i8, i8}, {i8, i8}* %buf2, i32 0, i32 1 %wider2 = bitcast i8* %inner to i16* store i16 0, i16* %wider2 ; CHECK: Undefined behavior: Buffer overflow - %before = getelementptr i8* %buf, i32 -1 + %before = getelementptr i8, i8* %buf, i32 -1 %wider3 = bitcast i8* %before to i16* store i16 0, i16* %wider3 @@ -140,7 +140,7 @@ define void @use_tail(i8* %valist) { ; CHECK: Unusual: Returning alloca value define i8* @return_local(i32 %n, i32 %m) { %t = alloca i8, i32 %n - %s = getelementptr i8* %t, i32 %m + %s = getelementptr i8, i8* %t, i32 %m ret i8* %s } @@ -152,7 +152,7 @@ entry: store i32* %x, i32** %retval br label %next next: - %t0 = load i32** %retval + %t0 = load i32*, i32** %retval %t1 = insertvalue { i32, i32, i32* } zeroinitializer, i32* %t0, 2 %t2 = extractvalue { i32, i32, i32* } %t1, 2 br label %exit @@ -172,7 +172,7 @@ entry: exit: %t3 = phi i32* [ %t4, %exit ] %t4 = bitcast i32* %t3 to i32* - %x = load volatile i32* %t3 + %x = load volatile i32, i32* %t3 br label %exit } |