Message ID | 20240621085819.2485987-16-poulhies@adacore.com |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=WrNKFr+5; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W5BH01jG7z20X8 for <incoming@patchwork.ozlabs.org>; Fri, 21 Jun 2024 19:03:40 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 768A83898392 for <incoming@patchwork.ozlabs.org>; Fri, 21 Jun 2024 09:03:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by sourceware.org (Postfix) with ESMTPS id 28280389838B for <gcc-patches@gcc.gnu.org>; Fri, 21 Jun 2024 08:58:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 28280389838B Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 28280389838B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::133 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718960329; cv=none; b=NaOSIUJbwl6DwO58t7cbPhW1m44PeuTTrr1/2Y3O+DpC2I6YycQPbnU0MBMZchc3lDxWALsg+WpVi2BV+GiajB88765ZRL+wLRH2xxxGWGnk6kbBYXwX2VlyZo6RzVW+2tKYZu+u7BIR3s3ENi3Xh9+gE0zH0LbnIgUj40E7wvU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718960329; c=relaxed/simple; bh=Kkyrxm65xphH550b/XE/Bcqe05C9AZahpE/6kPrUL3o=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ZPxV400zm3fPYL1J2eP7QacGqmsqt24XdHejRXClZ/uUnGseWGtfmSGMApVZ+L/fO0g9fh3LCYFNYQGyKuz/aW6TofIs4aDOO+Vo5LiXu/EyO1Dreb/eFfFsol92HmvExNCRkq586fwp44JTqPMEzLRR5jFAhZYQr1foNXjxnmU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-52c4b92c09bso2448383e87.1 for <gcc-patches@gcc.gnu.org>; Fri, 21 Jun 2024 01:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718960322; x=1719565122; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=y2oRvDAM63phqTFFjP9A2JS01m99E8f3LMzNLJ7Eugg=; b=WrNKFr+5A7feIhH9msft45bm3RB/RNniO3v6X8QW8FHZkSUEuqIgR/sPwYIoCyw0wN 82ZSv5uEe/URoD+bpkcBndaMsWBz9/cnO27LvZ9H4WTct+YRc/QQ/puubPBlFODOG0V6 ytZXk2RkSDQfYG4P1rnhDy+EP8wfgb1hho/b+kmw16LkSlQR3DFoN9IpY2wXFlh35mJG rwf4H72SRRxhJRC1Z7vtvG5gS8mh1JjhE6ssLSl54m9XlXiCBJldUHcHk7A3gUAoFato ENeDBYbNW2B1PEdOCafgfv9R0Mhxe1r9w68blqTh7cRfiDqKWOx73UuwTp5FW8HKz7Y4 4bmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718960322; x=1719565122; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y2oRvDAM63phqTFFjP9A2JS01m99E8f3LMzNLJ7Eugg=; b=YBz71bSTZuKucnarkSqGqGx3jbcoj6rjXIIyRU/c+XfG5JFlS2d9x9Z6Mgqui7lzYD 1TsqHwwPSULDzMFOWRIPnuZ2OQmwi4KAkYNqKfokzvqngq5H5FyYpibVxf+hVvnFcXoo ui8wHcgRkXL52scI86WSkyFa1/6s0tM+8BeRGHHKCvF7oM4jnPuHJaUZbdsS5nyHi4Lv MQ/Giz/YY0ZCWygqRGLVw1ozw9TujRgmX/ggmb3JWorOouSJNLu7V23bT+hOfzmJBdiE TJsfzf1DtlRrCEcL7jr+m1+20igsNcBjdmNw4GMvTdoedkoPUWMzp79IMuqBa5H/VXCB 77/w== X-Gm-Message-State: AOJu0YzpifairraNer1Mh+7f6SeoC9jFKCThnuJzmSt4m8EVZa5t7aLJ M+Hy8AhB8oNKQUTza3RuGgI07HZfjA5faQvquYNBecp7wJ0YB/C4sjsgIBHNqCxS8zxe5t9++yM = X-Google-Smtp-Source: AGHT+IGASUS/ssBzVQ17r5HRpzLBdOVVs0L4dhi2PPlgF4FNjeG0Jrq1YxEcyhIrqhm78DCC/mexog== X-Received: by 2002:a05:6512:3988:b0:52c:cb8d:6374 with SMTP id 2adb3069b0e04-52ccb8d6456mr6884408e87.11.1718960322623; Fri, 21 Jun 2024 01:58:42 -0700 (PDT) Received: from poulhies-Precision-5550.lan ([2001:861:3382:1a90:a589:2704:bfe1:5d92]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4247d0c5485sm55322375e9.21.2024.06.21.01.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jun 2024 01:58:42 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Ronan Desplanques <desplanques@adacore.com> Subject: [COMMITTED 16/22] ada: Apply fixes to Examine_Array_Bounds Date: Fri, 21 Jun 2024 10:58:12 +0200 Message-ID: <20240621085819.2485987-16-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240621085819.2485987-1-poulhies@adacore.com> References: <20240621085819.2485987-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.7 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.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org |
Series |
[COMMITTED,01/22] ada: Spurious style error with mutiple square brackets
|
expand
|
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 4cdac9443e6..4dde5f3964e 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -8157,13 +8157,15 @@ package body Sem_Util is if not Is_Constrained (Typ) then All_Static := False; Has_Empty := False; + return; -- A string literal has static bounds, and is not empty as long as it -- contains at least one character. elsif Ekind (Typ) = E_String_Literal_Subtype then All_Static := True; - Has_Empty := String_Literal_Length (Typ) > 0; + Has_Empty := String_Literal_Length (Typ) = 0; + return; end if; -- Assume that all bounds are static and not empty
From: Ronan Desplanques <desplanques@adacore.com> gcc/ada/ * sem_util.adb (Examine_Array_Bounds): Add missing return statements. Fix criterion for a string literal being empty. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)