From 323fc850b9c1d8c1c95ff2476d91347121ebacf7 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 16 Jan 2007 18:31:27 +0000 Subject: [PATCH] * fixed duplicate alias check git-svn-id: trunk@6003 - --- compiler/ncgutil.pas | 26 +++++++++++++------------- compiler/systems/t_linux.pas | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/compiler/ncgutil.pas b/compiler/ncgutil.pas index dcc960d624..3a542c731c 100644 --- a/compiler/ncgutil.pas +++ b/compiler/ncgutil.pas @@ -1919,20 +1919,20 @@ implementation procedure gen_proc_symbol(list:TAsmList); var - hs : string; + item : tstringlistitem; begin - repeat - hs:=current_procinfo.procdef.aliasnames.getfirst; - if hs='' then - break; - if (cs_profile in current_settings.moduleswitches) or - (po_global in current_procinfo.procdef.procoptions) then - list.concat(Tai_symbol.createname_global(hs,AT_FUNCTION,0)) - else - list.concat(Tai_symbol.createname(hs,AT_FUNCTION,0)); - if tf_use_function_relative_addresses in target_info.flags then - list.concat(Tai_function_name.create(hs)); - until false; + item := tstringlistitem(current_procinfo.procdef.aliasnames.first); + while assigned(item) do + begin + if (cs_profile in current_settings.moduleswitches) or + (po_global in current_procinfo.procdef.procoptions) then + list.concat(Tai_symbol.createname_global(item.str,AT_FUNCTION,0)) + else + list.concat(Tai_symbol.createname(item.str,AT_FUNCTION,0)); + if tf_use_function_relative_addresses in target_info.flags then + list.concat(Tai_function_name.create(item.str)); + item := tstringlistitem(item.next); + end; current_procinfo.procdef.procstarttai:=tai(list.last); end; diff --git a/compiler/systems/t_linux.pas b/compiler/systems/t_linux.pas index 4df4afce1a..be4d945cb5 100644 --- a/compiler/systems/t_linux.pas +++ b/compiler/systems/t_linux.pas @@ -164,7 +164,7 @@ begin { the manglednames can already be the same when the procedure is declared with cdecl } pd:=tprocdef(tprocsym(hp2.sym).ProcdefList[0]); - if has_alias_name(pd,hp2.name^) then + if not has_alias_name(pd,hp2.name^) then begin { place jump in al_procedures } current_asmdata.asmlists[al_procedures].concat(tai_align.create(target_info.alignment.procalign));