summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_res.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 12:06:44 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 12:06:44 +0200
commit39521a94f844f6c6462b4b7849e7f1e2780be6fa (patch)
treeca4a53080ce020fa8abbb8fc3d5044f4955a0102 /gcc/ada/sem_res.adb
parentb98a872b2227a0a075cce2549db7bb415fe6e083 (diff)
downloadgcc-39521a94f844f6c6462b4b7849e7f1e2780be6fa.tar.gz
[multiple changes]
2014-08-01 Yannick Moy <moy@adacore.com> * inline.adb (Cannot_Inline): Issue info message instead of warning for subprograms not inlined in GNATprove mode. * sem_res.adb (Resolve_Call): Take body into account for deciding whether subprogram can be inlined in GNATprove mode or not. 2014-08-01 Claire Dross <dross@adacore.com> * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming of Get_First_Parent_With_External_Axiomatization_For_Entity for shorter. * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper for parameters of packages with external axiomatization. From-SVN: r213443
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r--gcc/ada/sem_res.adb9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index dd7aedd1e8f..2d5766e27b1 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -6217,8 +6217,9 @@ package body Sem_Res is
-- being inlined.
declare
- Nam_UA : constant Entity_Id := Ultimate_Alias (Nam);
- Decl : constant Node_Id := Unit_Declaration_Node (Nam_UA);
+ Nam_UA : constant Entity_Id := Ultimate_Alias (Nam);
+ Decl : constant Node_Id := Unit_Declaration_Node (Nam_UA);
+ Body_Id : constant Entity_Id := Corresponding_Body (Decl);
begin
-- If the subprogram is not eligible for inlining in GNATprove
@@ -6226,7 +6227,7 @@ package body Sem_Res is
if Nkind (Decl) /= N_Subprogram_Declaration
or else not Is_Inlined_Always (Nam_UA)
- or else not Can_Be_Inlined_In_GNATprove_Mode (Nam_UA, Empty)
+ or else not Can_Be_Inlined_In_GNATprove_Mode (Nam_UA, Body_Id)
then
null;
@@ -6245,7 +6246,7 @@ package body Sem_Res is
-- With the one-pass inlining technique, a call cannot be
-- inlined if the corresponding body has not been seen yet.
- if No (Corresponding_Body (Decl)) then
+ if No (Body_Id) then
Error_Msg_NE
("?no contextual analysis of & (body not seen yet)",
N, Nam);