]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Adapt proof of runtime unit s-arit32
authorYannick Moy <moy@adacore.com>
Wed, 20 Apr 2022 09:39:11 +0000 (09:39 +0000)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 30 May 2022 08:29:01 +0000 (08:29 +0000)
After changes in GNATprove, adapt proof. Simply move an assertion up
before it is first needed here.

gcc/ada/

* libgnat/s-arit32.adb (Scaled_Divide32): Move assertion up.

gcc/ada/libgnat/s-arit32.adb

index baec78a34750865b626b1198cf842fd6abf9e3b1..3d500ac8fad157052ef57a865f0a7b314db99594 100644 (file)
@@ -474,6 +474,7 @@ is
 
       D := Uns64 (Xu) * Uns64 (Yu);
 
+      Lemma_Abs_Mult_Commutation (Big (X), Big (Y));
       pragma Assert (Mult = Big (D));
       Lemma_Hi_Lo (D, Hi (D), Lo (D));
       pragma Assert (Mult = Big_2xx32 * Big (Hi (D)) + Big (Lo (D)));
@@ -508,7 +509,6 @@ is
 
       Lemma_Abs_Div_Commutation (Big (X) * Big (Y), Big (Z));
       Lemma_Abs_Rem_Commutation (Big (X) * Big (Y), Big (Z));
-      Lemma_Abs_Mult_Commutation (Big (X), Big (Y));
       Lemma_Abs_Commutation (X);
       Lemma_Abs_Commutation (Y);
       Lemma_Abs_Commutation (Z);