Hello,
I found the following bug in the Beta version of GPC.
Best regards,
Peter Dietrich
--------------------
GPC-Version (gpc -v):
Reading specs from C:\usr\local\lib\gcc-lib\i386-mingw32\2.8.1\specs
gpc version 19990118, based on gcc-2.8.1
System-Version:
Windows NT 4.0 on i386
Problem description:
Variant records with tag fields cannot be initialized. The following
program is not accepted by the compiler:
program test (output);
type t = record
f1 : integer;
case tag : integer of
0: (i : integer);
1: (r : real);
end;
var r : t value (1, 1, 3.14);
begin
writeln (r.f1, r.tag, r.r);
end.
The error message is:
test3.pas:10: incompatible types in initialization
test3.pas:10: initial value is of wrong type
If I omit the 3.14 compilation succeeds but only f1 and tag are
initialized.