aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Kanig <kanig@adacore.com>2011-08-29 13:26:02 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-29 15:26:02 +0200
commit69794413ec2445eac7298bd4784fbd1cb34efe9e (patch)
treed7a69746de0804fc5c8825932ebab77567c48383
parent59e6b23c684bd7b2024faef3ac1b29279bdf2db2 (diff)
downloadgcc-69794413ec2445eac7298bd4784fbd1cb34efe9e.zip
gcc-69794413ec2445eac7298bd4784fbd1cb34efe9e.tar.gz
gcc-69794413ec2445eac7298bd4784fbd1cb34efe9e.tar.bz2
exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA mode.
2011-08-29 Johannes Kanig <kanig@adacore.com> * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA mode. * gnat1drv.adb (Adjust_Global_Switches): Set Use_Expressions_With_Actions to False in ALFA mode. * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in ALFA mode. From-SVN: r178223
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/exp_ch4.adb4
-rw-r--r--gcc/ada/gnat1drv.adb5
-rw-r--r--gcc/ada/sem_res.adb23
4 files changed, 32 insertions, 9 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index d201020..7e3b173 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,12 @@
+2011-08-29 Johannes Kanig <kanig@adacore.com>
+
+ * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
+ mode.
+ * gnat1drv.adb (Adjust_Global_Switches): Set
+ Use_Expressions_With_Actions to False in ALFA mode.
+ * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
+ ALFA mode.
+
2011-08-29 Yannick Moy <moy@adacore.com>
* exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index c495722..55ea87a 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -7593,6 +7593,10 @@ package body Exp_Ch4 is
Test : Node_Id;
begin
+ if ALFA_Mode then
+ return;
+ end if;
+
Decl :=
Make_Object_Declaration (Loc,
Defining_Identifier => Tnn,
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
index 3924190..5619533 100644
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -351,9 +351,10 @@ procedure Gnat1drv is
if Debug_Flag_Dot_XX then
Use_Expression_With_Actions := True;
- -- Debug flag -gnatd.Y decisively sets usage off
+ -- Debug flag -gnatd.Y and -gnatd.F (Alfa Mode) decisively set usage
+ -- off
- elsif Debug_Flag_Dot_YY then
+ elsif Debug_Flag_Dot_YY or Debug_Flag_Dot_FF then
Use_Expression_With_Actions := False;
-- Otherwise this feature is implemented, so we allow its use
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 7d47bbe..375ca90 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -8082,14 +8082,23 @@ package body Sem_Res is
procedure Resolve_Quantified_Expression (N : Node_Id; Typ : Entity_Id) is
begin
- -- The loop structure is already resolved during its analysis, only the
- -- resolution of the condition needs to be done. Expansion is disabled
- -- so that checks and other generated code are inserted in the tree
- -- after expression has been rewritten as a loop.
+ if not ALFA_Mode then
- Expander_Mode_Save_And_Set (False);
- Resolve (Condition (N), Typ);
- Expander_Mode_Restore;
+ -- The loop structure is already resolved during its analysis, only
+ -- the resolution of the condition needs to be done. Expansion is
+ -- disabled so that checks and other generated code are inserted in
+ -- the tree after expression has been rewritten as a loop.
+
+ Expander_Mode_Save_And_Set (False);
+ Resolve (Condition (N), Typ);
+ Expander_Mode_Restore;
+ else
+
+ -- In ALFA_Mode, no such magic needs to happen, we just resolve the
+ -- underlying nodes
+
+ Resolve (Condition (N), Typ);
+ end if;
end Resolve_Quantified_Expression;
-------------------