mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 17:19:33 +02:00
Add pi_needs_got to current_procinfo.flags in pass_1 method if a label reference is used
git-svn-id: trunk@22448 -
This commit is contained in:
parent
cd733daaa4
commit
bc04e83b25
@ -203,7 +203,7 @@ implementation
|
||||
uses
|
||||
cutils,
|
||||
verbose,systems,sysutils,
|
||||
defutil,
|
||||
defutil,procinfo,
|
||||
cpubase,cgbase,
|
||||
nld;
|
||||
|
||||
@ -588,6 +588,8 @@ implementation
|
||||
begin
|
||||
result:=nil;
|
||||
expectloc:=LOC_CREFERENCE;
|
||||
if (cs_create_pic in current_settings.moduleswitches) then
|
||||
include(current_procinfo.flags,pi_needs_got);
|
||||
end;
|
||||
|
||||
function trealconstnode.docompare(p: tnode): boolean;
|
||||
@ -948,6 +950,9 @@ implementation
|
||||
end
|
||||
else
|
||||
expectloc:=LOC_CREFERENCE;
|
||||
if (cs_create_pic in current_settings.moduleswitches) and
|
||||
(expectloc <> LOC_CONSTANT) then
|
||||
include(current_procinfo.flags,pi_needs_got);
|
||||
end;
|
||||
|
||||
|
||||
@ -1227,6 +1232,9 @@ implementation
|
||||
expectloc:=LOC_CONSTANT
|
||||
else
|
||||
expectloc:=LOC_CREFERENCE;
|
||||
if (cs_create_pic in current_settings.moduleswitches) and
|
||||
(expectloc <> LOC_CONSTANT) then
|
||||
include(current_procinfo.flags,pi_needs_got);
|
||||
end;
|
||||
|
||||
|
||||
|
@ -219,6 +219,8 @@ implementation
|
||||
begin
|
||||
result:=nil;
|
||||
expectloc:=LOC_REGISTER;
|
||||
if (cs_create_pic in current_settings.moduleswitches) then
|
||||
include(current_procinfo.flags,pi_needs_got);
|
||||
if left.nodetype<>typen then
|
||||
begin
|
||||
if is_objcclass(left.resultdef) and
|
||||
|
Loading…
Reference in New Issue
Block a user