[ooc-compiler] segfault by a call of virtual method of parametric type
Brought to you by:
mva
|
From: vedmed <ve...@in...> - 2003-10-06 04:53:04
|
MODULE TestVed0001;
IMPORT
Out,
Object;
TYPE
Bet(E: Object.Object) = POINTER TO BetDesc(E);
BetDesc(E: Object.Object) = RECORD (Object.ObjectDesc)
END;
Gam(E: Object.Object) = POINTER TO GamDesc(E);
GamDesc(E: Object.Object) = RECORD (BetDesc(E))
END;
PROCEDURE (self: Bet(E)) Dummy*();
BEGIN
Out.String("bet.dummy");
Out.Ln;
END Dummy;
PROCEDURE (self: Gam(E)) Dummy*();
BEGIN
Out.String("gam.dummy");
Out.Ln;
END Dummy;
PROCEDURE DoTest();
VAR
b: Bet(Object.Object);
BEGIN
b := NEW(Gam(Object.Object));
Out.String("after new");
Out.Ln;
b.Dummy;
Out.String("all right");
Out.Ln;
END DoTest;
BEGIN
DoTest;
END TestVed0001.
"Segmentation fault" when executed b.Dummy
system: ASPLinux 9 (RedHat 9 clone)
oo2c: 2.0.13
gc: 6.2
libtool: 1.4.3
gcc:
Reading specs from /usr/lib/gcc-lib/i386-asplinux-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-asplinux-linux
Thread model: posix
gcc version 3.2.2 20030222 (ASPLinux 3.2.2-5asp)
|