public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-825] [Ada] Delete no-longer-used Convert_To_Return_False flag
@ 2022-05-30 8:29 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-30 8:29 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:55c19dda8c6c5fd40f1ec7ea4dd2f0c12d8c309f
commit r13-825-g55c19dda8c6c5fd40f1ec7ea4dd2f0c12d8c309f
Author: Steve Baird <baird@adacore.com>
Date: Fri Apr 15 13:30:34 2022 -0700
[Ada] Delete no-longer-used Convert_To_Return_False flag
As a result of other recent changes, the Convert_To_Return_False flag
is never set. The flag can be therefore be deleted.
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.
Diff:
---
gcc/ada/exp_ch11.adb | 32 +++++++-------------------------
gcc/ada/gen_il-fields.ads | 1 -
gcc/ada/gen_il-gen-gen_nodes.adb | 3 +--
gcc/ada/sinfo.ads | 7 -------
4 files changed, 8 insertions(+), 35 deletions(-)
diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb
index c61f154c803..c60fe346fad 100644
--- 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
index 878755bf34e..e188a6dae33 100644
--- 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
index 96e1c761d92..dd730f4207b 100644
--- 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
index e3e06ee5f93..da42ae51e6f 100644
--- 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
-------------------------------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-30 8:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 8:29 [gcc r13-825] [Ada] Delete no-longer-used Convert_To_Return_False flag Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).