소스 검색

* when creating pic code, every procedure must be declared being global

git-svn-id: trunk@1733 -
florian 20 년 전
부모
커밋
ca921976f6
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      compiler/psub.pas

+ 6 - 1
compiler/psub.pas

@@ -1173,7 +1173,12 @@ implementation
             if (not current_module.in_interface) then
               include(pdflags,pd_implemen);
             if (not current_module.is_unit) or
-               maybe_smartlink_symbol then
+              maybe_smartlink_symbol or
+              {
+                taking addresses of static procedures goes wrong
+                if they aren't global when pic is used (FK)
+              }
+              (cs_create_pic in aktmoduleswitches) then
               include(pd.procoptions,po_global);
             pd.forwarddef:=false;
           end;