diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-11-20 15:24:21 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-11-20 15:24:21 +0100 |
commit | d8d7e809d6c6ce977e188f99e104097b5ece31d8 (patch) | |
tree | a5c49e3dca4040fbe6600f1168ef61593ec7cbe7 /gcc/ada/inline.adb | |
parent | f2d9ae209afbf4486850f531ebe091953f1f72f9 (diff) | |
download | gcc-d8d7e809d6c6ce977e188f99e104097b5ece31d8.zip gcc-d8d7e809d6c6ce977e188f99e104097b5ece31d8.tar.gz gcc-d8d7e809d6c6ce977e188f99e104097b5ece31d8.tar.bz2 |
[multiple changes]
2014-11-20 Bob Duff <duff@adacore.com>
* debug.adb: Minor comment fix.
2014-11-20 Arnaud Charlet <charlet@adacore.com>
* a-ciorma.adb: Minor update: move pragma Annotate up.
* a-cfdlli.adb: Skip codepeer analysis on this body.
2014-11-20 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
Allow use of this pragma with generic unit (package or subprogram).
* gnat_rm.texi: Clarify that pragma No_Elaboration_Code_All can
be applied to generics.
2014-11-20 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Valid_Limited_Ancestor): Ancestor part of
extension aggregate can itself be an extension aggregate, as
well as a call that is rewritten as a reference.
2014-11-20 Eric Botcazou <ebotcazou@adacore.com>
* inline.adb (Add_Inlined_Subprogram): Insert all programs
generated as a body or whose declaration was provided along with
the body.
2014-11-20 Javier Miranda <miranda@adacore.com>
* sem.adb (Semantics): Disable expansion if we are compiling a
separate unit under configurable runtime. By default separate
units are compiled with expansion disabled but under configurable
runtime we enable the expansion to get error messages about
missing entities.
From-SVN: r217855
Diffstat (limited to 'gcc/ada/inline.adb')
-rw-r--r-- | gcc/ada/inline.adb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index d5e9ae9..ca84a1f 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -454,6 +454,7 @@ package body Inline is procedure Add_Inlined_Subprogram (Index : Subp_Index) is E : constant Entity_Id := Inlined.Table (Index).Name; + Decl : constant Node_Id := Parent (Declaration_Node (E)); Pack : constant Entity_Id := Get_Code_Unit_Entity (E); procedure Register_Backend_Inlined_Subprogram (Subp : Entity_Id); @@ -486,14 +487,17 @@ package body Inline is begin -- If the subprogram is to be inlined, and if its unit is known to be -- inlined or is an instance whose body will be analyzed anyway or the - -- subprogram has been generated by the compiler, and if it is declared + -- subprogram was generated as a body by the compiler (for example an + -- initialization procedure) or its declaration was provided along with + -- the body (for example an expression function), and if it is declared -- at the library level not in the main unit, and if it can be inlined -- by the back-end, then insert it in the list of inlined subprograms. if Is_Inlined (E) and then (Is_Inlined (Pack) or else Is_Generic_Instance (Pack) - or else Is_Internal (E)) + or else Nkind (Decl) = N_Subprogram_Body + or else Present (Corresponding_Body (Decl))) and then not In_Main_Unit_Or_Subunit (E) and then not Is_Nested (E) and then not Has_Initialized_Type (E) |