From patchwork Mon Nov 21 10:14:37 2022 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: 23644 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1494370wrr; Mon, 21 Nov 2022 02:18:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf5siuHAJsDLQ6WIXhp7XbuNTvZv6r3vy7ubRDL+YxmHvK+kAPTqe21Dc6BfmjVXWt6NpVjp X-Received: by 2002:a50:bb08:0:b0:469:1684:217d with SMTP id y8-20020a50bb08000000b004691684217dmr5864395ede.270.1669025905736; Mon, 21 Nov 2022 02:18:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669025905; cv=none; d=google.com; s=arc-20160816; b=c5Guy0qpBEiz66olY5K7I6XFi/pIjnAQrcroH/hepvVa+j46nqLkY7r72v8jeiAid3 TJzyNc6ew2Jk4kNnGNnjvTs8HMM77aedaebKR8sDrbrMFlofjRjBf4sxLwCooVVbMfHf REfrT/9F5OJs8PnODfmec6K0m3GWURYGaPFcEvdtp31Zm4fnpk6dDwBwgokdCdohXCdO oLGJweJ7Ck5gkLVr0U6QVmUYIKule5nuiME+BKZ32su/Jzt/Q1mUgE6xEs+uNtM8lKDm 0cwlxDGctkcjjaSsQU45hPqf7tr2gedeDxwAQip7S6I7Eh4c1qjPy9l6HaVXWM3JJKef sOAg== 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=xeiTl2krrwCJCvxkG/ZUEgWcYfeeJS5qggVEAIlKa20=; b=fO2/isUBPHBuOvVdMf91wpdhWO4RmimTkG0uDSSCpzoMoeAqLDJ5UZNYs0crBkPNDN CnC/2/4U1IgRImpAzoYPbx6oPMoTrLzHC0ENHWl1Wrb28cfTcwoG0y3vp1Qy19oR20f7 I6UI1fNFDsLNaZPADv/OAppMj1KftXpkrNXQXrCdjSo9TEr9yQ+xilQ6N6hYlOYHWBnp U/+V1DKtz01qnKD3y0zvvAuylVH21pWO1wgLZFlCB/IatvFeskZTGrTiO3M1L2ILd8oc +D7rnfL5kEiIFiDpgcMkD7K1UrztpzmQrUTOk0sTdJh1uTUPxl0mkqQJyAR11hkkjktJ wINQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=x80zecPU; 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 sh41-20020a1709076ea900b00781c1645926si9230257ejc.524.2022.11.21.02.18.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 02:18:25 -0800 (PST) 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=x80zecPU; 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 2CA1B382EF37 for ; Mon, 21 Nov 2022 10:16:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2CA1B382EF37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669025786; bh=xeiTl2krrwCJCvxkG/ZUEgWcYfeeJS5qggVEAIlKa20=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=x80zecPUH5aTzZGG4kHWdhnZILZnHmKUSGehcyq9YcYeVOtHKHivZ5mImBlQ9W3eF PlO7GKJeBM/yrqiKerSjvIcG/gCHU8EbwiScS/9x42tb77st/V/ciFNyDZJVM7Zwef KZsIZWPuFXP1ZJNKiAQ/qX7HOBS9lhPFfgfxxTjM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id DAD02384F4B0 for ; Mon, 21 Nov 2022 10:14:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DAD02384F4B0 Received: by mail-wr1-x433.google.com with SMTP id s5so1883871wru.1 for ; Mon, 21 Nov 2022 02:14:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=xeiTl2krrwCJCvxkG/ZUEgWcYfeeJS5qggVEAIlKa20=; b=pDj8BrXfGhzpF5YMwRvFFReiKrNvs4i8DCSVFafQ6O3+iI464UxlLE5QylBYNEy+XR kma/wuZ6zrrJLij4udDrl2fnUBQVq+0fL+5owAYUdJAHOlNUX+FB888zkzy6wGS+QiS2 tP100axr02DV8UX1U7ENWYN2QOOel/xw5duXxkkDqgWrCi1mkO4d3X2xFpr8E0Cpr1oP mbNjZIj1+ychN7uXVrVIoAbDLM8VNRoCNfwUXIpm7Ozq9sKE1HlTasyRzUh71+yLykcP ZD2y4fkXVIi5PDUuwVaqXN/IvIbKH0MZY2NJGFN2zAK+ZNx37/jZwg712ACrRSOxCzEK 8L6Q== X-Gm-Message-State: ANoB5pnJfICBZYz1EisK6ClonkIwTkC3TPP7b5To07NUSj5SZ4Hw4lg7 xD+R+TdhTWhqOZCgg4gqsVsb3GuvXlnX9w== X-Received: by 2002:adf:fe47:0:b0:241:9aea:4396 with SMTP id m7-20020adffe47000000b002419aea4396mr10807647wrs.438.1669025679539; Mon, 21 Nov 2022 02:14:39 -0800 (PST) Received: from localhost.localdomain (static-176-191-105-132.ftth.abo.bbox.fr. [176.191.105.132]) by smtp.gmail.com with ESMTPSA id u10-20020a7bc04a000000b003c6bd12ac27sm12872599wmc.37.2022.11.21.02.14.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 02:14:38 -0800 (PST) To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED] ada: Minor tweak in assertion Date: Mon, 21 Nov 2022 11:14:37 +0100 Message-Id: <20221121101437.259534-1-poulhies@adacore.com> X-Mailer: git-send-email 2.34.1 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 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?1750100508080305642?= X-GMAIL-MSGID: =?utf-8?q?1750100508080305642?= From: Eric Botcazou For an array subtype, being definite is the same as being constrained. gcc/ada/ * sem_util.adb (Needs_Secondary_Stack): Test Is_Constrained directly instead of Is_Definite_Subtype for an array subtype. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 67baf7abfad..f331b4b78ba 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -23634,7 +23634,7 @@ package body Sem_Util is -- Unconstrained array type else - pragma Assert (Is_Array_Type (Typ) and not Is_Definite_Subtype (Typ)); + pragma Assert (Is_Array_Type (Typ) and then not Is_Constrained (Typ)); return True; end if; end Needs_Secondary_Stack;