* * *

Author Topic: Signal 291 compiler crash  (Read 1611 times)

Nitorami

  • Full Member
  • ***
  • Posts: 198
Signal 291 compiler crash
« on: February 03, 2016, 07:52:45 pm »
I am having a serious issue with the compiler FPC 3.0.0 which generates a signal 291 when I merely change the name of a variable in an otherwise rather old and stable code. By setting compiler verbosity to "all" I managed to locate the offending code line on which the compiler throws its last message "Error: Expression type must be class or record type, got (erroneous type)" before it dies. The correct reaction should be "Identifier not found". 

Not a regression, it's the same with FPC 2.6.4.

Unfortunately I did not manage to reproduce the fault with an extract of the code for inclusion in a bug report. It seems that the entire program of at least a substantial part of it is required to cause the crash. It is not a big program, maybe 1000 lines in total, but I doubt whether throwing the entire code at the dev team will be useful.

Any advice how to proceed ?



Nitorami

  • Full Member
  • ***
  • Posts: 198
Re: Signal 291 compiler crash
« Reply #1 on: February 03, 2016, 10:23:26 pm »
Could isolate it at last, it is related to optimisation loopunroll. Not sure whether loopunroll is fully supported yet, anyway, this tiny piece of code crashes the compiler. I will issue a bug report.

Code: Pascal  [Select]
  1. {$OPTIMIZATION LOOPUNROLL}
  2.  
  3. procedure SendState;
  4. var n: longint;
  5. begin
  6.   with Outputs[0] do begin
  7.     for n := 0 to pred(NumConns) do with OList[n] do begin end;
  8.   end;
  9. end;
  10.  

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus