LEFT | RIGHT |
1 ; Access a valid continuous range of an array in a single reverse loop. | 1 ; Access a valid continuous range of an array in a single reverse loop. |
2 | 2 |
3 ; RUN: opt < %s -asan -S -asan-opt=1 | FileCheck %s -check-prefix=OPT1 | 3 ; RUN: opt < %s -asan -S -asan-opt=1 -asan-opt-known-bounds=1 | FileCheck %s -ch
eck-prefix=OPT1 |
4 ; RUN: opt < %s -asan -S -asan-opt=0 | FileCheck %s -check-prefix=OPT0 | 4 ; RUN: opt < %s -asan -S -asan-opt=0 | FileCheck %s -check-prefix=OPT0 |
5 | 5 |
6 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
2:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:6
4-S128" | 6 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
2:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:6
4-S128" |
7 target triple = "x86_64-unknown-linux-gnu" | 7 target triple = "x86_64-unknown-linux-gnu" |
8 | 8 |
9 @array = global [50 x i32] zeroinitializer, align 16 | 9 @array = global [50 x i32] zeroinitializer, align 16 |
10 | 10 |
11 define void @_Z7examplev() address_safety nounwind uwtable { | 11 define void @_Z7examplev() address_safety nounwind uwtable { |
12 entry: | 12 entry: |
13 br label %for.body | 13 br label %for.body |
(...skipping 21 matching lines...) Expand all Loading... |
35 ; OPT0: call void @__asan_report_ | 35 ; OPT0: call void @__asan_report_ |
36 ; OPT0-NOT: call void @__asan_report_ | 36 ; OPT0-NOT: call void @__asan_report_ |
37 ; OPT0: @asan.module_ctor | 37 ; OPT0: @asan.module_ctor |
38 | 38 |
39 ; C++-example: int array[50]; | 39 ; C++-example: int array[50]; |
40 ; C++-example: | 40 ; C++-example: |
41 ; C++-example: void example() { | 41 ; C++-example: void example() { |
42 ; C++-example: for(int i = 0; i < 50; ++i) | 42 ; C++-example: for(int i = 0; i < 50; ++i) |
43 ; C++-example: array[50 - i - 1] = i; | 43 ; C++-example: array[50 - i - 1] = i; |
44 ; C++-example: } | 44 ; C++-example: } |
LEFT | RIGHT |