public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Marc Poulhi?s <dkm@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-1965] ada: Update annotations in runtime for proof Date: Tue, 20 Jun 2023 07:46:11 +0000 (GMT) [thread overview] Message-ID: <20230620074611.510EC3858D3C@sourceware.org> (raw) https://gcc.gnu.org/g:adc853f0661dcb4d1204d1a89ed49446ec01a980 commit r14-1965-gadc853f0661dcb4d1204d1a89ed49446ec01a980 Author: Yannick Moy <moy@adacore.com> Date: Tue May 16 13:16:13 2023 +0000 ada: Update annotations in runtime for proof With bump of stable SPARK used for proof of the runtime, some annotations need to change. gcc/ada/ * libgnat/s-aridou.adb (Scaled_Divide): Add assertions. * libgnat/s-valuti.adb: Add Loop_Variant. * libgnat/s-valuti.ads: Add Exceptional_Cases on No_Return procedure. Diff: --- gcc/ada/libgnat/s-aridou.adb | 11 +++++++++++ gcc/ada/libgnat/s-valuti.adb | 2 ++ gcc/ada/libgnat/s-valuti.ads | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gcc/ada/libgnat/s-aridou.adb b/gcc/ada/libgnat/s-aridou.adb index 66ace8071ff..831590ce387 100644 --- a/gcc/ada/libgnat/s-aridou.adb +++ b/gcc/ada/libgnat/s-aridou.adb @@ -2580,8 +2580,19 @@ is pragma Assert (Big (Double_Uns (Hi (T2))) + Big (Double_Uns (Hi (T1))) = Big (Double_Uns (D (1)))); + pragma Assert + (Is_Mult_Decomposition (D1 => Big (Double_Uns (D (1))), + D2 => Big (Double_Uns (D (2))), + D3 => Big (Double_Uns (D (3))), + D4 => Big (Double_Uns (D (4))))); else D (1) := 0; + + pragma Assert + (Is_Mult_Decomposition (D1 => Big (Double_Uns (D (1))), + D2 => Big (Double_Uns (D (2))), + D3 => Big (Double_Uns (D (3))), + D4 => Big (Double_Uns (D (4))))); end if; else diff --git a/gcc/ada/libgnat/s-valuti.adb b/gcc/ada/libgnat/s-valuti.adb index ec6fdb03225..ee37c1a636b 100644 --- a/gcc/ada/libgnat/s-valuti.adb +++ b/gcc/ada/libgnat/s-valuti.adb @@ -123,6 +123,7 @@ is while F < L and then S (F) = ' ' loop pragma Loop_Invariant (F in S'First .. L - 1); pragma Loop_Invariant (for all J in S'First .. F => S (J) = ' '); + pragma Loop_Variant (Increases => F); F := F + 1; end loop; @@ -139,6 +140,7 @@ is while S (L) = ' ' loop pragma Loop_Invariant (L in F + 1 .. S'Last); pragma Loop_Invariant (for all J in L .. S'Last => S (J) = ' '); + pragma Loop_Variant (Decreases => L); L := L - 1; end loop; diff --git a/gcc/ada/libgnat/s-valuti.ads b/gcc/ada/libgnat/s-valuti.ads index 1faa6471d0d..22d0612bc32 100644 --- a/gcc/ada/libgnat/s-valuti.ads +++ b/gcc/ada/libgnat/s-valuti.ads @@ -51,7 +51,8 @@ is procedure Bad_Value (S : String) with - Depends => (null => S); + Depends => (null => S), + Exceptional_Cases => (others => Standard.False); pragma No_Return (Bad_Value); -- Raises constraint error with message: bad input for 'Value: "xxx"
reply other threads:[~2023-06-20 7:46 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230620074611.510EC3858D3C@sourceware.org \ --to=dkm@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).