Message ID | 20240620085321.2412421-29-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=FoRsGu3b; 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 4W4Zdc30KJz20X6 for <incoming@patchwork.ozlabs.org>; Thu, 20 Jun 2024 19:17:40 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 758FD388CC1D for <incoming@patchwork.ozlabs.org>; Thu, 20 Jun 2024 09:17:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 4ADA5388A021 for <gcc-patches@gcc.gnu.org>; Thu, 20 Jun 2024 08:53:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4ADA5388A021 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 4ADA5388A021 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718873642; cv=none; b=W+MxZwlEaiIxOCvEyiBm2wF+3bmbEs31Kr3I+01jT1HXk1maj07wLFYUvGd16Btyg63iACbjdkAZ9bEQcFFdwyQyxk0D2NDKYt4d0Dq/It8HwsGG7zhVDZbBqwIf4ExeS84GvuFUHisdO/2l6QI5w+bIiNiJu2+1WTHo3jOmBLM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718873642; c=relaxed/simple; bh=4LuW8LjcpE8jpGCjJSHIQ9SyT9By56PgtREg59burK0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=JxroiAHcwM9m6jlTA08wEHIvkn+C8OMNx44OXsnwLUiAg3u4UN2CI8KgfcVtdsNJ3qcSLIHSg6J7rZDYitg1oBnS03RmFOfYdl+IxModIruFiPsoXtVAVPo5OitDOjryrXFV1RGQXmQ7RqxmcvAsGuC52PM0G8ceen653gYKOOY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3608e6d14b6so507327f8f.0 for <gcc-patches@gcc.gnu.org>; Thu, 20 Jun 2024 01:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718873637; x=1719478437; 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=KwCYLLGRWvI68KzH9YYbzhRmJd5s/BqjT2i9ZbPJ3/8=; b=FoRsGu3bH9LCZ8cOp8OFRPouNCnVtX1jWWsFg3TT/JOj6PQ6bmH0XItC1EWDBXzXGd 02QIbvWvkkpsw5YVyUwsds7461+nkL10/M+zGkMEN90O/FNnPO4pncY9nYoTTS2vvNMj jf/6Vk+sBI0GlcMjPR4MtgFUZle2Y7gKP+rdAeb09krAhQS17ImJwsPbhSEV7+KyavI9 SmW6pfLoyhmsSIXU5Jrk6sCjx+A5Qe+UAIRvWbdUa1/Sa5pSLPHnZmNZQxWU2wReSmEM mlp668PBt7mGZohDdz2UyUTPfkmIFrEFL4SKCXnICfurBKMOX3ra4aZBIajP4YtVWYDH 64EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718873637; x=1719478437; 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=KwCYLLGRWvI68KzH9YYbzhRmJd5s/BqjT2i9ZbPJ3/8=; b=cu715yUh5vtne9ZCF25McKWUW/81gppZ79iUA3G6NiM6Hx3kIIH0qpOPKj+H8UYlCv P3DnjVQDvygy+97dQ0Plez882I0lE8EUFSCX5M2GDuvyxO70ggqVd6Qz9xx/j/gMMDGs XGtDCWBhzRytj+hODr6yZDItTmmF7CbFX3uO4ndfMhpeTO/+27K2TREJYbl87zwxmQJG 2o75UKJ6lIuF9AKzoaW2M9VCRBc9abOjMNvf1dOuPCtROOlx2JmuAh0QRthrLjQCKta/ wHLEvt9QdXsXLC6lSVZpl/qwVfMPJ5RkiYby6LWPQcE9oad08agclvOgMkR/1Uz2XFBl P+NA== X-Gm-Message-State: AOJu0YxfUMecwFKiQYmBI+p1MVjrrNwoh2ErQjhsFm+PT8wfsm4TucfA U5DHjMCo+cKDLvIQiVWxvdESGKg+YRZe8Onh09+OZ+SyAZdJdmmACjkI04Qv1NABlgo2cq+uYKE = X-Google-Smtp-Source: AGHT+IFQQQZSoPftRkRogDND6PMD2BjIPp53jg0mdwEF5pujNZ+8Eq67PqIx12bKowxK74rjMxf5vw== X-Received: by 2002:adf:e983:0:b0:35f:2cd8:cb31 with SMTP id ffacd0b85a97d-36317b82ec3mr3379504f8f.35.1718873637089; Thu, 20 Jun 2024 01:53:57 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 01:53:56 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Yannick Moy <moy@adacore.com> Subject: [COMMITTED 29/30] ada: Fix checking of SPARK RM on ghost with concurrent part Date: Thu, 20 Jun 2024 10:53:19 +0200 Message-ID: <20240620085321.2412421-29-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/ghost.adb b/gcc/ada/ghost.adb index d220e0e1ec0..84fd40ed98a 100644 --- a/gcc/ada/ghost.adb +++ b/gcc/ada/ghost.adb @@ -1054,7 +1054,9 @@ package body Ghost is Full_Typ : Entity_Id; begin - if Is_Ghost_Entity (Typ) then + if Is_Ghost_Entity (Typ) + and then Comes_From_Source (Typ) + then Conc_Typ := Empty; Full_Typ := Typ; @@ -1062,7 +1064,9 @@ package body Ghost is Conc_Typ := Anonymous_Object (Typ); Full_Typ := Conc_Typ; - elsif Is_Concurrent_Type (Typ) then + elsif Has_Protected (Typ) + or else Has_Task (Typ) + then Conc_Typ := Typ; end if;
From: Yannick Moy <moy@adacore.com> SPARK RM 6.9(21) forbids a ghost type to have concurrent parts. This was not enforced, instead only the type itself was checked to be concurrent. Now fixed. gcc/ada/ * ghost.adb (Check_Ghost_Type): Fix checking. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/ghost.adb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)