[Ada] Do not generate an Itype_Reference node for slices in GNATprove mode
authorYannick Moy <moy@adacore.com>
Wed, 3 Mar 2021 13:54:09 +0000 (14:54 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 16 Jun 2021 08:43:04 +0000 (04:43 -0400)
gcc/ada/

* sem_res.adb (Set_Slice_Subtype): Revert special-case
introduced previously, which is not needed as Itypes created for
slices are precisely always used.

gcc/ada/sem_res.adb

index 4377f91..3ca4569 100644 (file)
@@ -12607,10 +12607,9 @@ package body Sem_Res is
       --  the point where actions for the slice are analyzed). Note that this
       --  is different from freezing the itype immediately, which might be
       --  premature (e.g. if the slice is within a transient scope). This needs
-      --  to be done only if expansion is enabled, or in GNATprove mode to
-      --  capture the associated run-time exceptions if any.
+      --  to be done only if expansion is enabled.
 
-      elsif Expander_Active or GNATprove_Mode then
+      elsif Expander_Active then
          Ensure_Defined (Typ => Slice_Subtype, N => N);
       end if;
    end Set_Slice_Subtype;