Message ID | 20240521073035.314024-30-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=ZjpJH5Bs; 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 4Vk60B696Cz1ydW for <incoming@patchwork.ozlabs.org>; Tue, 21 May 2024 17:44:42 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 242583858C50 for <incoming@patchwork.ozlabs.org>; Tue, 21 May 2024 07:44:41 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id C6A203858D28 for <gcc-patches@gcc.gnu.org>; Tue, 21 May 2024 07:31:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C6A203858D28 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 C6A203858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::436 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716276676; cv=none; b=cx4EjMW40oUi+SlehPcx+/ZXhJEGFYIH6huYJZWIFJRSEz2/k3y2E7H9hyHs1l5GjmW0Rd/io7oXm1zDkGrIKOXmuZH3We6PVh/keiuIY9e0YqhWpP1yLwCZakA6Aj96Y9qN/6Jln9NfQht+ZQhfn8bE2GiDWViplsk3et5Obws= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716276676; c=relaxed/simple; bh=adpWe3wlnWRP6+KNxi7qFxp1EcepaZjjHzSwfbEM6k8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=YEMfPApTY96ibJOsBpw0k851H509dOGu79y93cF83zcsg9Q1EBVEMXpR5VNBqxh+R0qhkwMoipKJbygiYp0yvBWByX7gZWrXDYu07t0ISUuCPyYISQCeXrkTL6EJwL+qmO3fK+YvlcrMqoL+Kh+rm6Ubck1Iy5In7HHfDEQRHXk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-34d7b0dac54so1787670f8f.0 for <gcc-patches@gcc.gnu.org>; Tue, 21 May 2024 00:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1716276670; x=1716881470; 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=LWujDKnxgUXd4fKlQ1Y5Y82lqoZrNZbc5iVOoacaOYc=; b=ZjpJH5BsaRwXZ8h30dsVsi5R5/oAy6d8frcCFbxdJp6y8gikSIH49XpG87Fk4cHEqm Ulv3CDFyAz15ne7gtD051bFQJtlWEQjN4mF6DXp3jNai9rRu/DbFyhftq3WO+TiXmXNh OqN7cnvFsHbUjg9a9/x3+XjHnjg4Z9ZXIzN7K26kT2vftMYfODvgs7w2jvuZe7bGrR38 BgSWefDiB7FivKn2+f7EuoPjfUxRwEUlO9bW9yHXRayMb6KK6/TJcq2MCsdoJf9vTjBj SGdT8XnX1fwRkwti8jwkKhkQDeprBWbEDp1FxvKP2mu09K1XEhk0QHEtS3O1lyzgpzOk eh1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716276670; x=1716881470; 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=LWujDKnxgUXd4fKlQ1Y5Y82lqoZrNZbc5iVOoacaOYc=; b=CIzHlyTqmotxfc/26UWudOn7dYWEnj46apOLSkCRYkPBt6L76i9gyKnsPOGC+YDad+ hPMRS5fntE2eRDJJrCRLlhBvhh05JbPkrG0EPvGc98JnAWr2aiRAPoUXaVRSQJZsdyor dLML6YtLqlZ+88vRhnzwAu5zgfppKhH5f3mqGxKFS5hCkcOc1I0/CIiMCzrPbHoD3lpi JSxoumNfBxijZAqaglwkYIQ0EEQ9EgRDkCA9aCcv+2Mt8wlSsXYVGpheNnQ8Jhm5LcV6 zolvfuDzqev81pDBHF7i3cwx/iMuS6S0e6bhKLYLl3idMilQZRzcI4o2OQrkCadHe3aB NjAg== X-Gm-Message-State: AOJu0YzXJmPWilkYsWmdbA11Ag0+3nFS0wqLxFuyP9gUDKbxTOHqZfMk 4pT0w8deuNMWEzFww+wygLvb+G+IdKYjwUpbIfVuw4A3igfRXo4Vh54Qm24w++U/ZHbyL/m5x/E = X-Google-Smtp-Source: AGHT+IEWVeuz8ke2esBuvf4WqsjtgsqjhGxsut4hzB8WSe4gTEeZ+GDqLfjoYM163zkZ+cCVVQYW5g== X-Received: by 2002:adf:f88c:0:b0:354:b95c:4fe0 with SMTP id ffacd0b85a97d-354b95c5305mr7353076f8f.13.1716276670569; Tue, 21 May 2024 00:31:10 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:de37:8b1c:1f33:2610]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fccee9292sm453333645e9.37.2024.05.21.00.31.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 00:31:10 -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 30/31] ada: Simplify test for propagation of attributes to subtypes Date: Tue, 21 May 2024 09:30:33 +0200 Message-ID: <20240521073035.314024-30-poulhies@adacore.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240521073035.314024-1-poulhies@adacore.com> References: <20240521073035.314024-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.8 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/31] ada: Add new Mingw task priority mapping
|
expand
|
diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index 6e40a157734..f6a4c0631b6 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -506,11 +506,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) /* Machine_Attributes on types are expected to be propagated to subtypes. The corresponding Gigi_Rep_Items are only attached to the first subtype though, so we handle the propagation here. */ - if (Base_Type (gnat_entity) != gnat_entity + if (!Is_Base_Type (gnat_entity) && !Is_First_Subtype (gnat_entity) - && Has_Gigi_Rep_Item (First_Subtype (Base_Type (gnat_entity)))) - prepend_attributes (&attr_list, - First_Subtype (Base_Type (gnat_entity))); + && Has_Gigi_Rep_Item (First_Subtype (gnat_entity))) + prepend_attributes (&attr_list, First_Subtype (gnat_entity)); /* Compute a default value for the size of an elementary type. */ if (Known_Esize (gnat_entity) && Is_Elementary_Type (gnat_entity))
From: Eric Botcazou <ebotcazou@adacore.com> This changes the test to use the Is_Base_Type predicate and also removes the superfluous call to Base_Type before First_Subtype. No functional changes. gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_entity): Use the Is_Base_Type predicate and remove superfluous calls to Base_Type. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc-interface/decl.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)