diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-23 09:41:36 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-23 09:41:36 +0000 |
commit | 24f0ba72b6729cc7fd33a97aebe3615813086e73 (patch) | |
tree | 10561fd51cf7daff3a76e742f0752fddb6de142c /gcc/ada/sem_prag.adb | |
parent | 362e5ece36cab6ff1252ef2a6d19d790f12b1a6c (diff) | |
download | gcc-24f0ba72b6729cc7fd33a97aebe3615813086e73.tar.gz |
2012-01-23 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Properly
handle Current_Value for volatile variables (also propagate
Treat_As_Volatile from type to object).
2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.adb (Install_Body): Detect the case
where the enclosing context is a package with a stub body that
has already been replaced by the actual body. In such cases,
the freeze node for the enclosing context must be inserted after
the real body.
2012-01-23 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Debug): Freeze the called
subprogram before expanding the pragma into an if-statement with
a block, to ensure that when the subprogram is null its body is
properly generated before expansion.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183420 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r-- | gcc/ada/sem_prag.adb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 59640de9282..00b27d304ad 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -7988,6 +7988,19 @@ package body Sem_Prag is -- use of the secondary stack does not generate execution overhead -- for suppressed conditions. + -- Normally the analysis that follows will freeze the subprogram + -- being called. However, if the call is to a null procedure, + -- we want to freeze it before creating the block, because the + -- analysis that follows may be done with expansion disabled, and + -- and the body will not be generated, leading to spurious errors. + + if Nkind (Call) = N_Procedure_Call_Statement + and then Is_Entity_Name (Name (Call)) + then + Analyze (Name (Call)); + Freeze_Before (N, Entity (Name (Call))); + end if; + Rewrite (N, Make_Implicit_If_Statement (N, Condition => Cond, Then_Statements => New_List ( |