I have recently downloaded GPC and tried to convert some of my Borland Pascal 7.0 files to compile with it. One of them stopped compiling with a segfault. After a while I managed to make a small source file which reproduces the bug:
unit bug
interface type o = object procedure f1(s: string(255)); end;
var a: integer;
implementation
procedure f2; begin end;
procedure f1(s: string(255)); begin end;
Later I realized that maybe I shouldn't be using string(255) as a parameter's type, and when I defined string255 = string(255) and used string255 as the type for 's', it worked fine. Anyway, I think that it can be still called a bug since gpc stops with a "Internal compiler error". GPC's output when I try to compile that file is:
parse error before '(' missing semicolon parse error before 'Implementation' gpc: Internal compiler error: program gpc1 got fatal signal 11.
I am using Kernel 2.0.35, glibc-2.0.7, and gcc 2.7.2-3.
Keep up the good work.
Hi!
Miguel Lobo wrote:
I have recently downloaded GPC
(Hopefully the most recent version gpc-19980830 from ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/beta/?)
and tried to convert some of my Borland Pascal 7.0 files to compile with it. One of them stopped compiling with a segfault. After a while I managed to make a small source file which reproduces the bug:
unit bug
^ missing `;'
interface type o = object procedure f1(s: string(255));
^ I get a "parse error" here.
end;
var a: integer;
implementation
procedure f2; begin end;
procedure f1(s: string(255)); begin end;
You know that this `f1' is *not* a method of `o'?
Later I realized that maybe I shouldn't be using string(255) as a parameter's type, [...]
Indeed. BTW, BP does not support `string[255]' in parameter lists either.
Anyway, I think that it can be still called a bug since gpc stops with a "Internal compiler error".
Indeed. Thanks for reporting it!
GPC's output when I try to compile that file is:
parse error before '(' missing semicolon parse error before 'Implementation' gpc: Internal compiler error: program gpc1 got fatal signal 11.
I get the same without the "Internal compiler error". This means that the bug will be fixed in the next release. (-:
Keep up the good work.
Thanks! (-: Currently just trying to do so ...)
Peter