From patchwork Mon May 15 09:42:29 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: 94038 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp6792041vqo; Mon, 15 May 2023 02:47:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5fB3XTNI3VtAgQ0CyhO9eGHZXWCGwaV2wT+lCRYCqnC5Ijqr3lHNVVKp4CUnpGY4xYq9zH X-Received: by 2002:a17:907:94cf:b0:8b8:c06e:52d8 with SMTP id dn15-20020a17090794cf00b008b8c06e52d8mr34527583ejc.36.1684144069435; Mon, 15 May 2023 02:47:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684144069; cv=none; d=google.com; s=arc-20160816; b=LjSb+9jIS5mDr/iBgbEwlNn03rRjhq0GaYKESYI/yQqY39Y83FSPRIZAtXz51yLUTk brQoTRNcBCyFXFTJuAjaBQJ+CSy17enEvkw8f9ELGWzuCAIWxvC4YRrmJyM/T98GxVsT Arz0JAbqTO/jOi5nLohvLj5ypmtwRGLSsMrTv9nLK5V3DKeDEFy+JpJUqkFc7qfsOGHm Cj48+3dpWcg3KlU0FQdtDwXCWyj9mtpiXUjAWSm1iQAjNRQTuOPJRfJr019afzSSbfku OnbFnhXu/A94EdEQDsKfUFr9+cu2UfES/mNEqDfkHVb2xqRABk9Rq/M2mcyEYZTVO8fS lkbg== 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=kFZvAhvBy9QVGjcWkbgRBz+DKe6O7H+NavQPKkIRS3I=; b=PiXW+7Qj4Dx7+yj5w3n6pMxxteYi5ccQ58OI5GcvxIis47jldaWWncI/wFVCb6RbZt TuMJT4xxNk/B1IA4TYUUTjrLOWtd8Xb30XfSN/Oskqfb3vO1gK9APGod5k4FqMmY4OCp UqABLfl8trLGzCa/KtzKTa+vXgFrodI9ZCxBKbL12OcdYDoOX+Zw+5skSimeyHSrw9rL vXHcOqasQP+eUdTL7S/0Xvxlx+cSgvOusm7mgpVfOari6HKqK5ZAm89xEgqqkt3aR4SW X1DiiasCzVFHU7LnSJz6RVXOfKAC2JJqfaUn9FyBhlTvxtObXxhucgwimDWholVozr2x glWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=j+QTkhEa; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id h25-20020a170906855900b0094efa335a49si11723922ejy.851.2023.05.15.02.47.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 02:47:49 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=j+QTkhEa; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 E74E538708C4 for ; Mon, 15 May 2023 09:45:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E74E538708C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684143912; bh=kFZvAhvBy9QVGjcWkbgRBz+DKe6O7H+NavQPKkIRS3I=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=j+QTkhEaUkJ5KRNsTqJcUX2jqcme8Q9e+n29al8EBJ75+W3ITxmWgw+1vScrJDrSE kMZfYpfsIv0uEir0RSZFO/S0RvSGRK1V3bu/wnrZoriHQi6JYjgEl3dJookMN4J1FV 71PMXb+Xjq39yVaHxsBJ05dS4OT0gLR4M842f/TA= 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 C37CB3853566 for ; Mon, 15 May 2023 09:42:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C37CB3853566 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f41d087b3bso95109735e9.0 for ; Mon, 15 May 2023 02:42:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684143753; x=1686735753; 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=kFZvAhvBy9QVGjcWkbgRBz+DKe6O7H+NavQPKkIRS3I=; b=EDAypI2FgNbB1VOxGnG+JDH/hQnT9KS+4dPQvX53qkn9BViCKya+sFFJ1EgxsK6RUT OgcgG6JWzY3eu+6vcvxJnQngTKchKO8QR3MyhX7MCkESU2FN9FeD3bamMfmUU0J/q1BQ qe3qCSw/JkB4Y/dPizXYCR8owOurNH28D8dVhtZe3AXEKvzvn9Fr9oy+6p1q29J/leb7 Vht6Lx2XmP9aZsfZ1LrV1epr5h08L4gjj3GezlVR3BF3myr7fSwPY9SD2TSzwoXEbPzh 9U0MJsQTd9ukPNiwxoiJ0FS48e+JR8OzvmpUVeE9yH0WwwrsSFcsYyBtzeiRgXq9UMQ4 lUJQ== X-Gm-Message-State: AC+VfDy8noh5mvPvDpvmc0U9F/fzmkfh536vA87fJHSyQlUtxccy5CmX Y/6Y5FL0MgkymoaXJschFdiExdoB9U5Eqkd3n4+XgA== X-Received: by 2002:a1c:cc14:0:b0:3f4:20bd:ba46 with SMTP id h20-20020a1ccc14000000b003f420bdba46mr20624078wmb.5.1684143753499; Mon, 15 May 2023 02:42:33 -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 l11-20020a7bc34b000000b003f195d2f1a9sm36309583wmj.15.2023.05.15.02.42.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 02:42:32 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Yannick Moy Subject: [COMMITTED] ada: Allow pragmas Annotate between loop pragmas Date: Mon, 15 May 2023 11:42:29 +0200 Message-Id: <20230515094229.1407641-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 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?1765953051808682338?= X-GMAIL-MSGID: =?utf-8?q?1765953051808682338?= From: Yannick Moy Pragma Annotate is now allowed between loop pragmas, in order to be able to justify separate loop checks in GNATprove. gcc/ada/ * sem_prag.adb (Check_Grouping): Allow Annotate pragmas between loop pragmas. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 266a433d6c4..6b1f9263f9d 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -6258,6 +6258,14 @@ package body Sem_Prag is elsif Is_Loop_Pragma (Stmt) then Prag := Stmt; + -- Skip Annotate pragmas, typically used to justify + -- unproved loop pragmas in GNATprove. + + elsif Nkind (Stmt) = N_Pragma + and then Pragma_Name (Stmt) = Name_Annotate + then + null; + -- Skip declarations and statements generated by -- the compiler during expansion. Note that some -- source statements (e.g. pragma Assert) may have