View Issue Details

IDProjectCategoryView StatusLast Update
0038069FPCCompilerpublic2020-11-15 15:16
ReporterNitorami Assigned ToFlorian  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformPCOSWin 10 
Product Version3.2.0 
Fixed in Version3.2.1 
Summary0038069: Internal Error 200604201
DescriptionThe textmode IDE using FPC 3.2.0 throws internal error 200604201 on compilation of the attached program. After that, the IDE remains in a dysfunct state. All further attempts to compile anything terminate with internal error 200309201.

The issue is clearly related to setting {FPUTYPE SSE2} locally in the unit, while not in the main program.

Steps To ReproduceJust compile.
Optimisation REGVAR must be on, and FPUTYPE SSE2 shall only be defined in the unit, not the main program.
No other settings seem to matter.
Additional InformationThis seems to be related to issue 0023340
TagsNo tags attached.
Fixed in Revision47422
FPCOldBugId
FPCTarget-
Attached Files

Activities

Nitorami

2020-11-12 14:08

reporter  

unitx.pas (2,156 bytes)   
{$mode objfpc}
{$modeswitch advancedrecords}
{$FPUTYPE SSE2}

unit unitx;
INTERFACE
uses sysutils;
type  float  = double; //#zentral definieren
      complex = record
        public
          re, im: float;
          class operator * (const a, b: complex): complex; inline;
          class operator * (const a: complex; const x:float): complex; inline;
          class operator * (const x: float; const a: complex): complex; inline;

          class operator := (const x: float): complex;     inline;
          class operator  = (const a,b: complex): boolean; inline;
          class operator  - (const a: complex): complex;   inline;
        end;


procedure mul (const a,b: complex; var c: complex); inline; overload;
procedure mul (const a: complex; const b: float; var c: complex); inline; overload;
procedure mul (const a: float; const b: complex; var c: complex); inline; overload;


IMPLEMENTATION


procedure mul (const a,b: complex; var c: complex);
begin
  c.re := a.re*b.re - a.im*b.im;
  c.im := a.re*b.im + a.im*b.re;
end;

procedure mul (const a: complex; const b: float; var c: complex);
begin
  c.re := a.re*b;
  c.im := a.im*b;
end;


procedure mul (const a: float; const b: complex; var c: complex);
begin
  mul (b,a,c);
end;

function pow (x,y: float): float;
begin
  result := exp (y*ln(x));
end;


function ToComplex (a,b: float): complex;
begin
  result.re := a;
  result.im := b;
end;

//Operatoren complex-complex
class operator complex.* (const a,b: complex): complex;
begin
  mul (a,b,result);
end;

class operator complex.* (const x: float; const a: complex): complex;
begin
  mul (a,x,result);
end;

class operator complex.* (const a: complex; const x:float): complex;
begin
  mul (a,x,result);
end;

class operator complex.:= (const x: float): complex;
begin
  result.re := x;
  result.im := 0;
end;

class operator complex.= (const a,b: complex): boolean;
begin
  result := (a.re=b.re) and (a.im=b.im);
end;

class operator complex.- (const a: complex): complex;
begin
  result.re := -a.re;
  result.im := -a.im;
end;


begin
end.
unitx.pas (2,156 bytes)   
IntError200604201.pas (211 bytes)   
{$mode objfpc}
{$OPTIMIZATION REGVAR}
{.$FPUTYPE SSE2}  //uncommenting this resolves the problem

uses unitx;

var z: complex;
    n: integer;
begin
  z := z*n;  //internal error 200604201
end.



IntError200604201.pas (211 bytes)   

Issue History

Date Modified Username Field Change
2020-11-12 14:08 Nitorami New Issue
2020-11-12 14:08 Nitorami File Added: unitx.pas
2020-11-12 14:08 Nitorami File Added: IntError200604201.pas
2020-11-15 15:16 Florian Assigned To => Florian
2020-11-15 15:16 Florian Status new => resolved
2020-11-15 15:16 Florian Resolution open => fixed
2020-11-15 15:16 Florian Fixed in Version => 3.2.1
2020-11-15 15:16 Florian Fixed in Revision => 47422
2020-11-15 15:16 Florian FPCTarget => -