ada: Expand generic formal subprograms with contracts for GNATprove
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 28 Oct 2022 18:28:45 +0000 (20:28 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 14 Nov 2022 13:46:49 +0000 (14:46 +0100)
In GNATprove mode generic formal subprograms with Pre/Post contracts are
now expanded into wrappers, just like in ordinary compilation.

gcc/ada/

* sem_ch12.adb (Analyze_Associations): Expand wrappers for
GNATprove.

gcc/ada/sem_ch12.adb

index 2766560..7af365e 100644 (file)
@@ -1937,7 +1937,7 @@ package body Sem_Ch12 is
                      --  take place e.g. within an enclosing generic unit.
 
                      if Has_Contracts (Analyzed_Formal)
-                       and then Expander_Active
+                       and then (Expander_Active or GNATprove_Mode)
                      then
                         Build_Subprogram_Wrappers;
                      end if;