* the fact that a procedure is local does not mean that it by definition

does not need a GOT pointer (mantis #11852)

git-svn-id: trunk@11586 -
This commit is contained in:
Jonas Maebe 2008-08-16 08:12:23 +00:00
parent 77cf5bff6b
commit 6697f173b6
3 changed files with 30 additions and 2 deletions

1
.gitattributes vendored
View File

@ -8540,6 +8540,7 @@ tests/webtbs/tw1157b.pp svneol=native#text/plain
tests/webtbs/tw11619.pp svneol=native#text/plain
tests/webtbs/tw1181.pp svneol=native#text/plain
tests/webtbs/tw11848.pp svneol=native#text/plain
tests/webtbs/tw11852.pp svneol=native#text/plain
tests/webtbs/tw1203.pp svneol=native#text/plain
tests/webtbs/tw1204.pp svneol=native#text/plain
tests/webtbs/tw1207.pp svneol=native#text/plain

View File

@ -493,8 +493,7 @@ unit cgcpu;
{ allocate PIC register }
if (cs_create_pic in current_settings.moduleswitches) and
(tf_pic_uses_got in target_info.flags) and
(pi_needs_got in current_procinfo.flags) and
not(po_kylixlocal in current_procinfo.procdef.procoptions) then
(pi_needs_got in current_procinfo.flags) then
begin
if (target_info.system<>system_i386_darwin) then
begin

28
tests/webtbs/tw11852.pp Normal file
View File

@ -0,0 +1,28 @@
unit tw11852;
interface
function _hc_test( inp: integer ): integer; CDecl;
implementation
uses
Classes, Types, SysUtils;
function _hc_test( inp: integer ): integer; CDecl;
begin
_hc_test := inp;
end;
procedure __func; local;
begin
WriteLn( 'local function' );
end;
initialization
__func;
end.
//= END OF FILE ===============================================================