[Ada] Fix proof of double arithmetic units

Message ID 20220516084317.GA3843764@adacore.com
State Committed
Commit c1e007985fef1389ba09f5b558aa4e7b9f03783f
Headers
Series [Ada] Fix proof of double arithmetic units |

Commit Message

Pierre-Marie de Rodat May 16, 2022, 8:43 a.m. UTC
  Proof of an assertion is not automatic anymore. Add two assertions
before it to guide the prover.

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

gcc/ada/

	* libgnat/s-aridou.adb (Double_Divide): Add intermediate
	assertions.
  

Patch

diff --git a/gcc/ada/libgnat/s-aridou.adb b/gcc/ada/libgnat/s-aridou.adb
--- a/gcc/ada/libgnat/s-aridou.adb
+++ b/gcc/ada/libgnat/s-aridou.adb
@@ -941,11 +941,13 @@  is
          else
             T2 := Yhi * Zlo;
             pragma Assert (Big (T2) = Big (Double_Uns'(Yhi * Zlo)));
+            pragma Assert (Big_0 = Big (Double_Uns'(Ylo * Zhi)));
          end if;
 
       else
          T2 := Ylo * Zhi;
          pragma Assert (Big (T2) = Big (Double_Uns'(Ylo * Zhi)));
+         pragma Assert (Big_0 = Big (Double_Uns'(Yhi * Zlo)));
       end if;
 
       T1 := Ylo * Zlo;