For gpc mailing list:
this email comes as a follow-up of this bug report
The start of the thread can be found at:
> >> How about adding this to the test suite?
> > The whole testsuite/gdb.pascal is almost empty,
> > I never invested time to develop it :(
> > At the time I started it, GPC (the GNU pascal compiler)
> > was still active, but development apparently
> > stopped since quite some time.
> > I am unable to install GPC, which means that I cannot test it.
> > Would a testsuite that supports only Free Pascal be acceptable?
> Do you actually mean, whether it's ok for a new
> test (not test suite) to go in untested on GPC? It certainly is.
> Better test on FPC than nowhere.
That is indeed what I meant.
> AFAICS, the tests themselves don't really care which compiler
> is in use other than for marking xfails; you just call
> and that works with either. That's my impression from quickly
> skimming testsuite/lib/pascal.exp.
The problem is that GPC and Free Pascal support several
pascal 'dialects'. But this requires command line options.
The -Mobjfpc option is required for Free Pascal compiler
to understand class type definition, but is rejected in default mode.
I expect GNU GPC to also reject class in 'normal' mode...
Maybe someone on the gpc mailing list knows if classes are supported
by GPC and if it requires a special compiler option.
FYI: Here is the example code that is included in the bug report.
$ cat ~/pas/test/test-class-pascal.pas
TA = class
x, y : integer;
function check(b : TA) : boolean;
destructor Done; virtual;
function TA.check (b : TA) : boolean;
check:=(x < b.x);
a, b : TA;
a.x := 67;
a.y := 33;