diff options
Diffstat (limited to 'compiler/aasmdata.pas')
-rw-r--r-- | compiler/aasmdata.pas | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/compiler/aasmdata.pas b/compiler/aasmdata.pas index b81272c957..001b66009a 100644 --- a/compiler/aasmdata.pas +++ b/compiler/aasmdata.pas @@ -122,8 +122,6 @@ interface type TAsmList = class(tlinkedlist) constructor create; - constructor create_without_marker; - function empty : boolean; function getlasttaifilepos : pfileposinfo; end; @@ -284,20 +282,6 @@ implementation constructor TAsmList.create; begin inherited create; - { make sure the optimizer won't remove the first tai of this list} - insert(tai_marker.create(mark_BlockStart)); - end; - - constructor TAsmList.create_without_marker; - begin - inherited create; - end; - - function TAsmList.empty : boolean; - begin - { there is always a mark_BlockStart available, - see TAsmList.create } - result:=(count<=1); end; @@ -422,6 +406,21 @@ implementation internalerror(200603261); end; hp.typ:=_typ; + { Changing bind from AB_GLOBAL to AB_LOCAL is wrong + if bind is already AB_GLOBAL or AB_EXTERNAL, + GOT might have been used, so change might be harmful. } + if (_bind<>hp.bind) and (hp.getrefs>0) then + begin +{$ifdef extdebug} + { the changes that matter must become internalerrors, the rest + should be ignored; a used cannot change anything about this, + so printing a warning/hint is not useful } + if (_bind=AB_LOCAL) then + Message3(asmw_w_changing_bind_type,s,asmsymbindname[hp.bind],asmsymbindname[_bind]) + else + Message3(asmw_h_changing_bind_type,s,asmsymbindname[hp.bind],asmsymbindname[_bind]); +{$endif extdebug} + end; hp.bind:=_bind; end else |