tw2053.pp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. { %FAIL }
  2. { Source provided for Free Pascal Bug Report 2053 }
  3. { Submitted by "Luis Castedo" on 2002-07-24 }
  4. { e-mail: [email protected] }
  5. program tb2;
  6. {$MODE TP}
  7. {$C+}
  8. type
  9. TMyRecord = record
  10. mr_sglDummy1: array[0..3] of Single;
  11. mr_lDummy2 : Longint;
  12. mr_iDummy3 : Integer;
  13. mr_iDummy4 : Integer;
  14. end;
  15. { TMyRecordArray = array[Integer] of TMyRecord;} { Error }
  16. TMyRecordArray = array[Longint] of TMyRecord; { OK }
  17. PMyRecordArray = ^TMyRecordArray;
  18. var
  19. pArray: PMyRecordArray;
  20. begin
  21. GetMem(pArray, 50 * SizeOf(TMyRecord));
  22. Assert(Assigned(pArray));
  23. WriteLn('pArray = ', Longint(pArray));
  24. WriteLn('@(pArray^[0]) = ', Longint(@(pArray^[0])));
  25. pArray^[0].mr_lDummy2 := 0;
  26. FreeMem(pArray, 50 * SizeOf(TMyRecord));
  27. end.
  28. {
  29. $Log$
  30. Revision 1.4 2002-10-15 15:48:25 carl
  31. - remove Pierre's diff.
  32. Revision 1.3 2002/10/15 06:38:29 pierre
  33. * really try to allocate more than 2Gb
  34. Revision 1.2 2002/10/09 16:56:46 carl
  35. * some cpu specific tests not run under other CPU's
  36. Revision 1.1 2002/09/27 21:09:56 carl
  37. + new bug report
  38. }