Here is a very short program which now fails
with a value out of range error:
PROGRAM
dyn_arr_test(input,output);
TYPE
Dyn_arr2(
Max_index1, Max_index2 : INTEGER ) = ARRAY [1..Max_index1, 1..Max_index2] OF
single;
Ptr_to_dyn_arr2
= ^Dyn_arr2;
VAR
test2 :
Ptr_to_dyn_arr2;
BEGIN
new(test2, 181,
181);
writeln('This
works');
new(test2, 182,
182);
writeln('This
works');
new(test2, 183,
183);
writeln('This
fails');
dispose(test2);
END.
Turning off range-checking doesn't
seem to work!
$ gpc --no-range-checking
-o dyn_arr_test dyn_arr_test.pas
I'm aware there are problems in this
area. I hope this helps.
I'm using gpc-20050217 with gcc-3.4.2
under Fedora Core 3.
Regards
David Wood