gpc gets segfault

Miguel Lobo luislm at mundivia.es
Sun Dec 6 13:45:12 CET 1998


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.




More information about the Gpc mailing list