Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Compiler bug related to range checking: F2084 Internal Error: URW1028

155 views
Skip to first unread message

Skybuck Flying

unread,
Nov 19, 2007, 1:47:42 AM11/19/07
to
Hello,

I just investigated the difference between the Delphi 7 and Delphi 2007
Package source.

I noticed were a compile of settings which were different.

I have now discovered one setting which causes the bug to pop-up:

{$RANGECHECKS ON} <- causes the compiler bug.

{$RANGECHECKS OFF} <- fixes the compiler bug.

Strange ?!

package Test2;

{$R *.res}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO ON}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS ON}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS ON}
{$RANGECHECKS OFF}
{$REFERENCEINFO ON}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$IMPLICITBUILD OFF}

requires
rtl;

contains
unit_TabstractNumberCollection_version_005 in
'TabstractNumberCollection\version 0.05 restore the
design\unit_TabstractNumberCollection_version_005.pas',
Unit_TbitNumberCollection_version_004 in 'TBitNumberCollection\version
0.04 based on version 0.02 design
restored\Unit_TbitNumberCollection_version_004.pas',
unit_TscalableBitSet_version_007 in 'TscalableBitSet\version
0.07\unit_TscalableBitSet_version_007.pas';

end.

Bye,
Skybuck.


Skybuck Flying

unread,
Nov 19, 2007, 1:50:35 AM11/19/07
to
When I compile the same source code in Delphi 7 with range checking on
Delphi 7 shows the following error message:

[Fatal Error] Unit_TbitNumberCollection_version_004.pas(60): Internal error:
C1091

Cursor is positioned at this line in the source code:

mBits : Tbits; // simply use delegation

function GetSize : uint64; override;


function TbitNumberCollection.GetSize : uint64;
begin
result := mBits.Size;
end;

Bye,
Skybuck.


Skybuck Flying

unread,
Nov 19, 2007, 2:05:09 AM11/19/07
to
Hello,

Thanks to a typecast the compiler bug is solved.

Also thanks to Delphi 7 I finally found the source line which is probably
causing this bug.

Delphi 7 places the cursor at the problem line !

Delphi 2007 is just stupid and stares like a dumb cow ! TUTTUTUTUTUTUTUT.

{
function TbitNumberCollection.GetSize : uint64;
begin

result := mBits.Size;
end;
}

// typecast solves compiler bug with range checking on.
// thanks to Delphi 7 for placing the cursor at the problem line which
Delphi 2007 does not do !!! >(((((
function TbitNumberCollection.GetSize : uint64;
begin
result := uint64(mBits.Size);
end;

Bye,
Skybuck.


0 new messages