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

 

The Information contained in this E-Mail and any subsequent correspondence is private and is intended solely for the intended recipient(s).
For those other than the recipient any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on such information is prohibited and may be unlawful.
Emails and other electronic communication with QinetiQ may be monitored.  Calls to QinetiQ may be recorded for quality control, regulatory and monitoring purposes.