diff -p -r -U3 -N -X /home/gpc/p/script/gpcdiff.exclude orig/p/objects.c p/objects.c --- orig/p/objects.c Fri Mar 1 00:25:25 2002 +++ p/objects.c Fri Mar 8 22:22:19 2002 @@ -110,9 +110,13 @@ call_method (cref, args) /* @@@ Here a runtime check can be added: does the VMT field of the object TREE_OPERAND (cref, 0) really point to a VMT? */ if (vmt_field) - method = simple_get_field (DECL_NAME (fun), - TREE_TYPE (TREE_TYPE (vmt_field)), - "Internal GPC error: virtual method `%s' not in VMT"); + { + char *name = concat ("method_", IDENTIFIER_POINTER (DECL_NAME (fun)), NULL); + method = simple_get_field (get_identifier (name), + TREE_TYPE (TREE_TYPE (vmt_field)), + "Internal GPC error: virtual method `%s' not in VMT"); + free (name); + } if (method) { tree type_save = TREE_TYPE (fun); @@ -450,11 +454,15 @@ construct_vmt (dest, abstract) for (field = TYPE_FIELDS (dest); field; field = TREE_CHAIN (field)) if (TREE_CODE (field) == FUNCTION_DECL && PASCAL_VIRTUAL_METHOD (field)) - /* The real type of this pointer is not needed for type checking - because it already is in the field of the object. Repeating it - here would only cause confusion in GPI files if the method has - a prediscriminated parameter. So use just ptr_type_node. */ - vmt_entry = chainon (vmt_entry, DO_FIELD_ID (DECL_NAME (field), ptr_type_node)); + { + /* The real type of this pointer is not needed for type checking + because it already is in the field of the object. Repeating it + here would only cause confusion in GPI files if the method has + a prediscriminated parameter. So use just ptr_type_node. */ + char *name = concat ("method_", IDENTIFIER_POINTER (DECL_NAME (field)), NULL); + vmt_entry = chainon (vmt_entry, DO_FIELD (name, ptr_type_node)); + free (name); + } vmt_type = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), vmt_entry, NULL_TREE); /* Build an initializer for the VMT record: Size */ diff -p -r -U3 -N -X /home/gpc/p/script/gpcdiff.exclude orig/p/rts/rts-version p/rts/rts-version --- orig/p/rts/rts-version Wed Mar 6 05:12:06 2002 +++ p/rts/rts-version Fri Mar 8 22:23:42 2002 @@ -1 +1 @@ -20020304 +20020308 diff -p -r -U3 -N -X /home/gpc/p/script/gpcdiff.exclude orig/p/test/maur9.pas p/test/maur9.pas --- orig/p/test/maur9.pas Thu Jan 1 01:00:00 1970 +++ p/test/maur9.pas Fri Mar 8 22:11:37 2002 @@ -0,0 +1,24 @@ +program TestSize; + +type tR = object + constructor init; + function Size: integer; virtual; + destructor fini; + end; + +constructor tR.init; +begin +end; + +function tR.Size: integer; +begin + Size := 1 +end; + +destructor tR.fini; +begin +end; + +begin + WriteLn ('OK') +end. diff -p -r -U3 -N -X /home/gpc/p/script/gpcdiff.exclude orig/p/version.h p/version.h --- orig/p/version.h Wed Mar 6 05:12:06 2002 +++ p/version.h Fri Mar 8 22:23:41 2002 @@ -3,4 +3,4 @@ #define GPC_MAJOR "2" #define GPC_MINOR "0" -#define GPC_VERSION_STRING "20020304" +#define GPC_VERSION_STRING "20020308"