Prof A Olowofoyeku (The African Chief) wrote:
Trying to compile some object oriented code that compiles without problem under all previous versions of GPC (and Delphi, FreePascal and Virtual Pascal) produces this result:
"d:/src/gcc-3.2.2/gcc/p/objects.c:438:finish_object_type: failed assertion `method' cdialogs.pas:381: Internal compiler error. Please submit a full bug report to the GPC mailing list <gpc@gnu.de>. See <URL:http://www.gnu-pascal.de/todo.html> for details. gpc1.exe: gpc exited with status 1 gpc1.exe: gpc exited with status 1"
It is impossible to reduce the code that caused this to a small program
Never say impossible ... program Chief44; uses Chief44u; type TMemoStrings = abstract object (TStrings) end; begin WriteLn ('OK') end. unit Chief44u; interface type TStrings = abstract object procedure foo; abstract; end; implementation end. --- p/gpc-decl.c.orig Tue Mar 25 13:33:12 2003 +++ p/gpc-decl.c Wed Mar 26 08:48:09 2003 @@ -2696,12 +2696,9 @@ PASCAL_STRUCTOR_METHOD (d) = PASCAL_STRUCTOR_METHOD (heading); PASCAL_OPERATOR_FUNCTION (d) = PASCAL_OPERATOR_FUNCTION (heading); DECL_LANG_OPERATOR_DECL (d) = operator_decl; - if (context != 6) - { - handle_autoexport (name); - if (operator_decl) - handle_autoexport (DECL_NAME (operator_decl)); - } + handle_autoexport (name); + if (operator_decl) + handle_autoexport (DECL_NAME (operator_decl)); } return d;
There is no reason that I can see why this code should cause the compiler to crash - but perhaps something has changed in the OOP handling parts of the compiler ...
Well, many things have changed in (almost) all parts of the compiler ... ;-) Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707