diff options
author | Ed Schonberg <schonberg@adacore.com> | 2009-07-27 13:41:57 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-07-27 15:41:57 +0200 |
commit | df7c3f6275380f0228dbf6edf62133357ec3a8d7 (patch) | |
tree | b3cfb42c19a6efff36670378ae8f392c6e1a735b /gcc | |
parent | 0e47ff5cdde89f3e89610ace38659e0a8fc37ad1 (diff) | |
download | gcc-df7c3f6275380f0228dbf6edf62133357ec3a8d7.zip gcc-df7c3f6275380f0228dbf6edf62133357ec3a8d7.tar.gz gcc-df7c3f6275380f0228dbf6edf62133357ec3a8d7.tar.bz2 |
exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not attempt expansion in Ravenscar mode.
2009-07-27 Ed Schonberg <schonberg@adacore.com>
* exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not attempt expansion in
Ravenscar mode. Error has already been posted on specification.
* sem.adb: Further code clean ups.
From-SVN: r150116
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ada/exp_ch9.adb | 7 | ||||
-rw-r--r-- | gcc/ada/sem.adb | 10 |
3 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ca9285d..d886bdf 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2009-07-27 Ed Schonberg <schonberg@adacore.com> + + * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not attempt expansion in + Ravenscar mode. Error has already been posted on specification. + + * sem.adb: Further code clean ups. + 2009-07-27 Robert Dewar <dewar@adacore.com> * g-sse.ads: Minor reformatting diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index cc58d9f..e75ceca 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -10324,6 +10324,13 @@ package body Exp_Ch9 is S : Entity_Id; -- Primitive operation slot begin + -- Under the Ravenscar profile, timed entry calls are excluded. An error + -- was already reported on spec, so do not attempt to expand the call. + + if Restriction_Active (No_Select_Statements) then + return; + end if; + -- The arguments in the call may require dynamic allocation, and the -- call statement may have been transformed into a block. The block -- may contain additional declarations for internal entities, and the diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb index 6f68bdd..7411ede 100644 --- a/gcc/ada/sem.adb +++ b/gcc/ada/sem.adb @@ -1680,8 +1680,16 @@ package body Sem is -------------------- procedure Do_Withed_Unit (Withed_Unit : Node_Id) is + Save_Do_Main : constant Boolean := Do_Main; + begin + -- Do not process the main unit if coming from a with_clause, + -- as would happen with a parent body that has a child spec + -- in its context. + + Do_Main := False; Do_Unit_And_Dependents (Withed_Unit, Unit (Withed_Unit)); + Do_Main := Save_Do_Main; end Do_Withed_Unit; procedure Do_Withed_Units is new Walk_Withs (Do_Withed_Unit); @@ -1875,7 +1883,7 @@ package body Sem is and then Present (Library_Unit (Main_CU)) then Do_Unit_And_Dependents - (Library_Unit (Main_CU), Unit (Library_Unit (Main_CU))); + (Library_Unit (Main_CU), Unit (Library_Unit (Main_CU))); else Do_Unit_And_Dependents (Main_CU, Unit (Main_CU)); end if; |