aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch13.adb
AgeCommit message (Collapse)AuthorFilesLines
2017-09-25[multiple changes]Pierre-Marie de Rodat1-2/+2
2017-09-25 Justin Squirek <squirek@adacore.com> * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb, exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb, gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb, gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb, libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads, libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb, libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb, libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb, libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb, libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads, put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb, sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb: Removal of ineffective use-clauses. * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with constant folded barriers. * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to Subtype_Marks and Names list in use-clause nodes to their new singular counterparts (e.g. Subtype_Mark, Name). * par.adb, par-ch8.adb (Append_Use_Clause): Created to set Prev_Ids and More_Ids in use-clause nodes. (P_Use_Clause): Modify to take a list as a parameter. (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and subtype_marks within an aggregate use-clauses into individual clauses. * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to P_Use_Clause to match its new behavior. * sem.adb (Analyze): Mark use clauses for non-overloaded entities. * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous errors. * sem_ch6.adb (Analyze_Generic_Subprogram_Body, Analyze_Subprogram_Body_Helper): Update use clause chain at the end of the declarative region. * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain after analysis (Analyze_Package_Specification): Update use clause chain when there is no body. * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add parameter to determine weither the installation of scopes should also propagate on the use-clause "chain". (Mark_Use_Clauses): Created to traverse use-clause chains and determine what constitutes a valid "use" of a clause. (Update_Use_Clause_Chain): Created to aggregate common machinary used to clean up use-clause chains (and warn on ineffectiveness) at the end of declaritive regions. * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a package name from a use-package clause. (Analyze_Package_Name_List): Created to perform analysis on a list of package names (similar to Analyze_Package_Name). (Find_Most_Prev): Created to traverse to the beginning of a given use-clause chain. (Most_Decendant_Use_Clause): Create to identify which clause from a given set is highest in scope (not always the most prev). (Use_One_Package, Use_One_Type): Major cleanup and reorganization to handle the new chaining algorithm, also many changes related to redundant clauses. A new parameter has also been added to force installation to handle certain cases. * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body, Analyze_Task_Body): Mark use clauses on relevant entities. * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses, Install_Parents): Add parameter to determine weither the installation of scopes should also propagate on the use-clause "chain". * sem_ch12.adb (Inline_Instance_Body): Add flag in call to Install_Context to avoid redundant chaining of use-clauses. * sem_ch13.adb: Minor reformatting. * sem_res.adb (Resolve): Mark use clauses on operators. (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant entities. * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause, Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to represent any given clause's usage/reference/necessity. (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause nodes to allow loose chaining of redundant clauses. (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names, Set_More_Ids, Set_Name): Modify set procedure calls to reflect reorganization in node fields. * types.ads (Source_File_Index): Adjust index bounds. (No_Access_To_Source_File): New constant. 2017-09-25 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of the expression to be used in the generated attribute specification (rather than relocating it) to avoid resolving a potentially malformed tree when the expression is resolved through an ASIS-specific call to Resolve_Aspect_Expressions. This manifests itself as a crash on a function with parameter associations. From-SVN: r253144
2017-01-13sem_aggr.adb, [...]: Update all eligible case statements to reflect the new ↵Hristian Kirtchev1-12/+11
style for case alternatives. 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com> * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb, exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb, layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb, exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb, exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb, g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb, sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb, prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb, a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb, get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb, g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb, sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb, s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb, contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb, g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb, g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb, a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb, ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb, get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb, prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb, exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb, s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb, a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb, a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb, g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb, par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb, uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb, a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case statements to reflect the new style for case alternatives. Various code clean up and reformatting. From-SVN: r244406
2017-01-13atree.adb (Allocate_Initialize_Node): A newly created node is no longer ↵Hristian Kirtchev1-15/+2
marked as Ghost at this level. 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com> * atree.adb (Allocate_Initialize_Node): A newly created node is no longer marked as Ghost at this level. (Mark_New_Ghost_Node): New routine. (New_Copy): Mark the copy as Ghost. (New_Entity): Mark the entity as Ghost. (New_Node): Mark the node as Ghost. * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now apply to unanalyzed entities. (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed entities. (Set_Is_Checked_Ghost_Entity): This attribute now applies to all entities as well as unanalyzed entities. (Set_Is_Ignored_Ghost_Entity): This attribute now applies to all entities as well as unanalyzed entities. * expander.adb Add with and use clauses for Ghost. (Expand): Install and revert the Ghost region associated with the node being expanded. * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code. (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code. (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code. (Expand_Freeze_Record_Type): Remove all Ghost-related code. (Freeze_Type): Install and revert the Ghost region associated with the type being frozen. * exp_ch5.adb Remove with and use clauses for Ghost. (Expand_N_Assignment_Statement): Remove all Ghost-related code. * exp_ch6.adb Remove with and use clauses for Ghost. (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code. (Expand_N_Subprogram_Body): Remove all Ghost-related code. * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the Ghost region of the working type. (Build_Invariant_Procedure_Declaration): Install and revert the Ghost region of the working type. (Expand_N_Package_Body): Remove all Ghost-related code. * exp_ch8.adb Remove with and use clauses for Ghost. (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related code. (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code. (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code. (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related code. * exp_ch13.adb Remove with and use clauses for Ghost. (Expand_N_Freeze_Entity): Remove all Ghost-related code. * exp_disp.adb (Make_DT): Install and revert the Ghost region of the tagged type. Move the generation of various entities within the Ghost region of the type. * exp_prag.adb Remove with and use clauses for Ghost. (Expand_Pragma_Check): Remove all Ghost-related code. (Expand_Pragma_Contract_Cases): Remove all Ghost-related code. (Expand_Pragma_Initial_Condition): Remove all Ghost-related code. (Expand_Pragma_Loop_Variant): Remove all Ghost-related code. * exp_util.adb (Build_DIC_Procedure_Body): Install and revert the Ghost region of the working types. (Build_DIC_Procedure_Declaration): Install and revert the Ghost region of the working type. (Make_Invariant_Call): Install and revert the Ghost region of the associated type. (Make_Predicate_Call): Reimplemented. Install and revert the Ghost region of the associated type. * freeze.adb (Freeze_Entity): Install and revert the Ghost region of the entity being frozen. (New_Freeze_Node): Removed. * ghost.adb Remove with and use clauses for Opt. (Check_Ghost_Completion): Update the parameter profile and all references to formal parameters. (Ghost_Entity): Update the comment on usage. (Install_Ghost_Mode): New routines. (Is_Ghost_Assignment): New routine. (Is_Ghost_Declaration): New routine. (Is_Ghost_Pragma): New routine. (Is_Ghost_Procedure_Call): New routine. (Is_Ghost_Renaming): Removed. (Is_OK_Declaration): Reimplemented. (Is_OK_Pragma): Reimplemented. (Is_OK_Statement): Reimplemented. (Is_Subject_To_Ghost): Update the comment on usage. (Mark_And_Set_Ghost_Assignment): New routine. (Mark_And_Set_Ghost_Body): New routine. (Mark_And_Set_Ghost_Completion): New routine. (Mark_And_Set_Ghost_Declaration): New routine. (Mark_And_Set_Ghost_Instantiation): New routine. (Mark_And_Set_Ghost_Procedure_Call): New routine. (Mark_Full_View_As_Ghost): Removed. (Mark_Ghost_Declaration_Or_Body): New routine. (Mark_Ghost_Pragma): New routine. (Mark_Ghost_Renaming): New routine. (Mark_Pragma_As_Ghost): Removed. (Mark_Renaming_As_Ghost): Removed. (Propagate_Ignored_Ghost_Code): Update the comment on usage. (Prune_Node): Freeze nodes no longer need special pruning, they are processed by the general ignored Ghost code mechanism. (Restore_Ghost_Mode): New routine. (Set_Ghost_Mode): Reimplemented. (Set_Ghost_Mode_From_Entity): Removed. * ghost.ads Add with and use clauses for Ghost. (Check_Ghost_Completion): Update the parameter profile along with the comment on usage. (Install_Ghost_Mode): New routine. (Is_Ghost_Assignment): New routine. (Is_Ghost_Declaration): New routine. (Is_Ghost_Pragma): New routine. (Is_Ghost_Procedure_Call): New routine. (Mark_And_Set_Ghost_Assignment): New routine. (Mark_And_Set_Ghost_Body): New routine. (Mark_And_Set_Ghost_Completion): New routine. (Mark_And_Set_Ghost_Declaration): New routine. (Mark_And_Set_Ghost_Instantiation): New routine. (Mark_And_Set_Ghost_Procedure_Call): New routine. (Mark_Full_View_As_Ghost): Removed. (Mark_Ghost_Pragma): New routine. (Mark_Ghost_Renaming): New routine. (Mark_Pragma_As_Ghost): Removed. (Mark_Renaming_As_Ghost): Removed. (Restore_Ghost_Mode): New routine. (Set_Ghost_Mode): Redefined. (Set_Ghost_Mode_From_Entity): Removed. * sem.adb (Analyze): Install and revert the Ghost region of the node being analyzed. (Do_Analyze): Change the way a clean Ghost region is installed and reverted. * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove all Ghost-related code. (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code. (Analyze_Number_Declaration): Remove all Ghost-related code. (Analyze_Object_Declaration): Install and revert the Ghost region of a deferred object declaration's completion. (Array_Type_Declaration): Remove all Ghost-related code. (Build_Derived_Type): Update the comment on the propagation of Ghost attributes from a parent to a derived type. (Derive_Subprogram): Remove all Ghost-related code. (Make_Class_Wide_Type): Remove all Ghost-related code. (Make_Implicit_Base): Remove all Ghost-related code. (Process_Full_View): Install and revert the Ghost region of the partial view. There is no longer need to check the Ghost completion here. * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost region of the left hand side. * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove all Ghost-related code. (Analyze_Expression_Function): Remove all Ghost-related code. (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code. (Analyze_Procedure_Call): Install and revert the Ghost region of the procedure being called. (Analyze_Subprogram_Body_Helper): Install and revert the Ghost region of the spec or body. (Analyze_Subprogram_Declaration): Remove all Ghost-related code. (Build_Subprogram_Declaration): Remove all Ghost-related code. (Find_Corresponding_Spec): Remove all Ghost-related code. (Process_Formals): Remove all Ghost-related code. * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert the Ghost region of the spec. (Analyze_Package_Declaration): Remove all Ghost-related code. * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as Ghost when it aliases a Ghost entity. (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases a Ghost entity. (Analyze_Object_Renaming): Mark a renaming as Ghost when it aliases a Ghost entity. (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases a Ghost entity. (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it aliases a Ghost entity. * sem_ch11.adb Remove with and use clauses for Ghost. (Analyze_Exception_Declaration): Remove all Ghost-related code. * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all Ghost-related code. (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related code. (Analyze_Package_Instantiation): Install and revert the Ghost region of the package instantiation. (Analyze_Subprogram_Instantiation): Install and revert the Ghost region of the subprogram instantiation. (Instantiate_Package_Body): Code clean up. Install and revert the Ghost region of the package body. (Instantiate_Subprogram_Body): Code clean up. Install and revert the Ghost region of the subprogram body. * sem_ch13.adb (Build_Predicate_Functions): Install and revert the Ghost region of the related type. (Build_Predicate_Function_Declaration): Code clean up. Install and rever the Ghost region of the related type. * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Install and revert the Ghost region of the pragma. (Analyze_Initial_Condition_In_Decl_Part): Install and revert the Ghost region of the pragma. (Analyze_Pragma): Install and revert the Ghost region of various pragmas. Mark a pragma as Ghost when it is related to a Ghost entity or encloses a Ghost entity. (Analyze_Pre_Post_Condition): Install and revert the Ghost region of the pragma. (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the Ghost region of the pragma. * sem_res.adb (Resolve): Remove all Ghost-related code. * sem_util.adb (Is_Declaration): Reimplemented. (Is_Declaration_Other_Than_Renaming): New routine. * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine. * sinfo.adb (Is_Checked_Ghost_Pragma): New routine. (Is_Ghost_Pragma): Removed. (Is_Ignored_Ghost_Pragma): New routine. (Set_Is_Checked_Ghost_Pragma): New routine. (Set_Is_Ghost_Pragma): Removed. (Set_Is_Ignored_Ghost_Pragma): New routine. * sinfo.ads: Update the documentation on Ghost mode and Ghost regions. New attributes Is_Checked_Ghost_Pragma and Is_Ignored_Ghost_Pragma along with usages in nodes. Remove attribute Is_Ghost_Pragma along with usages in nodes. (Is_Checked_Ghost_Pragma): New routine along with pragma Inline. (Is_Ghost_Pragma): Removed along with pragma Inline. (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline. (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline. (Set_Is_Ghost_Pragma): Removed along with pragma Inline. (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline. From-SVN: r244395
2016-07-04[multiple changes]Arnaud Charlet1-1/+8
2016-07-04 Hristian Kirtchev <kirtchev@adacore.com> * exp_aggr.adb (Ctrl_Init_Expression): New routine. (Gen_Assign): Code cleanup. Perform in-place side effect removal when the expression denotes a controlled function call. * exp_util.adb (Remove_Side_Effects): Do not remove side effects on a function call which has this behavior suppressed. * sem_aggr.adb Code cleanup. * sinfo.adb (No_Side_Effect_Removal): New routine. (Set_Side_Effect_Removal): New routine. * sinfo.ads New attribute No_Side_Effect_Removal along with occurences in nodes. (No_Side_Effect_Removal): New routine along with pragma Inline. (Set_Side_Effect_Removal): New routine along with pragma Inline. 2016-07-04 Arnaud Charlet <charlet@adacore.com> * opt.ads, sem_prag.adb (Universal_Addressing_On_AAMP): Removed. Remove support for pragma No_Run_Time. Update comments. 2016-07-04 Pascal Obry <obry@adacore.com> * g-forstr.ads: More documentation for the Formatted_String support. 2016-07-04 Ed Schonberg <schonberg@adacore.com> * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case 'Address): If the address comes from an aspect specification and not a source attribute definition clause, do not remove side effects from the expression, because the expression must be elaborated at the freeze point of the object and not at the object declaration, because of the delayed analysis of aspect specifications. From-SVN: r237959
2015-10-23[multiple changes]Arnaud Charlet1-4/+15
2015-10-23 Bob Duff <duff@adacore.com> * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Use Underlying_Type for B_Typ, in case the Typ is a subtype of a type with unknown discriminants. * g-awk.ads: Minor style fix in comment 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com> * debug.adb: Document the use of debug switch -gnatd.5. * einfo.adb: Code reformatting. (Is_Ghost_Entity): Moved from ghost.adb. * einfo.ads New synthesized attribute Is_Ghost_Enity along with usage in nodes and pragma Inline. (Is_Ghost_Entity: Moved from ghost.ads. * exp_ch3.adb Code reformatting. (Expand_Freeze_Array_Type): Capture, set and restore the Ghost mode. (Expand_Freeze_Class_Wide_Type): Capture, set and restore the Ghost mode. (Expand_Freeze_Enumeration_Type): Capture, set and restore the Ghost mode. (Expand_Freeze_Record_Type): Capture, set and restore the Ghost mode. * exp_ch6.adb (Expand_Subprogram_Contract): Do not expand the contract of an ignored Ghost subprogram. * exp_ch13.adb Add with and use clauses for Ghost. (Expand_N_Freeze_Entity): Capture, set and restore the Ghost mode. * exp_dbug.adb (Get_External_Name): Code reformatting. Add a special prefix for ignored Ghost entities or when requested by -gnatd.5 for any Ghost entity. * exp_dbug.ads Document the use of prefix "_ghost_" for ignored Ghost entities. * exp_prag.adb (Expand_Pragma_Check): Capture, set and restore the Ghost mode. (Expand_Pragma_Loop_Variant): Use In_Assertion_Expr to signal the original context. * ghost.adb (Check_Ghost_Overriding): Code cleanup. (Is_Ghost_Entity): Moved to einfo.adb. (Is_OK_Declaration): Move the assertion expression check to the outer level. (Is_OK_Ghost_Context): An assertion expression is a valid Ghost context. * ghost.ads (Is_Ghost_Entity): Moved to einfo.ads. * sem_ch3.adb (Analyze_Object_Contract): A source Ghost object cannot be imported or exported. Mark internally generated objects as Ghost when applicable. (Make_Class_Wide_Type): Inherit the ghostness of the root tagged type. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark a stand alone subprogram body as Ghost when applicable. (Analyze_Subprogram_Declaration): Mark internally generated subprograms as Ghost when applicable. * sem_ch7.adb: Code cleanup. * sem_ch13.adb (Add_Invariants): Add various formal parameters to break dependency on global variables. (Build_Invariant_Procedure): Code cleanup. Capture, set and restore the Ghost mode. * sem_res.adb (Resolve_Actuals): The actual parameter of a source Ghost subprogram whose formal is of mode IN OUT or OUT must be a Ghost variable. 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch8.adb Code cleanup. (Find_Expanded_Name): Replace the call to In_Pragmas_Depends_Or_Global with a call to In_Abstract_View_Pragma. (In_Abstract_View_Pragma): New routine. (In_Pragmas_Depends_Or_Global): Removed. * sem_prag.adb (Analyze_Part_Of): Catch a case where indicator Part_Of denotes the abstract view of a variable. From-SVN: r229224
2015-10-16exp_ch5.adb, [...]: Code clean up: remove special handling for .NET and JVM.Arnaud Charlet1-7/+0
2015-10-16 Arnaud Charlet <charlet@adacore.com> * exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads, sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb, exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb, lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb, einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb, rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb, gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb, exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb, exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb, sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb, exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb: Code clean up: remove special handling for .NET and JVM. From-SVN: r228874
2015-02-05g-rannum.adb, [...]: Minor reformatting.Robert Dewar1-2/+9
2015-02-05 Robert Dewar <dewar@adacore.com> * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads, sem_warn.ads: Minor reformatting. * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect deleted by -gnatI. * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give error for abstract type. From-SVN: r220445
2014-11-07[multiple changes]Arnaud Charlet1-1/+1
2014-11-07 Arnaud Charlet <charlet@adacore.com> * debug.adb, snames.adb-tmpl (Is_Keyword_Name): Consider 'overriding' a keyword in Ada 95 mode when -gnatd.D is used. * gnat_ugn.texi: Document -gnatd.D. 2014-11-07 Vasiliy Fofanov <fofanov@adacore.com> * gnatls.adb: Lower severity of the program's return value in some common cases. 2014-11-07 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb (Decorate_Type): The limited view of a tagged type has an empty list of primitive operations. 2014-11-07 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch3.adb (Analyze_Object_Declaration): Update references to SPARK RM. (Process_Full_View): Update references to SPARK RM. * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references to SPARK RM. (Analyze_Subprogram_Body_Helper): Update references to SPARK RM. * sem_ch7.adb (Analyze_Package_Body_Helper): Update references to SPARK RM. * sem_prag.adb (Check_Ghost_Constituent): Update references to SPARK RM. * sem_res.adb (Check_Ghost_Policy): Update references to SPARK RM. (Resolve_Actuals): Ensure that the actual parameter of a Ghost subprogram whose formal is of mode IN OUT or OUT is Ghost. * sem_util.adb (Check_Ghost_Completion): Update references to SPARK RM. 2014-11-07 Ed Schonberg <schonberg@adacore.com> * exp_ch7.adb (Make_Final_Call): If type of designated object is derived from that of the formal of the Deep_Finalize procedure, add an unchecked conversion to prevent spurious type error. 2014-11-07 Robert Dewar <dewar@adacore.com> * table.adb, inline.adb, einfo.adb, gnat1drv.adb, exp_ch13.adb, exp_fixd.adb, prj-conf.adb, exp_strm.adb, a-cofove.adb, exp_ch3.ads: Minor reformatting. 2014-11-07 Robert Dewar <dewar@adacore.com> * sem_ch12.adb, sem_ch13.adb, prj-tree.adb: Minor reformatting. From-SVN: r217227
2014-10-31[multiple changes]Arnaud Charlet1-1/+15
2014-10-31 Ed Schonberg <schonberg@adacore.com> * exp_ch3.ads (Make_Tag_Assignment): New function, used to re-initialize the tag in a tagged object declaration with initial value. * exp_ch3.adb (Expand_N_Object_Declaration): Use Make_Tag_Assignment to simplify code for a tagged object declaration. * exp_ch13.adb (Expand_Freeze_Entity): Analyze freeze actions for the freeze node of an object. * freeze.adb (Check_Address_Clause): Use Make_Tag_Assignment when needed to extend Freeze_Actions for a tagged object declaration. 2014-10-31 Eric Botcazou <ebotcazou@adacore.com> * gnat_ugn.texi: Further minor improvement to -flto entry. 2014-10-31 Gary Dismukes <dismukes@adacore.com> * g-dynhta.adb, g-dynhta.ads: Minor typo fixes and reformatting. From-SVN: r216955
2014-10-10[multiple changes]Arnaud Charlet1-1/+1
2014-10-10 Robert Dewar <dewar@adacore.com> * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb, freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb, sem_ch6.adb, sem_cat.adb, sem_disp.adb (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive throughout where appropriate. 2014-10-10 Bob Duff <duff@adacore.com> * a-coinho-shared.ads: Minor reformatting. * s-traceb.adb: Minor clean up. 2014-10-10 Robert Dewar <dewar@adacore.com> * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line. * ali.ads (GNATprove_Mode): New component in ALI table. (GNATprove_Mode_Specified): New global. * gnatbind.adb (Gnatbind): Give fatal error if any file compiled in GNATProve mode. * lib-writ.ads, lib-writ.adb (GP): New flag on P line for GNATProve_Mode. 2014-10-10 Javier Miranda <miranda@adacore.com> * exp_ch3.adb (Build_Init_Procedure): Adding assertion. (Build_Init_Statement): Ensure that statements associated with the parent components are located at the beginning of the returned list of statements. 2014-10-10 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full view of a private type T that has a type invariant is a scalar or constrained array type, the base type created for the full view has the same type invariant. From-SVN: r216074
2014-07-18[multiple changes]Arnaud Charlet1-0/+11
2014-07-18 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting. 2014-07-18 Robert Dewar <dewar@adacore.com> * einfo.adb (Has_Static_Predicate): New function. (Set_Has_Static_Predicate): New procedure. * einfo.ads (Has_Static_Predicate): New flag. * sem_ch13.adb (Is_Predicate_Static): New function (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize (Add_Call): Minor change in Sloc of generated expression (Add_Predicates): Remove setting of Static_Pred, no longer used. * sem_ch4.adb (Has_Static_Predicate): Removed this function, replace by use of the entity flag Has_Static_Predicate_Aspect. * sem_eval.adb (Eval_Static_Predicate_Check): Check real case and issue warning that predicate is not checked for now. * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in spec. * sem_util.adb (Check_Expression_Against_Static_Predicate): Carry out check for any case where there is a static predicate, and output appropriate message. * sinfo.ads: Minor comment corrections. 2014-07-18 Ed Schonberg <schonberg@adacore.com> * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived from an untagged private type whose full view is tagged, the type is marked tagged for layout reasons, but it has no dispatch table, so Set_All_DT_Position must not be called. * exp_ch13.adb: If the freeze node is for a type internal to a record declaration, as is the case for a class-wide subtype of a parent component, the relevant scope is the scope of the enclosing record. From-SVN: r212804
2014-07-16[multiple changes]Arnaud Charlet1-4/+13
2014-07-16 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Find_Type_Name): Diagnose properly a private extension completion that is an interface definition with an interface list. 2014-07-16 Arnaud Charlet <charlet@adacore.com> * gnatls.adb (Gnatls): Code clean ups. 2014-07-16 Thomas Quinot <quinot@adacore.com> * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind. * sem.adb (Analyze): Handle N_Compound_Statement. * sprint.adb (Sprint_Node_Actual): Ditto. * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New procedure to handle N_Compound_Statement. * exp_aggr.adb (Collect_Initialization_Statements): Use a proper compound statement node, instead of a bogus expression-with-actions with a NULL statement as its expression, to wrap collected initialization statements. * freeze.ads, freeze.adb (Explode_Initialization_Compound_Statement): New public procedure, lifted from Freeze_Entity. (Freeze_Entity): When freezing an object with captured initialization statements and without delayed freezing, explode compount statement. * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special case that used to handle bogus EWAs with NULL statement as the expression. * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with delayed freezing and captured initialization statements, explode compound statement. From-SVN: r212662
2014-02-20einfo.ads: Minor comment addition: Etype of package is Standard_Void_Type.Robert Dewar1-5/+5
2014-02-20 Robert Dewar <dewar@adacore.com> * einfo.ads: Minor comment addition: Etype of package is Standard_Void_Type. * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb, exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb, exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb, freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb, sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To. Replace all calls with calls to New_Occurrence_Of. 2014-02-20 Robert Dewar <dewar@adacore.com> * par-util.adb (Ignore, case of right paren): Make this a serious error. From-SVN: r207942
2014-02-04[multiple changes]Arnaud Charlet1-1/+1
2014-02-04 Gary Dismukes <dismukes@adacore.com> * exp_ch13.adb: Minor spelling fix. 2014-02-04 Robert Dewar <dewar@adacore.com> * opt.ads: Minor comment update. 2014-02-04 Robert Dewar <dewar@adacore.com> * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite instead of Replace. 2014-02-04 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings on null expressions if component type is non-null, when the corresponding association covers an empty range of index values. From-SVN: r207468
2014-02-04[multiple changes]Arnaud Charlet1-0/+40
2014-02-04 Robert Dewar <dewar@adacore.com> * sinfo.ads: Further comments on N_Expression_With_Actions node. 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global variables Out_Items and Ref_Global. Remove local constant Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7 and D8. Remove the useless collection of global items as this was a leftover from an earlier version of the routine. Move several routines out to avoid deep nesting and indentation. (Inputs_Match): Add formal parameter Dep_Clause. Rename formal parameter Do_Checks to Post_Errors. Update the comment on usage. (Is_Matching_Input): Renamed to Input_Match. Add formal parameters Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks to Post_Errors. Update the comment on usage. Account for the case where a self referential state may have a null input_list. (Is_Self_Referential): New routine. 2014-02-04 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the entity renames an expression, as in the case of an object of an unconstrained type initialized by a function call, defer the rewriting of the expression to the expander. * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case 'Alignment): If the entity renames an expression, introduce temporary to capture value, and rewrite original declaration to use temporary. From-SVN: r207467
2013-04-24[multiple changes]Arnaud Charlet1-2/+13
2013-04-24 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch6.adb (Expand_Actuals): Add a predicate check on an actual the related type has a predicate function. * sem_ch3.adb (Constant_Redeclaration): Ensure that the related type has an invariant procedure before building a call to it. * sem_ch6.adb (Append_Enabled_Item): New routine. (Check_Access_Invariants): Use routine Append_Enabled_Item to chain onto the list of postconditions. (Contains_Enabled_Pragmas): Removed. (Expand_Contract_Cases): Use routine Append_Enabled_Item to chain onto the list of postconditions. (Invariants_Or_Predicates_Present): Removed. (Process_PPCs): Partially reimplemented. 2013-04-24 Sergey Rybin <rybin@adacore.com frybin> * tree_io.ads: Update ASIS_Version_Number because of changes in the way how entities are chained in a scope by means of Next_Entity link. 2013-04-24 Ed Schonberg <schonberg@adacore.com> * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case Storage_Size): If the clause is not from an aspect, insert assignment to size variable of task type at the point of the clause, not after the task definition, to prevent access before elaboration in the back-end. 2013-04-24 Yannick Moy <moy@adacore.com> * sem_prag.adb (Sig_Flags): Set correct value for Pragma_Assume. 2013-04-24 Yannick Moy <moy@adacore.com> * gnat_rm.texi: Document 'Loop_Entry. 2013-04-24 Jose Ruiz <ruiz@adacore.com> * s-tassta.adb, s-tarest.adb (Task_Wrapper): Start looking for fall-back termination handlers from the parents, because they apply only to dependent tasks. * s-solita.adb (Task_Termination_Handler_T): Do not look for fall-back termination handlers because the environment task has no parent, and if it defines one of these handlers it does not apply to itself because they apply only to dependent tasks. From-SVN: r198244
2013-04-24[multiple changes]Arnaud Charlet1-42/+2
2013-04-24 Eric Botcazou <ebotcazou@adacore.com> * fe.h (Machine_Overflows_On_Target): New macro and declaration. (Signed_Zeros_On_Target): Likewise. 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch6.adb: Add with and use clause for Sem_Prag. (Freeze_Subprogram): Analyze all delayed aspects for a null procedure so that they are available when analyzing the internally-generated _Postconditions routine. * exp_ch13.adb: Remove with and use clause for Sem_Prag. (Expand_N_Freeze_Entity): Move the code that analyzes delayed aspects of null procedures to exp_ch6.Freeze_Subprogram. * sem_prag.adb (Analyze_Abstract_State): Update the check on volatile requirements. 2013-04-24 Bob Duff <duff@adacore.com> * ali-util.ads (Source_Record): New component Stamp_File to record from whence the Stamp came. * ali-util.adb (Set_Source_Table): Set Stamp_File component. * bcheck.adb (Check_Consistency): Print additional information in Verbose_Mode. * gnatbind.adb (Gnatbind): Print additional information in Verbose_Mode. From-SVN: r198224
2013-04-24[multiple changes]Arnaud Charlet1-1/+8
2013-04-24 Robert Dewar <dewar@adacore.com> * exp_ch13.adb, sem_prag.adb: Update comments. * sem_ch3.adb, exp_ch9.adb, g-socket.adb, sem_ch13.adb: Minor reformatting. 2013-04-24 Doug Rupp <rupp@adacore.com> * vms_data.ads (/{NO}INHIBIT-EXEC): Document new default behavior. 2013-04-24 Yannick Moy <moy@adacore.com> * sinfo.ads: Minor correction of typo. From-SVN: r198223
2013-04-23[multiple changes]Arnaud Charlet1-1/+13
2013-04-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch9.adb (Build_PPC_Wrapper): Correct the traversal of pre- and post-conditions. (Expand_N_Task_Type_Declaration): Use the correct attribute to check for pre- and post-conditions. * exp_ch13.adb (Expand_N_Freeze_Entity): Correct the traversal of pre- and post-conditions. Analyze delayed classification items. * freeze.adb (Freeze_Entity): Use the correct attribute to check for pre- and post- conditions. * sem_ch3.adb (Analyze_Declarations): Correct the traversal of pre- and post-conditions as well as contract- and test-cases. Analyze delayed pragmas Depends and Global. * sem_ch6.adb (Check_Subprogram_Contract): Use the correct attribute to check for pre- and post-conditions, as well as contract-cases and test-cases. (List_Inherited_Pre_Post_Aspects): Correct the traversal of pre- and post- conditions. (Process_Contract_Cases): Update the comment on usage. Correct the traversal of contract-cases. (Process_Post_Conditions): Update the comment on usage. Correct the traversal of pre- and post-conditions. (Process_PPCs): Correct the traversal of pre- and post-conditions. (Spec_Postconditions): Use the correct attribute to check for pre- and post- conditions, as well as contract-cases and test-cases. * sem_ch13.adb (Analyze_Aspect_Specifications): Reimplement the actions related to aspects Depends and Global. Code refactoring for pre- and post-conditions. (Insert_Delayed_Pragma): New routine. * sem_prag.adb (Add_Item): New routine. (Analyze_Depends_In_Decl_Part): New routine. (Analyze_Global_In_Decl_Part): New routine. (Analyze_Pragma): Reimplement the actions related to aspects Depends and Global. Verify that a body acts as a spec for pragma Contract_Cases. (Chain_PPC): Use Add_Contract_Item to chain a pragma. (Chain_CTC): Correct the traversal of contract- and test-cases. Use Add_Contract_Item to chain a pragma. (Chain_Contract_Cases): Correct the traversal of contract- and test-cases. Use Add_Contract_Item to chain a pragma. (Check_Precondition_Postcondition): Update the comment on usage. (Check_Test_Case): Update the comment on usage. * sem_prag.ads (Analyze_Depends_In_Decl_Part): New routine. (Analyze_Global_In_Decl_Part): New routine. * sem_util.ads, sem_util.adb (Add_Contract_Item): New routine. * sinfo.adb (Classifications): New routine. (Contract_Test_Cases): New routine. (Pre_Post_Conditions): New routine. (Set_Classifications): New routine. (Set_Contract_Test_Cases): New routine. (Set_Pre_Post_Conditions): New routine. (Set_Spec_CTC_List): Removed. (Set_Spec_PPC_List): Removed. (Spec_CTC_List): Removed. (Spec_PPC_List): Removed. * sinfo.ads: Update the structure of N_Contruct along with all related comments. (Classifications): New routine and pragma Inline. (Contract_Test_Cases): New routine and pragma Inline. (Pre_Post_Conditions): New routine and pragma Inline. (Set_Classifications): New routine and pragma Inline. (Set_Contract_Test_Cases): New routine and pragma Inline. (Set_Pre_Post_Conditions): New routine and pragma Inline. (Set_Spec_CTC_List): Removed. (Set_Spec_PPC_List): Removed. (Spec_CTC_List): Removed. (Spec_PPC_List): Removed. 2013-04-23 Doug Rupp <rupp@adacore.com> * init.c (GNAT$STOP) [VMS]: Bump sigargs[0] count by 2 to account for LIB$STOP not having the chance to add the PC and PSL fields. From-SVN: r198198
2013-04-11[multiple changes]Arnaud Charlet1-1/+24
2013-04-11 Ben Brosgol <brosgol@adacore.com> * gnat_ugn.texi: Minor clean ups. 2013-04-11 Robert Dewar <dewar@adacore.com> * nlists.ads, nlists.adb, treepr.adb, treepr.ads: Move debugging function p from Nlists to Treepr. 2013-04-11 Ed Schonberg <schonberg@adacore.com> * sem_disp.adb (Check_Dispatching_Context): If the context is a contract for a null procedure defer error reporting until postcondition body is created. * exp_ch13.adb (Expand_N_Freeze_Entity): If the entity is a null procedure, complete the analysis of its contracts so that calls within classwide conditions are properly rewritten as dispatching calls. From-SVN: r197794
2012-11-06[multiple changes]Arnaud Charlet1-0/+1
2012-11-06 Tristan Gingold <gingold@adacore.com> * sem_ch9.adb (Analyze_Protected_Type_Declaration): Fix thinko in previous commit. 2012-11-06 Jose Ruiz <ruiz@adacore.com> * ali.adb (Scan_ALI): Fix parsing mechanism for -fstack-check. 2012-11-06 Thomas Quinot <quinot@adacore.com> * atree.adb, atree.ads, einfo.adb, errout.adb, errout.ads, erroutc.adb, erroutc.ads, errutil.adb, errutil.ads, err_vars.ads, expander.adb, exp_ch13.adb, exp_ch2.adb, exp_ch6.adb, exp_dist.adb, fe.h, fmap.adb, fmap.ads, gprep.adb, makeutl.adb, osint.adb, osint.ads, par_sco.adb, prepcomp.adb, prj-part.adb, prj-proc.adb, scng.adb, sdefault.ads, sem_ch10.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_dim.adb, sem_elab.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_type.adb, sem_warn.adb, stylesw.adb, stylesw.ads, targparm.adb, targparm.ads (Cascaded_Error): Rename to more descriptive name 'Check_Error_Detected'. Add calls to Check_Error_Detected at places where semantic analysis is abandoned assuming a previously detected error. From-SVN: r193235
2012-06-12[multiple changes]Arnaud Charlet1-7/+23
2012-06-12 Robert Dewar <dewar@adacore.com> * switch-c.adb, a-exexpr-gcc.adb: Minor reformatting. 2012-06-12 Vincent Pucci <pucci@adacore.com> * checks.adb (Tag_Checks_Suppressed): Remove Kill_Tag_Checks check. * einfo.adb (Universal_Aliasing): Apply to the implementation base type instead of the base type. (Get_Rep_Item_For_Entity): Return a pragma if the pragma node is not present in the Rep Item chain of the parent. (Kill_Tag_Checks): Removed (unused flag). (Set_Kill_Tag_Checks): Removed. (Get_First_Rep_Item): New routine. (Get_Rep_Pragma_For_Entity): New routine. (Has_Rep_Item): New routine. (Has_Rep_Pragma_For_Entity): New routine. (Present_In_Rep_Item): New routine. * einfo.ads (Kill_Tag_Checks): Removed. (Set_Kill_Tag_Checks): Removed. (Get_First_Rep_Item): New routine. (Get_Rep_Pragma_For_Entity): New routine. (Has_Rep_Item): New routine. (Has_Rep_Pragma_For_Entity): New routine. (Present_In_Rep_Item): New routine. * exp_attr.adb, sem_attr.adb: Attribute_CPU, Attribute_Dispatching_Domain and Attribute_Interrupt_Priority case added. * exp_ch13.adb (Expand_N_Attribute_Definition_Clause): For attribute Storage_Size, insert the new assignement statement after the Size variable declaration. * exp_ch3.adb (Build_Init_Statements): Fill the CPU, Dispatching_Domain, Priority and Size components with the Rep Item expression (if any). * exp_ch9.adb (Expand_N_Task_Type_Declaration): _CPU, _Priority, _Domain fields are always present in the corresponding record type. (Find_Task_Or_Protected_Pragma): Removed. (Get_Relative_Deadline_Pragma): New routine. (Make_Initialize_Protection): Find_Task_Or_Protected_Pragma removed. (Make_Task_Create_Call): Check CPU, Size or Dispatching_Domain Rep Item is present using new routine Has_Rep_Item. * freeze.adb (Freeze_All): Push_Scope_And_Install_Discriminants and Uninstall_Discriminants_And_Pop_Scope calls added. (Freeze_Entity): Evaluate_Aspects_At_Freeze_Point call added. * sem_aux.adb (Nearest_Ancestor): Retrieve the nearest ancestor for private derived types. * sem_ch13.adb (Analyze_Aspect_Specifications): Clean-up and reordering. Delay analysis for all aspects (except some peculiar cases). (Analyze_Attribute_Definition_Clause): Attribute_CPU, Attribute_Dispatching_Domain, Interrupt_Priority and Attribute_Priority cases added. (Analyze_Freeze_Entity): Push_Scope_And_Install_Discriminants and Uninstall_Discriminants_And_Pop_Scope calls added. (Check_Aspect_At_Freeze_Point): Reordering and clean-up. (Duplicate_Clause): Issue an explicit error msg when the current clause duplicates an aspect specification, an attribute definition clause or a pragma. (Evaluate_Aspects_At_Freeze_Point): New routine. * sem_ch13.ads (Evaluate_Aspects_At_Freeze_Point): New routine. * sem_ch9.adb, sem_ch9.ads (Install_Discriminants): New routine. (Push_Scope_And_Install_Discriminants): New routine. (Uninstall_Discriminants): New routine. (Uninstall_Discriminants_And_Pop_Scope): New routine. * sem_prag.adb (Check_Duplicate_Pragma): Issue an explicit error msg when the current pragma duplicates an aspect specification, an attribute definition clause or a pragma. (Analyze_Pragma): Remove use of flags Has_Pragma_CPU, Has_Pragma_Priority and Has_Pragma_Dispatching_Domain. * sem_util.adb (Compile_Time_Constraint_Error): Don't complain about the type if the corresponding concurrent type doesn't come from source. * sinfo.adb, sinfo.ads (Has_Pragma_CPU): Removed. (Has_Pragma_Dispatching_Domain): Removed. (Has_Pragma_Priority): Removed. (Has_Task_Info_Pragma): Removed. (Has_Task_Name_Pragma): Removed. (Set_Has_Pragma_CPU): Removed. (Set_Has_Pragma_Dispatching_Domain): Removed. (Set_Has_Pragma_Priority): Removed. (Set_Has_Task_Info_Pragma): Removed. (Set_Has_Task_Name_Pragma): Removed. * snames.adb-tmpl (Get_Pragma_Id): Pragma_CPU, Pragma_Dispatching_Domain and Pragma_Interrupt_Priority added. (Is_Pragma_Name): Name_CPU, Name_Dispatching_Domain and Name_Interrupt_Priority added. * snames.ads-tmpl: Name_Dispatching_Domain, Name_CPU and Name_Interrupt_Priority moved to the list of Attribute_Name. Attribute_CPU, Attribute_Dispatching_Domain and Attribute_Interrupt_Priority added. Pragma_Dispatching_Domain, Pragma_CPU and Pragma_Interrupt_Priority moved to the end of the Pragma_Name list. From-SVN: r188455
2011-12-02[multiple changes]Arnaud Charlet1-0/+1
2011-12-02 Bob Duff <duff@adacore.com> * gnat_ugn.texi: Clarify usage of -p binder switch. 2011-12-02 Javier Miranda <miranda@adacore.com> * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb (Effectively_Has_Constrained_Partial_View): Moved to sem_aux (In_Generic_Body): Moved to sem_aux. (Unit_Declaration_Node): Moved to sem_aux. * einfo.ads (Effectively_Has_Constrained_Partial_View): Complete documentation. * exp_attr.adb, live.adb, sem_ch10.adb, checks.adb, sem.adb, rtsfind.adb, sem_attr.adb, sem_elab.adb, exp_ch4.adb, sem_ch4.adb, exp_ch13.adb: Add with-clause on Sem_Aux. From-SVN: r181917
2011-08-29[multiple changes]Arnaud Charlet1-7/+0
2011-08-29 Yannick Moy <moy@adacore.com> * exp_ch13.adb: Adjust previous change. 2011-08-29 Robert Dewar <dewar@adacore.com> * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb, exp_ch4.adb, sem_ch8.adb: Minor code reorganization Minor reformatting. From-SVN: r178226
2011-08-29[multiple changes]Arnaud Charlet1-0/+7
2011-08-29 Yannick Moy <moy@adacore.com> * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode. * exp_ch9.adb: Do not expand tasking constructs in Alfa mode. * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of tagged types and dispatching calls in Alfa mode. 2011-08-29 Javier Miranda <miranda@adacore.com> * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that we do not report an error on an Empty node. 2011-08-29 Geert Bosch <bosch@adacore.com> * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o, a-nlrear.o and a-nurear.o. 2011-08-29 Robert Dewar <dewar@adacore.com> * freeze.adb: Minor code reorganization. Minor reformatting. * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb, sem_ch6.adb: Minor reformatting 2011-08-29 Tristan Gingold <gingold@adacore.com> * s-except.ads, s-except.adb: Provide dummy body. 2011-08-29 Yannick Moy <moy@adacore.com> * sem_warn.adb (Within_Postcondition): Take into account the case of an Ensures component in a Test_Case. From-SVN: r178222
2011-08-29[multiple changes]Arnaud Charlet1-4/+4
2011-08-29 Hristian Kirtchev <kirtchev@adacore.com> * a-fihema.ads, a-fihema.adb: Unit removed. * a-undesu.ads, a-undesu.adb: New unit implementing Ada.Unchecked_Deallocate_Subpool. * einfo.adb: Remove Associated_Collection from the node usage. Add Finalization_Master to the node usage. (Associated_Collection): Removed. (Finalization_Master): New routine. (Set_Associated_Collection): Removed. (Set_Finalization_Master): New routine. (Write_Field23_Name): Remove Associated_Collection from the output. Add Finalization_Master to the output. * einfo.ads: Remove attribute Associated_Collection and its uses in entities. Add new attribute Finalization_Master along with its uses in entitites. (Associated_Collection): Removed along with its pragma import. (Finalization_Master): New routine along with a pragma import. (Set_Associated_Collection): Removed along with its pragma import. (Set_Finalization_Master): New routine along with a pragma import. * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to Build_Finalization_Collection with Build_Finalization_Master. (Expand_Freeze_Record_Type): Move the generation of Finalize_Address before the bodies of the predefined routines. Add comment explaining this. Replace call to Build_Finalization_Collection with Build_Finalization_Master. (Freeze_Type): Replace call to Build_Finalization_Collection with Build_Finalization_Master. (Make_Finalize_Address_Body): Comment reformatting. (Make_Predefined_Primitive_Specs): Code reformatting. (Stream_Operation_OK): Update comment mentioning finalization collections. Replace RE_Finalization_Collection with RE_Finalization_Master. * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to Associated_Collection with Finalization_Master. Replace call to Build_Finalization_Collection with Build_Finalization_Master. (Expand_Allocator_Expression): Replace call to Associated_Collection with Finalization_Master. Replace call to Set_Associated_Collection with Set_Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr. (Expand_N_Allocator): Replace call to Associated_Collection with Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr. * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the comment on usage. Replace call to Needs_BIP_Collection with Needs_BIP_Finalization_Master Remplace BIP_Collection with BIP_Finalization_Master. Update all comments which mention finalization collections. Replace Associated_Collection with Finalization_Master. Replace Build_Finalization_Collection with Build_Finalization_Master. (BIP_Formal_Suffix): Update BIP_Collection's case. (Build_Heap_Allocator): Update the related comment. Rename local variable Collect to Fin_Mas_Id and update its occurrences. Update comments which mention finalization collections. Replace Set_Associated_Collection with Set_Finalization_Master. (Expand_Call): Update the code which detects a special piece of library code for .NET/JVM. (Make_Build_In_Place_Call_In_Allocator): Replace the call to Add_Collection_Actual_To_Build_In_Place_Call with Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code which generates a call to Make_Set_Finalize_Address_Ptr_Call. (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to Add_Collection_Actual_To_Build_In_Place_Call with Add_Finalization_Master_Actual_To_Build_In_Place_Call. (Make_Build_In_Place_Call_In_Assignment): Replace call to Add_Collection_Actual_To_Build_In_Place_Call with Add_Finalization_Master_Actual_To_Build_In_Place_Call. (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master. * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master. (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master. * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage. Rename local variable Collect to Fin_Mas_Id and update its occurrences. Replace call to Set_Associated_Collection with Set_Finalization_Master. (Build_Finalization_Collection): Renamed to Build_Finalization_Master. Replace the call to Associated_Collection with Finalization_Master. Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences. Update the way finalization master names are generated. Update the retrieval of the correct access type which will carry the pool and master attributes. (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved. (Make_Finalize_Address_Body): Abstract types do not need Finalize_Address. Code reformatting. (Make_Finalize_Address_Stmts): Update comment on usage. (Make_Set_Finalize_Address_Ptr_Call): Removed. (Process_Declarations): Update comments. * exp_ch7.ads (Build_Finalization_Collection): Renamed to Build_Finalization_Master. Update associated comment. (Make_Set_Finalize_Address_Ptr_Call): Removed. * exp_ch13.adb: Update comments which mention finalization collections. (Expand_N_Free_Statement): Replace the call to Associated_Collection with Finalization_Master. * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to create calls to routines Allocate_Any_Controlled and Deallocate_Any_Controlled. (Find_Finalize_Address): New routine. (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the comparison. (Requires_Cleanup_Actions): Update the comment on freeze node inspection. * exp_util.ads: Remove comment on generated code for Build_Allocate_Deallocate_Proc. The code is now quite complex and it is better to simply look in the body. * freeze.adb (Freeze_All): Update the comment of finalization collections. Replace the call to Associated_Collection with Finalization_Master. Replace the call to Build_Finalization_Collection with Build_Finalization_Master. * impunit.adb: Add a-undesu and s-stposu to the list of units. * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file a-fihema. * rtsfind.adb (Get_Unit_Name): Remove the processing for children of Ada.Finalization. Add processing for children of System.Storage_Pools. * rtsfind.ads: Remove the naming of second level children of Ada.Finalization. Remove Ada_Finalization_Heap_Management from the list of units. Remove subtype Ada_Finalization_Child. Remove the following subprogram entities: RE_Allocate RE_Deallocate RE_Finalization_Collection RE_Finalization_Collection_Ptr RE_Set_Finalize_Address_Ptr Add the naming of second level children of System.Storage_Pools. Add System_Finalization_Masters and System_Storage_Pools_Subpools to the list of units. Add subtype System_Storage_Pools_Child. Add the following subprogram entities to System.Finalization_Masters: RE_Finalization_Master RE_Finalization_Master_Ptr Add the following subprogram entities to System.Storage_Pools.Subpools: RE_Allocate_Any_Controlled RE_Deallocate_Any_Controlled RE_Root_Storage_Pool_With_Subpools RE_Root_Subpool RE_Subpool_Handle Move the following subprogram entities from Ada.Finalization.Heap_Management to System.Finalization_Masters: RE_Add_Offset_To_Address RE_Attach RE_Base_Pool RE_Detach * sem_ch3.adb (Access_Type_Declaration): Replace the call to Set_Associated_Collection with Set_Finalization_Master. * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal BIP_Finalization_Master is created. * s-finmas.adb: New unit System.Finalization_Masters. * s-finmas.ads: New unit System.Finalization_Masters. * s-stopoo.ads, s-stopoo.adb: Minor code reformatting. * s-stposu.ads, s-stposu.adb: New unit implementing System.Storage_Pools.Subpools. 2011-08-29 Bob Duff <duff@adacore.com> * tbuild.adb: Add assertion. From-SVN: r178183
2011-08-03[multiple changes]Arnaud Charlet1-1/+3
2011-08-03 Robert Dewar <dewar@adacore.com> * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb, exp_ch3.adb, exp_ch3.ads: Minor reformatting. 2011-08-03 Pascal Obry <obry@adacore.com> * g-awk.ads: Minor comment fix. 2011-08-03 Sergey Rybin <rybin@adacore.com> * tree_io.ads (ASIS_Version_Number): Update because of the changes in the tree structure related to discriminant constraints. Original_Discriminant cannot be used any more for computing the defining name for the reference to a discriminant. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the function is not visibly tagged, this is not a dispatching call and therfore is not Tag_Indeterminate, even if the function is marked as dispatching on result. From-SVN: r177281
2011-08-03[multiple changes]Arnaud Charlet1-1/+9
2011-08-03 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch13.adb: Add with and use clauses for Restrict and Rident. (Expand_N_Free_Statement): Add a guard to protect against run-times which do not support controlled types. * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect against run-times which do not support controlled types. * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect against run-times which do not support controlled types. * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect against run-times which do not support controlled types. * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to protect against run-times which do not support controlled types. 2011-08-03 Eric Botcazou <ebotcazou@adacore.com> * exp_intr.adb: Put back with and use clauses for Exp_Ch11. (Expand_Unc_Deallocation): Expand the AT_END handler at the very end. From-SVN: r177280
2011-08-03exp_ch13.adb: Add with and use clause for Targparm;Hristian Kirtchev1-0/+8
2011-08-03 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch13.adb: Add with and use clause for Targparm; (Expand_N_Free_Statement): Prevent the generation of a custom Deallocate on .NET/JVM targets since this requires pools and address arithmetic. * exp_ch4.adb (Expand_Allocator_Expression): When compiling for .NET/JVM targets, attach the newly allocated object to the access type's finalization collection. Do not generate a call to Set_Finalize_Address_Ptr on .NET/JVM because this routine does not exist in the runtime. (Expand_N_Allocator): When compiling for .NET/JVM targets, do not create a custom Allocate for object that do not require initialization. Attach a newly allocated object to the access type's finalization collection on .NET/JVM. * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for assignment of controlled types on .NET/JVM. The two hidden pointers Prev and Next and stored and later restored after the assignment takes place. * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized kludge for .NET/JVM to recognize a particular piece of code coming from Heap_Management and change the call to Finalize into Deep_Finalize. * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of finalization collections on .NET/JVM only for types derived from Controlled. Separate the association of storage pools with a collection and only allow it on non-.NET/JVM targets. (Make_Attach_Call): New routine. (Make_Detach_Call): New routine. (Process_Object_Declarations): Suppress the generation of build-in-place return object clean up code on .NET/JVM since it uses pools. * exp_ch7.ads (Make_Attach_Call): New routine. (Make_Detach_Call): New routine. * exp_intr.adb Add with and use clause for Targparm. (Expand_Unc_Deallocation): Detach a controlled object from a collection on .NET/JVM targets. * rtsfind.ads: Add entries RE_Attach, RE_Detach and RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table. * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special names used in finalization. 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com> * a-fihema.adb: Add with and use clauses for System.Soft_Links. (Attach, Detach): Lock the current task when chaining an object onto a collection. From-SVN: r177276
2011-08-03a-except.adb, [...] (Raise_From_Controlled_Operation): Rewritten to create ↵Hristian Kirtchev1-1/+104
the message strings when... 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com> * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation): Rewritten to create the message strings when the exception is not raised by an abort during finalization. * a-except.ads, a-except-2005.ads: Add pragma Export for procedure Raise_From_Controlled_Operation and update its associated comment. * a-fihema.ads, a-fihema.adb: New GNAT unit. Ada.Finalization.Heap_Management provides key functionality associated with controlled objects on the heap, their creation, finalization and reclamation. Type Finalization_Collection is effectively a wrapper which sits ontop of a storage pool and performs all necessary bookkeeping for all the objects it contains. Each access-to-controlled or access-to-class-wide type receives a collection as part of its expansion. The compiler generates buffer code and invokes Allocate / Deallocate to create and destroy allocated controlled objects. * a-finali.adb ("="): Removed. * a-finali.ads ("="): Removed. Controlled types no longer carry hidden fields Prev and Next. * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer. A library unit with at least one controlled object on the library level has a special finalizer which is invoked by the binder. To signal this, ali files carry field PF. * ali.ads: New field in type Unit_Record called Has_Finalizer. Add associated comment on field usage. * a-tags.adb (Get_RC_Offset): Removed. (Needs_Finalization): New routine. * a-tags.ads: Update the structure of the GNAT dispatch tables. Dispatch tables now carry field Needs_Finalization which provides runtime indication whether a type is controlled or has controlled components or both. Remove field RC_Offset. (Get_RC_Offset): Removed along with its associated pragma Export. Since tagged types with controlled components no longer carry hidden field _controller, the special mechanism to retrieve its location is no longer needed. (Needs_Finalization): New routine. * atree.ads, atree.adb (Elist24): New routine. (Set_Elist24): New routine. * atree.h: Add a define clause for Elist24. * bindgen.adb New library-level variable Lib_Final_Built. (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the presence of a VM target, the routine generates calls to the proper library finalization routine. (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM targets. Set the correct library finalization routine depending on whether the library has controlled objects or this is a VM compilation. (Gen_Finalize_Library_Ada): New routine. This procedure generates calls to library-level finalizers of compiled units in reverse order of elaboration. It also produces exception management code and reraises a potential exception after all units have been finalized. (Gen_Finalize_Library_C): New routine. This procedure generates calls to library-level finalizers of compiled units in reverse order of elaboration. (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the definitions of all library-level finalizers available to the compilation (Gen_Main_Ada): Directly call Adafinal which now contails all target dependent code. (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call System.Standard_Library.Adafinal directly. If the library needs finalization actions, create the sequence of finalization calls. (Gen_Output_File_Ada): Alphabetize local variables and constants. Generate a with clause for System.Soft_Links when compiling for a VM. Remove the code which imports System.Standard_Library.Adafinal as Do_Finalize. Generate the library finalization routine. (Gen_Output_File_C): Add new local constant Needs_Library_Finalization. If the library needs finalization actions, create all the definitions of library- level finalizers. (Has_Finalizer): New routine. Determines whether at least one compiled unit has a library-level finalizer. Add type Qualification_Mode. (Set_Unit_Name): Add a formal which controls the replacement of a dot. * einfo.adb: New usage of field 15 as Return_Flag. Remove Finalization_Chain_Entity from the usages of field 19. Remove Associated_Final_Chain from the usages of field 23. New usage of field 23 as Associated_Collection. New usage of field 24 as Finalizer. New usage of flag 252 as Is_Processed_Transient. (Associated_Final_Chain): Removed. (Associated_Collection): New routine. (Finalization_Chain_Entity): Removed. (Finalizer): New routine. (Is_Finalizer): New routine. (Is_Processed_Transient): New routine. (Return_Flag): New routine. (Set_Associated_Final_Chain): Removed. (Set_Associated_Collection): New routine. (Set_Finalization_Chain_Entity): Removed. (Set_Finalizer): New routine. (Set_Is_Processed_Transient): New routine. (Set_Return_Flag): New routine. (Write_Entity_Flags): Include Is_Processed_Transient to the list of displayed flags. (Write_Field8_Name): Alphabetize the output. (Write_Field11_Name): Alphabetize the output. (Write_Field12_Name): Alphabetize the output. (Write_Field13_Name): Alphabetize the output. (Write_Field14_Name): Alphabetize the output. (Write_Field15_Name): Alphabetize the output. (Write_Field16_Name): Alphabetize the output. (Write_Field17_Name): Alphabetize the output. (Write_Field18_Name): Alphabetize the output. (Write_Field19_Name): Alphabetize the output. Remove the output of Finalization_Chain_Entity. (Write_Field20_Name): Alphabetize the output. (Write_Field21_Name): Alphabetize the output. (Write_Field22_Name): Alphabetize the output. (Write_Field23_Name): Alphabetize the output. Remove the output of Associated_Final_Chain. Add output for Associated_Collection. (Write_Field24_Name): Alphabetize the output. (Write_Field25_Name): Add output for Finalizer. (Write_Field26_Name): Alphabetize the output. (Write_Field27_Name): Alphabetize the output. (Write_Field28_Name): Alphabetize the output. * einfo.ads: Add new field description for Associated_Collection and its uses in nodes. Remove Associated_Final_Chain and its uses in nodes. Remove Finalization_Chain_Entity and its uses in nodes. Add new field description for Finalizer and its uses in nodes. Add new synthesized attribute Is_Finalizer. Add new flag description for Is_Processed_Transient and its uses in nodes. Add new field description for Return_Flag and its uses in nodes. (Associated_Final_Chain): Removed along with its pragma Inline. (Associated_Collection): New routine and pragma Inline. (Finalization_Chain_Entity): Removed along with its pragma Inline. (Finalizer): New routine and pragma Inline. (Is_Finalizer): New routine and pragma Inline. (Is_Processed_Transient): New routine and pragma Inline. (Return_Flag): New routine and pragma Inline. (Set_Associated_Final_Chain): Removed along with its pragma Inline. (Set_Associated_Collection): New routine and pragma Inline. (Set_Finalization_Chain_Entity): Removed along with its pragma Inline. (Set_Finalizer): New routine and pragma Inline. (Set_Is_Processed_Transient): New routine and pragma Inline. (Set_Return_Flag): New routine and pragma Inline. * exp_aggr.adb: Alphabetize subprograms. (Build_Array_Aggr_Code): Remove formal Flist and its associated comment. (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their associated comments. Remove local variables External_Final_List and Attach. Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to Ancestor. Remove the retrieval of finalization lists. Update the call to Make_Adjust_Call. (Convert_Aggr_In_Allocator): Remove the retrieval of finalization lists. Update the call to Late_Expansion. (Convert_Aggr_In_Assignment): Update the call to Late_Expansion. (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion. (Gen_Assign): Remove the retrieval of the finalization list used to build the assignment. Update the calls to Make_Init_Call and Make_Adjust_Call. (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions. Remove the mechanism to determine attachment levels and finalization list retrieval. Remove the processing for coextensions. (Init_Controller): Removed. Controllers no longer exist. (Late_Expansion): Remove formals Flist and Obj along with their associated comments. Update the calls to Build_Record_Aggr_Code and Build_Array_Aggr_Code. * exp_ch13.adb (Expand_N_Free_Statement): New routine. (Expand_N_Freeze_Entity): Add special processing for finalizers which appear in entry bodies, protected subprograms and task bodies. * exp_ch13.ads (Expand_N_Free_Statement): New routine. * exp_ch3.adb (Add_Final_Chain): Removed. (Build_Array_Init_Proc): Alphabetize local variables. (Build_Assignment): Alphabetize local variables. Update the call to Maked_Adjust_Call. (Build_Class_Wide_Master): Rename local variables to better reflect their role. (Build_Discriminant_Assignments): Code reformatting. (Build_Init_Call_Thru): Code reformatting. (Build_Init_Procedure): Code reformatting. Generate a special version of Deep_Finalize which is capable of finalizing all initialized components and ignore the rest. (Build_Init_Statements): Rename local variables to better reflect their role. Reimplement the mechanism to include the creation and update of an index variable called a "counter". It is used as a bookmark for tracing initialized and non-initialized components. (Build_Initialization_Call): Remove local variable Controller_Typ. Alphabetize all local variables. Remove the initialization of the record controller and update the call to Make_Init_Call. (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent. New local variable Counter. (Constrain_Array): Alphabetize. (Expand_Freeze_Array_Type): Create a collection instead of a finalization list. (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive Finalize_Address which is used in conjunction with allocated controlled objects. (Expand_N_Object_Declaration): Remove the creation of a finalization list for anonymous access types. Update the calls to Make_Init_Call and Make_Adjust_Call. (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the retrieval of finalization lists. Remove the expansion of the record controller. Create TSS primitive Finalize_Address used in conjunction with controlled objects on the heap. Create finalization collections for access-to-controlled record components. (Expand_Record_Controller): Removed. (Freeze_Type): Remove the freezing of record controllers. Freezing of class-wide types now requires additional processing. Create finalization collections for access-to-controlled types. (Increment_Counter): New routine. (Make_Counter): New routine. (Make_Eq_If): Remove the mention of Name_uController. (Make_Predefined_Primitive_Specs): There is no longer need to skip types coming from System.Finalization_Root. (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles. (Predefined_Primitive_Bodies): There is no longer need to skip types coming from System.Finalization_Root. (Stream_Operation_OK): Do not generate stream routines for type Ada.Finalization.Heap_Management.Finalization_Collection. * exp_ch3.ads: Alphabetize subprograms. * exp_ch4.adb: Remove with and use clause for Sem_Ch8. Add with and use clause for Lib. (Complete_Coextension_Finalization): Removed. (Complete_Controlled_Allocation): New routine. Create a finalization collection for anonymous access-to-controlled types. Create a custom Allocate which interfaces with the back end and the machinery in Heap_Management. (Expand_Allocator_Expression): Add necessary calls to Complete_Controlled_Allocation. Remove the retrieval of finalization lists. Update the calls to Make_Adjust_Call. Generate a call to Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate the associated collection. (Expand_N_Allocator): Remove the processing for dynamic coextensions. Code clean up. Remove the retrieval of finalization lists and attachment levels. Update the call to Make_Init_Call. Generate a call to Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate the associated collection. (Get_Allocator_Final_List): Removed. Finalization lists are not available. (Suitable_Element): Remove the mention of Name_uController. * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp. (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of the left hand side, carry out the assignment and adjust the left hand side. * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed. (Add_Collection_Actual_To_Build_In_Place_Call): New routine. (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to BIP_Collection and BIPcollection. (Build_Heap_Allocator): New routine used to allocate the return object of a build-in-place function onto a collection. (Expand_Ctrl_Function_Call): Moved from Exp_Ch7. (Expand_Call): Do not replace direct calls to Deep routines with their aliases. (Expand_N_Extended_Return_Statement): Give all variables shorter names and update their occurrences. Add a special return flag to monitor the [ab]normal execution of the function. The flag is set right before the return statement. Rewrite the mechanism used to allocate a build-in-place return object on the heap or on a storage pool. (Is_Direct_Deep_Call): New routine. (Make_Build_In_Place_Call_In_Allocator): Add a collection to a build-in-place function call instead of a final list. Build a call to Set_Finalize_Address_Ptr to decorate the associated collection. (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in order to name the build-in-place function call's result for later finalization. Add a collection to a build-in-place function call instead of a final list. (Make_Build_In_Place_Call_In_Assignment): Add a collection to a build-in-place function call instead of a final list. Remove the code which moves one final list and transforms it into the actual in a nested build-in-place call. (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a build-in-place function call instead of a final list. (Move_Final_List): Removed. (Needs_BIP_Collection): New routine. (Needs_BIP_Final_List): Removed. * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in enumeration type BIP_Formal_Kind. Update the related comment. (Needs_BIP_Collection): New routine. (Needs_BIP_Final_List): Removed. * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the majority of subprograms in this unit. Add Name_Finalize_Address to array Name_Of and TSS_Finalize_Address to array Deep_Name_Of. (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization statements for an array type. (Build_Adjust_Statements): Create the adjust statements for a record type. (Build_Cleanup_Statements): New routine. A procedure which given any construct containing asynchronous calls, references to _master, or is a task body, a task allocation or a protected body produces the necessary runtime calls to clean up these constructs. (Build_Exception_Handler): New routine. (Build_Final_List): Removed. (Build_Finalization_Collection): New routine. A core procedure which creates a collection to service heap allocated controlled objects associated with an access-to-controlled type. (Build_Finalize_Statements): Create the finalization statements for a record types. (Build_Finalizer): New routine. A core procedure which given any construct with declarations and/or statements detects all objects which need any type of clean up (controlled objects, protected objects) and generates all necessary code to clean up the said objects in the proper order. (Build_Finalizer_Call): New routine. (Build_Initialize_Statements): Create the initialization statements for an array type. The generated routine contains code to finalize partially initialized arrays. (Build_Object_Declarations): New routine. (Build_Raise_Statement): New routine. (Clean_Simple_Protected_Objects): Removed. (Controller_Component): Removed. (Enclosing_Function): New routine. (Expand_Cleanup_Actions): Create a finalizer for a construct which has either declarations or statements or both. (Expand_N_Package_Body): Create a finalizer for a non-generic package. (Expand_N_Package_Declaration): Create a finalizer for a non-generic package. (Find_Final_List): Removed. (Global_Flist_Ref): Removed. (In_Finalization_Root): Removed. (Insert_Actions_In_Scope_Around): Determine the range of the transient scope in terms of tree nodes. Process all transient variables within that range. (Make_Adjust_Call): Rewritten. There is no longer an attach call generated after the adjust. (Make_Attach_Call): Removed. (Make_Call): New routine. (Make_Clean): Removed. (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate build routines. (Make_Deep_Proc): Rewritten to generate the new profile signature used in Deep routines. (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate build routines. (Make_Final_Call): Modified to simply create a call to either Deep_Finalize or Finalize. (Make_Finalize_Address_Body): New routine. (Make_Finalize_Address_Stmts): New routine. A function which produces TSS primitive Finalize_Address used in conjunction with heap allocated controlled objects. (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM. (Make_Init_Call): Rewritten. There is no longer an attach call generated after initialization. (Make_Local_Deep_Finalize): New routine. (Make_Set_Finalize_Address_Ptr_Call): New routine. (Make_Transient_Block): Remove the finalization list retrieval and manipulation. (Needs_Finalization): Moved to Exp_Util. (Parent_Field_Type): New routine. (Preprocess_Components): New routine. (Process_Transient_Objects): New routine. (Wrap_HSS_In_Block): New routine. (Wrap_Transient_Declaration): Remove finalization list management and controller insertion. (Wrap_Transient_Expression): Code reformatting. (Wrap_Transient_Statement): Code reformatting. * exp_ch7.ads (Build_Final_List): Removed. (Build_Finalization_Collection): New routine. (Build_Raise_Statement): New routine. (Controller_Component): Removed. (Expand_Ctrl_Function_Call): Moved to Exp_Ch6. (Find_Final_List): Removed. (In_Finalization_Root): Removed. (Is_Simple_Protected_Type): Update related comment. (Make_Adjust_Call): New parameter profile and associated comments. (Make_Attach_Call): Removed. (Make_Final_Call): New parameter profile and associated comments. (Make_Finalize_Address_Body): New routine. (Make_Init_Call): New parameter profile and associated comments. (Make_Local_Deep_Finalize): New routine. (Make_Set_Finalize_Address_Ptr_Call): New routine. (Needs_Finalization): Moved to Exp_Util. * exp_ch9.adb (Add_Object_Pointer): Code reformatting. (Expand_N_Protected_Body): Remove the handling of finalization lists. (Find_Protection_Type): Moved to Exp_Util. * exp_disp.adb: Remove with and use clauses for Exp_Ch7. (Make_DT): Update sequence of dispatch table initialization. Remove the initialization of field RC_Offset. Add initialization of field Needs_ Finalization. * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting. Reimplement how an object is first finalized, then deallocated. * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Code reformatting. * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address. Register TSS_Finalize_Address with type TSS_Names. * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core procedure provides the interface between an allocation / deallocation and the support machinery in Ada.Finalization.Heap_Management. (Find_Init_Call): Code reformatting. (Find_Init_Call_In_List): Code reformatting. (Find_Protection_Type): Moved from Exp_Ch9. (Find_Prim_Op): Reimplement to add preference of recovered primitive. (Has_Controlled_Coextensions): Removed. (Has_Controlled_Objects): New routine. (In_Library_Level_Package_Body): New routine. (Insert_Action_After): New routine. (Is_Finalizable_Transient): New routine. This predicate determines whether an object declaration is one of the many variants of controlled transients. (Is_Null_Access_BIP_Func_Call): New routine. (Is_Non_BIP_Func_Call): New routine. (Is_Related_To_Func_Return): New routine. (Needs_Finalization): Moved from Exp_Ch7. * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine. (Find_Protection_Type): Moved from Exp_Ch9. (Has_Controlled_Coextensions): Removed. (Has_Controlled_Objects): New routine. (In_Library_Level_Package_Body): New routine. (Insert_Action_After): New routine. (Is_Finalizable_Transient): New routine. (Is_Null_Access_BIP_Func_Call): New routine. (Is_Non_BIP_Func_Call): New routine. (Is_Related_To_Func_Return): New routine. (Needs_Finalization): Moved from Exp_ch7. * expander.adb (Expand): Add a case for N_Free_Statement. * freeze.adb (Freeze_All): Replace the generation of a finalization list with a collection for access-to-controlled types. (Freeze_Entity): Code reformatting. (Freeze_Record_Type): Remove the freezing of a record controller component. (Freeze_Subprogram): Code reformatting. * inline.adb (Cleanup_Scopes): Remove the reset of the scope finalization list. * lib-writ.adb (Write_Unit_Information): Output "PF" when a package has a library-level finalizer. * lib-writ.ads: Add "PF" to the sequence of unit attributes. * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed. * Makefile.rtl: Remove a-filico and s-finimp from the list of object files. Add a-fihema to the list of object files. * par-ch4.adb: Alphabetize the associations in type Is_Parameterless_Attribute. * rtsfind.ads: Ada.Finalization_List.Controller and System.Finalization_Implementation are no longer a GNAT unit. Update the range of type Ada_Finalization_Child. Remove the following recoverable entities: RE_Attach_To_Final_List RE_Deep_Tag_Attach RE_Finalize_List RE_Finalize_One RE_Finalizable_Ptr_Ptr RE_Global_Final_List RE_Limited_Record_Controller RE_List_Controller RE_Move_Final_List RE_Record_Controller RE_Simple_List_Controller Add the following recoverable entities: RE_Add_Offset_To_Address RE_Allocate RE_Base_Pool RE_Deallocate RE_Exception_Identity RE_Finalization_Collection RE_Finalization_Collection_Ptr RE_Needs_Finalization RE_Save_Library_Occurrence RE_Set_Finalize_Address_Ptr RE_Set_Storage_Pool_Ptr RE_Storage_Count * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of Name_uController. * sem_aux.adb (First_Discriminant): Remove mention of Name_uController. (First_Stored_Discriminant): Remove the mention of Name_uController. * sem_aux.ads: Comment reformatting. * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery to redecorate an already existing class-wide type. (Decorate_Tagged_Type): New parameter profile and associated comment. Create a "shadow class-wide type" for a shadow entity. * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting of the final chain along with the associated comment. * sem_ch3.adb (Access_Type_Declaration): Add new local variable Full_Desig and set it to the full view of the designated type. Initialize the finalization collection to empty. (Build_Derived_Record_Type): Alphabetize local variables. Code reformatting. (Collect_Fixed_Components): Remove the mention of Name_uController. (Create_Constrained_Components): Remove the mention of Name_uController. (Make_Class_Wide_Type): Add specialized code to redecorate an existing class-wide type of a shadow entity. (Process_Full_View): Update the machinery which marks type Limited_Controlled's entity as limited. * sem_ch4.adb (Analyze_One_Call): Code reformatting. * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization list, instead make a collection build-in-place formal. * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of a designated type in order to establish a match between the renaming and the renamed entity. (Find_Selected_Component): Add guard to prevent spurious exceptions from being raised on .NET/JVM. * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address to the list of primitive that need special processing. Update arrays C_Names and D_Names. (Replace_Types): Handle class-wide types. * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a different parameter profile, look at the first formal. * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and use clauses for Exp_Util. * sem_res.adb: Remove with and use clauses for Elists. (Propagate_Coextensions): Removed. (Resolve_Allocator): Do not propagate the list of coextensions from one allocator to another. * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable Deaccessed_T to Desig_Typ. (Enter_Name): Remove the mention of Name_uController. (Gather_Components): Remove the mention of Name_uController. (Incomplete_Or_Private_View): New routine. (Is_Coextension_Root): Removed. (Is_Fully_Initialized_Type): Remove the mention of Name_uController. * sem_util.ads (Incomplete_Or_Private_View): New routine. (Is_Coextension_Root): Removed. * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion. Controlled types are now derived from a null tagged record. Remove types Finalizable_Ptr, Finalizable and Empty_Root_Controlled. * sinfo.adb (Coextensions): Removed. (Set_Coextensions): Removed. * sinfo.ads: Remove Coextensions from the explanation of node fields and its uses in nodes. Update the field usage of N_Allocator. (Coextensions): Removed along with its pragma Inline. (Set_Coextensions): Removed along with its pragma Inline. * snames.ads-tmpl: Remove names Name_uClean Name_uController Name_uFinal_List Name_uLocal_Final_List Name_Finalization_Root Name_Next Name_Prev Add names Name_uFinalizer Name_Finalize_Address * s-pooglo.adb (Allocate): Add overriding indicator. (Deallocate): Add overriding indicator. (Storage_Size): Add overriding indicator. * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather than Finalize_Global_List. (Null_Finalize_Global_List): Removed. (Save_Library_Occurrence): New routine. * s-soflin.ads: Remove variable Finalize_Global_List along with its initialization. Add variable Finalize_Library_Objects along with its pragma Export. Add variables Library_Exception and Library_Exception_Set along with their pragma Export. (Null_Finalize_Global_List): Removed. (Save_Library_Occurrence): New routine. * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects rather than Finalize_Global_List. * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field of the constructed node. From-SVN: r177275
2011-08-03[multiple changes]Arnaud Charlet1-1/+2
2011-08-03 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb, exp_aggr.adb: Minor reformatting. 2011-08-03 Thomas Quinot <quinot@adacore.com> * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of tagged assignment when discriminant checks are suppressed. This is useless and extremely costly in terms of static stack usage. 2011-08-03 Bob Duff <duff@adacore.com> * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances of generics, because this leads to the wrong entity in the wrong scope, causing (e.g.) pragma Export_Procedure to get an error if the entity is an instance. (Process_Interface_Name): Follow Alias for instances of generics, to correct for the above change. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value is an integer literal it is always safe to replace the reference. In addition, if the reference appears in the generated code for an object declaration it is necessary to copy because otherwise the reference might be to the uninitilized value of the discriminant of the object itself. 2011-08-03 Pascal Obry <obry@adacore.com> * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no ACL used, in this case we want to check for ending .exe, not .exe anywhere in the path. 2011-08-03 Sergey Rybin <rybin@adacore.com> * tree_io.ads (ASIS_Version_Number): Update because of the changes in the tree structure (semantic decoration of references to record discriminants). From-SVN: r177237
2011-08-03[multiple changes]Arnaud Charlet1-9/+12
2011-08-03 Gary Dismukes <dismukes@adacore.com> * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete choices of a named array aggregate, bail out when any choices are marked as Errors_Posted. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope in which entity is frozen, to handle properly loop variables in iterators. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the subtype is not static, compute the upper bound using attributes, to handle properly index types that are not integer types. 2011-08-03 Bob Duff <duff@adacore.com> * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs. Update copyright notice. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Build_Discriminant_Constraints): Only use Original_Discriminant if within an instance. * sem_ch4.adb (Analyze_Selected_Component): Ditto. 2011-08-03 Thomas Quinot <quinot@adacore.com> * einfo.ads: Minor reformatting. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a composite type with an unfrozen subcomponent, in the profile of a primitive operation. From-SVN: r177236
2011-08-02[multiple changes]Arnaud Charlet1-2/+8
2011-08-02 Robert Dewar <dewar@adacore.com> * sem_attr.adb: Minor reformatting. 2011-08-02 Ed Falis <falis@adacore.com> * init.c: Revert previous change. 2011-08-02 Robert Dewar <dewar@adacore.com> * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value (Has_Default_Component_Value): Removed * einfo.ads Comment updates (Has_Default_Aspect): Replaces Has_Default_Value (Has_Default_Component_Value): Removed * exp_ch13.adb (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects * exp_ch3.adb (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects (Get_Simple_Init_Val): Handle Default_Value aspect (Needs_Simple_Initialization): Handle Default_Value aspect * exp_ch3.ads: Needs_Simple_Initialization * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect * par-prag.adb (Pragma_Default[_Component]Value) Removed * sem_ch13.adb (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects * sem_prag.adb (Pragma_Default[_Component]Value) Removed * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed 2011-08-02 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate package containing iteration primitives. exp_ch5.adb (Expand_Iterator_Loop): ditto. From-SVN: r177147
2011-08-01[multiple changes]Arnaud Charlet1-2/+6
2011-08-01 Robert Dewar <dewar@adacore.com> * aspects.ads (Boolean_Aspects): New subtype. * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects for derived types in cases where the parent type and derived type have aspects. * freeze.adb (Freeze_Entity): Fix problems in handling derived type with aspects when parent type also has aspects. (Freeze_Entity): Deal with delay of boolean aspects (must evaluate boolean expression at this point). * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in accordance with final decision on the Ada 2012 feature. * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag. 2011-08-01 Matthew Heaney <heaney@adacore.com> * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector. From-SVN: r177005
2010-10-22a-except-2005.adb (Rmsg_18): New message text.Robert Dewar1-329/+0
2010-10-22 Robert Dewar <dewar@adacore.com> * a-except-2005.adb (Rmsg_18): New message text. * a-except.adb (Rmsg_18): New message text. * atree.adb (List25): New function (Set_List25): New procedure * atree.ads (List25): New function (Set_List25): New procedure * einfo.adb (Static_Predicate): Is now a list (OK_To_Reference): Present in all entities * einfo.ads (Static_Predicate): Is now a list (OK_To_Reference): Applies to all entities * exp_ch13.adb (Build_Predicate_Function): Moved to Sem_Ch13 * sem_attr.adb (Bad_Attribute_For_Predicate): Call Bad_Predicated_Subtype_Use. * sem_case.ads, sem_case.adb: Major surgery to deal with predicated subtype case. * sem_ch13.adb (Build_Predicate_Function): Moved from Exp_Ch13 to Sem_Ch13. (Build_Static_Predicate): New procedure handles static predicates. * sem_ch3.adb (Analyze_Subtype_Declaration): Delay freeze on subtype with no constraint if ancestor subtype has predicates. (Analyze_Variant_Part): New calling sequence for Analyze_Choices * sem_ch4.adb (Junk_Operand): Don't complain about OK_To_Reference entity. (Analyze_Case_Expression): New calling sequence for Analyze_Choices * sem_ch5.adb (Analyze_Case_Statement): New calling sequence for Analyze_Choices. * sem_util.ads, sem_util.adb (Bad_Predicated_Subtype_Use): New procedure * types.ads (PE_Bad_Predicated_Generic_Type): Replaces PE_Bad_Attribute_For_Predicate. * atree.h: Add definition of List25. From-SVN: r165828
2010-10-22[multiple changes]Arnaud Charlet1-0/+1
2010-10-22 Robert Dewar <dewar@adacore.com> * par-ch5.adb: Minor reformatting. * gcc-interface/Make-lang.in: Update dependencies. 2010-10-22 Robert Dewar <dewar@adacore.com> * a-except.adb, a-except-2005.adb: Add new Rcheck entry. * exp_ch13.adb (Add_Call): Make sure subtype is marked with Has_Predicates set to True if it inherits predicates. * sem_attr.adb: Handle 'First/'Last/'Range for predicated types * types.ads (PE_Bad_Attribute_For_Predicate): New reason code * types.h: Add new Rcheck entry. * einfo.ads, einfo.adb (Static_Predicate): New field. Minor code reorganization (file float routines in proper section) Fix bad field name in comments. 2010-10-22 Robert Dewar <dewar@adacore.com> * sem_eval.adb (Subtypes_Statically_Compatible): Check null exclusion case. 2010-10-22 Vincent Celier <celier@adacore.com> * prj-conf.adb (Get_Config_Switches): Detect if there is at least one declaration of IDE'Compiler_Command for one of the language in the main project. (Do_Autoconf): If there were at least one Compiler_Command declared and no target, invoke gprconfig with --target=all instead of the normalized host name. 2010-10-22 Robert Dewar <dewar@adacore.com> * par-ch4.adb: Update syntax in comments for Ada 2012. * sinfo.ads: Update syntax in comments for Ada 2012 * par-ch3.adb (Check_Restricted_Expression): Remove "in Ada 2012 mode" from msg. From-SVN: r165822
2010-10-22checks.adb (Apply_Predicate_Check): Remove attempt at optimization when ↵Robert Dewar1-11/+3
subtype is the same... 2010-10-22 Robert Dewar <dewar@adacore.com> * checks.adb (Apply_Predicate_Check): Remove attempt at optimization when subtype is the same, caused legitimate checks to be missed. * exp_ch13.adb (Build_Predicate_Function): Use Nearest_Ancestor to get inheritance from right entity. * freeze.adb (Freeze_Entity): Use Nearest_Ancestor to freeze in the derived type case if the ancestor type has predicates. * sem_aux.ads, sem_aux.adb (Nearest_Ancestor): New function. * sem_prag.adb (Check_Enabled): Minor code reorganization. From-SVN: r165807
2010-10-22[multiple changes]Arnaud Charlet1-14/+31
2010-10-22 Robert Dewar <dewar@adacore.com> * einfo.ads, einfo.adb (Has_Predicates): Flag is now on all entities (simplifies code). * exp_ch13.adb (Build_Predicate_Function): Output info msgs for inheritance. * sem_ch13.adb (Analyze_Aspect_Specifications): Make sure we have a freeze node for entities for which a predicate is specified. (Analyze_Aspect_Specifications): Avoid duplicate calls * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove attempt to avoid duplicate calls to Analye_Aspect_Specifications. 2010-10-22 Thomas Quinot <quinot@adacore.com> * a-exextr.adb, atree.ads, freeze.adb: Minor reformatting. From-SVN: r165804
2010-10-21sem_res.adb, [...]: Minor reformatting.Thomas Quinot1-20/+16
2010-10-21 Thomas Quinot <quinot@adacore.com> * sem_res.adb, exp_ch13.adb: Minor reformatting. 2010-10-21 Thomas Quinot <quinot@adacore.com> * sem_ch3.adb (Check_Or_Process_Discriminant): Reject illegal attempt to provide a tagged full view as the completion of an untagged partial view if the partial view has a discriminant with default. From-SVN: r165775
2010-10-21einfo.ads, einfo.adb: Add handling of predicates.Robert Dewar1-0/+325
2010-10-21 Robert Dewar <dewar@adacore.com> * einfo.ads, einfo.adb: Add handling of predicates. Rework handling of invariants. * exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_ch6.adb: Minor changes to handing of invariants. * par-prag.adb: Add dummy entry for pragma Predicate * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for Predicate aspects. * sem_prag.adb: Add implementation of pragma Predicate. * snames.ads-tmpl: Add entries for pragma Predicate. 2010-10-21 Robert Dewar <dewar@adacore.com> * elists.adb: Minor reformatting. From-SVN: r165766
2010-10-11[multiple changes]Arnaud Charlet1-0/+25
2010-10-11 Robert Dewar <dewar@adacore.com> * g-htable.ads (Get_First): New procedural version for Simple_HTable (Get_Next): New procedural version for Simple_HTable * s-htable.adb (Get_First): New procedural version for Simple_HTable (Get_Next): New procedural version for Simple_HTable * s-htable.ads (Get_First): New procedural version for Simple_HTable (Get_Next): New procedural version for Simple_HTable 2010-10-11 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb (Propagate_Discriminants): To gather the components of a variant part, use the association list of the subaggregate, which already includes the values of the needed discriminants. 2010-10-11 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Changes to accomodate aspect delay (Tree_Write): New procedure. * atree.ads, atree.adb: Flag3 is now Has_Aspects and applies to all nodes. * atree.h: Flag3 is now Has_Aspects and applies to all nodes * debug.adb: Add debug flag gnatd.A * einfo.adb (Has_Delayed_Aspects): New flag (Get_Rep_Item_For_Entity): New function * einfo.ads (Has_Delayed_Aspects): New flag (Get_Rep_Item_For_Entity): New function * exp_ch13.adb (Expand_N_Freeze_Entity): Insert delayed aspects into tree. * exp_ch3.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb: New calling sequence for Freeze_Entity. * freeze.ads, freeze.adb (Freeze_Entity): Takes node rather than source ptr. All calls are changed to this new interface. (Freeze_And_Append): Same change (Freeze_Entity): Evaluate deferred aspects * sem_attr.adb: New calling sequence for Freeze_Entity (Eval_Attribute): Don't try to evaluate attributes of unfrozen types when we are in spec expression preanalysis mode. * sem_ch10.adb: New calling sequence for Freeze_Entity * sem_ch11.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). * sem_ch12.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). * sem_ch13.adb (Analyze_Aspect_Specifications): Major rewrite to accomodate delaying aspect evaluation to the freeze point. (Duplicate_Clause): Simplify using Get_Rep_Item_For_Entity, and also accomodate delayed aspects. (Rep_Item_Too_Late): Deal with delayed aspects case * sem_ch13.ads (Rep_Item_Too_Late): Document handling of delayed aspects * sem_ch3.adb (Analyze_Subtype_Declaration): Make sure that generic actual types are properly frozen (this is needed because of the new check in Eval_Attribute that declines to evaluate attributes for unfrozen types). Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). * sem_ch3.ads (Preanalyze_Spec_Expression): Note use for delayed aspects * sem_ch5.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). New calling sequence for Freeze_Entity. * sem_ch9.adb, sem_ch7.adb, sem_ch6.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). New calling sequence for Freeze_Entity * sem_prag.adb (Check_Duplicate_Pragma): Simplify using Get_Rep_Item_For_Entity (Get_Pragma_Arg): Moved to Sinfo * sinfo.ads, sinfo.adb (Aspect_Rep_Item_: New field (Is_Delayed_Aspect): New flag (Next_Rep_Item): Document use for aspects (Get_Pragma_Arg): Moved here from Sem_Prag * sprint.adb (Sprint_Aspect_Specifications): Now called after semicolon is output and removes semicolon (simplifies interface). (Sprint_Node_Actual): Simplify handling of aspects now that Has_Aspects applies to any node. * tree_gen.adb: Write contents of Aspect_Specifications hash table * tree_in.adb: Read and initialize Aspect_Specifications hash table * treepr.adb (Print_Node): Print Has_Aspects flag (Print_Node): Print Aspect_Specifications in Has_Aspects set * xtreeprs.adb: Remove obsolete references to Flag1,2,3 From-SVN: r165300
2010-08-05[multiple changes]Arnaud Charlet1-0/+10
2010-08-05 Thomas Quinot <quinot@adacore.com> * exp_ch4.adb: Minor reformatting * gnat1drv.adb: Minor reformatting. Minor code reorganization (use Nkind_In). 2010-08-05 Ed Schonberg <schonberg@adacore.com> * exp_util.ads, exp_util.adb (Needs_Constant_Address): New predicate to determine whether the expression in an address clause for an initialized object must be constant. Code moved from freeze.adb. (Remove_Side_Effects): When the temporary is initialized with a reference, indicate that the temporary is a constant as done in all other cases. * freeze.adb (Check_Address_Clause): use Needs_Constant_Address. * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case 'Address): If object does not need a constant address, remove side effects from address expression, so it is elaborated at the point of the address clause and not at the freeze point of the object, so that elaboration order is respected. 2010-08-05 Vincent Celier <celier@adacore.com> * prj.adb (Is_Compilable): Return False for header files of non Ada languages. 2010-08-05 Emmanuel Briot <briot@adacore.com> * prj-nmsc.adb: The Missing_Source_Files flag also considers a missing exec directory as a warning rather than an error. From-SVN: r162906
2010-06-23[multiple changes]Arnaud Charlet1-1/+0
2010-06-23 Robert Dewar <dewar@adacore.com> * g-pehage.adb, exp_ch13.adb: Minor reformatting. 2010-06-23 Thomas Quinot <quinot@adacore.com> * a-tags.ads: Fix description of TSD structure. 2010-06-23 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Mark_Context): When indicating that the body of a generic unit is needed prior to the unit containing an instantiation, search recursively the context of the generic to add other generic bodies that may be instantiated indirectly through the current instance. From-SVN: r161251
2010-06-23[multiple changes]Arnaud Charlet1-1/+20
2010-06-23 Robert Dewar <dewar@adacore.com> * freeze.adb: Minor reformatting. 2010-06-23 Bob Duff <duff@adacore.com> * g-pehage.adb (Trim_Trailing_Nuls): Fix the code to match the comment. 2010-06-23 Vincent Celier <celier@adacore.com> * make.adb (Compile_Sources): Complete previous change. 2010-06-23 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Add_Extra_Formal): Use suffix "C" in the name of the Constrained extra formal. 2010-06-23 Ed Schonberg <schonberg@adacore.com> * exp_ch13.adb (Expand_Freeze_Actions): If validity checks and Initialize_Scalars are enabled, compile the generated equality function for a composite type with full checks enabled, so that validity checks are performed on individual components. From-SVN: r161250
2009-07-10[multiple changes]Arnaud Charlet1-2/+2
2009-07-10 Thomas Quinot <quinot@adacore.com> * exp_ch7.adb: Update comments. 2009-07-10 Arnaud Charlet <charlet@adacore.com> * exp_ch13.adb (Expand_N_Record_Representation_Clause): Ignore mod clause if -gnatI is set instead of crashing. 2009-07-10 Ed Schonberg <schonberg@adacore.com> * sem_ch11.adb (Same_Expression): Null is always equal to itself. Additional work to remove redundant successive raise statements, in this case access checks. 2009-07-10 Vincent Celier <celier@adacore.com> * make.adb (Compile): Always create a deep copy of the mapping file argument (-gnatem=...) as it may be deallocate/reallocate by Normalize_Arguments. 2009-07-10 Javier Miranda <miranda@adacore.com> * einfo.adb (Directly_Designated_Type): Add assertion. * sem_res.adb (Check_Fully_Declared_Prefix): Add missing check on access types before using attribute Directly_Designated_Type. 2009-07-10 Emmanuel Briot <briot@adacore.com> * prj.ads: Minor typo fix 2009-07-10 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Add_Extra_Formal): Protected operations do no need special treatment. * exp_ch6.adb (Expand_Protected_Subprogram_Call): If rewritten subprogram is a function call, resolve properly, to ensure that extra actuals are added as needed. From-SVN: r149474
2009-04-07[multiple changes]Arnaud Charlet1-0/+1
2009-04-07 Thomas Quinot <quinot@adacore.com> * exp_ch4.adb (Expand_Concatenate): Add missing conversion to index type for the case of concatenating a constrained array indexed by an enumeration type. 2009-04-07 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Check_Conformance): when checking conformance of an operation that overrides an abstract operation inherited from an interface, return False if only one of the controlling formals is an access parameter. 2009-04-07 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Analyze_Object_Renaming): additional error messages mandated by AI05-105. 2009-04-07 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Get_Mains): Warn if a main is an empty string 2009-04-07 Thomas Quinot <quinot@adacore.com> * usage.adb: Minor fix in usage message. * sem_ch10.adb (Remove_Homonyms): Fix subtype of formal in body to match declaration; the correct subtype is Node_Id, not Entity_Id, because the expected node kind is an identifier, not a defining identifier. * switch-c.adb: Minor reformatting. * uintp.adb: Minor reformatting. 2009-04-07 Robert Dewar <dewar@adacore.com> * exp_ch13.adb: Minor reformatting From-SVN: r145696
2009-04-07[multiple changes]Arnaud Charlet1-0/+16
2009-04-07 Robert Dewar <dewar@adacore.com> * sem_warn.adb (Check_Infinite_Loop_Warning.Test_Ref): Add defence against missing parent. 2009-04-07 Thomas Quinot <quinot@adacore.com> * xoscons.adb: Minor reformatting 2009-04-07 Robert Dewar <dewar@adacore.com> * rtsfind.ads: Remove obsolete string concatenation entries 2009-04-07 Robert Dewar <dewar@adacore.com> * exp_ch4.adb (Expand_Concatenate): Redo handling of bounds 2009-04-07 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb (Check_Body_Required): Handle properly imported subprograms. 2009-04-07 Gary Dismukes <dismukes@adacore.com> * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case Attribute_Address): When Init_Or_Norm_Scalars is True and the object is of a scalar or string type then suppress the setting of the expression to Empty. * freeze.adb (Warn_Overlay): Also emit the warnings about default initialization for the cases of scalar and string objects when Init_Or_Norm_Scalars is True. From-SVN: r145694
2008-08-18gcc/ada/Samuel Tardieu1-3/+2
* exp_ch13.adb, exp_disp.adb, sem_cat.adb, sem_ch10.adb, * sem_ch12.adb, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, * sem_prag.adb, sem_util.adb, sem_warn.adb: Use Is_Package_Or_Generic_Package instead of hand-crafted tests. From-SVN: r139191
2008-05-26einfo.ads (Abstract_Interface_Alias): Renamed as Interface_Alias.Javier Miranda1-1/+1
2008-05-26 Javier Miranda <miranda@adacore.com> * einfo.ads (Abstract_Interface_Alias): Renamed as Interface_Alias. (Set_Abstract_Interface_Alias): Renamed as Set_Interface_Alias. (Is_Internal): Adding documentation on internal entities that have attribute Interface_Alias (old attribute Abstract_Interface_Alias) * einfo.adb (Abstract_Interface_Alias): Renamed as Interface_Alias. (Set_Abstract_Interface_Alias): Renamed as Set_Interface_Alias. Added assertion to force entities with this attribute to have attribute Is_Internal set to True. (Next_Tag_Component): Simplify assertion using attribute Is_Tag. * sem_ch3.adb (Derive_Interface_Subprograms): This subprogram has been renamed as Derive_Progenitor_Subprograms. In addition, its code is a new implementation. (Add_Interface_Tag_Components): Remove special management of synchronized interfaces. (Analyze_Interface_Declaration): Minor reformating (Build_Derived_Record_Type): Minor reformating (Check_Abstract_Overriding): Avoid reporting error in case of abstract predefined primitive inherited from interface type because the body of internally generated predefined primitives of tagged types are generated later by Freeze_Type (Derive_Subprogram): Avoid generating an internal name if the parent subprogram overrides an interface primitive. (Derive_Subprograms): New implementation that keeps separate the management of tagged types not implementing interfaces, from tagged types that implement interfaces. (Is_Progenitor): New implementation. (Process_Full_View): Add documentation (Record_Type_Declaration): Replace call to Derive_Interface_Subprograms by call to Derive_Progenitor_Subprograms. * sem_ch6.ads (Is_Interface_Conformant): New subprogram. (Check_Subtype_Conformant, Subtype_Conformant): Adding new argument Skip_Controlling_Formals. * sem_ch6.adb (Is_Interface_Conformant): New subprogram. (Check_Conventions): New implementation. Remove local subprogram Skip_Check. Remove formal Search_From of routine Check_Convention. (Check_Subtype_Conformant, Subtype_Conformant): Adding new argument Skip_Controlling_Formals. (New_Overloaded_Entity): Enable addition of predefined dispatching operations. * sem_disp.ads (Find_Primitive_Covering_Interface): New subprogram. * sem_disp.adb (Check_Dispatching_Operation): Disable registering the task body procedure as a primitive of the corresponding tagged type. (Check_Operation_From_Private_Type): Avoid adding twice an entity to the list of primitives. (Find_Primitive_Covering_Interface): New subprogram. (Override_Dispatching_Operation): Add documentation. * sem_type.adb (Covers): Minor reformatings * sem_util.ads (Collect_Abstract_Interfaces): Renamed as Collect_Interfaces. Rename formal. (Has_Abstract_Interfaces): Renamed as Has_Interfaces. (Implements_Interface): New subprogram. (Is_Parent): Removed. (Primitive_Names_Match): New subprogram. (Remove_Homonym): Moved here from Derive_Interface_Subprograms. (Ultimate_Alias): New subprogram. * sem_util.adb (Collect_Abstract_Interfaces): Renamed as Collect_Interfaces. Remove special management for synchronized types. Rename formal. Remove internal subprograms Interface_Present_In_Parent and Add_Interface. (Has_Abstract_Interfaces): Renamed as Has_Interfaces. Replace assertion on non-record types by code to return false in such case. (Implements_Interface): New subprogram. (Is_Parent): Removed. No special management is now required for synchronized types covering interfaces. (Primitive_Names_Match): New subprogram. (Remove_Homonym): Moved here from Derive_Interface_Subprograms. (Ultimate_Alias): New subprogram. * exp_ch3.adb (Add_Internal_Interface_Entities): New subprogram. Add internal entities associated with secondary dispatch tables to the list of tagged type primitives that are not interfaces. (Freeze_Record_Type): Add new call to Add_Internal_Interface_Entities (Make_Predefined_Primitive_Specs): Code reorganization to improve the management of predefined equality operator. In addition, if the type has an equality function corresponding with a primitive defined in an interface type, the inherited equality is abstract as well, and no body can be created for it. * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved from exp_util to exp_disp. (Is_Predefined_Interface_Primitive): New subprogram. Returns True if an entity corresponds with one of the predefined primitives required to implement interfaces. Update copyright notice. * exp_disp.adb (Set_All_DT_Position): Add assertion. Exclude from the final check on abstract subprograms all the primitives associated with interface primitives because they must be visible in the public and private part. (Write_DT): Use Find_Dispatching_Type to locate the name of the interface type. This allows the use of this routine, for debugging purposes, when the tagged type is not fully decorated. (Is_Predefined_Dispatching_Operation): Moved from exp_util to exp_disp. Factorize code calling new subprogram Is_Predefined_Interface_Primitive. (Is_Predefined_Interface_Primitive): New subprogram. Returns True if an entity corresponds with one of the predefined primitives required to implement interfaces. * exp_util.adb (Find_Interface_ADT): New implementation (Find_Interface): Removed. * sprint.adb (Sprint_Node_Actual): Generate missing output for the list of interfaces associated with nodes N_Formal_Derived_Type_Definition and N_Private_Extension_Declaration. From-SVN: r135923
2008-04-08a-tags.adb (Register_Interface_Offset): New subprogram.Javier Miranda1-13/+34
2008-04-08 Javier Miranda <miranda@adacore.com> Robert Dewar <dewar@adacore.com> Ed Schonberg <schonberg@adacore.com> * a-tags.adb (Register_Interface_Offset): New subprogram. (Set_Dynamic_Offset_To_Top): New subprogram (see previous comment). (To_Predef_Prims_Table_Ptr): Removed. (Acc_Size): Removed. (To_Acc_Size): Removed. (Parent_Size): Modified to the call the subprogram returning the size of the parent by means of the new TSD component Size_Func. * a-tags.ads (Offset_To_Top_Ptr): New access type declaration. (DT_Offset_To_Top_Offset): New constant value that is used to generate code referencing the Offset_To_Top component of the dispatch table's prologue. (Prim_Ptr): New declaration of access to procedure. Used to avoid the use of 'address to initialize dispatch table slots. (Size_Func): New component of the TSD. Used by the run-time to call the size primitive of the tagged type. * checks.adb (Apply_Access_Check): Avoid check when accessing the Offset_To_Top component of a dispatch table. (Null_Exclusion_Static_Checks): If the non-null access type appears in a deferred constant declaration. do not add a null expression, to prevent spurious errors when full declaration is analyzed. (Apply_Discriminant_Check): If both discriminant constraints share a node which is not static but has no side effects, do not generate a check for that discriminant. (Generate_Index_Checks): Set Name_Req to true in call to duplicate subexpr, since the prefix of an attribute is a name. * checks.ads: Fix nit in comment. * exp_ch3.ads, exp_ch3.adb (Freeze_Record_Type): Do not add the spec and body of predefined primitives in case of CPP tagged type derivations. (Freeze_Type): Deal properly with no storage pool case (Make_Predefined_Primitive_Specs): Generate specification of abstract primitive Deep_Adjust if a nonlimited interface is derived from a limited interface. (Build_Dcheck_Functions): Create discriminant-checking functions only for variants that have some component(s). (Build_Slice_Assignment): In expanded code for slice assignment, handle properly the case where the slice bounds extend to the last value of the underlying representation. (Get_Simple_Init_Val): New calling sequence, accomodate Invalid_Value (Is_Variable_Size_Record): An array component has a static size if index bounds are enumeration literals. * exp_disp.adb (Make_DT): Use the first subtype to determine whether an external tag has been specified for the type. (Building_Static_DT): Add missing support for private types. (Make_DT): Add declaration of Parent_Typ to ensure consistent access to the entity associated with the parent of Typ. This is done to avoid wrong access when the parent is a private type. (Expand_Interface_Conversion): Improve error message when the configurable runtime has no support for dynamic interface conversion. (Expand_Interface_Thunk): Add missing support to interface types in configurable runtime. (Expand_Dispatching_Call): remove obsolete code. (Make_DT): Replace occurrences of RE_Address by RE_Prim_Ptr, and ensure that all subtypes and aggregates associated with dispatch tables have the attribute Is_Dispatch_Table_Entity set to true. (Register_Primitive): Rename one variable to improve code reading. Replace occurrences of RE_Addres by RE_Prim_Ptr. Register copy o of the pointer to the 'size primitive in the TSD. * rtsfind.ads (RE_DT_Offset_To_Top_Offset): New entity. (RE_Offset_To_Top_Ptr): New entity. (RE_Register_Interface_Offset): New entity. (RE_Set_Dynamic_Offset_To_Top): New entity. (RE_Set_Offset_To_Top): Removed entity. (RE_Prim_Ptr): New entity (RE_Size_Func): New entity (RE_Size_Ptr): New entity (RTU_Id): Add Ada_Dispatching and Ada_Dispatching_EDF. (Ada_Dispatching_Child): Define this new subrange. (RE_Id): Add new required run-time calls (RE_Set_Deadline, RE_Clock, RE_Time_Span, and RE_Time_Span_Zero). (RE_Unit_Table): Add new required run-time calls * rtsfind.adb (Get_Unit_Name): Add processing for Ada.Dispatching children. * exp_atag.ads, exp_atag.adb (Build_Offset_To_Top): New subprogram. (Build_Set_Static_Offset_To_Top): New subprogram. Generates code that initializes the Offset_To_Top component of a dispatch table. (Build_Predef_Prims): Removed. (Build_Get_Predefined_Prim_Op_Address): Replace call to Predef_Prims by its actual code. (Build_Set_Size_Function): New subprogram. * exp_ch13.adb: Do not generate storage variable for storage_size zero (Expand): Handle setting/restoring flag Inside_Freezing_Actions From-SVN: r134020