public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Adapt proof of runtime unit s-arit32
@ 2022-05-30  8:32 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-30  8:32 UTC (permalink / raw)
  To: gcc-patches; +Cc: Yannick Moy

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]

After changes in GNATprove, adapt proof. Simply move an assertion up
before it is first needed here.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

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

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 720 bytes --]

diff --git a/gcc/ada/libgnat/s-arit32.adb b/gcc/ada/libgnat/s-arit32.adb
--- a/gcc/ada/libgnat/s-arit32.adb
+++ b/gcc/ada/libgnat/s-arit32.adb
@@ -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);



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-30  8:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30  8:32 [Ada] Adapt proof of runtime unit s-arit32 Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).