[fpc-devel] FPC trunk building lazarus trunk fails with compiler AV ?

2021-12-11 Thread Marco van de Voort via fpc-devel


FPC trunk building lazarus trunk fails with compiler AV ?

An old ghost seems to have resurfaced. I didn't build a development 
lazarus for a while (I used a stable one for work), but at least 1-2 
weeks I have this problem:



(3104) Compiling postscriptcanvas.pas
(3104) Compiling printers.pas
(3104) Compiling postscriptunicode.pas
c:\repo\lazarusgit\lcl\postscriptcanvas.pas(707,3) Warning: (6060) Case 
statement does not handle all possible cases
c:\repo\lazarusgit\lcl\postscriptcanvas.pas(722,30) Error: (1026) 
Compilation raised exception internally

Fatal: (1018) Compilation aborted
An unhandled exception occurred at $00499477:
EAccessViolation: Access violation
  $00499477  GET_ALIAS,  line 1214 of rgobj.pas
  $0049C655  INSTR_SPILL_REGISTER,  line 2834 of rgobj.pas
  $0049BDE3  SPILL_REGISTERS,  line 2572 of rgobj.pas
  $004987DF  DO_REGISTER_ALLOCATION,  line 659 of rgobj.pas
  $0048935A  DO_REGISTER_ALLOCATION,  line 903 of cgobj.pas
  $004E2659  GENERATE_CODE_TREE,  line 1616 of psub.pas
  $004E450B  READ_PROC,  line 2840 of psub.pas
  $004E49F9  READ_DECLARATIONS,  line 3072 of psub.pas
  $0043D00A  COMPILE,  line 402 of parser.pas
  $004D44AE  LOADPPU,  line 2276 of fppu.pas
  $005AF153  LOADUNITS,  line 523 of pmodules.pas
  $005AFFA8  PROC_UNIT,  line 983 of pmodules.pas
  $0043D00A  COMPILE,  line 402 of parser.pas
  $00418526  COMPILE,  line 288 of compiler.pas

Compiler AVs in postscript* units have happened before afaik.

Any pointers?

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Error: Internal error 200602035

2021-12-11 Thread Martin Frb via fpc-devel

I just got: fpdebugdebugger.pas(4322,1) Error: Internal error 200602035
Even on a clean build.
(fpc 3.2.3, updated yesterday)

I am not able to create a small example, but I saved the state of my 
lazarus dir to

https://gitlab.com/martin_frb/lazarus/-/commits/fpc-err-internal-200602035
I hope this will reproduce.

In case it matters
-gh -g -gw3 -godwarfsets  -gl   -dCR   -Ct -Co -Cr -Ci  -gt   -Si- -Sa
-dXe  -Se15  -ve -vw -vn  -vi
  -O-  -CX  -WC

Compiling the package fpdebug with the above details/commit should 
result in the error.


the error is caused by / line 426
    procedure DoProcessMessages; inline;

remove the inline and all is fine.

It may be noteworthy to mention line 4139
  ProcessMessagesProc := @DoProcessMessages;

The variable is in another unit.
var
  ProcessMessagesProc: procedure of object;



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Bug? "overload" between class.method and plain procedure ?

2021-12-11 Thread Martin Frb via fpc-devel

Should overload work for the following?
Upon seeing the method being overloaded, if (in the class hierarchy) no 
method  with matching signature is found, should procedures outside the 
class be searched?
> project1.lpr(19,8) Error: Incompatible type for arg no. 1: Got 
"ShortInt", expected "Boolean"


In the below example, I could write "project1.Foo(1); ". But if I had 
various "Foo" in various included units, then it would be inconvenient 
to always have to find the correct unit myself.


The doc https://www.freepascal.org/docs-html/ref/refsu86.html does not 
contain any references to classes. It only refers to cross unit.



program Project1;
{$mode objfpc}{$H+}

procedure Foo(a: integer); forward; overload;

type
  TBar = class
  public
    procedure Foo(a: boolean); overload;
    procedure Bar;
  end;

procedure TBar.Foo(a: boolean);
begin
end;

procedure TBar.Bar;
begin
  Foo(1); //project1.lpr(19,8) Error: Incompatible type for arg no. 1: 
Got "ShortInt", expected "Boolean"

end;

procedure Foo(a: integer);
begin
end;

begin
end.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel