diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-10-31 12:12:14 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-10-31 12:12:14 +0100 |
commit | d99565f84f00f7edfdfa42fdc490415806ad0e4b (patch) | |
tree | 3d78a402ce261033d427e046bc679f4a1ec37435 /gcc | |
parent | 2ef051289c77160d87d20f11c27d2ea53bf75861 (diff) | |
download | gcc-d99565f84f00f7edfdfa42fdc490415806ad0e4b.zip gcc-d99565f84f00f7edfdfa42fdc490415806ad0e4b.tar.gz gcc-d99565f84f00f7edfdfa42fdc490415806ad0e4b.tar.bz2 |
[multiple changes]
2014-10-31 Arnaud Charlet <charlet@adacore.com>
* sem_ch13.adb (Check_Constant_Address_Clause): Disable checks
on address clauses in CodePeer mode.
2014-10-31 Javier Miranda <miranda@adacore.com>
* inline.adb (Expand_Inlined_Call): Do not skip
inlining of calls to subprogram renamings.
2014-10-31 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Resolve_Entity_Name): Account for
the case where the immediate parent of a reference to an entity
is a parameter association.
From-SVN: r216960
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 16 | ||||
-rw-r--r-- | gcc/ada/inline.adb | 4 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.adb | 3 | ||||
-rw-r--r-- | gcc/ada/sem_res.adb | 15 |
4 files changed, 33 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index bb18546..37e32f9 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,19 @@ +2014-10-31 Arnaud Charlet <charlet@adacore.com> + + * sem_ch13.adb (Check_Constant_Address_Clause): Disable checks + on address clauses in CodePeer mode. + +2014-10-31 Javier Miranda <miranda@adacore.com> + + * inline.adb (Expand_Inlined_Call): Do not skip + inlining of calls to subprogram renamings. + +2014-10-31 Hristian Kirtchev <kirtchev@adacore.com> + + * sem_res.adb (Resolve_Entity_Name): Account for + the case where the immediate parent of a reference to an entity + is a parameter association. + 2014-10-31 Eric Botcazou <ebotcazou@adacore.com> * inline.adb (Check_And_Split_Unconstrained_Function): Do not diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 7f0d54b..8157bf2 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -2659,7 +2659,9 @@ package body Inline is -- Body_To_Inline is also set for renamings (see sinfo.ads) elsif Nkind (Orig_Bod) in N_Entity then - return; + if not Has_Pragma_Inline (Subp) then + return; + end if; -- Skip inlining if the function returns an unconstrained type using -- an extended return statement since this part of the new inlining diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 86f70d0..826b3dc 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -9197,8 +9197,9 @@ package body Sem_Ch13 is -- particular, no need to pester user about rep clauses that violate -- the rule on constant addresses, given that these clauses will be -- removed by Freeze before they reach the back end. + -- Similarly in CodePeer mode, we want to relax these checks. - if not Ignore_Rep_Clauses then + if not Ignore_Rep_Clauses and not CodePeer_Mode then Check_Expr_Constants (Expr); end if; end Check_Constant_Address_Clause; diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 31dfe5f..973c0d8 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -6740,7 +6740,7 @@ package body Sem_Res is -- Local variables E : constant Entity_Id := Entity (N); - Par : constant Node_Id := Parent (N); + Par : Node_Id; -- Start of processing for Resolve_Entity_Name @@ -6846,6 +6846,15 @@ package body Sem_Res is Eval_Entity_Name (N); end if; + Par := Parent (N); + + -- When the entity appears in a parameter association, retrieve the + -- related subprogram call. + + if Nkind (Par) = N_Parameter_Association then + Par := Parent (Par); + end if; + -- An effectively volatile object subject to enabled properties -- Async_Writers or Effective_Reads must appear in a specific context. -- The following checks are only relevant when SPARK_Mode is on as they @@ -6865,8 +6874,8 @@ package body Sem_Res is null; -- Assume that references to effectively volatile objects that appear - -- as actual parameters in a procedure call are always legal. The - -- full legality check is done when the actuals are resolved. + -- as actual parameters in a procedure call are always legal. A full + -- legality check is done when the actuals are resolved. elsif Nkind (Par) = N_Procedure_Call_Statement then null; |