From a9e6f868cb1467dc53328ed3585156bc8bc0620f Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Wed, 6 Sep 2017 10:50:12 +0000 Subject: sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation message for missing input. 2017-09-06 Yannick Moy * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation message for missing input. 2017-09-06 Yannick Moy * 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 --- gcc/ada/inline.adb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/ada/inline.adb') 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 -- cgit v1.1