]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Tune recent change for bit-packed arrays to help GNATprove backend
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 4 Jul 2025 09:52:46 +0000 (11:52 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 22 Jul 2025 10:10:33 +0000 (12:10 +0200)
When GNAT is operating in GNATprove_Mode the Expander_Active flag is disabled,
but we still must do things that ordinary backends expect.

gcc/ada/ChangeLog:

* sem_util.adb (Get_Actual_Subtype): Do the same for GCC and GNATprove
backends.

gcc/ada/sem_util.adb

index 3fced544fb5ff1ee15f92467e6466e680e7800fd..d4bfd64483a4e41bd80227e270b3ceedad7ca4df 100644 (file)
@@ -10002,7 +10002,7 @@ package body Sem_Util is
          --  pass to the back end should contain no references to Atyp (and a
          --  freeze node would contain such a reference).
 
-         elsif not Expander_Active then
+         elsif not (Expander_Active or GNATprove_Mode) then
             return Typ;
 
          --  Else build the actual subtype