diff --git a/compiler/nmem.pas b/compiler/nmem.pas index 7defd970de..f75db70409 100644 --- a/compiler/nmem.pas +++ b/compiler/nmem.pas @@ -231,7 +231,8 @@ implementation begin result:=nil; expectloc:=LOC_REGISTER; - if (cs_create_pic in current_settings.moduleswitches) then + if (left.nodetype=typen) and + (cs_create_pic in current_settings.moduleswitches) then include(current_procinfo.flags,pi_needs_got); if left.nodetype<>typen then begin