Message ID | 20240610090747.1557638-20-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=SKxc7xkQ; 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 4VyR284NJyz20Tk for <incoming@patchwork.ozlabs.org>; Mon, 10 Jun 2024 19:14:08 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BFCC03858420 for <incoming@patchwork.ozlabs.org>; Mon, 10 Jun 2024 09:14:06 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id CC7D7385B508 for <gcc-patches@gcc.gnu.org>; Mon, 10 Jun 2024 09:08:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CC7D7385B508 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 CC7D7385B508 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::331 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718010503; cv=none; b=U9CzPcpDkKSoR0AsFTmJY2VwTwzQuz1qsgX/Z6MluXMGOC+ger4wcQBRejKkuNUt8kF0ruAweykbp0sTHy9vcnwQ5Ph2Z5MeDmDvC8bTszAo0tuovnfAy+hX1mUZ6my1zNECAXmgw3/FndUtDjpZGGxBAlbB3YOM2fZ0zBq63oI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718010503; c=relaxed/simple; bh=6tfZ9WDiBubUP6dPedy15S/we/Yteztr8xNhYxiX1Vw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=crwm98+TDnwkc85ssSh8j4RGdhH4WjyVy9EENfVYNsoE6eSLQAETAdXXBLnWQv+xcjcIR9DGIMv9fGs9m9n4+no0WP3r11HkldLJn4HHgP/TTH/BXn8coKtikeSf4c2Q7pQJnMisMzdIcGO708d7r33/SYm0jJbWRiZHptTY3Ng= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4217dbeb4caso10975495e9.1 for <gcc-patches@gcc.gnu.org>; Mon, 10 Jun 2024 02:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718010497; x=1718615297; 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=0o0DcYvzJ1wO8TlKbQhpEVw9Bw7bzEtulsjvP/+iAgE=; b=SKxc7xkQyLh9bpYCUBDoGa+jnixkyJ5R/A1zFramieaaAh0qGH++HNjoZG0/jClocq SfSxQPfoZhB1q5uoo4usrAZUynzMcZhnc34eMYqXdOyjXSiP8a6Y5m5t5PoQ4eVDdjVI JmNXEnRYMzMiFeq9Mc1z3zjeFaO/bHNC5mJ1lCyPV3VHSn0e2WS1+ubF3VcnGbAaUTDH JXv02QdzppAKczRzWJNbeSxucWKqM/+jHHax3BTain2pSDRbYCdfpXu+8Htw+s3LcyWa Ca4hKi75jAGZvUuVQi2wWL+XrflLY/9DhoFhXJKt1ouke56YvZJPPw2VqMcCA22KIdoB +wNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718010497; x=1718615297; 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=0o0DcYvzJ1wO8TlKbQhpEVw9Bw7bzEtulsjvP/+iAgE=; b=mU5BXyE7Bd7bmq8v5xLPLPRV9ReclWaqcONaMx2EI1NzFu2nALSDDNjqn5wHJ79q3J Ip6BSHvrZwThy2AyMinFXRNlm8UGfRT1Rq7D/Ds3nY45gP1g3wjjyeID3jXsj3zEQpeK o3hB0hKVJSLyK/3dDtjsi46KnJ7+l+rq/oG4SZ5wfNgRAODnB9t0Be6azZY6cknmW4IW d6/BPDxU9VjBSyLQrCf8ramXmX8zM6kKlbPyuVSGK5Lp6s8SpwzdC1UgNrVbgFcjPRwB VBdoTXK5DB7+5bsfQ2l2QurK8gCMey3ARG9UypNCRus53OqBxYmw+chVNM7xrLWhIEds fQ6w== X-Gm-Message-State: AOJu0Yzq5qB7Py6SByWFhyXcqfJBgikCvJBinDtJrKJj+pL5bVHi1aDo YjIyJGSmNCHqUfVCeK+ovmJfNumxahh1kn3Vwq7koQR2lt/m/mWdpEpHsUxguBT6YRWzl/fyAw0 = X-Google-Smtp-Source: AGHT+IEgATzUMwhkb7iOQezJKp7aM2GpWM6098fUiqMpcF+Eum3awrCa10ByTUO7iWeTe+v1H+LB6A== X-Received: by 2002:adf:efc9:0:b0:35f:2030:d42c with SMTP id ffacd0b85a97d-35f2030d582mr1945754f8f.17.1718010497490; Mon, 10 Jun 2024 02:08:17 -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-35f0f551c20sm6454970f8f.69.2024.06.10.02.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 02:08:17 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Justin Squirek <squirek@adacore.com> Subject: [COMMITTED 20/30] ada: Further refine 'Super attribute Date: Mon, 10 Jun 2024 11:07:36 +0200 Message-ID: <20240610090747.1557638-20-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240610090747.1557638-1-poulhies@adacore.com> References: <20240610090747.1557638-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: Refactor checks for Refined_Global in generic instances
|
expand
|
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 4fd270aeae9..2fd95f36d65 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -6683,6 +6683,12 @@ package body Sem_Attr is elsif Depends_On_Private (P_Type) then Error_Attr_P ("prefix type of % is a private extension"); + -- Disallow view conversions to interfaces in order to avoid + -- depending on whether an interface type is used as a parent + -- or progenitor type. + + elsif Is_Interface (Node (First_Elmt (Parents))) then + Error_Attr_P ("type of % cannot be an interface"); end if; -- Generate a view conversion and analyze it
From: Justin Squirek <squirek@adacore.com> This patch adds the restriction on 'Super such that it cannot apply to objects whose parent type is an interface. gcc/ada/ * sem_attr.adb (Analyze_Attribute): Add check for interface parent types. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_attr.adb | 6 ++++++ 1 file changed, 6 insertions(+)