From patchwork Tue May 16 08:39:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 94519 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp270899vqo; Tue, 16 May 2023 01:43:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4XT0/LwODlNW4bv5KdXM9SErkZD5wzNxuURUcsxuPYn0F0h/EzMPzAypGc4cbrB1rkIWw/ X-Received: by 2002:a05:6402:1054:b0:50c:161b:9154 with SMTP id e20-20020a056402105400b0050c161b9154mr27602966edu.11.1684226620888; Tue, 16 May 2023 01:43:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684226620; cv=none; d=google.com; s=arc-20160816; b=sf9nslK8RV4/lLRM8apdihzibv0jstt22B/dFhK4gUblylhvlay+F/CFey69Wcq4cK CrpdvoUVW0ajcL2a226XXHEHn2zBgOmz4gM6xMSD8Dz35c+gNDTLkFhIpCOxqB/02nPm NFpSqXrEv/U+NlduE5h1oL0YSP2es0GvsfkQWc7kXNuiONxiR4etg3/fblDEHyRwrV4+ R4RsO4+Z/uj4ERzGjzwBnWZBLO3vOK07v2dU62Mqi5PkahdI8rO9CMJ8W6d63wd2mN/0 08sfQQ2MbEYM/MkuOgLIjz9UfSFWXF6AgiB8EkXWL+IE90ZSTxb6d3jPHZ0y/S8hTLw4 RpFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=eztKLZ3ZD/9rAAYYMbH9nyrULKhHpk4EQKKhKptLS90=; b=HHceVQmUPd9Mud9zWMiiSHXr//aZKAkrogNIRENSVnDza9XtNyLFYjClIoRXpAj+eL HfXWKm2NovtnBCmWYj7WOo88SKsDNOUxaklEPsMO9D4mnkxgIPMhY23EXAi9UEQ+ZKnJ guZ9HhTiI2P04R7AnH9p++/F64VGVlccGDolrct+6T2NY3DBBit8ggttwt0apuDnUe/1 irLh2BmgjCLQntqYEBu+ub6LARJT3eWvVPqRbEgn3gjxmy5D4YZ1ZgTB0DzaY8K6Ilgn XHla2ZVZBydHDICnA0dO6OeH4fpM/fn9uAJ4gMPq1JVvuTiJuDWnfhPtRNJLckwC2vk8 mwcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=hGKITEgE; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id z16-20020aa7d410000000b0050c1675d225si14059986edq.518.2023.05.16.01.43.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 01:43:40 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=hGKITEgE; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 751FA38708B9 for ; Tue, 16 May 2023 08:41:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 751FA38708B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684226498; bh=eztKLZ3ZD/9rAAYYMbH9nyrULKhHpk4EQKKhKptLS90=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=hGKITEgED6TdUFs6aPm0M4VB/bBhoepCdCt1ErX+9jRZHHBccyJjnriRJgsGKEwSu /yYsU+R4aiHQWYXhMxmvt33HDEp3oLce0wqTbyH9q1yY4QdvsKXrMqkAALkT/2gG5p 9AMIPcBGKN9hPWYY5Sp0725GQAbYhbV7ojHZ6fkM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 2AB48385414D for ; Tue, 16 May 2023 08:39:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2AB48385414D Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f50020e0f8so16659225e9.0 for ; Tue, 16 May 2023 01:39:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684226383; x=1686818383; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eztKLZ3ZD/9rAAYYMbH9nyrULKhHpk4EQKKhKptLS90=; b=by9MbWq9n8Fws5dNdsNrjcQBVu8DPyxPjTclIzJhEzaNPpgl7x/UAj9Xh5wC3zjKxM 659XlVPJCynWY77FRXxSuNI8evx00zmpeSUWsceqC1viB5hXcpWgKBFHXUYSRatlF2Lg qnX8KhC2i7d5aTCCWMUXfXOcIGcvLnT/GucKGjUOdfCRJ6KtIlsPqC+YQitdxM+g/dAc YHk/n+0loTF9aPisgo+GVZaG6W4G4Zi/heqWS28Y0UCyEH48niT5A5lV2jzDXRbfDl8l lDTWH4rx545fLobjMvg1Qxo1G49rSMBS3NeuMYTMiLGVfc8O6KEQJYRAhbPZdbhQc4ip E2VQ== X-Gm-Message-State: AC+VfDxqbxWXUPmXy0fuAK7NFwPbxlAI2Zp92reDXsFeRCtbD6/SHT6h buRPMo2BwH29Adu2TlLsAjGCqvY5WdM9yrC9QoEnZQ== X-Received: by 2002:a5d:514e:0:b0:307:91a0:ede1 with SMTP id u14-20020a5d514e000000b0030791a0ede1mr22550670wrt.7.1684226383090; Tue, 16 May 2023 01:39:43 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id l8-20020a5d4108000000b003077f3dfcc8sm1790696wrp.32.2023.05.16.01.39.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 01:39:42 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Yannick Moy Subject: [COMMITTED] ada: Add intermediate assertions for proof of Super_Tail Date: Tue, 16 May 2023 10:39:40 +0200 Message-Id: <20230516083940.1500958-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= From: =?utf-8?q?Marc_Poulhi=C3=A8s?= Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766039613041766294?= X-GMAIL-MSGID: =?utf-8?q?1766039613041766294?= From: Yannick Moy Proof of Superbounded internal unit requires a little more help. gcc/ada/ * libgnat/a-strsup.adb: Add intermediate assertions. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/a-strsup.adb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/ada/libgnat/a-strsup.adb b/gcc/ada/libgnat/a-strsup.adb index 25a843153f2..c727575ee6b 100644 --- a/gcc/ada/libgnat/a-strsup.adb +++ b/gcc/ada/libgnat/a-strsup.adb @@ -1788,6 +1788,12 @@ package body Ada.Strings.Superbounded with SPARK_Mode is Source.Data (1 .. Npad) := [others => Pad]; Source.Data (Npad + 1 .. Max_Length) := Temp (1 .. Max_Length - Npad); + + pragma Assert + (Source.Data (1 .. Npad) = [1 .. Npad => Pad]); + pragma Assert + (Source.Data (Npad + 1 .. Max_Length) + = Temp (1 .. Max_Length - Npad)); end if; when Strings.Left =>