aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/inline.adb
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2017-09-06 10:50:12 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2017-09-06 12:50:12 +0200
commita9e6f868cb1467dc53328ed3585156bc8bc0620f (patch)
tree295a2b4b60a1a481fdc2e31f85d86539b08db1e0 /gcc/ada/inline.adb
parent09b57dfe286b5445e30815d752bf528da047e4df (diff)
downloadgcc-a9e6f868cb1467dc53328ed3585156bc8bc0620f.zip
gcc-a9e6f868cb1467dc53328ed3585156bc8bc0620f.tar.gz
gcc-a9e6f868cb1467dc53328ed3585156bc8bc0620f.tar.bz2
sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation message for missing input.
2017-09-06 Yannick Moy <moy@adacore.com> * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation message for missing input. 2017-09-06 Yannick Moy <moy@adacore.com> * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining of protected subprograms and entries. * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected): New function to detect when a subprogram of entry is defined inside a protected object. From-SVN: r251778
Diffstat (limited to 'gcc/ada/inline.adb')
-rw-r--r--gcc/ada/inline.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index 007d59c..6b6222b 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -1406,6 +1406,13 @@ package body Inline is
elsif Instantiation_Location (Sloc (Id)) /= No_Location then
return False;
+ -- Do not inline subprograms and entries defined inside protected types,
+ -- which typically are not helper subprograms, which also avoids getting
+ -- spurious messages on calls that cannot be inlined.
+
+ elsif Is_Subp_Or_Entry_Inside_Protected (Id) then
+ return False;
+
-- Do not inline predicate functions (treated specially by GNATprove)
elsif Is_Predicate_Function (Id) then