summaryrefslogtreecommitdiff
path: root/gcc/ada/lib-writ.adb
Commit message (Collapse)AuthorAgeFilesLines
* 2016-04-21 Jerome Lambourg <lambourg@adacore.com>charlet2016-04-211-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * s-soflin.adb: Initialize the Stack_Limit global variable. 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com> * lib-writ.adb: Minor reformatting. 2016-04-21 Ed Schonberg <schonberg@adacore.com> * exp_pakd.adb (Compute_Number_Components): New function to build an expression that computes the number of a components of an array that may be multidimensional. (Expan_Packed_Eq): Use it. 2016-04-21 Arnaud Charlet <charlet@adacore.com> * g-traceb.ads: Update list of supported platforms. 2016-04-21 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Add_Predicates): if the type is declared in an inner package it may be frozen outside of the package, and the generated pragma has not been analyzed yet, the expression for the predicate must be captured and added to the predicate function at this point. 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com> * contracts.adb (Analyze_Package_Body_Contract): Do not check for a missing package refinement because 1) packages do not have "refinement" and 2) the check for proper state refinement is performed in a different place. * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented. (Has_Null_Visible_Refinement): Reimplemented. * sem_ch3.adb (Analyze_Declarations): Determine whether all abstract states have received a refinement and if not, emit errors. * sem_ch7.adb (Analyze_Package_Declaration): Code cleanup. Determine whether all abstract states of the package and any nested packages have received a refinement and if not, emit errors. (Requires_Completion_In_Body): Add new formal parameter Do_Abstract_States. Update the comment on usage. Propagate the Do_Abstract_States flag to all Unit_Requires_Body calls. (Unit_Requires_Body): Remove formal parameter Ignore_Abstract_States. Add new formal paramter Do_Abstract_States. Propagate the Do_Abstract_States flag to all Requires_Completion_In calls. * sem_ch7.ads (Unit_Requires_Body): Remove formal parameter Ignore_Abstract_States. Add new formal paramter Do_Abstract_States. Update the comment on usage. * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do not initialize the constituent list as this is now done on a need-to-add-element basis. (Analyze_Single_Task_Declaration): Do not initialize the constituent list as this is now done on a need-to-add-element basis. * sem_ch10.adb (Decorate_State): Do not initialize the constituent lists as this is now done on a need-to-add-element basis. * sem_prag.adb (Analyze_Constituent): Set the refinement constituents when adding a new element. (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when adding a new element. (Analyze_Part_Of_Option): Set the Part_Of constituents when adding a new element. (Analyze_Pragma): Set the Part_Of constituents when adding a new element. (Check_Constituent_Usage (all versions)): Reimplemented. (Collect_Constituent): Set the refinement constituents when adding a new element. (Create_Abstract_State): Do not initialize the constituent lists as this is now done on a need-to-add-element basis. (Propagate_Part_Of): Set the Part_Of constituents when adding a new element. * sem_util.adb (Check_State_Refinements): New routine. (Has_Non_Null_Refinement): Reimplemented. (Has_Null_Refinement): Reimplemented. (Requires_State_Refinement): Removed. * sem_util.ads (Check_State_Refinements): New routine. (Requires_State_Refinement): Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235326 138bc75d-0d04-0410-961f-82ee72b054a4
* 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>charlet2016-04-211-7/+13
| | | | | | | | | * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup. * sem.adb: Fix comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235325 138bc75d-0d04-0410-961f-82ee72b054a4
* 2016-04-21 Ed Schonberg <schonberg@adacore.com>charlet2016-04-211-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype declaration with no aspects, whose subtype_mark is a subtype with predicates, inherits the list of subprograms for the type. 2016-04-21 Arnaud Charlet <charlet@adacore.com> * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous change. 2016-04-21 Thomas Quinot <quinot@adacore.com> * g-socket.adb (Raise_Host_Error): Include additional Name parameter. 2016-04-21 Ed Schonberg <schonberg@adacore.com> * lib-writ.adb (Write_ALI): Do not record in ali file units that are present in the files table but not analyzed. These units are present because they appear in the context of units named in limited_with clauses, and the unit being compiled does not depend semantically on them. 2016-04-21 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to create the procedure body for an function returning an array type, when generating C code. Reuse the subprogram body rather than creating a new one, both as an efficiency measure and because in an instance the body may contain global references that must be preserved. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235324 138bc75d-0d04-0410-961f-82ee72b054a4
* 2016-04-19 Bob Duff <duff@adacore.com>charlet2016-04-191-14/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_elab.adb (Check_A_Call): There are cases where we have No (Ent) after the Alias loop, even when there was no previous error, so we can't assert that there was an error. 2016-04-19 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference): Reject use of type name as a prefix to 'access within an aggregate in a context that is not the declarative region of a type. 2016-04-19 Vincent Celier <celier@adacore.com> * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild -l" Fail if the invocation is "gnat find -P" or "gnat xref -P" Remove anything related to project files * g-mbdira.adb: minor whitespace cleanup * g-spipat.adb: minor removal of extra spaces after closing paren 2016-04-19 Ed Schonberg <schonberg@adacore.com> * exp_ch6.adb (Expand_Actuals): If post-statements are present and the enclosing context is a function call or indexing, build an Expression_With_Actions for the call. 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com> * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate a with line for an ignored Ghost unit. * sem_ch7.adb (Analyze_Package_Declaration): Add local constant Par. A child package is Ghost when its parent is Ghost. * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to a subprogram declaration that acts as a compilation unit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235191 138bc75d-0d04-0410-961f-82ee72b054a4
* 2015-11-23 Olivier Hainque <hainque@adacore.com>hainque2015-11-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eric Botcazou <botcazou@adacore.com> * opt.ads (Exception_Mechanism): Now three values: Front_End_SJLJ, Back_End_SJLJ and Back_End_ZCX. (Back_End_Exceptions, Front_End_Exceptions, ZCX_Exceptions, SJLJ_Exceptions): New functions, reflecting properties of the current Exception_Mechanism. * opt.adb: Implement the new functions. * fe.h: Bind the new Exception_Mechanism and helper functions for gigi. * exp_ch11.adb (Expand_At_End_Handler): Replace test on mechanism by use of property helper and update comments. (Expand_Exception_Handlers): Replace tests on mechanism by use of helper. Restrict Abort_Defer to ZCX specifically. * exp_ch9.adb (Expand_N_Asynchronous_Select): Replace tests on mechanism by calls to helper functions. Abort_Undefer for ZCX only, paired with Expand_Exception_Handlers. * exp_sel.adb (Build_Abort_Block_Handler): Replace tests on mechanism by calls to helper functions. Abort_Undefer for ZCX only, paired with Expand_Exception_Handlers. * lib-writ.ads (P line documentation): Add entry for "FX", representative of unit compiled with Frontend_Exceptions True. * lib-writ.adb (Output_Main_Program_Line): Add "FX" on P line if compiled with Frontend_Exceptions True. * ali.ads (ALIs_Record): Ada a Frontend_Exceptions component, to reflect whether the ALI file contained an "FX" indication on the P line. (Frontend_Exceptions_Specified): New boolean, to keep track of whether at least an FX ALI file is in the closure. * ali.adb (Scan_ALI): Handle "FX" on the P line. (Initialize_ALI): Initialize Frontend_Exceptions_Specified to False. * targparm.ads: Update desription of exception schemes. (Frontend_Exceptions_On_Target): New flag, reflect Frontend_Exceptions set to True in system.ads, or not set at all. * targparm.adb (Targparm_Tags): Add FEX to convey Frontend_Exceptions. Rename ZCD to ZCX for consistency. (FEX_Str, Targparm_Str, Get_Target_Parameters): Adjust accordingly. * gnat1drv.adb (Adjust_Global_Switches): Adjust Exception_Mechanism setting, now from combination of Frontend_Exceptions and ZCX_By_Default. * bcheck.adb (Check_Consistent_Zero_Cost_Exception_Handling): Rename as ... (Check_Consistent_Exception_Handling): Check consistency of both ZCX_By_Default and Frontend_Exceptions. (Check_Configuration_Consistency): Check_Consistent_Exception_Handling if either flag was set at least once. * make.adb (Check): Remove processing of a possible -fsjlj coming from lang-specs.h. * gnatlink.adb (Gnatlin): Likewise. * gcc-interface/Makefile.in (gnatlib-sjlj/zcx): Now set both ZCX_By_Default and Frontend_Exceptions. * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): Use eh property helper to test for back-end exceptions. Adjust mechanism name when testing for front-end sjlj. (case E_Procedure): Likewise. * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Likewise, and rename local variables. (Exception_Handler_to_gnu_sjlj): Rename as Exception_Handler_to_gnu_fe_sjlj. (Exception_Handler_to_gnu_zcx): Rename as Exception_Handler_to_gnu_gcc and adjust tests on eh mechanisms to use property helpers or correct mechanism name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230752 138bc75d-0d04-0410-961f-82ee72b054a4
* 2015-10-16 Arnaud Charlet <charlet@adacore.com>charlet2015-10-161-10/+1
| | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228874 138bc75d-0d04-0410-961f-82ee72b054a4
* 015-02-05 Robert Dewar <dewar@adacore.com>charlet2015-02-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch13.adb (Add_Invariants): Don't assume invariant is standard Boolean. * sem_prag.adb (Analyze_Pragma, case Check): Don't assume condition is standard Boolean, it can be non-standard derived Boolean. 2015-02-05 Robert Dewar <dewar@adacore.com> * checks.adb (Enable_Range_Check): Disconnect attempted optimization for the case of range check for subscript of unconstrained array. 2015-02-05 Robert Dewar <dewar@adacore.com> * par-ch13.adb (With_Present): New function (Aspect_Specifications_Present): Handle WHEN in place of WITH (Get_Aspect_Specifications): Comment update. * par.adb: Comment updates. 2015-02-05 Robert Dewar <dewar@adacore.com> * errout.adb (Handle_Serious_Error): New setting of Fatal_Error. * frontend.adb (Frontend): New setting of Fatal_Error. * lib-load.adb (Create_Dummy_Package_Unit): New setting of Fatal_Error. (Load_Main_Source): New setting of Fatal_Error (Load_Unit): New setting of Fatal_Error. * lib-writ.adb (Add_Preprocessing_Dependency): New setting of Fatal_Error. (Ensure_System_Dependency): New setting of Fatal_Error. * lib.adb (Fatal_Error): New setting of Fatal_Error (Set_Fatal_Error): New setting of Fatal_Error. * lib.ads: New definition of Fatal_Error and associated routines. * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error. * par-load.adb (Load): New setting of Fatal_Error. * rtsfind.adb (Load_RTU): New setting of Fatal_Error. * sem_ch10.adb (Analyze_Compilation_Unit): New setting of Fatal_Error. (Optional_Subunit): New setting of Fatal_Error. (Analyze_Proper_Body): New setting of Fatal_Error. (Load_Needed_Body): New setting of Fatal_Error. 2015-02-05 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Call): If the function being called has out parameters do not check for language version if the function comes from a predefined unit, as those are always compiled in Ada 2012 mode. 2015-02-05 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Process_Full_View): Verify that the full view of a type extension must carry an explicit limited keyword if the partial view does (RM 7.3 (10.1)). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220446 138bc75d-0d04-0410-961f-82ee72b054a4
* 2015-01-30 Yannick Moy <moy@adacore.com>charlet2015-01-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_attr.adb: Code clean up. 2015-01-30 Robert Dewar <dewar@adacore.com> * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record. * ali.ads (Unit_Record): Add new field Serious_Errors. * lib-writ.adb (Write_Unit_Information): Set SE (serious errors) attribute in U line. * lib-writ.ads: New attribute SE (serious erors) in unit line. 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com> * einfo.adb Update the usage of attributes Entry_Bodies_Array, Lit_Indexes, Scale_Value, Storage_Size_Variable, String_Literal_Low_Bound along associated routines and Write_FieldX_Name. (Pending_Access_Types): New routine. (Set_Pending_Access_Types): New routine. (Write_Field15_Name): Add an entry for Pending_Access_Types. * einfo.ads Add new attribute Pending_Access_Types along with usage in nodes. Update the usage of attributes Entry_Bodies_Array, Lit_Indexes, Scale_Value, Storage_Size_Variable, String_Literal_Low_Bound. (Pending_Access_Types): New routine along with pragma Inline. (Set_Pending_Access_Types): New routine along with pragma Inline. * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable Ins_Node. Determine the insertion node for anonynous access type that acts as a component type of an array. Update the call to Build_Finalization_Master. (Expand_Freeze_Record_Type): Update the calls to Build_Finalization_Master. (Freeze_Type): Remove local variable RACW_Seen. Factor out the code that deals with remote access-to-class-wide types. Create a finalization master when the designated type contains a private component. Fully initialize all pending access types. (Process_RACW_Types): New routine. (Process_Pending_Access_Types): New routine. * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer needs to set primitive Finalize_Address. (Expand_N_Allocator): Allocation no longer sets primitive Finalize_Address. * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call): Update the call to Build_Finalization_Master. (Make_Build_In_Place_Call_In_Allocator): Allocation no longer needs to set primitive Finalize_Address. * exp_ch7.adb (Add_Pending_Access_Type): New routine. (Build_Finalization_Master): New parameter profile. Associate primitive Finalize_Address with the finalization master if the designated type has been frozen, otherwise treat the access type as pending. Simplify the insertion of the master and related initialization code. (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide abstract types. (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ. Simplify the implementation. * exp_ch7.ads (Build_Finalization_Master): New parameter profile along with comment on usage. (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update the comment on usage. * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine Finalize_Address to retrieve the primitive. (Finalize_Address): New routine. (Find_Finalize_Address): Removed. * exp_util.ads (Finalize_Address): New routine. * freeze.adb (Freeze_All): Remove the generation of finalization masters. * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any pending access types from the partial to the full view. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220279 138bc75d-0d04-0410-961f-82ee72b054a4
* 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>charlet2015-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * scos.ads: Update documentation about the SCO table build process and about table records format. * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw. (SCO_Record_Filtered): New procedure. (Set_SCO_Logical_Operator): New procedure. (dsco): Update documentation. * par_sco.adb: Update library-level comments. (SCO_Generation_State_Type): New type. (SCO_Generation_State): New variable. (SCO_Raw_Table): New package instanciation. (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table. ("<"): New. (Tristate): New type. (Is_Logical_Operator): Return Tristate and update documentation. (Has_Decision): Update call to Is_Logical_Operator and complete documentation. (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update comment, add an assertion for state checking and change references to SCO_Table into SCO_Raw_Table. (dsco): Refactor to dump the raw and the filtered tables. (Process_Decisions.Output_Decision_Operand): Handle putative short-circuit operators. (Process_Decisions.Output_Element): Update references to Set_Table_Entry and to Condition_Pragma_Hash_Table. (Process_Decisions.Process_Decision_Operand): Update call to Is_Logical_Operator. (Process_Decisions.Process_Node): Handle putative short-circuit operators and change references to SCO_Table into SCO_Raw_Table. (SCO_Output): Add an assertion for state checking and remove code that used to stamp out SCO entries. (SCO_Pragma_Disabled): Change reference to SCO_Table into SCO_Raw_Table. (SCO_Record): Rename to SCO_Record_Raw, add an assertion for state checking and change references to SCO_Table into SCO_Raw_Table. (Set_SCO_Condition): Add an assertion for state checking, update references to Condition_Pragma_Hash_Table and change references to SCO_Table into SCO_Raw_Table. (Set_SCO_Pragma_Enabled): Add an assertion for state checking and change references to SCO_Table into SCO_Raw_Table. (Set_SCO_Logical_Operator): New procedure. (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update references to Set_Table_Entry and to Condition_Pragma_Hash_Table. (SCO_Record_Fildered): New procedure. * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass. * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and output SCOs. * par-load.adb (Load): Update reference to SCO_Record. * par.adb (Par): Update reference to SCO_Record. * put_scos.adb (Put_SCOs): Add an assertion to check that no putative SCO condition reaches this end. * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record. * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs when corresponding to an "and"/"or" operator affected by the Short_Circuit_And_Or pragma. 2015-01-06 Robert Dewar <dewar@adacore.com> * sem_ch8.adb (Analyze_Use_Package): Give more specific error msg for attempted USE of generic subprogram or subprogram. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219234 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-10-10 Robert Dewar <dewar@adacore.com>charlet2014-10-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216074 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>charlet2014-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch7.adb: Fix minor oversight in condition. 2014-08-01 Bob Duff <duff@adacore.com> * projects.texi: Minor documentation improvements. 2014-08-01 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All. * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect. * lib-load.adb: Initialize No_Elab_Code_All field. * lib-writ.adb: Initialize No_Elab_Code_All. * lib.ads, lib.adb: New field No_Elab_Code_All. * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All. * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no longer exists. * sem_ch10.adb (Analyze_Context): Processing for No_Elaboration_Code_All removed. (Generate_Parent_References): Moved to Sem_Util. * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All. * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from Sem_Ch10. * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All. * targparm.adb: Minor comment updates Add comments on ignoring pragma No_Elaboration_Code_All. 2014-08-01 Nicolas Roche <roche@adacore.com> * adaint.c (__gnat_set_close_on_exec): Ensure that we can unset "close_on_exec" flag. 2014-08-01 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building the parameter specs of the wrapper program for a primitive operation of a synchronized type that implements an interface, copy the null_exclusion indicator as well. 2014-08-01 Robert Dewar <dewar@adacore.com> * sem_eval.ads: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213466 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-08-01 Robert Dewar <dewar@adacore.com>charlet2014-08-011-14/+0
| | | | | | | | | | | | | | | | | * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove VMS-specific code. * prj-conf.adb: Minor reformatting. * xr_tabls.adb (Read_File): Restore code which was enabled on non VMS platforms before. * prj-env.adb (Initialize_Default_Project_Path): Ditto. * sem_ch5.adb: Minor reformatting. * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb, sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb: Remove VMS-specific code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213432 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-31 Robert Dewar <dewar@adacore.com>charlet2014-07-311-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor reformatting. 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment which demonstrates the expansion of while loops subject to attribute 'Loop_Entry. The condition of a while loop along with related condition actions is now wrapped in a function. Instead of repeating the condition, the expansion now calls the function. 2014-07-31 Ed Schonberg <schonberg@adacore.com> * sem_case.adb (Check_Against_Predicate): Correct off-by-one error when reporting of missing values in a case statement for a type with a static predicate. (Check_Choices): Reject a choice given by a subtype to which a Dynamic_Predicate applies. * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit Has_Dynamic_Predicate_Aspect flag from parent. 2014-07-31 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate cannot apply to a subtype of an incomplete type. (Is_Static_Choice): Treat an Others_Clause as static. The staticness of the expression and of the range are checked elsewhere. 2014-07-31 Pascal Obry <obry@adacore.com> * adaint.h (__gnat_ftell64): Added. (__gnat_fseek64): Added. (__int64): Added. * cstreams.c (__int64): Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213366 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-31 Arnaud Charlet <charlet@adacore.com>charlet2014-07-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-writ.adb (Write_Unit_Information): Fix case where U = No_Unit. 2014-07-31 Claire Dross <dross@adacore.com> * exp_util.adb, exp_util.ads (Get_First_Parent_With_External_Axiomatization_For_Entity): New routine to find the first parent of an entity with a pragma Annotate (GNATprove, External_Axiomatization). (Has_Annotate_Pragma_For_External_Axiomatization): New function to check if a package has a pragma Annotate (GNATprove, External_Axiomatization). * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New flag on the entity for the declaration created for a formal subprogram in an instance. This is a renaming declaration, or in GNATprove_Mode the declaration of an expression function that captures the axiomatization of the actual. * sem_ch6.adb (Analyze_Expression_Function): For a Generic_Actual_Subprogram, place body immediately after the declaration because it may be used in a subsequent declaration in the instance. * sem_ch12.adb (Build_Wrapper): Add code to handle instances where the actual is a function, not an operator. Handle functions with one and two parameters and binary and unary operators. 2014-07-31 Pascal Obry <obry@adacore.com> * cstreams.c (__gnat_is_regular_file_fd): Removed. * adaint.c (__gnat_is_regular_file_fd): Added. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213364 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-31 Vincent Celier <celier@adacore.com>charlet2014-07-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * projects.texi: Minor spelling error fix. 2014-07-31 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Document No_Elaboration_Code_All restriction. * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit information. * lib.ads, lib.adb (No_Elab_Code): New field in unit information. * restrict.adb (Process_Restriction_Synonyms): Add handling of No_Elaboration_Code_All. * restrict.ads (Process_Restriction_Synonyms): Now handles No_Elaboration_Code_All. * sem_ch10.adb (Analyze_Context): Enforce transitive with for No_Elaboration_Code_All. * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Handle setting of No_Elab_Code in unit information. Handle No_Elaboration_Code_All. * snames.ads-tmpl (Name_No_Elaboration_Code): New name for pragma processing. (Name_No_Elaboration_Code_All): New name for pragma processing. 2014-07-31 Eric Botcazou <ebotcazou@adacore.com> * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array types with a null range and use the Esize of the component instead of its RM_Size to identify appropriate values. 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com> * freeze.adb Add with and use clause for Aspects. (Freeze_Expression): Emit an error when a volatile constant lacks Boolean aspect Import. (Has_Boolean_Aspect_Import): New routine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213347 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-30 Thomas Quinot <quinot@adacore.com>charlet2014-07-301-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | * lib-load.ads: Minor reformatting. * sinfo.ads (Library_Unit): Update comment. * lib.ads (Notes): Simplify. The Unit component in Notes_Entry is redundant. Instead used the pragma Node_Id directly as the element type. 2014-07-30 Thomas Quinot <quinot@adacore.com> * lib.adb (Store_Note): Store only notes that do not come from an instance, and that are in the extended main source unit. * lib-writ (Write_Unit_Information): Annotations from subunits must be emitted along with those for the main unit, and they must carry a specific file name. * ali.ads (Notes_Record): Use a File_Name_Type instead of a Unit_Id for the source file containing the pragma, as in the case of annotations from subunits we might not have a readily available unit id. * ali.adb (Scan_ALI): Account for above change in data structure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213295 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-29 Robert Dewar <dewar@adacore.com>charlet2014-07-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set SSO_Default_Specified. * ali.ads (ALIs_Record): Add field SSO_Default (SSO_Default_Specified): New global switch. * bcheck.adb (Check_Consistent_SSO_Default): New procedure (Check_Configuration_Consistency): Call this procedure * einfo.adb (SSO_Set_High_By_Default): New function (SSO_Set_Low_By_Default): New function (Set_SSO_Set_High_By_Default): New procedure (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags): List new flags * einfo.ads (SSO_Set_Low_By_Default): New flag (SSO_Set_High_By_Default): New flag * freeze.adb (Set_SSO_From_Default): New procedure (Freeze_Array_Type): Call Set_SSO_From_Default (Freeze_Record_Type): Call Set_SSO_From_Default * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed * lib-writ.ads: Add OL/OH parameters to P line * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate * opt.ads (Default_SSO): New global switch (Default_SSO_Config): New global switch * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is set by default using pragma Default_Scalar_Storage_Order. * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Clear SSO defaults when explicit SSO is inherited. (Analyze_Attribute_Definition_Clause): Clear SSO defaults when explicit SSO is specified. (Inherit_Aspects_At_Freeze_Point): Clear SSO default when inheriting SSO. * sem_ch3.adb (Set_Default_SSO): New procedure (Analyze_Private_Extension_Declaration): Set defualt SSO (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type): ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto (Record_Type_Declaration): ditto * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope): Save Default_SSO * sem_prag.adb (Analyze_Pragma, case Default_Scalar_Storage_Order): Set Default_SSO 2014-07-29 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Valid_Operator_Definition): Verify that all parameter have mode IN. This check must be done here for subprogram instantiations that have operator names, because their analysis does not follow the same path as that for subprogram declarations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213167 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-29 Robert Dewar <dewar@adacore.com>charlet2014-07-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range to Is_OK_Static_Range. * sem_attr.adb (Eval_Attribute): Make sure we properly flag static attributes (Eval_Attribute, case Size): Handle size of zero properly (Eval_Attribute, case Value_Size): Handle size of zero properly. * sem_ch13.adb: Minor reformatting. * sem_ch3.adb (Process_Range_Expr_In_Decl): Change Is_Static_Range to Is_OK_Static_Range. * sem_eval.adb (Eval_Case_Expression): Total rewrite, was wrong in several ways (Is_Static_Range): Moved here from spec (Is_Static_Subtype): Moved here from spec Change some incorrect Is_Static_Subtype calls to Is_OK_Static_Subtype. * sem_eval.ads: Add comments to section on Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range): Add clarifying comments (Is_Static_Range): Moved to body (Is_Statically_Unevaluated): New function. * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change Is_Static_Range to Is_OK_Static_Range. * sinfo.ads: Additional commments for Is_Static_Expression noting that clients should almost always use Is_OK_Static_Expression instead. Many other changes throughout front end units to obey this rule. * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression for enumeration literal. * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb, lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads, sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb: Replace all occurrences of Is_Static_Expression by Is_OK_Static_Expression. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213159 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-18 Robert Dewar <dewar@adacore.com>charlet2014-07-181-24/+18
| | | | | | | | | | | | * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting. 2014-07-18 Vincent Celier <celier@adacore.com> * lib-writ.ads: Update documentation about the D lines. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212796 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-18 Ed Schonberg <schonberg@adacore.com>charlet2014-07-181-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch13.adb (Replace_Type_References_Generic): Use type entity as a parameter, rather than its Chars field, in order to locate freeze node of type. If the predicate or invariant has references to types other than the one to which the contract applies, these types must be frozen, and the corresponding predicate functions created, before that freeze node. 2014-07-18 Robert Dewar <dewar@adacore.com> * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization. * par_sco.adb: Minor reformatting. 2014-07-18 Gary Dismukes <dismukes@adacore.com> * exp_ch4.adb (Real_Range_Check): Turn off the Do_Range_Check flag on the conversion's current Expression argument rather than on the originally captured Operand node, as Expression may reflect a rewriting (as in conversions to a fixed-point type). 2014-07-18 Vincent Celier <celier@adacore.com> * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit is not a subunit. * ali.ads (Sdep_Record): New component Unit_Name. * lib-writ.adb (Write_ALI): Write the unit name in D lines. * makeutl.adb (Check_Source_Info_In_ALI): Return False if a dependent unit is in a project and the source file name is not one of its sources. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212795 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-18 Robert Dewar <dewar@adacore.com>charlet2014-07-181-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bcheck.adb (Check_Consistent_Restrictions): Remove obsolete code checking for violation of No_Standard_Allocators_After_Elaboration (main program) * bindgen.adb (Gen_Adainit): Handle No_Standard_Allocators_After_Elaboration (Gen_Output_File_Ada): ditto. * exp_ch4.adb (Expand_N_Allocator): Handle No_Standard_Allocators_After_Elaboration. * Makefile.rtl: Add entry for s-elaall * rtsfind.ads: Add entry for Check_Standard_Allocator. * s-elaall.ads, s-elaall.adb: New files. * sem_ch4.adb (Analyze_Allocator): Handle No_Standard_Allocators_After_Elaboration. 2014-07-18 Robert Dewar <dewar@adacore.com> * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb, ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses. Remove AB parameter from ali files and all uses. Remove Allocator_In_Body and all uses. 2014-07-18 Robert Dewar <dewar@adacore.com> * g-expect-vms.adb: Add comment. 2014-07-18 Thomas Quinot <quinot@adacore.com> * par_sco.adb (Is_Logical_Operation): return True for N_If_Expression. 2014-07-18 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Resolve_Attribute, case 'Update): Do full analysis and resolution of each choice in the associations within the argument of Update, because they may be variable names. 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition actions before the generated if statement. 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com> * gnat_ugn.texi Enhance the documentation of switches -gnateA and -gnateV. 2014-07-18 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Build_Default_Subtype): Add missing condition so that code matches description: use the full view of the base only if the base is private and the subtype is not. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212779 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-17 Ed Schonberg <schonberg@adacore.com>charlet2014-07-171-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type of function call for later use when shared passive objects are involved. 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com> * par-ch13.adb (Get_Aspect_Specifications): Catch a case where the argument of SPARK aspect Refined_State is not properly parenthesized. 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend the lifetime of a reference to an Ada 2012 container element. (Is_Element_Reference): New routine. 2014-07-17 Robert Dewar <dewar@adacore.com> * ali.ads: Minor comment fix. * lib-writ.adb: Minor reformatting. 2014-07-17 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit in ASIS mode, load another subunit only if it a subunit of the current one, not a sibling that has been reached through the analysis of an ancestor. This allows the construction of the ASIS tree for the subunit even when sibling subunits have errors. 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch3.adb (Analyze_Declarations): Remove the guard which prevents the analysis of various contracts when the associated construct is erroneous. * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the SPARK_Pragma of an illegal or a partially decorated construct. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212734 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-06-13 Robert Dewar <dewar@adacore.com>charlet2014-06-131-1/+1
| | | | | | | | | | | * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor reformatting. * sem_attr.adb: Minor code reformatting and simplification. * checks.adb: Fix minor typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211622 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-06-13 Robert Dewar <dewar@adacore.com>charlet2014-06-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit): Removed. * opt.ads (Compiler_Unit): New flag. * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit for null statement sequence (not allowed in compiler unit). * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during parsing. * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new calling sequence. * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for Check_Compiler_Unit. * sem_ch6.adb (Analyze_Extended_Return_Statement): Call Check_Compiler_Unit (this construct is not allowed in compiler units). * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]): Set Opt.Compiler_Unit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211617 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-01-29 Robert Dewar <dewar@adacore.com>charlet2014-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb, ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads, a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads, a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb, atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb, a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb, cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb, eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb, freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb, gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads, krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads, live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb, par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb, par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb, rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads, sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb, sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb, s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads, sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb, s-regpat.adb, s-secsta.adb, s-stalib.ads, s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb, s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb, s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads, system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb, urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207260 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-01-20 Yannick Moy <moy@adacore.com>charlet2014-01-201-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb, * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb, * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into GNATprove_Mode. * sem_ch13.adb: Remove blank. * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace subprograms by alias for renamings, not for inherited primitive operations. * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion in GNATprove mode. (Remove_Side_Effects): Apply the removal in GNATprove mode, for the full analysis of expressions. * expander.adb (Expand): Call the light SPARK expansion in GNATprove mode. (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore save/restore actions for Expander_Active flag in GNATprove mode, similar to what is done in ASIS mode. * frontend.adb (Frontend): Generic bodies are instantiated in GNATprove mode. * gnat1drv.adb (Adjust_Global_Switches): Set operating mode to Check_Semantics in GNATprove mode, although a light expansion is still performed. (Gnat1drv): Set Back_End_Mode to Declarations_Only in GNATprove mode, and later on special case the GNATprove mode to continue analysis anyway. * lib-writ.adb (Write_ALI): Always generate ALI files in GNATprove mode. * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to Expander_Active. (SPARK_Mode): Renamed as GNATprove_Mode. * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the tree in GNATprove_Mode. * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate body in GNATprove mode. (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove mode. * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl): Make sure side effects are removed in GNATprove mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206805 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-17 Thomas Quinot <quinot@adacore.com>charlet2013-10-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_ch7.adb: Minor reformatting. 2013-10-17 Ed Schonberg <schonberg@adacore.com> * sem_dim.adb (Process_Minus, Process_Divide): Label dimension expression with standard operator and type, for pretty-printing use. 2013-10-17 Bob Duff <duff@adacore.com> * gnat_ugn.texi: Document --pp-new and --pp-old switches. 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com> * einfo.adb: Flag 159 is now known as From_Limited_With. Replace all references to attribute From_With_Type with From_Limited_With. (From_With_Type): Renamed to From_Limited_With. (Set_From_With_Type): Renamd to Set_From_Limited_With. * einfo.ads: Remove attribute From_With_Type and occurrences in nodes. Add attribute From_Limited_With along with occurrences in nodes. (From_With_Type): Renamed to From_Limited_With along with pragma Inline. (Set_From_With_Type): Renamed to Set_From_Limited_With along with pragma Inline. * sem_ch7.adb, sem_ch8.adb, sem_ch12.adb, sem_ch13.adb, sem_disp.adb, sem_res.adb, sem_type.adb, sem_util.adb, sem_warn.adb, exp_attr.adb, exp_disp.adb, freeze.adb, itypes.adb, layout.adb, lib-writ.adb, rtsfind.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb, sem_ch4.adb: Replace all references to attribute From_With_Type with From_Limited_With. * sem_ch6.adb: Replace all references to attribute From_With_Type with From_Limited_With. (Designates_From_With_Type): Renamed to Designates_From_Limited_With. (Process_Formals): Update the call to Designates_From_With_Type. * sem_ch10.adb: Replace all references to attribute From_With_Type with From_Limited_With. (Build_Limited_Views): Reimplemented. * gcc-interface/decl.c Replace all references to attribute From_With_Type with From_Limited_With. (finalize_from_with_types): Renamed to finalize_from_limited_with. * gcc-interface/gigi.h (finalize_from_with_types): Renamed to finalize_from_limited_with. * gcc-interface/trans.c: Replace all references to attribute From_With_Type with From_Limited_With. (Compilation_Unit_to_gnu): Update the call to finalize_from_with_types. 2013-10-17 Pascal Obry <obry@adacore.com> * projects.texi: Update VCS_Kind documentation. 2013-10-17 Matthew Heaney <heaney@adacore.com> * a-convec.adb, a-coinve.adb, a-cobove.adb (Insert, Insert_Space): Inspect value range before converting type. 2013-10-17 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Pragma): Flag the use of pragma Refined_Pre as illegal. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203755 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-14 Robert Dewar <dewar@adacore.com>charlet2013-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * exp_prag.adb, sem_prag.adb, a-exexda.adb, s-vmexta.ads: Minor reformatting. 2013-10-14 Vincent Celier <celier@adacore.com> * ali.adb (Get_File_Name): New Boolean parameter May_Be_Quoted, defaulted to False. Calls Get_Name with May_Be_Quoted. (Get_Name): New Boolean parameter May_Be_Quoted, defaulted to False. If May_Be_Quoted is True and first non blank charater is '"', unquote the name. (Scan_ALI): For the file/path name on the D line, call Get_File_Name with May_Be_Quoted = True, as it may have been quoted. * lib-util.adb, lib-util.ads (Write_Info_Name_May_Be_Quoted): New procedure to write file/path names that may contain spaces and if they do are quoted. * lib-writ.adb (Write_ALI): Use new procedure Write_Info_Name_May_Be_Quoted to write file/path names on D lines. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203534 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Robert Dewar <dewar@adacore.com>charlet2013-10-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_aggr.adb (Resolve_Array_Aggregate): Redo duplicate/missing choice circuit. Was not quite right in some cases, which showed up in ACATS test B43201C. * sem_attr.adb (Address_Checks): Make sure name is set right for some messages issued. * mlib-prj.adb: Minor code reorganization. * gnat_ugn.texi: Remove special VMS doc for tagging of warning msgs. * exp_ch9.adb: Minor reformatting. 2013-10-10 Tristan Gingold <gingold@adacore.com> * lib-writ.adb (Write_Unit_Information): Adjust previous patch. 2013-10-10 Robert Dewar <dewar@adacore.com> * sem_ch5.adb (Analyze_If_Statement): Warn on redundant if statement. * sem_util.ads, sem_util.adb (Has_No_Obvious_Side_Effects): New function. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Expand_N_Timed_Entry_Call): Simplify expansion for the case of a dispatching trigger: there is no need to duplicate the code or create a subprogram to encapsulate the triggering statements. This allows exit statements in the triggering statements, that refer to enclosing loops. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203369 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Robert Dewar <dewar@adacore.com>charlet2013-10-101-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-writ.adb (Write_Unit_Information): Fatal error if linker options are detected in a predefined generic unit. 2013-10-10 Thomas Quinot <quinot@adacore.com> * s-oscons-tmplt.c (CLOCK_REALTIME): Always define, possibly using a dummy placeholder value. (NEED_PTHREAD_CONDATTR_SETCLOCK): Remove, not needed anymore. * thread.c: Adjust #if test accordingly. 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch6.adb (Consequence_Error): Generate an implicit if statement. (Expand_Contract_Cases): Generate an implicit if statement. (Process_Contract_Cases): Do not expand Contract_Cases when no code is being generated. 2013-10-10 Robert Dewar <dewar@adacore.com> * sem_attr.adb (Address_Checks): New procedure. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * sinfo.ads, sinfo.adb: New Node Freeze_Generic_Entity, to trigger semantic actions at the proper point for entities that previously had no explicit freeze point. * freeze.adb (Freeze_Generic_Entities): generate new nodes to indicate the point at which semantic checks can be performed on entities declared in generic packages. * sem_ch13.ads, sem_ch13.adb: New procedure Analyze_Freeze_Generic_Entity. * exp_util.adb (Insert_Actions): Treat new node like Freeze_Entity. * sem.adb (Analyze): Call Analyze_Freeze_Generic_Entity. * sprint.adb (Sprint_Node): display Analyze_Freeze_Generic_Entity. * gcc-interface/trans.c: Ignore Analyze_Freeze_Generic_Entity. * gcc-interface/Make-lang.in: Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203367 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Robert Dewar <dewar@adacore.com>charlet2013-07-081-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem.ads: Minor comment updates. * s-restri.ads, exp_ch6.adb, lib-load.ads, exp_ch3.adb, sem_ch10.adb: Minor reformatting. 2013-07-08 Robert Dewar <dewar@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry for Restriction_Set. * gnat_rm.texi: Add missing menu entry for Attribute Ref Add documentation for attribute Restriction_Set. * lib-writ.adb (Write_With_Lines): Generate special W lines for Restriction_Set. * lib-writ.ads: Document special use of W lines for Restriction_Set. * lib.ads (Restriction_Set_Dependences): New table. * par-ch4.adb (Is_Parameterless_Attribute): Add Loop_Entry to list (Scan_Name_Extension_Apostrophe): Remove kludge test for Loop_Entry (Scan_Name_Extension_Apostrophe): Handle No_Dependence for Restricton_Set. * restrict.adb (Check_SPARK_Restriction): Put in Alfa order (OK_No_Dependence_Unit_Name): New function. * restrict.ads (OK_No_Dependence_Unit_Name): New function. * rtsfind.adb: Minor reformatting Minor code reorganization. * sem_attr.adb (Analyze_Attribute): Add processing for Restriction_Set. * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Remove Check_Unit_Name and use new function OK_No_Dependence_Unit_Name instead. * sinfo.ads: Minor comment updates. * snames.ads-tmpl: Add entry for Restriction_Set attribute. 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Apply_Accessibility_Check): Remove local constant Pool_Id and local variable Free_Stmt. Do not deallocate the faulty object as "free" is not available on all targets/profiles. 2013-07-08 Robert Dewar <dewar@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Storage_Size aspect for task type in case discriminant is referenced. (Analyze_Attribute_Definition_Clause): Do not flag Storage_Size attribute definition clause as obsolescent if from aspect. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200771 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-07-051-44/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aspects.adb: Add an entry for SPARK_Mode in table Canonical_Aspect. * aspects.ads: Add an entry for SPARK_Mode in tables Aspect_Id, Aspect_Argument, Aspect_Names. * atree.adb (Node32): New routine. (Set_Node32): New routine. * atree.ads (Node32): New routine. (Set_Node32): New routine. * einfo.adb: Node32 is now used as SPARK_Mode_Pragmas. (Set_SPARK_Mode_Pragmas): New routine. (SPARK_Mode_Pragmas): New routine. (Write_Field32_Name): Add and entry for SPARK_Modes. * einfo.ads: Add attribute SPARK_Mode_Pragmas along with usage in various entities. (Set_SPARK_Mode_Pragmas): New routine and pragma Inline. (SPARK_Mode_Pragmas): New routine and pragma Inline. * gnat_rm.texi: Add sections explaining the syntax and semantics of aspect/pragma SPARK_Mode. * gnat_ugn.texi: Add pragma SPARK_Mode to the list of configuration pragmas. * lib.adb (Set_SPARK_Mode_Pragma): New routine. (SPARK_Mode_Pragma): New routine. * lib.ads: Alphabetize the comments on fields of record Unit_Record. Add new field SPARK_Mode_Pragma along with comment on its usage. Update the layout of record Unit_Record. (Set_SPARK_Mode_Pragma): New routine and pragma Inline. (SPARK_Mode_Pragma): New routine and pragma Inline. * lib-load.adb (Create_Dummy_Package_Unit): Initialize field SPARK_Mode_Pragma. (Load_Main_Source): Initialize field SPARK_Mode_Pragma. (Load_Unit): Initialize field SPARK_Mode_Pragma. * lib-writ.adb (Add_Preprocessing_Dependency): Initialize field SPARK_Mode_Pragma. (Ensure_System_Dependency): Initialize field SPARK_Mode_Pragma. * opt.ads: Alphabetize verification flags. Store the compilation-wide SPARK mode in variable Global_SPARK_Mode. * par-prag.adb: Pragma SPARK_Mode does not need special processing by the parser. * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect SPARK_Mode into a pragma. (Check_Aspect_At_Freeze_Point): Aspect SPARK_Mode does not need delayed processing. * sem_prag.adb: Add an entry for SPARK_Mode in table Sig_Flags. (Analyze_Pragma): Add processing for pragma SPARK_Mode. (Get_SPARK_Mode_Id): New routine. (Is_Elaboration_SPARK_Mode): New routine. (Is_Private_SPARK_Mode): New routine. * sem_prag.ads (Get_SPARK_Mode_Id): New routine. (Is_Elaboration_SPARK_Mode): New routine. (Is_Private_SPARK_Mode): New routine. * sinfo.ads: Update the comment on the usage of field Next_Pragma. * snames.ads-tmpl: Add new predefined name for SPARK_Mode and Auto. Add new pragma Id for SPARK_Mode. * types.ads: Add new type SPARK_Mode_Id. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200711 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-04-24 Yannick Moy <moy@adacore.com>charlet2013-04-241-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | * adabkend.adb, ali-util.adb, ali.adb, debug.adb, errout.adb, errout.ads, erroutc.adb, exp_ch3.adb, exp_ch4.adb, exp_ch6.adb, exp_ch7.adb, exp_dbug.adb, exp_util.adb, expander.adb, freeze.adb, gnat1drv.adb, lib-writ.adb, lib-writ.ads, lib-xref.adb, lib-xref.ads, opt.adb, opt.ads, restrict.adb, sem_aggr.adb, sem_attr.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_eval.adb, sem_prag.adb, sem_res.adb, sem_util.adb: Everything with name 'Alfa' renamed in 'SPARK'. Update comments. Renaming of units with name 'Alfa', renamed with 'SPARK' instead. * exp_alfa.adb: renamed exp_spark.adb. * exp_alfa.ads: renamed exp_spark.ads. * get_alfa.adb: renamed get_spark_xrefs.adb. * get_alfa.ads: renamed get_spark_xrefs.ads. * lib-xref-alfa.adb: renamed lib-xref-spark_specific.adb. * put_alfa.adb: renamed put_spark_xrefs.adb. * put_alfa.ads: renamed put_spark_xrefs.ads. * alfa.adb: renamed spark_xrefs.adb. * alfa.ads: renamed spark_xrefs.ads. * alfa_test.adb: renamed spark_xrefs_test.adb. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198234 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-04-11 Robert Dewar <dewar@adacore.com>charlet2013-04-111-89/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * back_end.adb (Register_Back_End_Types): Moved to Get_Targ * back_end.ads (C_String): Moved to Get_Targ (Register_Type_Proc): Moved to Get_Targ (Register_Back_End_Types): Moved to Get_Targ. * cstand.adb (Register_Float_Type): New interface (Create_Back_End_Float_Types): Use entries in FPT_Mode_Table. * get_targ.adb (Register_Back_End_Types): Moved here from Back_End. * get_targ.ads (C_String): Moved here from Back_End (Register_Type_Proc): Moved here from Back_End (Register_Back_End_Types): here from Back_End. * gnat1drv.adb (GGnat11drv): Add call to Write_Target_Dependent_Values; * lib-writ.ads, lib-writ.adb (Write_ALI): Remove section writing obsolete target dependent info. * opt.ads (Generate_Target_Dependent_Info): Removed (Target_Dependent_Info_Read): New flag (Target_Dependent_Info_Write): New flag * output.adb: Minor comment change * s-os_lib.ads: Minor reformatting * set_targ.ads, set_targ.adb: Minor reformatting. * switch-c.adb (Scan_Switches.First_Ptr): New variable (Scan_Front_End_Switches): Check -gnatd.b, -gnateT come first (Scan_Front_End_Switches): Handle -gnatet, -gnateT * ttypes.ads: Remove documentation section on target dependent info in ali file Remove four letter codes, no longer used Instead of using Get_Targ.Get_xxx, we use Set_Targ.xxx * usage.adb: Add usage lines for -gnatet/-gnateT * gcc-interface/Make-lang.in: Update dependencies. 2013-04-11 Thomas Quinot <quinot@adacore.com> * sem_ch4.adb: Update documentation. * sinfo.ads (N_Expression_With_Actions): Ditto. 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Add a guard to prevent the double insertion of the same aspect into a rep item list. This previously led to a circularity. 2013-04-11 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Eval_Attribute, case 'Access): Reject attribute reference if the prefix is the dereference of an anonymous access to subprogram type. * exp_attr.adb (Expand_N_Attribute_Reference, Access_Cases): Handle properly a reference to the current instance of a protected type from within a protected subprogram. * sem_res.adb (Find_Unique_Access_Type): Treat Attribute_Access_Type like Allocator_Type when resolving an equality operator. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197791 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-12-05 Robert Dewar <dewar@adacore.com>charlet2012-12-051-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-writ.adb (Write_ALI): Output T lines. * lib-writ.ads: Minor reformatting. Add documentation of T lines. * opt.ads (Generate_Target_Dependent_Info): New flag. * switch-c.adb (Scan_Switches): Recognize -gnatet switch (target dependent info). * ttypes.ads: Add four letter codes to declarations (for target dependent info). * usage.adb: Add line for -gnatet switch. 2012-12-05 Hristian Kirtchev <kirtchev@adacore.com> * exp_prag.adb (Expand_N_Pragma): Add a call to expand pragma Loop_Variant. (Expand_Pragma_Loop_Assertion): Removed. (Expand_Pragma_Loop_Variant): New routine. * par-prag.adb: Remove Pragma_Loop_Assertion and add two new Pragma_Loop_Invariant and Pragma_Loop_Variant entries. * sem_attr.adb (Analyze_Attribute): Update the code which locates the enclosing pragma. * sem_prag.adb (Analyze_Pragma): Remove the code which analyzes pragma Loop_Assertion as the pragma is now obsolete. Add the machinery to checks the semantics of pragmas Loop_Invariant and Loop_Variant. (Check_Loop_Invariant_Variant_Placement): New routine. * snames.ads-tmpl: Remove name Loop_Assertion. Add new names Loop_Invariant and Loop_Variant. Rename Name_Decreasing to Name_Decreases and Name_Increasing to Name_Increases. Remove the pragma Id for Loop_Assertion and add two new Ids for Loop_Invariant and Loop_Variant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194203 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-10-29 Tristan Gingold <gingold@adacore.com>charlet2012-10-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_ch9.adb, s-tarest.ads, exp_ch3.adb: Update comments. 2012-10-29 Yannick Moy <moy@adacore.com> * gnat_rm.texi: Minor documentation addition. 2012-10-29 Emmanuel Briot <briot@adacore.com> * xr_tabls.adb, xr_tabls.ads (Add_Declaration, Add_Reference): No longer assume that a parameter declaration is seen after the subprogram that uses it. 2012-10-29 Tristan Gingold <gingold@adacore.com> * lib-writ.adb (Write_ALI): Emit partition elaboration policy in P line. * lib-writ.ads: Document partition elaboration policy indication. * sem_prag.adb (Check_Arg_Is_Partition_Elaboration_Policy): New procedure. (Analyze_Pragma): Handle Partition_Elaboration_Policy. (Sig_Flags): Add flag for Pragma_Partition_Elaboration_Policy * ali.adb (Initialize_ALI): Init Partition_Elaboration_Policy_Specified. (Scan_ALI): Read Ex indications. * ali.ads: ALIs_Record: Add Partition_Elaboration_Policy. * par-prag.adb (Prag): Add Partition_Elaboration_Policy. * snames.adb-tmpl (Is_Partition_Elaboration_Policy_Name): New function. * opt.ads (Partition_Elaboration_Policy): Declare. (Partition_Elaboration_Policy_Sloc): Declare. * bcheck.adb (Check_Consistent_Partition_Elaboration_Policy): New procedure. (Check_Configuration_Consistency): Check partition elaboration policy consistency. * snames.ads-tmpl (Name_Partition_Elaboration_Policy): New name. (First_Partition_Elaboration_Policy_Name, Name_Concurrent, Name_Sequential, Last_Partition_Elaboration_Policy_Name): Likewise. (Pragma_Partition_Elaboration_Policy): New literal. (Is_Partition_Elaboration_Policy_Name): New function. 2012-10-29 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Is_Public_Subprogram_For): Handle properly expression functions, which are rewritten as subprogram declarations, when generating invariants for its return value and in-out parameters. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192928 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-12 Robert Dewar <dewar@adacore.com>charlet2012-07-121-37/+114
| | | | | | | | | | | | | | | | | | | | | | | | | * s-atopri.adb, s-atopri.ads: Minor reformatting. 2012-07-12 Robert Dewar <dewar@adacore.com> * ali.adb: Add circuitry to read new named form of restrictions lines. * debug.adb: Add doc for new -gnatd.R switch (used positional notation for output of restrictions data in ali file). * lib-writ.adb: Implement new named format for restrictions lines. * lib-writ.ads: Add documentation for new named format for restrictions in ali files. * restrict.adb, restrict.ads, sem_prag.adb: Update comments. * rident.ads: Go back to withing System.Rident * s-rident.ads: Add extensive comment on dealing with consistency checking. 2012-07-12 Thomas Quinot <quinot@adacore.com> * par_sco.adb, scos.ads: Emit detailed SCOs for SELECT statements. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189438 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-04-25 Robert Dewar <dewar@adacore.com>charlet2012-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * sem_ch3.adb, csinfo.adb, lib-writ.adb, sem_ch12.adb, lib-xref.adb: Minor reformatting. 2012-04-25 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch9.adb: Rename Lock_Free_Sub_Type to Lock_Free_Subprogram. Remove type Subprogram_Id. Rename LF_Sub_Table to Lock_Free_Subprogram_Table. (Allow_Lock_Free_Implementation): Renamed to Allows_Lock_Free_Implementation. Update the comment on lock-free restrictions. Code clean up and restructuring. (Build_Lock_Free_Protected_Subprogram_Body): Update the profile and related comments. Code clean up and restructuring. (Build_Lock_Free_Unprotected_Subprogram_Body): Update the profile and related comments. Code clean up and restructuring. (Comp_Of): Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186828 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-04-02 Robert Dewar <dewar@adacore.com>charlet2012-04-021-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * s-atopri.ads: Minor reformatting. 2012-04-02 Thomas Quinot <quinot@adacore.com> * sem_util.adb: Minor reformatting, minor code cleanup. 2012-04-02 Ed Schonberg <schonberg@adacore.com> * lib-xref.adb (Generate_Reference): For a reference to an operator symbol, set the sloc to point to the first character of the operator name, and not to the initial quaote. (Output_References): Ditto for the definition of an operator symbol. 2012-04-02 Vincent Celier <celier@adacore.com> * ali.adb (Scan_Ali): Recognize Z lines. Set Implicit_With_From_Instantiation to True in the With_Record for Z lines. * ali.ads (With_Record): New Boolean component Implicit_With_From_Instantiation, defaulted to False. * csinfo.adb: Indicate that Implicit_With_From_Instantiation is special * lib-writ.adb (Write_ALI): New array Implicit_With. (Collect_Withs): Set Implicit_With for the unit is it is not Yes. (Write_With_Lines): Write a Z line instead of a W line if Implicit_With is Yes for the unit. * sem_ch12.adb (Inherit_Context): Only add a unit in the context if it is not there yet. * sinfo.ads: New flag Implicit_With_From_Instantiation (Flag12) added. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186079 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-05 Bob Duff <duff@adacore.com>charlet2011-12-051-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch4.adb: Minor comment fix. 2011-12-05 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Add documentation for -gnatw.e. 2011-12-05 Bob Duff <duff@adacore.com> * treepr.adb (pn): Print something useful for Elmt_Ids. Add Write_Eol to 'when others' case, so the output will be seen immediately in gdb. 2011-12-05 Ed Schonberg <schonberg@adacore.com> * lib-writ.adb (Output_Main_Program_Line): A generic subprogram is never a main program. 2011-12-05 Thomas Quinot <quinot@adacore.com> * par_sco.adb: Various minor adjustments to dominance markers generation. 2011-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Expression_Function): If the function is a completion, generate a body reference for its defining entity, before rewriting the node as a body. * sem_util.adb (Defining_Entity): Add entry for expression function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182006 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-09-19 Robert Dewar <dewar@adacore.com>charlet2011-09-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * err_vars.ads, errout.ads: Minor reformatting. 2011-09-19 Robert Dewar <dewar@adacore.com> * aspects.ads (Impl_Defined_Aspects): New array * lib-writ.adb (No_Dependences): New name for No_Dependence * restrict.adb (No_Dependences): New name for No_Dependence (Check_Restriction_No_Specification_Of_Aspect): New procedure. (Set_Restriction_No_Specification_Of_Aspect): New procedure (Restricted_Profile_Result): New variable (No_Specification_Of_Aspects): New variable (No_Specification_Of_Aspect_Warning): New variable * restrict.ads (No_Dependences): New name for No_Dependence (Check_Restriction_No_Specification_Of_Aspect): New procedure (Set_Restriction_No_Specification_Of_Aspect): New procedure * s-rident.ads: Add restriction No_Implementation_Aspect_Specifications, this is also added to the No_Implementation_Extensions profile. * sem_ch13.adb (Analyze_Aspect_Specifications): Check No_Implementation_Defined_Aspects (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect * sem_prag.adb (Analyze_Aspect_Specifications): Check No_Implementation_Aspects (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name 2011-09-19 Yannick Moy <moy@adacore.com> * lib-xref.adb (Generate_Reference): Take into account multiple renamings for Alfa refs. 2011-09-19 Thomas Quinot <quinot@adacore.com> * g-socthi-mingw.adb: Minor reformatting. 2011-09-19 Yannick Moy <moy@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): Set tagged type expansion to False in mode Alfa 2011-09-19 Pascal Obry <obry@adacore.com> * mingw32.h: Remove obsolete code needed for old versions of MingW. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178959 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-09-01 Yannick Moy <moy@adacore.com>charlet2011-09-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter Ignore_Errors to ignore failures to read ALI files when True. 2011-09-01 Javier Miranda <miranda@adacore.com> * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default constructor calls associated with non-tagged record types. 2011-09-01 Robert Dewar <dewar@adacore.com> * g-socthi-vms.adb: Minor reformatting. 2011-09-01 Nicolas Roche <roche@adacore.com> * sysdep.c: Don't use macro functions for stdio functions on VxWorks in order to avoid impact of imcompatible changes. * cstreams.c: Likewise * cio.c: Likewise * aux-io.c: Likewise 2011-09-01 Yannick Moy <moy@adacore.com> * lib-writ.adb (Write_With_Lines): Always output complete information on "with" line in Alfa mode, as this is required by formal verification back-end. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178406 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-31 Jose Ruiz <ruiz@adacore.com>charlet2011-08-311-5/+5
| | | | | | | | | | | | | | | | | | * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous access types. * affinity.c (__gnat_set_affinity_mask): Declare index variable. 2011-08-31 Yannick Moy <moy@adacore.com> * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in full-expander test. Minor reformatting, renaming ALFA in Alfa (we dropped acronym) * einfo.adb (Primitive_Operations): Correctly return list of primitive operations in a case where it returned previously No_Elist. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178358 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-05 Ed Schonberg <schonberg@adacore.com>charlet2011-08-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch3.adb: (Check_Private_Overriding): better error message, suggested by AI95-0068. 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve the two potential initialization calls. This accounts for any access-before-elaboration checks which may precede the initialization calls. (Next_Suitable_Statement): New routine. Returns the next real statement after the input node while skipping generated checks. * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along with comment on usage. Do not generate Elaborate_All when the trigger is a finalization call coming from a type init proc. (Check_Elab_Call): Propagate the initialization procedure context to subsequent calls to Check_A_Call. (Check_Internal_Call_Continue): Propagate the initialization procedure context to subsequent calls to Check_Elab_Call. (Is_Finalization_Procedure): New routine. Returns True if the input entity denotes a [Deep_]Finalize routine. * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc along with comment on usage. 2011-08-05 Vadim Godunko <godunko@adacore.com> * s-atocou.ads: Add list of supported platforms. 2011-08-05 Yannick Moy <moy@adacore.com> * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables * opt.ads (Disable_ALI_File): new Boolean flag * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing 2011-08-05 Ed Falis <falis@adacore.com> * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that environ is properly defined. 2011-08-05 Vincent Celier <celier@adacore.com> * make.adb (Compilation_Phase): Exit immediately when all objects have been found up to date, to avoid multiple exit messages. * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the same project for languages with no compiler. * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch -eI. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177434 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-03 Javier Miranda <miranda@adacore.com>charlet2011-08-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_prag.adb (Process_Interface_Name): Allow duplicated export names in Java since they are always enclosed in a namespace that differentiates them, and overloaded entities are supported by the VM. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * checks.adb (Determine_Range): If a computed bound of an operation is outside the range of the base type of the expression, and overflow checks are enabled, the result is unknown and cannot be used for any subsequent constant folding. * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are unknown, so is the result of the comparison. 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com> * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal From_Abort. When finalization was triggered by an abort, propagate Standard'Abort_Signal rather than Program_Error. * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal From_Abort. * a-except.adb (Raise_From_Controlled_Operation): Add new formal From_Abort. When finalization was triggered by an abort, propagate Standard'Abort_Signal rather than Program_Error. * a-except.ads:(Raise_From_Controlled_Operation): Add new formal From_Abort. * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable Abort_Id. Update the calls to Build_Object_Declarations and Build_Raise_Statement to include Abort_Id. (Build_Adjust_Statements): New local variable Abort_Id. Update the calls to Build_Object_Declarations and Build_Raise_Statement to include Abort_Id. (Build_Finalize_Statements): New local variable Abort_Id. Update the calls to Build_Object_Declarations and Build_Raise_Statement to include Abort_Id. (Build_Components): Create an entity for Abort_Id when exceptions are allowed on the target. (Build_Finalizer): New local variable Abort_Id. (Build_Initialize_Statements): New local variable Abort_Id. Update the calls to Build_Object_Declarations and Build_Raise_Statement to include Abort_Id. (Build_Object_Declarations): Add new formal Abort_Id. Create the declaration of flag Abort_Id to preserve the original abort status before finalization code is executed. (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to runtime routine Raise_From_Controlled_Operation. (Create_Finalizer): Update the call to Build_Raise_Statement to include Abort_Id. Update the call to Build_Object_Declarations to include Abort_Id. Update the layout of the finalizer body. (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort. (Process_Transient_Objects): New local variable Abort_Id. Remove the clunky code to create all flags and objects related to exception propagation and replace it with a call to Build_Object_Declarations. Update the call to Build_Raise_Statement to include Abort_Id. * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec. Add new formal Abort_Id and associated comment on its use. (Build_Raise_Statement): Add new formal Abort_Id and associated comment on its use. * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id. Remove the clunky code to create all flags and objects related to exception propagation and replace it with a call to Build_Object_Declarations. Update the call to Build_Raise_Statement. 2011-08-03 Eric Botcazou <ebotcazou@adacore.com> * s-tassta.adb: Fix minor typos. 2011-08-03 Robert Dewar <dewar@adacore.com> * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb, lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177283 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>charlet2011-08-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177275 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-03 Robert Dewar <dewar@adacore.com>charlet2011-08-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb, make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb, fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb, prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads, sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb, prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb, prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads, alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting 2011-08-03 Robert Dewar <dewar@adacore.com> * repinfo.adb (List_Mechanism): Add handling of Convention_Ada_Pass_By_XXX. * sem_mech.adb (Set_Mechanism): Ditto. * sem_prag.adb (Process_Convention): Add entries for Convention_Ada_Pass_By_XXX. * snames.adb-tmpl, snames.ads-tmpl: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177252 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>charlet2011-08-031-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat_ugn.texi: Document -Wstack-usage. * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes. 2011-08-03 Thomas Quinot <quinot@adacore.com> * sem_prag.adb Issue an error (not a warning) when a C++ type does not have keyword LIMITED. 2011-08-03 Yannick Moy <moy@adacore.com> * alfa.adb, alfa.ads, alfa_test.adb: New files. * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA) (Scan_ALI): do not issue a fatal error if parsing known lines after Xref section (does not happen in compiler, only if code directly calls Scan_ALI). * get_alfa.adb, get_alfa.ads: New files. * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if needed. * lib-xref-alfa.adb: New file. * lib-xref.adb, lib-xref.ads (Xref_Entry): redefine information needed in cross-references for ALFA. Push ALFA treatments in separated local package. (Enclosing_Subpragram_Or_Package): treat specially subprogram identifiers. Return entity of package body instead of spec. Return Empty for a scope with no location. (Generate_Reference): adapt to new components for ALFA information. Remove the need for D references on definitions. (Is_Local_Reference): moved to ALFA local package (Output_References): extract subfunction as Extract_Source_Name (Output_Local_References): remove procedure, replaced by filtering of cross-references in package ALFA and printing in Put_ALFA. (Write_Entity_Name): remove procedure * lib.adb, lib.ads (Extract_Source_Name): extract here function to print exact name of entity as it appears in source file (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA * put_alfa.adb, put_alfa.ads: New files. * xref_lib.adb (Search_Xref): protect read of cross-references against reading other sections of the ALI file, in gnatxref (Search): protect read of cross-references against reading other sections of the ALI file, in gnatfind. * gcc-interface/Make-lang.in: Update dependencies. 2011-08-03 Thomas Quinot <quinot@adacore.com> * sem_ch3.adb: Minor reformatting. 2011-08-03 Jose Ruiz <ruiz@adacore.com> * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of raising an exception. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer type, always use 1 as the lower bound or string, even if lower bound of context is not static, to handle properly null strings in a non-static context. 2011-08-03 Bob Duff <duff@adacore.com> * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is always legal on the right-hand side of an assignment statement; there is always an applicable index constraint in this case. Therefore, the check for Pkind = N_Assignment_Statement is now unconditional -- it doesn't depend on whether Is_Constrained (Typ). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177239 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-02 Robert Dewar <dewar@adacore.com>charlet2011-08-021-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_res.adb: Minor reformatting. * sem_prag.adb: Minor reformatting. 2011-08-02 Javier Miranda <miranda@adacore.com> * exp_atag.adb, exp_atags.ads (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr by the tagged type Entity. Required to use this routine in the VM targets since we do not have available the Tag entity in the VM platforms. * exp_ch6.adb (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package Ada.Tags has not been previously loaded. * exp_ch7.adb (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke Build_VM_TSDs if package Ada.Tags has not been previously loaded. * sem_aux.adb (Enclosing_Dynamic_Scope): Add missing support to handle the full view of enclosing scopes. Required to handle enclosing scopes that are synchronized types whose full view is a task type. * exp_disp.adb (Build_VM_TSDs): Minor code improvement to avoid generating and analyzing lists with empty nodes. (Make_Disp_Asynchronous_Select_Body): Add support for VM targets. (Make_Disp_Conditional_Select_Body): Add support for VM targets. (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets. (Make_Disp_Timed_Select_Body): Add support for VM targets. (Make_Select_Specific_Data_Table): Add support for VM targets. (Make_VM_TSD): Generate code to initialize the SSD structure of the TSD. 2011-08-02 Yannick Moy <moy@adacore.com> * lib-writ.adb (Write_ALI): when ALFA mode is set, write local cross-references section in ALI. * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub (enclosing subprogram), Slc (location of Sub) and Sun (unit number of Sub). (Enclosing_Subprogram_Or_Package): new function to return the enclosing subprogram or package entity of a node (Is_Local_Reference_Type): new function returns True for references selected in local cross-references. (Lt): function extracted from Lt in Output_References (Write_Entity_Name): function extracted from Output_References (Generate_Definition): generate reference with type 'D' for definition of objects (object declaration and parameter specification), with appropriate locations and units, for use in local cross-references. (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created references of type 'I' for initialization in object definition. (Output_References): move part of function Lt and procedure Write_Entity_Name outside of the body. Ignore references of types 'D' and 'I' introduced for local cross-references. (Output_Local_References): new procedure to output the local cross-references sections. (Lref_Entity_Status): new array defining whether an entity is a local * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference with 'I' type when initialization expression is present. * get_scos.adb, get_scos.ads: Correct comments and typos git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177168 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-18 Jose Ruiz <ruiz@adacore.com>charlet2010-10-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add field corresponding to the affinity when expanding the task declaration. (Make_Task_Create_Call): Add the affinity parameter to the call to create task. * sem_prag.adb (Analyze_Pragma): Add the analysis for pragma CPU, taking into account the case when it applies to a subprogram (only for main and with static expression) or to a task. * par_prag.adb:(Prag): Make pragma CPU a valid one. * snames.ads-tmpl (Name_uCPU, Name_CPU): Add these new name identifiers used by the expander for handling the affinity parameter when creating a task. (Pragma_Id): Add Pragma_CPU as a valid one. * rtsfind.ads (RTU_Id): Make System_Multiprocessors accesible. (RE_Id, RE_Unit_Table): Make the entities RE_CPU_Range and RE_Unspecified_CPU visible. * sinfo.ads, sinfo.adb (Has_Pragma_CPU, Set_Has_Pragma_CPU): Add these two subprograms to set/get the flag indicating whether there is a pragma CPU which applies to the entity. * lib.ads, lib.adb (Unit_Record, Default_Main_CPU, Main_CPU, Set_Main_CPU): Add the field Main_CPU to Unit_Record to store the value of the affinity associated to the main subprogram (if any). Default_Main_CPU is used when no affinity is set. Subprograms Set_Main_CPU and Main_CPU are added to set/get the affinity of the main subprogram. * ali.ads, ali.adb (ALIs_Record): Add field Main_CPU to contain the value of the affinity of the main subprogram. (Scan_ALI): Get the affinity of the main subprogram (encoded as C=XX in the M line). * lib-writ.ads, lib-writ.adb (M_Parameters): Encode the affinity of the main subprogram in the M (main) line using C=XX. * lib-load.adb (Create_Dummy_Package_Unit, Load_Main_Source, Load_Unit): Add new field Main_CPU. * bindgen.adb (Gen_Adainit_Ada, Gen_Adainit_C): Add the code to pass the affinity of the main subprogram to the run time. * s-taskin.ads (Common_ATCB): Add the field Base_CPU to store the affinity. (Unspecified_CPU): Add this constant to identify the case when no affinity is set for tasks. * s-taskin.adb (Initialize_ATCB): Store the value coming from pragma CPU in the common part of the ATCB. (Initialize): Store the value coming from pragma CPU (for the environment task) in the common part of the ATCB. * s-tassta.ads, s-tassta.adb (Create_Task): Add the affinity specified by pragma CPU to the ATCB. * s-tarest.ads, s-tarest.adb (Create_Restricted_Task): Add the affinity specified by pragma CPU to the ATCB. * s-tporft.adb (Register_Foreign_Thread): Add the new affinity parameter to the call to Initialize_ATCB. * s-taprop-linux.adb (Create_Task): Change the attributes of the thread to include the task affinity before creation. Additionally, the affinity selected with Task_Info is also enforced changing the attributes at task creation time, instead of changing it after creation. (Initialize): Change the affinity of the environment task if required by a pragma CPU. * s-osinte-linux.ads (pthread_setaffinity_np): Instead of using a wrapper to check whether the function is available or not, use a weak symbol. (pthread_attr_setaffinity_np): Add the import of this function which is used to change the affinity in the attributes used to create a thread. * adaint.c (__gnat_pthread_attr_setaffinity_np): Remove this wrapper. It was used to check whether the pthread function was available or not, but the use of a weak symbol handles this situation in a cleaner way. * s-taprop-mingw.adb (Create_Task, Initialize): Change the affinity of tasks (including the environment task) if required by a pragma CPU. * s-taprop-solaris.adb (Enter_Task): Change the affinity of tasks (including the environment task) if required by a pragma CPU. * s-taprop-vxworks.adb (Create_Task, Initialize): Change the affinity of tasks (including the environment task) if required by a pragma CPU. * init.c (__gl_main_cpu): Make this value visible to the run time. It will pass the affinity of the environment task. 2010-10-18 Javier Miranda <miranda@adacore.com> * einfo.adb (Direct_Primitive_Operations): Complete assertion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165625 138bc75d-0d04-0410-961f-82ee72b054a4