trunk/gcc137/vcs_diff_compiler.patch results

File details

./trunk/gcc137/vcs_diff_compiler.patch 2026-07-24-05:25

Used binaries

   

Binaries version

> uname -a
Linux cfarm137 6.12.90+deb13.1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.90-2 (2026-05-27) x86_64 GNU/Linux

Full file content

 
diff --git a/compiler/arm/agarmgas.pas b/compiler/arm/agarmgas.pas
index a152371522..89571b9268 100644
--- a/compiler/arm/agarmgas.pas
+++ b/compiler/arm/agarmgas.pas
@@ -212,9 +212,16 @@       TArmAppleGNUAssembler=class(TAppleGNUassembler)
 
             if assigned(symbol) then
               begin
+{$ifdef DEBUG_THUMB_ISSUE}
+                s:='';
+                if (base<>NR_NO) and not(is_pc(base)) then
+                  s:='['+gas_regname(base)+']';
+                s:=s+symbol.name;
+{$else not DEBUG_THUMB_ISSUE}
                 if (base<>NR_NO) and not(is_pc(base)) then
                   internalerror(200309011);
                 s:=symbol.name;
+{$endif not DEBUG_THUMB_ISSUE}
                 if offset<>0 then
                   s:=s+tostr_with_plus(offset);
                 if refaddr=addr_pic then
diff --git a/compiler/jvm/njvmcnv.pas b/compiler/jvm/njvmcnv.pas
index 5e47b14760..7ec3a0d3cd 100644
--- a/compiler/jvm/njvmcnv.pas
+++ b/compiler/jvm/njvmcnv.pas
@@ -1432,6 +1432,9 @@                         if resultdef.typ=classrefdef then
         dummyres: tnode;
       begin
         result:=do_target_specific_explicit_typeconv(true,dummyres);
+	if result and assigned(current_procinfo) and
+	   assigned(current_procinfo.procdef) then
+          include(current_procinfo.procdef.implprocoptions,pio_inline_not_possible);
       end;
 
 
diff --git a/compiler/pdecvar.pas b/compiler/pdecvar.pas
index f4c5b7d938..711892ca68 100644
--- a/compiler/pdecvar.pas
+++ b/compiler/pdecvar.pas
@@ -1356,9 +1356,14 @@ implementation
                       { the whole record -- which is why we use pt and not hp)  }
 
                       { we can't take the size of an open array or an array of const }
+                      { Different types (even with matching size) can cause wrong
+                        codegen when the absolute var gets inlined, because the
+                        register-resident target is updated in place via SUBSETREG
+                        ops without first loading its current value. Force memory. }
                       if is_open_array(pt.resultdef) or
                          is_array_of_const(pt.resultdef) or
-                         (vs.vardef.size <> pt.resultdef.size) then
+                         (vs.vardef.size <> pt.resultdef.size) or
+                         not equal_defs(vs.vardef,pt.resultdef) then
                         make_not_regable(pt,[ra_addr_regable]);
                       tabsolutevarsym(abssym).adjust_varregable;
                     end;
diff --git a/compiler/powerpc/itcpugas.pas b/compiler/powerpc/itcpugas.pas
index 2fa37cf15c..a6b5f3c2b0 100644
--- a/compiler/powerpc/itcpugas.pas
+++ b/compiler/powerpc/itcpugas.pas
@@ -21,6 +21,17 @@
 }
 unit itcpugas;
 
+{$ifdef DEBUG_CODEGEN_BUG}
+  {$OPTIMIZATION ON}
+  {$OPTIMIZATION AUTOINLINE}
+  {$PIC OFF}
+  {$OPTIMIZATION LEVEL4}
+  {$OPTIMIZATION CSE}
+  {$OPTIMIZATION USELOADMODIFYSTORE}
+  {$OPTIMIZATION DFA}
+  {$OPTIMIZATION PEEPHOLE}
+{$endif}
+
 {$i fpcdefs.inc}
 
 interface
@@ -101,7 +112,6 @@ implementation
         {$i rppcgri.inc}
       );
 
-
     function findreg_by_gasname(const s:string):tregisterindex;
       var
         i,p : tregisterindex;