public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1458] [Ada] Fix bug in if_expressions introduced by var-size nodes changes
@ 2021-06-15 10:21 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-15 10:21 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b2339160162e80fd854a9caaaf0d3dd0207ede8e
commit r12-1458-gb2339160162e80fd854a9caaaf0d3dd0207ede8e
Author: Bob Duff <duff@adacore.com>
Date: Fri Feb 5 13:06:13 2021 -0500
[Ada] Fix bug in if_expressions introduced by var-size nodes changes
gcc/ada/
* gen_il-gen.adb (Setter_Needs_Parent): Add missing
Then_Actions. Fix self-contradictory comment.
* exp_util.adb (Insert_Actions): Minor comment improvments.
Diff:
---
gcc/ada/exp_util.adb | 9 +++------
gcc/ada/gen_il-gen.adb | 11 ++++++-----
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index c6c8d6c6253..1189870bd60 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -7203,8 +7203,8 @@ package body Exp_Util is
-- Actions belong to the then expression, temporarily place
-- them as Then_Actions of the if expression. They will be
- -- moved to the proper place later when the if expression
- -- is expanded.
+ -- moved to the proper place later when the if expression is
+ -- expanded.
elsif N = ThenX then
if Present (Then_Actions (P)) then
@@ -7217,10 +7217,7 @@ package body Exp_Util is
return;
- -- Actions belong to the else expression, temporarily place
- -- them as Else_Actions of the if expression. They will be
- -- moved to the proper place later when the if expression
- -- is expanded.
+ -- Else_Actions is treated the same as Then_Actions above
elsif N = ElseX then
if Present (Else_Actions (P)) then
diff --git a/gcc/ada/gen_il-gen.adb b/gcc/ada/gen_il-gen.adb
index 36662895950..cffbf2a87d1 100644
--- a/gcc/ada/gen_il-gen.adb
+++ b/gcc/ada/gen_il-gen.adb
@@ -479,13 +479,14 @@ package body Gen_IL.Gen is
Node_Field_Types_Used, Entity_Field_Types_Used : Type_Set;
Setter_Needs_Parent : Field_Set :=
- (Actions | Expression | Else_Actions => True, others => False);
+ (Actions | Expression | Then_Actions | Else_Actions => True,
+ others => False);
-- Set of fields where the setter should set the Parent. True for
-- syntactic fields of type Node_Id and List_Id, but with some
- -- exceptions. Expression and Else_Actions are syntactic AND semantic,
- -- and the Parent is needed. Default_Expression is also both, but the
- -- Parent is not needed. Else_Actions is not syntactic, but the Parent
- -- is needed.
+ -- exceptions. Expression is syntactic AND semantic, and the Parent
+ -- is needed. Default_Expression is also both, but the Parent is not
+ -- needed. Then_Actions and Else_Actions are not syntactic, but the
+ -- Parent is needed.
procedure Check_Completeness;
-- Check that every type and field has been declared
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-15 10:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 10:21 [gcc r12-1458] [Ada] Fix bug in if_expressions introduced by var-size nodes changes 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).