From 9ef4a35a7b1a0060a19229041bf328043166cf31 Mon Sep 17 00:00:00 2001 From: svenbarth Date: Sat, 15 Dec 2012 21:43:52 +0000 Subject: [PATCH] Fix the fix for Mantis #21538. The check never really worked up to now... defcmp.pas, compare_defs_ext: use "equal_defs" instead of a reference comparison to check whether the type defs are equal pgenutil.pas, insert_generic_parameter_types: * add to each (specialized) generic parameter the "sp_generic_para" flag so that it will be added to the "genericparas" list upon ppu loading * add the generic parameter to the genericparas list as well, so that the comparison in "compare_defs_ext" is triggered at all... (up to now the list was always empty -.-) ppu.pas: * increase PPU version git-svn-id: trunk@23149 - --- compiler/defcmp.pas | 7 ++++++- compiler/pgenutil.pas | 2 ++ compiler/ppu.pas | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/compiler/defcmp.pas b/compiler/defcmp.pas index 2391bd8305..9306ba04d5 100644 --- a/compiler/defcmp.pas +++ b/compiler/defcmp.pas @@ -206,6 +206,7 @@ implementation hpd : tprocdef; i : longint; diff : boolean; + symfrom,symto : tsym; begin eq:=te_incompatible; doconv:=tc_not_possible; @@ -277,7 +278,11 @@ implementation begin if tstoreddef(def_from).genericparas.nameofindex(i)<>tstoreddef(def_to).genericparas.nameofindex(i) then internalerror(2012091302); - if tstoreddef(def_from).genericparas[i]<>tstoreddef(def_to).genericparas[i] then + symfrom:=ttypesym(tstoreddef(def_from).genericparas[i]); + symto:=ttypesym(tstoreddef(def_to).genericparas[i]); + if not (symfrom.typ=typesym) or not (symto.typ=typesym) then + internalerror(2012121401); + if not equal_defs(ttypesym(symfrom).typedef,ttypesym(symto).typedef) then diff:=true; if diff then break; diff --git a/compiler/pgenutil.pas b/compiler/pgenutil.pas index 09d27e1bd8..1b41f3fb0e 100644 --- a/compiler/pgenutil.pas +++ b/compiler/pgenutil.pas @@ -662,6 +662,8 @@ uses else include(def.defoptions,df_specialization); st.insert(generictype); + include(generictype.symoptions,sp_generic_para); + def.genericparas.add(generictype.name,generictype); end; end; diff --git a/compiler/ppu.pas b/compiler/ppu.pas index d09f18a4bc..e11289967e 100644 --- a/compiler/ppu.pas +++ b/compiler/ppu.pas @@ -43,7 +43,7 @@ type {$endif Test_Double_checksum} const - CurrentPPUVersion = 155; + CurrentPPUVersion = 156; { buffer sizes } maxentrysize = 1024;