summaryrefslogtreecommitdiff
path: root/compiler/aasmdata.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:28:34 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:28:34 +0000
commit1903b037de2fb3e75826406b46f055acb70963fa (patch)
tree604cd8b790fe14e5fbe441d4cd647c80d2a36a9a /compiler/aasmdata.pas
parentad1141d52f8353457053b925cd674fe1d5c4eafc (diff)
parent953d907e4d6c3a5c2f8aaee6e5e4f73c55ce5985 (diff)
downloadfpc-blocks.tar.gz
* synchronised with trunk till r29513blocks
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/blocks@29516 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/aasmdata.pas')
-rw-r--r--compiler/aasmdata.pas31
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