From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id 3440A3815FDD for ; Mon, 30 May 2022 08:32:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3440A3815FDD Received: by mail-wr1-x42f.google.com with SMTP id t13so13597336wrg.9 for ; Mon, 30 May 2022 01:32:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=xMuAEljpwTIJfyGq8mdIbSGloC6aOQnGkykbZ5+jYZc=; b=iCDa9AIECOQIG63X9twOK4i4YVDU4/mCFQX+9xtdzQIBnTKGzoNyhQJ/Hru6mI8scf zYQJXvRlI9tQkcTFjqHA302xWzmzR/c8WchE0Rsh4zfgv+GyXBTWgxIwGLPSrbpNO1jB TmXgYWw/jsCxZs4aC1l3rUTunPKkdTJWRmi6YAc5zx8YRK8CMJdQjoqaQpTAtKU7rE73 O7MXgThdlRbYenr1CiNqWDsv/8gutKoagppLLJp0UyDeJk36iy+QfUbn/pvrxVZGaiP6 78fc8eI7QEucuY/6GOeZCkkOD5rYrokoKbQirkoCMK6zZ2bqyqetWLOjze4dCva8uzgA rd6A== X-Gm-Message-State: AOAM5339iMh/KwYkJKWukcKdXul405qGXIIThVBU/499axQWTxbnIOdo x/5KitLK9U4NxSenQd+NNCVpMiWUYe/+SQ== X-Google-Smtp-Source: ABdhPJzK+nWCUamndQDlPhp4k4xK5vH3O5z36FRAB8Onru9tx28WHAoXYamHml8Ca/XDNYUOJlCqoQ== X-Received: by 2002:a05:6000:144f:b0:20f:d6e8:a54 with SMTP id v15-20020a056000144f00b0020fd6e80a54mr31110102wrx.482.1653899556979; Mon, 30 May 2022 01:32:36 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id n19-20020a05600c4f9300b00397342bcfb7sm10367514wmq.46.2022.05.30.01.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 01:32:36 -0700 (PDT) Date: Mon, 30 May 2022 08:32:36 +0000 From: Pierre-Marie de Rodat To: gcc-patches@gcc.gnu.org Cc: Steve Baird Subject: [Ada] Delete no-longer-used Convert_To_Return_False flag Message-ID: <20220530083236.GA210594@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="YiEDa0DAkWCtVeE4" Content-Disposition: inline X-Spam-Status: No, score=-13.3 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2022 08:32:39 -0000 --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline As a result of other recent changes, the Convert_To_Return_False flag is never set. The flag can be therefore be deleted. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch11.adb (Expand_N_Raise_Expression): Remove Convert_To_Return_False test. * gen_il-fields.ads: Remove Convert_To_Return_False field. * gen_il-gen-gen_nodes.adb: Remove use of Convert_To_Return_False field. * sinfo.ads: Remove comment describing Convert_To_Return_False flag. --YiEDa0DAkWCtVeE4 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch.diff" diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb --- a/gcc/ada/exp_ch11.adb +++ b/gcc/ada/exp_ch11.adb @@ -1350,37 +1350,19 @@ package body Exp_Ch11 is -- in -- raise Constraint_Error; - -- unless the flag Convert_To_Return_False is set, in which case - -- the transformation is to: - - -- do - -- return False; - -- in - -- raise Constraint_Error; - -- The raise constraint error can never be executed. It is just a dummy -- node that can be labeled with an arbitrary type. RCE := Make_Raise_Constraint_Error (Loc, Reason => CE_Explicit_Raise); Set_Etype (RCE, Typ); - if Convert_To_Return_False (N) then - Rewrite (N, - Make_Expression_With_Actions (Loc, - Actions => New_List ( - Make_Simple_Return_Statement (Loc, - Expression => New_Occurrence_Of (Standard_False, Loc))), - Expression => RCE)); - - else - Rewrite (N, - Make_Expression_With_Actions (Loc, - Actions => New_List ( - Make_Raise_Statement (Loc, - Name => Name (N), - Expression => Expression (N))), - Expression => RCE)); - end if; + Rewrite (N, + Make_Expression_With_Actions (Loc, + Actions => New_List ( + Make_Raise_Statement (Loc, + Name => Name (N), + Expression => Expression (N))), + Expression => RCE)); Analyze_And_Resolve (N, Typ); end Expand_N_Raise_Expression; diff --git a/gcc/ada/gen_il-fields.ads b/gcc/ada/gen_il-fields.ads --- a/gcc/ada/gen_il-fields.ads +++ b/gcc/ada/gen_il-fields.ads @@ -118,7 +118,6 @@ package Gen_IL.Fields is Contract_Test_Cases, Controlling_Argument, Conversion_OK, - Convert_To_Return_False, Corresponding_Aspect, Corresponding_Body, Corresponding_Entry_Body, diff --git a/gcc/ada/gen_il-gen-gen_nodes.adb b/gcc/ada/gen_il-gen-gen_nodes.adb --- a/gcc/ada/gen_il-gen-gen_nodes.adb +++ b/gcc/ada/gen_il-gen-gen_nodes.adb @@ -523,8 +523,7 @@ begin -- Gen_IL.Gen.Gen_Nodes Cc (N_Raise_Expression, N_Subexpr, (Sy (Name, Node_Id, Default_Empty), - Sy (Expression, Node_Id, Default_Empty), - Sm (Convert_To_Return_False, Flag))); + Sy (Expression, Node_Id, Default_Empty))); Cc (N_Range, N_Subexpr, (Sy (Low_Bound, Node_Id), diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -1005,12 +1005,6 @@ package Sinfo is -- direct conversion of the underlying integer result, with no regard to -- the small operand. - -- Convert_To_Return_False - -- Present in N_Raise_Expression nodes that appear in the body of the - -- special predicateM function used to test a predicate in the context - -- of a membership test, where raise expression results in returning a - -- value of False rather than raising an exception. - -- Corresponding_Aspect -- Present in N_Pragma node. Used to point back to the source aspect from -- the corresponding pragma. This field is Empty for source pragmas. @@ -6932,7 +6926,6 @@ package Sinfo is -- Sloc points to RAISE -- Name (always present) -- Expression (set to Empty if no expression present) - -- Convert_To_Return_False -- plus fields for expression ------------------------------- --YiEDa0DAkWCtVeE4--