Message ID | 20240620085321.2412421-24-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=kfVZAeFL; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4W4ZVl6Htlz20X8 for <incoming@patchwork.ozlabs.org>; Thu, 20 Jun 2024 19:11:43 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1E166389003C for <incoming@patchwork.ozlabs.org>; Thu, 20 Jun 2024 09:11:42 +0000 (GMT) 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 6D8F4388A01C for <gcc-patches@gcc.gnu.org>; Thu, 20 Jun 2024 08:53:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6D8F4388A01C 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 6D8F4388A01C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::433 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718873641; cv=none; b=JHsagOOuQMHEYjTThC8XkCKZgMxU7YJEB09vHygQCY7cTVb9MyVK7SkjaGuLiCRWFYL6g1ZIlDbFNaovxxuodKSm83Ld8Gsrp11vh+zaCkhU9QyWpCnwhxn52avNbnCxdpJWScic+LT155e/tpEs7FW155/XsBDeXsXXkF8Dv28= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718873641; c=relaxed/simple; bh=vQNHiSCDtoF41lqMzsgZOn/s8ZaNaqhcl3Uz7ObJkMQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=AXESOZrljtPNlHey6phHUL6Spvi3EpcIB6N5uEWn8g4uw4cc+ohzjeH2OkfvpMb4C2+gez5VCb+qf+I9PcFcHDu+iWOzPunfU7JA7qBI0TB9RCxvbYcWaUAOzIvkvdwKwck2WL8taSLYLwjsnDZtN2x4OebgoKUb+S4vCGFDs3o= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3621ac606e1so1094647f8f.1 for <gcc-patches@gcc.gnu.org>; Thu, 20 Jun 2024 01:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718873632; x=1719478432; 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=4iMtqKzSqBu38u6amHaFpsahVEoTtthh+Ssyc5uIXss=; b=kfVZAeFL+mwVQL2FXxBkho7Ir2QVuVWfHIJTKFIXBnLDJU80gf7IMFptlkVytMIywQ /8Ga6ELhRIZ1v1zDp7tbnxE+hq0zeK7d2XPNltbrJS01ID4bGJ1DuR41w1T+EiixV3ij U+kGkRlXqZ8AJABjT0v0uhmakgdziNYmR2fhPs8Ftpb48l1tj7YWy6yrbra3wxoEG4PC NQKWaK0y2Sh9+YR1k7kTDwl19W/b6aSJrfLzhiBpBzWwEnqvmlAuTdE0xe5i04vf22jp bxIo7hgPbOiSLMIV5oVaSy5aWSGOtytWmSE5slKCU+NzsSVV38WZlOyYEAt8aoZ9sWE3 HO8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718873632; x=1719478432; 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=4iMtqKzSqBu38u6amHaFpsahVEoTtthh+Ssyc5uIXss=; b=hL6x2HcUl6XmFTpcAST72ic+0vo0yiUcgad3o/0zRWrYqkW7Kyjco9AEwkEyVxCKcD KU4JDlmtIr9um7IWTI+afRKDWYh/fv4ktnjoj5LjsfJ9FS1LpAmUeXePGHJkX2J/FqAU OxIbBdOyv0lgCx5Yf7O1fpHkgphskVmd2S1jxYyqWMpBHAJp8KNj0oX4N41P9Ia3nVAy YCJQvVWjd3Spr8DumeE5L/kwl7OAm67ncPNFLEd6Fs+XPnTvFFeF/pOhSxjRnj1HJQFH uZx8yfBr6cjQ1ATa2xN8upgQvmllaLxlvkXWci3qjJvvi/TiPecTzR90wBtC1z1fjygK l1QQ== X-Gm-Message-State: AOJu0YzpSo86Fl/LHx0ngtmSB9MG40dp7eDRpSu59x5VtyxuWcyAiGSF ncbT+NHGiEAt4b/+AjSQ71k0nX4psAuQaccjmBVl/i9TbPFmB4KrFuOS3sNTDU3uoGoBPtdDybM = X-Google-Smtp-Source: AGHT+IGtTUhvs7wkTOgg6ygI71g/Ijsp5QYRxGctxNEhcw4T20ZAqzR+mwM55n5/Mk12yjhG2XyTKQ== X-Received: by 2002:adf:f10d:0:b0:35f:1bb0:ed8e with SMTP id ffacd0b85a97d-3609ea6c78amr7064932f8f.21.1718873632748; Thu, 20 Jun 2024 01:53:52 -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 ffacd0b85a97d-363c795febfsm3305522f8f.104.2024.06.20.01.53.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 01:53:52 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou <ebotcazou@adacore.com> Subject: [COMMITTED 24/30] ada: Fix assertion failure during analysis of instantiation of formal package Date: Thu, 20 Jun 2024 10:53:14 +0200 Message-ID: <20240620085321.2412421-24-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240620085321.2412421-1-poulhies@adacore.com> References: <20240620085321.2412421-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, 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.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/30] ada: Fix list of attributes defined by Ada 2022
|
expand
|
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index d05c7b61194..8ace16ad008 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -10996,7 +10996,8 @@ package body Sem_Ch12 is if Is_Child_Unit (Gen_Parent) then I_Nam := New_Copy_Tree (Name (Original_Node (Analyzed_Formal))); - pragma Assert (Entity (I_Nam) = Gen_Parent); + pragma Assert (Entity (I_Nam) = Gen_Parent + or else Renamed_Entity (Entity (I_Nam)) = Gen_Parent); else I_Nam :=
From: Eric Botcazou <ebotcazou@adacore.com> It's an assertion on the name of an instance of a generic child unit and it needs to cope with a renaming of the unit. gcc/ada/ * sem_ch12.adb (Instantiate_Formal_Package): Accept renamings of a generic parent that is a child unit for the abbreviated instance. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch12.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)