View Issue Details

IDProjectCategoryView StatusLast Update
0035298FPCCompilerpublic2020-01-24 22:39
ReporterThaddy de KoningAssigned ToFlorian 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformallOSallOS Versionall
Product Version3.3.1Product Build41802 
Target VersionFixed in Version3.3.1 
Summary0035298: Internal error 200706094 on inc (or other addition)
DescriptionI got this internal error 200706094 during translating Rudy Velhuis's biginteger library.
The code should be legal, although it has the possibility to overflow.
Does not matter which syntax you use (+ or inc)
Steps To Reproduce{$MODE DELPHI}
{$RANGECHECKS OFF}
{$OVERFLOWCHECKS OFF}

function SplitMix64(var X: UInt64) : UInt64;
var
  Z: UInt64;
begin
  Inc(X, UInt64($9E3779B97F4A7C15));
  Z := (X xor (X shr 30)) * UInt64($BF58476D1CE4E5B9);
  Z := (Z xor (Z shr 27)) * UInt64($94D049BB133111EB);
  Result := Z xor (Z shr 31);
end;

begin
end.

TagsNo tags attached.
Fixed in Revision44031
FPCOldBugId
FPCTarget-
Attached Files

Activities

Ugochukwu Mmaduekwe

2019-03-30 11:51

reporter   ~0115120

@Thaddy, Although not a fix, below is a way to circumvent the issue (at least till it is fixed).

function SplitMix64(var X: UInt64): UInt64;
var
  Z, K: UInt64;
begin
  K := UInt64($9E3779B97F4A7C15); // assign the constant to a variable first
  Inc(X, K);
  Z := (X xor (X shr 30)) * UInt64($BF58476D1CE4E5B9);
  Z := (Z xor (Z shr 27)) * UInt64($94D049BB133111EB);
  Result := Z xor (Z shr 31);
end;

rd0x

2019-03-30 12:20

reporter   ~0115128

Might be related to the other issues for 200706094 which were already reported

Issue History

Date Modified Username Field Change
2019-03-30 10:41 Thaddy de Koning New Issue
2019-03-30 11:51 Ugochukwu Mmaduekwe Note Added: 0115120
2019-03-30 12:20 rd0x Note Added: 0115128
2020-01-24 22:39 Florian Assigned To => Florian
2020-01-24 22:39 Florian Status new => resolved
2020-01-24 22:39 Florian Resolution open => fixed
2020-01-24 22:39 Florian Fixed in Version => 3.3.1
2020-01-24 22:39 Florian Fixed in Revision => 44031
2020-01-24 22:39 Florian FPCTarget => -