Quellcode durchsuchen

* fix internalerror 200502052 with certain min/max optimizations on x86-64, resolves #40730

florian vor 1 Jahr
Ursprung
Commit
139f2dfe84
1 geänderte Dateien mit 9 neuen und 0 gelöschten Zeilen
  1. 9 0
      compiler/x86/nx86inl.pas

+ 9 - 0
compiler/x86/nx86inl.pas

@@ -1751,6 +1751,15 @@ implementation
              { Try to use references as is, unless they would trigger internal
                error 200502052 }
              if (cs_create_pic in current_settings.moduleswitches) and
+               (paraarray[1].location.loc in [LOC_REFERENCE,LOC_CREFERENCE]) and
+               Assigned(paraarray[1].location.reference.symbol) then
+               hlcg.location_force_reg(current_asmdata.CurrAsmList,paraarray[1].location,
+                 paraarray[1].resultdef,paraarray[1].resultdef,true);
+
+             { Try to use references as is, unless they would trigger internal
+               error 200502052 }
+             if (cs_create_pic in current_settings.moduleswitches) and
+               (paraarray[2].location.loc in [LOC_REFERENCE,LOC_CREFERENCE]) and
                Assigned(paraarray[2].location.reference.symbol) then
                hlcg.location_force_reg(current_asmdata.CurrAsmList,paraarray[2].location,
                  paraarray[2].resultdef,paraarray[2].resultdef,true);