[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
This commit is contained in:
Arnaud Charlet 2014-11-20 15:24:21 +01:00
parent f2d9ae209a
commit d8d7e809d6
9 changed files with 64 additions and 12 deletions

View File

@ -1,3 +1,39 @@
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.
2014-11-20 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb: Minor reformatting.

View File

@ -30,6 +30,7 @@ with System; use type System.Address;
package body Ada.Containers.Formal_Doubly_Linked_Lists with
SPARK_Mode => Off
is
pragma Annotate (CodePeer, Skip_Analysis);
-----------------------
-- Local Subprograms --

View File

@ -38,9 +38,8 @@ pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Keys);
with System; use type System.Address;
package body Ada.Containers.Indefinite_Ordered_Maps is
pragma Suppress (All_Checks);
pragma Annotate (CodePeer, Skip_Analysis);
pragma Suppress (All_Checks);
-----------------------------
-- Node Access Subprograms --

View File

@ -249,7 +249,7 @@ package body Debug is
-- output (dt) or recreated source output (dg,do,ds) includes only
-- the main unit. If df is set, then the output in either case
-- includes all compiled units (see also dg,do,ds,dt). Note that to
-- be effective, this swich must be used in combination with one or
-- be effective, this switch must be used in combination with one or
-- more of dt, dg, do or ds.
-- dg Print the source recreated from the generated tree. In the case

View File

@ -4701,6 +4701,7 @@ the current unit and any extended main source units (body and subunits.
It also has has the effect of enforcing a transitive application of this
aspect, so that if any unit is implicitly or explicitly WITH'ed by the
current unit, it must also have the No_Elaboration_Code_All aspect set.
It may be applied to package or subprogram specs or their generic versions.
@node Pragma No_Inline
@unnumberedsec Pragma No_Inline

View File

@ -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)

View File

@ -1433,11 +1433,13 @@ package body Sem is
-- error messages about missing entities in the run-time even
-- if we are compiling in -gnatc (no code generation) mode.
-- Similar processing applies to No_Run_Time_Mode. However,
-- don't do this if debug flag -gnatd.Z is set (this is to handle
-- a situation where this new processing causes trouble).
-- don't do this if debug flag -gnatd.Z is set or when we are
-- compiling a separate unit (this is to handle a situation
-- where this new processing causes trouble).
or else ((Configurable_Run_Time_Mode or No_Run_Time_Mode)
and not Debug_Flag_Dot_ZZ));
and not Debug_Flag_Dot_ZZ
and Nkind (Unit (Cunit (Main_Unit))) /= N_Subunit));
end if;
Full_Analysis := True;

View File

@ -2663,12 +2663,19 @@ package body Sem_Aggr is
function Valid_Limited_Ancestor (Anc : Node_Id) return Boolean is
begin
if Is_Entity_Name (Anc)
and then Is_Type (Entity (Anc))
if Is_Entity_Name (Anc) and then Is_Type (Entity (Anc)) then
return True;
-- The ancestor must be a call or an aggregate, but a call may
-- have been expanded into a temporary, so check original node.
elsif Nkind_In (Anc, N_Aggregate,
N_Extension_Aggregate,
N_Function_Call)
then
return True;
elsif Nkind_In (Anc, N_Aggregate, N_Function_Call) then
elsif Nkind (Original_Node (Anc)) = N_Function_Call then
return True;
elsif Nkind (Anc) = N_Attribute_Reference

View File

@ -16729,9 +16729,11 @@ package body Sem_Prag is
return;
end if;
-- Must appear for a spec
-- Must appear for a spec or generic spec
if not Nkind_In (Unit (Cunit (Current_Sem_Unit)),
N_Generic_Package_Declaration,
N_Generic_Subprogram_Declaration,
N_Package_Declaration,
N_Subprogram_Declaration)
then