From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id 666D23849AE4 for ; Mon, 6 May 2024 09:18:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 666D23849AE4 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 666D23849AE4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::336 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714987118; cv=none; b=PykDS99g9GFrkx73Yw0Uhw8ItT0rYMiUs+D0kJYlZBChRmKVO8gxWmjFxB8KJ2Y9tvaMRJTMfUd4597XgJOcKogvkDq8bfJ4MrQjELm7TZ2HkwJ2jrXTqwY3VxmInRt3GxmAU7u/Gkw7p5Uk/cSHHzLGWHu4mJx0hJ2oeRUcMRY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714987118; c=relaxed/simple; bh=YQcr28gWyMOTcbh45vZ/sHUcXd81jVZ6KF0onS9sor0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=iR2qrTW9SBiAJqsZZTkVwbGgidZWD7c+irOLSpWy4l75iCbBpb//kaWveA5wxH3H+2XDxMANhX89YMfQun8rKatB+0W19JUqIW9OXz3+ayxnezWYhdnliNJklMCIXzQOEYphLgB3U75R/ghy/F4mI/kZu9jNsA8iIFGSUK2VK/o= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-41b782405d5so17973335e9.2 for ; Mon, 06 May 2024 02:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1714987115; x=1715591915; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=i569OSLhgwe9rPzwhuxW6PLXVxEu4h+kP0b5GTItnr8=; b=OIof/EHRGTV7HdSzK1tSk1bq/dPF4w/vQR72+lf9o0y1KjFcRWYKgD/vj4Dy4u6mry Xo0/Te5WAwxW8qG9SaaLk6aVLX4+AO9PEsnao7WdvcOdgggJ6xeqMro4cipG2u58RqJu iXqdHFpFDf8IhH9P16RRa5R0TVOaUdPu0db3XUMo02uKGBqB2fJ7yJrdpTVAu8o6uZx4 ZVc4tCcXJYHwzPqmhtvMBopV9mwKwAtA86FGknrt6+stHer2lW109xasiNd9wCoUp1Jr xVfoDQK11LZPdPzW9gtoabw5jGsNASwge4HApAPy6GwZBYLCUp7WIncczI3XUS14T2VO oeww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714987115; x=1715591915; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=i569OSLhgwe9rPzwhuxW6PLXVxEu4h+kP0b5GTItnr8=; b=k4Tf6nAlLkvaS0M+SBydjL4F6cGxin5ozVBiA1+Zx2yiEAjHxXAODzKpj6xby/6v7b QwUOb4qaaLi73wm7OR36NytYTd2zOKEYT03TXI99z7uto5tgOz3KG2QUbrAH9E8i8KJt DYh1IeAFK9mTMoxctseVJidvOLdfYtJ0cFXxqY428wykNAGTqesfZLQtoIKdzezg5E2j 2FmYk9JkWMWSHdvrv6hLDMpFwNMtA6nuU4lNcaHf//5ediQARRqWxyGM3s+P+hVD/C1a qFet/0Kv6imjh788Q/Cps28C/Lu5BVtqjQraPckUJOpkDmPT3DJEsN1rnvdEihoEc9+i RObQ== X-Gm-Message-State: AOJu0YzRBSyF+q4nLmkolzn9eK45zsYXPZpJGSMZl+IaFBs0JyO1WDEq 0PfvpPC+XS+FDSzOEhy/zOsoW3jgUW69sgfwtN/WqXtwEGn5ftEcKQFyY3ojmCanJ6IgCvwk/S0 = X-Google-Smtp-Source: AGHT+IGFk+GoR87wrBpoAmXDdT7xV2x+oAS6vJZrAuu8/HkBKvgC7Ffm0rnf03l21sfad7ijQoi2mg== X-Received: by 2002:a05:600c:3846:b0:41b:f116:8868 with SMTP id s6-20020a05600c384600b0041bf1168868mr8953298wmr.12.1714987115133; Mon, 06 May 2024 02:18:35 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:9ea2:39d7:df74:396d]) by smtp.gmail.com with ESMTPSA id c16-20020adffb10000000b0034f0633e322sm3109992wrr.38.2024.05.06.02.18.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 02:18:34 -0700 (PDT) From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED] ada: Deconstruct support for abstract states with Relaxed_Initialization Date: Mon, 6 May 2024 11:18:33 +0200 Message-ID: <20240506091833.1586219-1-poulhies@adacore.com> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_ASCII_DIVIDERS,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 List-Id: From: Piotr Trojanek GNATprove newer implemented support for abstract states with aspect Relaxed_Initialization, so the frontend support is now deconstructed. gcc/ada/ * einfo-utils.adb (Is_Relaxed_Initialization_State): Remove. * einfo-utils.ads (Is_Relaxed_Initialization_State): Remove. * einfo.ads: Remove description of removed aspect. * fe.h (Is_Relaxed_Initialization_State): Remove. * sem_prag.adb (Analyze_Abstract_State): Remove support for Relaxed_Initialization. * sem_util.adb (Has_Relaxed_Initialization): Likewise. * sem_util.ads (Has_Relaxed_Initialization): Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/einfo-utils.adb | 14 -------------- gcc/ada/einfo-utils.ads | 1 - gcc/ada/einfo.ads | 5 ----- gcc/ada/fe.h | 3 --- gcc/ada/sem_prag.adb | 25 +++++++++---------------- gcc/ada/sem_util.adb | 5 ----- gcc/ada/sem_util.ads | 6 +++--- 7 files changed, 12 insertions(+), 47 deletions(-) diff --git a/gcc/ada/einfo-utils.adb b/gcc/ada/einfo-utils.adb index 00799eb9bee..438868ac757 100644 --- a/gcc/ada/einfo-utils.adb +++ b/gcc/ada/einfo-utils.adb @@ -1649,20 +1649,6 @@ package body Einfo.Utils is and then Is_Protected_Type (Corresponding_Concurrent_Type (Id)); end Is_Protected_Record_Type; - ------------------------------------- - -- Is_Relaxed_Initialization_State -- - ------------------------------------- - - function Is_Relaxed_Initialization_State (Id : E) return B is - begin - -- To qualify, the abstract state must appear with simple option - -- "Relaxed_Initialization" (SPARK RM 6.10). - - return - Ekind (Id) = E_Abstract_State - and then Has_Option (Id, Name_Relaxed_Initialization); - end Is_Relaxed_Initialization_State; - -------------------------------- -- Is_Standard_Character_Type -- -------------------------------- diff --git a/gcc/ada/einfo-utils.ads b/gcc/ada/einfo-utils.ads index 701d8ce59fb..d87a3e34f49 100644 --- a/gcc/ada/einfo-utils.ads +++ b/gcc/ada/einfo-utils.ads @@ -201,7 +201,6 @@ package Einfo.Utils is function Is_Protected_Component (Id : E) return B with Inline; function Is_Protected_Interface (Id : E) return B; function Is_Protected_Record_Type (Id : E) return B with Inline; - function Is_Relaxed_Initialization_State (Id : E) return B; function Is_Standard_Character_Type (Id : E) return B; function Is_Standard_String_Type (Id : E) return B; function Is_String_Type (Id : E) return B with Inline; diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 6f563d5e62c..e3bfdb3507d 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -3219,10 +3219,6 @@ package Einfo is -- Applies to all entities, true for record types and subtypes, -- includes class-wide types and subtypes (which are also records). --- Is_Relaxed_Initialization_State (synthesized) --- Applies to all entities, true for abstract states that are subject to --- option Relaxed_Initialization. - -- Is_Remote_Call_Interface -- Defined in all entities. Set in E_Package and E_Generic_Package -- entities to which a pragma Remote_Call_Interface is applied, and @@ -5129,7 +5125,6 @@ package Einfo is -- Has_Null_Visible_Refinement (synth) -- Is_External_State (synth) -- Is_Null_State (synth) - -- Is_Relaxed_Initialization_State (synth) -- Is_Synchronized_State (synth) -- Partial_Refinement_Constituents (synth) diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h index 6aaa3fdc4d3..397045ea583 100644 --- a/gcc/ada/fe.h +++ b/gcc/ada/fe.h @@ -501,9 +501,6 @@ B Is_Protected_Interface (E Id); #define Is_Protected_Record_Type einfo__utils__is_protected_record_type B Is_Protected_Record_Type (E Id); -#define Is_Relaxed_Initialization_State einfo__utils__is_relaxed_initialization_state -B Is_Relaxed_Initialization_State (E Id); - #define Is_Standard_Character_Type einfo__utils__is_standard_character_type B Is_Standard_Character_Type (E Id); diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 39005aaea05..299e388167f 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -12181,16 +12181,15 @@ package body Sem_Prag is is -- Flags used to verify the consistency of options - AR_Seen : Boolean := False; - AW_Seen : Boolean := False; - ER_Seen : Boolean := False; - EW_Seen : Boolean := False; - External_Seen : Boolean := False; - Ghost_Seen : Boolean := False; - Others_Seen : Boolean := False; - Part_Of_Seen : Boolean := False; - Relaxed_Initialization_Seen : Boolean := False; - Synchronous_Seen : Boolean := False; + AR_Seen : Boolean := False; + AW_Seen : Boolean := False; + ER_Seen : Boolean := False; + EW_Seen : Boolean := False; + External_Seen : Boolean := False; + Ghost_Seen : Boolean := False; + Others_Seen : Boolean := False; + Part_Of_Seen : Boolean := False; + Synchronous_Seen : Boolean := False; -- Flags used to store the static value of all external states' -- expressions. @@ -12672,12 +12671,6 @@ package body Sem_Prag is Check_Duplicate_Option (Opt, Synchronous_Seen); Check_Ghost_Synchronous; - -- Relaxed_Initialization - - elsif Chars (Opt) = Name_Relaxed_Initialization then - Check_Duplicate_Option - (Opt, Relaxed_Initialization_Seen); - -- Option Part_Of without an encapsulating state is -- illegal (SPARK RM 7.1.4(8)). diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index ef6f3823b1b..c47904f168c 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -13106,11 +13106,6 @@ package body Sem_Util is -- but now without any syntactic checks. case Ekind (E) is - -- Abstract states have option Relaxed_Initialization - - when E_Abstract_State => - return Is_Relaxed_Initialization_State (E); - -- Constants have this aspect attached directly; for deferred -- constants, the aspect is attached to the partial view. diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 384b9a3dac8..db02d39fdee 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -1516,9 +1516,9 @@ package Sem_Util is function Has_Relaxed_Initialization (E : Entity_Id) return Boolean; -- Returns True iff entity E is subject to the Relaxed_Initialization - -- aspect. Entity E can be either type, variable, constant, subprogram, - -- entry or an abstract state. For private types and deferred constants - -- E should be the private view, because aspect can only be attached there. + -- aspect. Entity E can be either type, variable, constant, subprogram or + -- entry. For private types and deferred constants E should be the private + -- view, because aspect can only be attached there. function Has_Signed_Zeros (E : Entity_Id) return Boolean; -- Determines if the floating-point type E supports signed zeros. -- 2.43.2