aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runnable/generic_pointer_arithmetic.elna
blob: fe1e1974288f2cbebcee0a7ef0344fbd835cf77c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var
  base: [4]Int
  element: ^Int
  first: Pointer
  second: Pointer

program()
begin
  element := base.ptr;
  first := element;
  second := first + 1;
  assert(cast(second : Word) - cast(first : Word) = 1u);
  assert(second - 1 = first)
return 0u8

end.