Sign in Join

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

Mailing lists / fpc-devel / 2001-03

Some compiler problems?

2 messages · 1 person · –

Reply by email Subscribe to this list Your subscription

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

Aleksey V. Vaneev

Hello,

Dunno what I'm doing wrong, but my program in some situations reports "Internal error."

The program itself is relatively complex, so I will not send any source.

  But I've found a routine that causes the error. It is a nested
  procedure in a class method and when I do something s := '$' +
  mystr; where s is an AnsiString variable, it reports error I'm
  talking about.
  I also reported a bug (exit(var)). Can you check it out? Maybe its
  roots are like those of "Internal error"'s?

Best regards,
Aleksey

Reply by email

Aleksey V. Vaneev

Hello,

But I've found a routine that causes the error. It is a nested procedure in a class method and when I do something s := '$' + mystr; where s is an AnsiString variable, it reports error I'm talking about.

I've found why this bug is occuring..

Consider, please, this example:

----
procedure TObj.Proc1 (p1, p2: DWord);
var
  sss: AnsiString;
  procedure checkParam (p: DWord); inline;
  begin
    if (p > 20) then
      halt;
  end;
  procedure setupParams;
  var
     s: AnsiString;
  begin
    checkParam (p1);
    s := '$' + sss;
  end;
begin
  sss := '12345';
  setupParams;
end;
----

Problem was solved by removing inline; statement. This example is not exactly what I have, but very similar.

Best regards,
Aleksey

Reply by email