]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Small tweak to latest change
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 16 May 2025 23:20:19 +0000 (01:20 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 1 Jul 2025 08:29:43 +0000 (10:29 +0200)
Unlike RTE, RTU_Entity alone does not cause the unit to be loaded.

gcc/ada/ChangeLog:

* exp_ch7.adb (Shift_Address_For_Descriptor): Add dummy variable
to make sure that System_Storage_Elements is loaded.

gcc/ada/exp_ch7.adb

index 9abdcc18a57c7ed287fe5cc6162f96b641a5824d..4d2b8348048e2468aae9206dea7e96c0d72657ca 100644 (file)
@@ -8868,7 +8868,9 @@ package body Exp_Ch7 is
       Typ    : Entity_Id;
       Op_Nam : Name_Id) return Node_Id
    is
-      Loc : constant Source_Ptr := Sloc (Addr);
+      Loc   : constant Source_Ptr := Sloc (Addr);
+      Dummy : constant Entity_Id  := RTE (RE_Storage_Offset);
+      --  Make sure System_Storage_Elements is loaded for RTU_Entity
 
    begin
       --  Generate: