Lazarus

Free Pascal => General => Topic started by: Turbonobo on May 26, 2014, 05:23:41 pm

Title: Fatal: Internal error 200410231 using -O2 or -O3 option
Post by: Turbonobo on May 26, 2014, 05:23:41 pm
I was trying the lazarus example
(Numerics055.zip\Demos\Lazarus\PiBench\PiBench.lpr)
 for this library:
http://sergworks.wordpress.com/2013/12/20/numerics-0-55-released/ (http://sergworks.wordpress.com/2013/12/20/numerics-0-55-released/)

Everything worked fine and it ran perfectly.  :)
But if I set the optimisation level project settings to -O2 or -O3 FPC refuses to compile the example
and gives me this error:

Code: [Select]
...\Numerics055\Source\Pascal\Numerics.pas(1085,1) Fatal: Internal error 200410231
 :(

This is where the error happens in the Numerics.pas file:
Code: [Select]
class function BigCardinal.DivRem(const Dividend: BigCardinal;
               Divisor: Cardinal; var Remainder: Cardinal): BigCardinal;
begin
  HResCheck(Dividend.FNumber.DivRemLimbU(Divisor, Result.FNumber, Remainder));
end;

class function BigCardinal.DivRem(const Dividend: Cardinal;
               Divisor: BigCardinal; var Remainder: Cardinal): Cardinal;
begin {error on this line}
  HResCheck(Divisor.FNumber.DivRemLimbU2(Dividend, Result, Remainder));
end;

class operator BigCardinal.IntDivide(const A: BigCardinal; const B: Cardinal): BigCardinal;
var
  Remainder: Cardinal;

begin
  HResCheck(A.FNumber.DivRemLimbU(B, Result.FNumber, Remainder));
end;
 

This file is part of the library itself, not the example.

What might cause this error? is there a way to solve this besides not using level 2 or 3 optimisations?

I am using 32-bit lazarus 1.2.2 and FPC 2.6.4 on 64-bit Windows 7
Title: Re: Fatal: Internal error 200410231 using -O2 or -O3 option
Post by: Leledumbo on May 26, 2014, 05:55:30 pm
Quote
What might cause this error?
Bug in the compiler
Quote
is there a way to solve this besides not using level 2 or 3 optimisations?
Figure out what triggers the error, and change the code to something equivalent but different syntactically. Or check bugtracker whether the bug has been reported and fixed, if yes then use fixes version of the compiler. Otherwise, report and wait for the fix, or fix the bug yourself.
Title: Re: Fatal: Internal error 200410231 using -O2 or -O3 option
Post by: Turbonobo on May 26, 2014, 07:29:35 pm
I reported the bug on the bugtracker.

Just curious, how can the errornumber give the debuggers a clue what the cause could be?
The wiki page http://wiki.freepascal.org/Lazarus_Faq
mentions 'Fatal: Internal error XXXXYYZZW'
what is the meaning of X, Y ,Z and W ?
Title: Re: Fatal: Internal error 200410231 using -O2 or -O3 option
Post by: BigChimp on May 26, 2014, 07:34:21 pm
It looks to me as a date in ISO8601 notation followed by a serial number.
Title: Re: Fatal: Internal error 200410231 using -O2 or -O3 option
Post by: BigChimp on May 26, 2014, 07:38:56 pm
Just curious, how can the errornumber give the debuggers a clue what the cause could be?
Try searching for that number inside the fpc source code using e.g. grep ;)
Title: Re: Fatal: Internal error 200410231 using -O2 or -O3 option
Post by: Leledumbo on May 27, 2014, 03:09:23 am
Quote
Just curious, how can the errornumber give the debuggers a clue what the cause could be?
That number is put on code branches that should NEVER execute.
TinyPortal © 2005-2018