Skip to content

Commit

Permalink
Opaque Pointers: codegen/inbounds.d (ldc-developers#4213)
Browse files Browse the repository at this point in the history
  • Loading branch information
thewilsonator authored Sep 23, 2022
1 parent cb8ba12 commit af61ba8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/codegen/inbounds.d
Original file line number Diff line number Diff line change
Expand Up @@ -65,27 +65,27 @@ float foo8(S s) {
// IndexExp in dynamic array with const exp
// CHECK-LABEL: @foo9
int foo9(int[] a) {
// CHECK: getelementptr inbounds i32, i32*
// CHECK: getelementptr inbounds i32, {{i32\*|ptr}}
return a[1];
}

// IndexExp in dynamic array with variable exp
// CHECK-LABEL: @foo10
int foo10(int[] a, int i) {
// CHECK: getelementptr inbounds i32, i32*
// CHECK: getelementptr inbounds i32, {{i32\*|ptr}}
return a[i];
}

// SliceExp for static array with const lower bound
// CHECK-LABEL: @foo11
int[] foo11(ref int[3] a) {
// CHECK: getelementptr inbounds i32, i32*
// CHECK: getelementptr inbounds i32, {{i32\*|ptr}}
return a[1 .. $];
}

// SliceExp for dynamic array with variable lower bound
// CHECK-LABEL: @foo12
int[] foo12(int[] a, int i) {
// CHECK: getelementptr inbounds i32, i32*
// CHECK: getelementptr inbounds i32, {{i32\*|ptr}}
return a[i .. $];
}

0 comments on commit af61ba8

Please sign in to comment.