From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7871) id B2D673857C51; Mon, 21 Nov 2022 10:13:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B2D673857C51 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669025608; bh=Vz1LXvFZ5Xc+XOhFfWb9VY99GphR0Zr37+ldMDyxdKg=; h=From:To:Subject:Date:From; b=Q2T3r4dRG+UCHBiuU9WCSs3AGRvctZhd5odGTxoBF1IheY/pl9tj67JW65+xxWqa0 CLYOR8Xc9itXqtU/4wTEhs0a4OLOnRPynechClbrnVnjKeiJlMsE0S4d1l82hei1I8 AHv4GTZVZBa1eamwRuQ4ukkg8Qr/TvuK7gJ4mg1k= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Marc Poulhi?s To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-4197] ada: Minor tweak in assertion X-Act-Checkin: gcc X-Git-Author: Eric Botcazou X-Git-Refname: refs/heads/master X-Git-Oldrev: 24dde337d8bf3f971dd7abc643bb7f1703eaf022 X-Git-Newrev: 5947b1ee8af0c8e5a08a20f1f2b9f0b09720d130 Message-Id: <20221121101328.B2D673857C51@sourceware.org> Date: Mon, 21 Nov 2022 10:13:28 +0000 (GMT) List-Id: https://gcc.gnu.org/g:5947b1ee8af0c8e5a08a20f1f2b9f0b09720d130 commit r13-4197-g5947b1ee8af0c8e5a08a20f1f2b9f0b09720d130 Author: Eric Botcazou Date: Thu Nov 17 13:31:33 2022 +0100 ada: Minor tweak in assertion 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. Diff: --- 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;