Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2022-09

Internal error 2019022201 from function reference

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Hairy Pixels

This program gives internal compiler error 2019022201 (Free Pascal Compiler version 3.3.1 [2022/05/27] for aarch64). Something is wrong with the PPU. This is a very basic program using function references so it seems unlikely it could not be known. Any ideas?

============================

{$mode objfpc}
{$modeswitch functionreferences}
unit function_ref_error;
interface
type
  TCallback = record
    proc: reference to procedure;
  end;
implementation
end.

Regards,
Ryan Joseph

Reply by email

Sven Barth
to Hairy Pixels

Hairy Pixels via fpc-pascal schrieb am
Fr., 9. Sep. 2022, 18:05:

Show quoted text 5 lines
This program gives internal compiler error 2019022201 (Free Pascal Compiler version 3.3.1 [2022/05/27] for aarch64). Something is wrong with the PPU. This is a very basic program using function references so it seems unlikely it could not be known. Any ideas?

Why do you think it's not known if there is an internal error? Internal errors are precisely there to cover cases that should not be taken, but are then triggered by some code path that was not thought about. As a general rule: always report an internal error if it wasn't reported already. If it was then check whether you can maybe provide a better example to reproduce it.

Regards,
Sven

Reply by email

Hairy Pixels
to Sven Barth
Show quoted text 5 lines
On Sep 11, 2022, at 4:22 PM, Sven Barth wrote: Why do you think it's not known if there is an internal error? Internal errors are precisely there to cover cases that should not be taken, but are then triggered by some code path that was not thought about. As a general rule: always report an internal error if it wasn't reported already. If it was then check whether you can maybe provide a better example to reproduce it.

I see you fixed this already, thanks Sven!

Here’s another internal error I found. https://gitlab.com/freepascal.org/fpc/source/-/issues/39907. Is this fixable? It’s kind of substandard thing to redefine TObject but it’s related to units again so it may be systemic.

Regards,
Ryan Joseph

Reply by email