summaryrefslogtreecommitdiff
path: root/gcc/ada/sinfo.adb
Commit message (Collapse)AuthorAgeFilesLines
* 2011-09-06 Yannick Moy <moy@adacore.com>charlet2011-09-061-32/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch13.adb (Analyze_Aspect_Specifications): Call Set_Corresponding_Aspect when creating pragma from aspect. (Add_Predicates): Use new field Corresponding_Aspect. * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect name when present, for the purpose of issuing error messages; remove local procedure Error_Pragma_Arg_Alternate_Name. * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in N_Pragma node. (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from N_Pragma node. 2011-09-06 Robert Dewar <dewar@adacore.com> * checks.adb, s-except.ads, g-socket.adb: Minor reformatting. 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch6.adb (Build_Heap_Allocator): Add new local variable Desig_Typ. Code and comment reformatting. Add machinery to ensure that the allocation uses a fat pointer when the type of the return object is a constrained array and the function return type is an unconstrained array. 2011-09-06 Vincent Celier <celier@adacore.com> * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal parameters in subprograms. 2011-09-06 Arnaud Charlet <charlet@adacore.com> * s-taprop-mingw.adb (Finalize_TCB): Fix typo. 2011-09-06 Thomas Quinot <quinot@adacore.com> * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb (System.Tasking.Primitive_Operations.Specific.Delete): Remove subprogram. (System.Tasking.Primitive_Operations.Specific.Set): If argument is null, destroy task specific data, to make API consistent with other platforms, and thus compatible with the shared version of s-tpoaal.adb. (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB): Document the above assumption. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178583 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-09-02 Ed Schonberg <schonberg@adacore.com>charlet2011-09-021-0/+16
| | | | | | | | | | | | | | | * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use, present in incomplete type declarations to refine the error message the full declaration is in the same unit. * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of an incomplete type, set the Premature_Use for additional message. * sem_ch3.adb (Find_Type_Name): If partial view is incomplete and Premature_Use is set, place additional information at the point of premature use. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178461 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-09-01 Robert Dewar <dewar@adacore.com>charlet2011-09-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting. 2011-09-01 Thomas Quinot <quinot@adacore.com> * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to GNATRTL_NONTASKING_OBJS. 2011-09-01 Robert Dewar <dewar@adacore.com> * einfo.ads (Is_Aliased): Fix existing documentation and add note on possibility of this flag being set for formals in Ada 2012 mode. * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada 2012. * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012 mode. * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for Ada 2012. * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for Ada 2012. 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper insertion node in a tree of nested Expression_With_Actions nodes. (Process_Transient_Object): In the case where a complex if statement has been converted into nested Expression_With_Actions nodes, the "hook" object and the associated access type must be inserted before the top most Expression_With_Actions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178401 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-31 Jose Ruiz <ruiz@adacore.com>charlet2011-08-311-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the dispatching domain aspect. * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain aspect. * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the Dispatching_Domain aspect in a similar way as we do for the Priority aspect. * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the Dispatching_Domain component if a Dispatching_Domain pragma or aspect is present. (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma. * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma Dispatching_Domain and add it to the task definition. (Sig_Flags): Add Pragma_Dispatching_Domain. * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the support to find the types Dispatching_Domain and Dispatching_Domain_Access. * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain, Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and query the availability of a pragma Dispatching_Domain. * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by the expander to pass the Dispatching_Domain when creating a task. (Name_Dispatching_Domain): Add this new name for a pragma. (Pragma_Id): Add the new Pragma_Dispatching_Domain. * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the task has been allocated at creation time. * s-tarest.adb (Create_Restricted_Task): The dispatching domain using Ravenscar is always null. * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which the task has been allocated at creation time. * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have a specific dispatching domain. * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb, s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain and CPU are specified for the task, and the CPU value is not contained within the range of processors for the domain. 2011-08-31 Vincent Celier <celier@adacore.com> * make.adb (Original_Gcc) : New constant String_Access. (Gnatmake): For VM targets, do not use VM version of the compiler if --GCC= has been specified. 2011-08-31 Thomas Quinot <quinot@adacore.com> * sem_ch5.adb: Minor reformatting. 2011-08-31 Ed Schonberg <schonberg@adacore.com> * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do not reanalyze it. 2011-08-31 Bob Duff <duff@adacore.com> * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case the access type is private; we don't care about privacy in expansion. 2011-08-31 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate subcomponents tnat may be limited, because they originate in view conflicts. If the original aggregate is legal and the actuals are legal, the aggregate itself is legal. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178371 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-29 Matthew Heaney <heaney@adacore.com>charlet2011-08-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check for sibling when common parent. 2011-08-29 Thomas Quinot <quinot@adacore.com> * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with "pragma_". 2011-08-29 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions for the return type when in ASIS mode. 2011-08-29 Vincent Celier <celier@adacore.com> * make.adb (Gnatmake): Get the default search dirs, then the target parameters after getting the Builder switches, as the Builder switches may include --RTS= and that could change the default search dirs. 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of Make_Final_Call. Move the processing for class-wide types before the processing for derivations from [Limited_]Controlled. (Make_Final_Call): Move the processing for class-wide types before the processing for derivations from [Limited_]Controlled. * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check. Add code to account for alignments larger than the list header. Add a comment illustrating the structure of the allocated object + padding + header. (Deallocate_Any_Controlled): Add code to account for alignments larger than the list header. 2011-08-29 Ed Schonberg <schonberg@adacore.com> * sinfo.ads, sinfo.adb: New node kind N_Formal_Incomplete_Type_Definition, related flags. par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition): Parse formal incomplete types. * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in sem_ch12. * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body): Formal incomplete types do not need completion. * sem_ch12.adb (Analyze_Formal_Incomplete_Type, Validate_Incomplete_Type_Instance): New procedures to handle formal incomplete types. * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual that corresponds to a formal incomplete type. * sprint.adb: Handle formal incomplete type declarations. * exp_util.adb (Insert_Actions): An incomplete_type_definition is not an insertion point. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178184 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>charlet2011-08-291-18/+0
| | | | | | | | | | | | | | | | | | | | * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a statement list is wrapped in a block, the block is explicitly analyzed in order to properly redecorate the entities and create a servicing finalizer. 2011-08-29 Tristan Gingold <gingold@adacore.com> * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove. (Set_Zero_Cost_Handling): Remove. 2011-08-29 Thomas Quinot <quinot@adacore.com> * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178162 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-05 Bob Duff <duff@adacore.com>charlet2011-08-051-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for subpools. * par-ch4.adb (P_Allocator): Parse new subpool specification syntax. 2011-08-05 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the general indexing aspects of Ada2012. Called when analyzing indexed components when other interpretations fail. * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only in an expression context where overloading is meaningful. This excludes the occurrence in an aspect specification (efficiency only). * sem_attr.adb (Analyze_Attribute): indicate that the attributes related to iterators can be set by an attribute specification, but cannot be queried. * sem_ch13.adb (Analyze_Aspect_Specifications): handle Constant_Indexing and Variable_Indexing. (Check_Indexing_Functions): New procedure to perform legality checks. Additional semantic checks at end of declarations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177446 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-04 Yannick Moy <moy@adacore.com>charlet2011-08-041-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat_rm.texi: Document new pragma and aspect. * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case (No_Duplicates_Allowed): new constant array defining whether duplicates aspects of each kind can appear on the same declaration. * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract field, which points to a node holding the previous Spec_PPC_List. * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List through the indirection with Contract. * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node * par-prag.adb (Prag): do nothing on Test_Case pragma * sem.adb (Analyze): abort on N_Contract, on which Analyze should not be called directly. * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in component Ensures of Test_Case. * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb (Analyze_Generic_Subprogram_Declaration, Analyze_Subprogram_Instantiation, Analyze_Abstract_Subprogram_Declaration, Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Specification, Analyze_Entry_Declaration): insert contract in subprogram node at point of definition * sem_ch13.adb (Aspect_Loop): do not raise error on duplicate Test_Case aspect (Analyze_Aspect_Specifications): analyze Test_Case aspect and create corresponding pragma (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases, similar to the analysis of pre/post (Derive_Subprogram): insert contract in subprogram node at point of derivation. * sem_prag.adb, sem_prag.ads (Check_Arg_Is_String_Literal, Check_Identifier): new checking procedures to be called in treatment of pragmas (Check_Test_Case): new procedure to check that a Test_Case aspect or pragma is well-formed. This does not check currently that 'Result is used only in the Ensures component of a Test_Case. (Analyze_Pragma): add case for Test_Case (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures components of a Test_Case. (Preanalyze_TC_Args): new procedure to preanalyze the boolean expressions in the 3rd (and 4th if present) arguments of a Test_Case pragma, treated as spec expressions. (Sig_Flags): add value -1 for Test_Case. * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma, Get_Requires_From_Test_Case_Pragma): getters for both expression components of a Test_Case. * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as indirection between an entry or [generic] subprogram entity and its pre/post + test-cases. (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List): get/set for fields of an N_Contract node. * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode, Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new names and pragma for Test_Case. * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177384 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-04 Thomas Quinot <quinot@adacore.com>charlet2011-08-041-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled): This flag of N_Pragma nodes is not used, remove it as well as all of the associated circuitry. 2011-08-04 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the runtime check on duplicated externa tags * debug.adb Document switch -gnatdQ. 2011-08-04 Gary Dismukes <dismukes@adacore.com> * a-fihema.ads: Minor typo fix. 2011-08-04 Yannick Moy <moy@adacore.com> * sem_ch10.adb: Minor comment update. 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com> * einfo.adb: Update the node field usage to reflect the renaming of Return_Flag to Return_ Flag_Or_Transient_Decl. (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. (Write_Field15_Name): Change Return_Flag to Return_Flag_Or_Transient_Decl. * einfo.ads: Rename node field Return_Flag to Return_Flag_Or_Transient_Decl. Update the associated comment and all occurrences in entities. (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update associated Inline pragma. (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update associated Inline pragma. * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New routine. * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to Return_Flag and Set_Return_Flag. * exp_ch7.adb (Process_Declarations): Add code to recognize hook objects generated for controlled transients declared inside an Exception_With_Actions. Update the calls to Return_Flag. (Process_Object_Declaration): Add code to add a null guard for hook objects generated for controlled transients declared inside an Exception_With_Actions. Update related comment. * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook objects generated for controlled transients declared inside an Exception_With_Actions. Update the calls to Return_Flag. * expander.adb (Expand): Add new case for N_Expression_With_Actions. 2011-08-04 Ed Schonberg <schonberg@adacore.com> * sem_util.adb:(Wrong_Type): Improve error message on a one-element positional aggregate. 2011-08-04 Vincent Celier <celier@adacore.com> * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma SLOC only for pragmas. 2011-08-04 Emmanuel Briot <briot@adacore.com> * projects.texi: Minor typo fix. 2011-08-04 Emmanuel Briot <briot@adacore.com> * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging on case-sensitive file systems. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177349 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-04 Tristan Gingold <gingold@adacore.com>charlet2011-08-041-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset instead of the locally imported procedure. * s-taprop-mingw.adb (Enter_Task): Ditto. * s-valrea.adb (Scan_Real): Ditto. * s-imgrea.adb (Set_Image_Real): Ditto. * s-flocon.ads: Make the package pure. 2011-08-04 Thomas Quinot <quinot@adacore.com> * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove. * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly. * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement): New subprogram, moved here from... * par.adb, par-ch5.adb (P_Statement_Name): ... here. * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any rewriting of the last argument into a procedure call statement here... * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there instead. 2011-08-04 Thomas Quinot <quinot@adacore.com> * par_sco.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177337 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>charlet2011-08-031-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-02 Robert Dewar <dewar@adacore.com>charlet2011-08-021-1/+12
| | | | | | | | | | | | | | | | | | | | | * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads, exp_ch3.adb: Minor reformatting. 2011-08-02 Emmanuel Briot <briot@adacore.com> * adaint.c (__gnat_locate_exec_on_path): only returns executable files, not any regular file. (__gnat_locate_file_with_predicate): new subprogram. 2011-08-02 Yannick Moy <moy@adacore.com> * sinfo.adb, sinfo.ads: Restrict the use of flags Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression nodes, plus N_Subtype_Declaration for the 2nd one. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177180 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-02 Robert Dewar <dewar@adacore.com>charlet2011-08-021-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch12.adb, sem_ch11.adb: New calling sequence for Analyze_Aspect_Specifications * sem_ch13.adb (Analyze_Aspect_Specifications): New handling for boolean aspects * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling sequence for Analyze_Aspect_Specifications * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used 2011-08-02 Robert Dewar <dewar@adacore.com> * freeze.adb (Freeze_Entity): Remove handling of delayed boolean aspects, since these no longer exist. 2011-08-02 Robert Dewar <dewar@adacore.com> * par-ch13.adb (Aspect_Specifications_Present): Always return false on semicolon, do not try to see if there are aspects following it. * par-ch3.adb (P_Declarative_Items): Better message for unexpected aspect spec. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177095 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-02 Ed Schonberg <schonberg@adacore.com>charlet2011-08-021-0/+16
| | | | | | | | | | | | | | | * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5. * par_ch8.adb (P_Use_Type): initialize Used_Operations for node. * sinfo.ads, sinfo.adb (Used_Operations): new attribute of use_type_clauses, to handle more efficiently use_type and use_all_type constructs. * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the Ada2012 Use_All_Type clause. (Use_Class_Wide_Operations): new procedure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177090 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-02 Robert Dewar <dewar@adacore.com>charlet2011-08-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb, sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized expression to expression function. 2011-08-02 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb: transform simple Ada2012 membership into equality only if types are compatible. 2011-08-02 Yannick Moy <moy@adacore.com> * sem_res.adb (Matching_Static_Array_Bounds): new function which returns True if its argument array types have same dimension and same static bounds at each index. (Resolve_Actuals): issue an error in formal mode on actuals passed as OUT or IN OUT paramaters which are not view conversions in SPARK. (Resolve_Arithmetic_Op): issue an error in formal mode on multiplication or division with operands of fixed point types which are not qualified or explicitly converted. (Resolve_Comparison_Op): issue an error in formal mode on comparisons of Boolean or array type (except String) operands. (Resolve_Equality_Op): issue an error in formal mode on equality operators for array types other than String with non-matching static bounds. (Resolve_Logical_Op): issue an error in formal mode on logical operators for array types with non-matching static bounds. Factorize the code in Matching_Static_Array_Bounds. (Resolve_Qualified_Expression): issue an error in formal mode on qualified expressions for array types with non-matching static bounds. (Resolve_Type_Conversion): issue an error in formal mode on type conversion for array types with non-matching static bounds git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177089 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-01 Robert Dewar <dewar@adacore.com>charlet2011-08-011-0/+32
| | | | | | | | | | | | | | | | | | | | * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate. * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for Static_Predicate and Dynamic_Predicate. (Build_Predicate_Function): Add processing for Static_Predicate and Dynamic_Predicate. * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag (From_Static_Predicate): New flag * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate 2011-08-01 Robert Dewar <dewar@adacore.com> * usage.adb: Documentation cleanup for Ada version modes in usage. * expander.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177009 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-01 Robert Dewar <dewar@adacore.com>charlet2011-08-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * atree.ads: Minor comment fix. * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads, a-witeio.ads, sem_prag.adb: Minor reformatting. 2011-08-01 Doug Rupp <rupp@adacore.com> * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure pointers. Use descrip.h header file for convenience. Add some comments. 2011-08-01 Robert Dewar <dewar@adacore.com> * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point (Freeze_All): Call Check_Aspect_At_End_Of_Declarations * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point): New procedure. (Check_Aspect_At_End_Of_Declarations): New procedure (Analye_Aspect_Specification): Minor changes for above procedures * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect specification node as well. 2011-08-01 Pascal Obry <obry@adacore.com> * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special Windows files. Use GetFilesAttributes() in this case to check for file existence instead of returning with an error code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177008 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-08-01 Robert Dewar <dewar@adacore.com>charlet2011-08-011-0/+16
| | | | | | | | | | | | | | | | | | | | | | * aspects.ads (Boolean_Aspects): New subtype. * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects for derived types in cases where the parent type and derived type have aspects. * freeze.adb (Freeze_Entity): Fix problems in handling derived type with aspects when parent type also has aspects. (Freeze_Entity): Deal with delay of boolean aspects (must evaluate boolean expression at this point). * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in accordance with final decision on the Ada 2012 feature. * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag. 2011-08-01 Matthew Heaney <heaney@adacore.com> * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177005 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-22 Ben Brosgol <brosgol@adacore.com>charlet2010-10-221-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat_rm.texi: Add chapter on Ada 2012 support. 2010-10-22 Robert Dewar <dewar@adacore.com> * sem_ch12.adb: Minor reformatting. 2010-10-22 Thomas Quinot <quinot@adacore.com> * exp_dist.adb: Mark missing case of nested package when expanding stubs. 2010-10-22 Ed Schonberg <schonberg@adacore.com> * par-ch10.adb: Discard incomplete with_clause. 2010-10-22 Robert Dewar <dewar@adacore.com> * checks.adb (Enable_Range_Check): Remove code suppressing range check if static predicate present, not needed. * exp_attr.adb (Expand_Pred_Succ): Check Suppress_Assignment_Checks flag * exp_ch3.adb (Expand_N_Object_Declaration): Check Suppress_Assignment_Checks flag. * exp_ch4.adb (Expand_N_In): Make some corrections for proper handling of ranges when predicates are present. * exp_ch5.adb (Expand_Predicated_Loop): New procedure (Expand_N_Assignment_Statement): Check Suppress_Assignment_Checks flag (Expand_N_Loop_Statement): Handle loops over predicated types * sem_case.adb (Analyze_Choices): Remove extra blank in error message. * sem_ch13.adb (Build_Predicate_Function.Add_Call): Suppress info message for inheritance if within a generic instance, not useful there! (Build_Static_Predicate): Optimize test in predicate function based on static ranges determined. * sem_ch5.adb (Analyze_Iteration_Scheme): Error for loop through subtype with non-static predicate. * sinfo.ads, sinfo.adb (Suppress_Assignment_Checks): New flag. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165834 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-22 Robert Dewar <dewar@adacore.com>charlet2010-10-221-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb (Is_Generic_Formal): Moved from Sem_Util to Sem_Aux. 2010-10-22 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_Iterator_Loop): New subprogram, implements new iterator forms over arrays and containers, in loops and quantified expressions. * exp_util.adb (Insert_Actions): include N_Iterator_Specification. * par-ch4.adb (P_Quantified_Expression): Handle iterator specifications. * par-ch5.adb (P_Iterator_Specification): New subprogram. Modify P_Iteration_Scheme to handle both loop forms. * sem.adb: Handle N_Iterator_Specification. * sem_ch5.adb, sem_ch5.ads (Analyze_Iterator_Specification): New subprogram. * sinfo.adb, sinfo.ads: New node N_Iterator_Specification. N_Iteration_Scheme can now include an Iterator_Specification. Ditto for N_Quantified_Expression. * snames.ads-tmpl: Add names Cursor, Element, Element_Type, No_Element, and Previous, to support iterators over predefined containers. * sprint.adb: Handle N_Iterator_Specification. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165811 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-19 Ed Schonberg <schonberg@adacore.com>charlet2010-10-191-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_ch4.adb, exp_ch4.ads (Expand_Quantified_Expression): New procedure * exp_util.adb (Insert_Actions): Include Quantified_Expression. * expander.adb: Call Expand_Qualified_Expression. * par.adb: New procedure P_Quantified_Expression. Make P_Loop_Parameter_Specification global for use in quantified expressions. * par-ch3.adb (P_Subtype_Mark_Resync): Allow "some" as an identifier if version < Ada2012. * par-ch4.adb: New procedure P_Quantified_Expression. * par-ch5.adb: P_Loop_Parameter_Specification is now global. * scans.adb, scans.ads: Introduce token Some. For now leave as unreserved. * scn.adb (Scan_Reserved_Identifier): For earlier versions of Ada, treat Some as a regular identifier. * sem.adb: Call Analyze_Quantified_Expression. * sem_ch4.adb, sem_ch4.ads: New procedure Analyze_Quantified_Expression. * sem_ch5.adb, sem_ch5.ads: Analyze_Iteration_Scheme is public, for use in quantified expressions. * sem_res.adb: New procedure Resolve_Qualified_Expression. * sinfo.adb, sinfo.ads: New node N_Quantified_Expression * snames.ads-tmpl: New name Some. * sprint.adb: Output quantified_expression. 2010-10-19 Robert Dewar <dewar@adacore.com> * a-exexda.adb: Minor reformatting Minor code reorganization. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165698 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-18 Bob Duff <duff@adacore.com>charlet2010-10-181-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sinfo.ads, sinfo.adb: Modify comment about adding fields to be more correct, and to be in a more convenient order. (Default_Storage_Pool): New field of N_Compilation_Unit_Aux, for recording the Default_Storage_Pool for a parent library unit. * einfo.ads (Etype): Document the case in which Etype can be Empty. * sem_prag.adb (Pragma_Default_Storage_Pool): Analyze the new Default_Storage_Pool pragma. * sem.ads (Save_Default_Storage_Pool): Save area for push/pop scopes. * gnat_ugn.texi: Document Default_Storage_Pool as a new configuration pragma. * freeze.adb (Freeze_Entity): When freezing an access type, take into account any Default_Storage_Pool pragma that applies. We have to do this at the freezing point, because up until that point, a Storage_Pool or Storage_Size clause could occur, which should override the Default_Storage_Pool. * par-prag.adb: Add this pragma to the list of pragmas handled entirely during semantics. * sem_ch8.adb (Push_Scope, Pop_Scope): Save and restore the Default_Storage_Pool information. * opt.ads (Default_Pool, Default_Pool_Config): New globals for recording currently-applicable Default_Storage_Pool pragmas. * opt.adb: Save/restore the globals as appropriate. * snames.ads-tmpl (Name_Default_Storage_Pool, Pragma_Default_Storage_Pool): New pragma name. 2010-10-18 Vincent Celier <celier@adacore.com> * make.adb (Switches_Of): Put the spec and body suffix in canonical case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165637 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-18 Robert Dewar <dewar@adacore.com>charlet2010-10-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | * sinfo.ads, sinfo.adb: Change Has_Pragma_CPU to Flag14 (Flag10 is standard field). 2010-10-18 Robert Dewar <dewar@adacore.com> * s-stausa.adb, s-taprop-linux.adb, s-taprop-mingw.adb, s-tassta.ads: Minor reformatting. 2010-10-18 Robert Dewar <dewar@adacore.com> * exp_strm.adb (Build_Elementary_Input_Call): Check No_Default_Stream_Attributes. (Build_Elementary_Write_Call): Check No_Default_Stream_Attributes * s-rident.ads: Add restriction No_Default_Stream_Attributes Put restriction No_Allocators_After_Elaboration in alpha order git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165626 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-18 Jose Ruiz <ruiz@adacore.com>charlet2010-10-181-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* 2010-10-12 Robert Dewar <dewar@adacore.com>charlet2010-10-121-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat_rm.texi: Clarify that 'Old can be used in preconditions and postcondition pragmas. 2010-10-12 Robert Dewar <dewar@adacore.com> * errout.ads, erroutc.adb: The # insertion now handles from in place of at. * exp_prag.adb (Expand_Pragma_Check): Suppress generated default message if new switch Exception_Locations_Suppressed is set. (Expand_Pragma_Check): Revised wording for default message for case of precondition or postcondition. * namet.ads, namet.adb (Build_Location_String): New procedure. * opt.ads (List_Inherited_Pre_Post): New flag. * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Add call to list inherited pre/post aspects. * sem_ch13.adb (Analyze_Aspect_Specification): Improve generation of messages for precondition/postcondition cases. * sem_ch6.adb (Process_PPCs): General cleanup, and list inherited PPC's if flag List_Inherited_Pre_Post is set True. (Process_PPCs): Add initial handling for inherited preconditions (List_Inherited_Pre_Post_Aspects): New procedure * sem_ch6.ads (List_Inherited_Pre_Post_Aspects): New procedure * sem_disp.adb (Inherited_Subprograms): New function * sem_disp.ads (Inherited_Subprograms): New function * sem_prag.adb (Check_Duplicate_Pragma): Clean up handling of pre/postcondition. (Check_Precondition_Postcondition): Check for inherited aspects * sem_warn.adb: Process -gnatw.l/w.L setting List_Inherited_Pre_Post * sinfo.ads, sinfo.adb (Split_PPC): New flag. * sinput.ads, sinput.adb (Build_Location_String): New function. * usage.adb: Add line for -gnatw.l/-gnatw.L 2010-10-12 Javier Miranda <miranda@adacore.com> * exp_util.adb (Remove_Side_Effects): Remove wrong code. 2010-10-12 Arnaud Charlet <charlet@adacore.com> * xref_lib.adb: Add handling of j/J letters. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165361 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-12 Robert Dewar <dewar@adacore.com>charlet2010-10-121-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_ch9.adb (Has_Pragma_Priority): New name for Has_Priority_Pragma * gnat_rm.texi (pragma Suppress_All): Document new placement rules * par-prag.adb (P_Pragma, case Suppress_All): Set Has_Pragma_Suppress_All flag. * sem_prag.adb (Has_Pragma_Priority): New name for Has_Priority_Pragma (Analyze_Pragma, case Suppress_All): Remove placement check (Process_Compilation_Unit_Pragmas): Use Has_Pragma_Suppress_All flag * sem_prag.ads (Process_Compilation_Unit_Pragmas): Update documentation * sinfo.adb (Has_Pragma_Suppress_All): New flag (Has_Pragma_Priority): New name for Has_Priority_Pragma * sinfo.ads (Has_Pragma_Suppress_All): New flag (Has_Pragma_Priority): New name for Has_Priority_Pragma 2010-10-12 Arnaud Charlet <charlet@adacore.com> * lib-xref.ads: Mark j/J as reserved for C++ classes. 2010-10-12 Jose Ruiz <ruiz@adacore.com> * a-exetim-default.ads, a-exetim-posix.adb: New. * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for linux): Use the POSIX Realtime support to implement CPU clocks. (EXTRA_GNATRTL_TASKING_OBJS for linux): Add the a-exetim.o object to the tasking library. (THREADSLIB): Make the POSIX.1b Realtime Extensions library (librt) available for shared libraries. * gcc-interface/Make-lang.in: Update dependencies. 2010-10-12 Robert Dewar <dewar@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): For Pre/Post, break apart expressions with AND THEN clauses into separate pragmas. * sinput.ads, sinput.adab (Get_Logical_Line_Number_Img): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165356 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-12 Robert Dewar <dewar@adacore.com>charlet2010-10-121-2/+4
| | | | | | | | | | | | | | * par-ch13.adb (P_Aspect_Specifications): Fix handling of 'Class aspects * sem_ch13.adb (Analyze_Aspect_Specifications): Fix bad Sloc on aspects * sem_prag.adb (Fix_Error): Only change pragma names for pragmas from aspects. (Check_Optional_Identifier): Handle case of direct arguments (Chain_PPC): Test for abstract case, giving appropriate messages * sinfo.ads, sinfo.adb (Class_Present): Allowed on N_Pragma node git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165355 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-11 Robert Dewar <dewar@adacore.com>charlet2010-10-111-20/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g-htable.ads (Get_First): New procedural version for Simple_HTable (Get_Next): New procedural version for Simple_HTable * s-htable.adb (Get_First): New procedural version for Simple_HTable (Get_Next): New procedural version for Simple_HTable * s-htable.ads (Get_First): New procedural version for Simple_HTable (Get_Next): New procedural version for Simple_HTable 2010-10-11 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb (Propagate_Discriminants): To gather the components of a variant part, use the association list of the subaggregate, which already includes the values of the needed discriminants. 2010-10-11 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Changes to accomodate aspect delay (Tree_Write): New procedure. * atree.ads, atree.adb: Flag3 is now Has_Aspects and applies to all nodes. * atree.h: Flag3 is now Has_Aspects and applies to all nodes * debug.adb: Add debug flag gnatd.A * einfo.adb (Has_Delayed_Aspects): New flag (Get_Rep_Item_For_Entity): New function * einfo.ads (Has_Delayed_Aspects): New flag (Get_Rep_Item_For_Entity): New function * exp_ch13.adb (Expand_N_Freeze_Entity): Insert delayed aspects into tree. * exp_ch3.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb: New calling sequence for Freeze_Entity. * freeze.ads, freeze.adb (Freeze_Entity): Takes node rather than source ptr. All calls are changed to this new interface. (Freeze_And_Append): Same change (Freeze_Entity): Evaluate deferred aspects * sem_attr.adb: New calling sequence for Freeze_Entity (Eval_Attribute): Don't try to evaluate attributes of unfrozen types when we are in spec expression preanalysis mode. * sem_ch10.adb: New calling sequence for Freeze_Entity * sem_ch11.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). * sem_ch12.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). * sem_ch13.adb (Analyze_Aspect_Specifications): Major rewrite to accomodate delaying aspect evaluation to the freeze point. (Duplicate_Clause): Simplify using Get_Rep_Item_For_Entity, and also accomodate delayed aspects. (Rep_Item_Too_Late): Deal with delayed aspects case * sem_ch13.ads (Rep_Item_Too_Late): Document handling of delayed aspects * sem_ch3.adb (Analyze_Subtype_Declaration): Make sure that generic actual types are properly frozen (this is needed because of the new check in Eval_Attribute that declines to evaluate attributes for unfrozen types). Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). * sem_ch3.ads (Preanalyze_Spec_Expression): Note use for delayed aspects * sem_ch5.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). New calling sequence for Freeze_Entity. * sem_ch9.adb, sem_ch7.adb, sem_ch6.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). New calling sequence for Freeze_Entity * sem_prag.adb (Check_Duplicate_Pragma): Simplify using Get_Rep_Item_For_Entity (Get_Pragma_Arg): Moved to Sinfo * sinfo.ads, sinfo.adb (Aspect_Rep_Item_: New field (Is_Delayed_Aspect): New flag (Next_Rep_Item): Document use for aspects (Get_Pragma_Arg): Moved here from Sem_Prag * sprint.adb (Sprint_Aspect_Specifications): Now called after semicolon is output and removes semicolon (simplifies interface). (Sprint_Node_Actual): Simplify handling of aspects now that Has_Aspects applies to any node. * tree_gen.adb: Write contents of Aspect_Specifications hash table * tree_in.adb: Read and initialize Aspect_Specifications hash table * treepr.adb (Print_Node): Print Has_Aspects flag (Print_Node): Print Aspect_Specifications in Has_Aspects set * xtreeprs.adb: Remove obsolete references to Flag1,2,3 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165300 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-11 Robert Dewar <dewar@adacore.com>charlet2010-10-111-121/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aspects.ads, aspects.adb: Major revision of this package for 2nd stage of aspects implementation. * gcc-interface/Make-lang.in: Add entry for aspects.o * gcc-interface/Makefile.in: Add aspects.o to GNATMAKE_OBJS * par-ch13.adb (Aspect_Specifications_Present): New function (P_Aspect_Specifications): New procedure * par-ch3.adb (P_Type_Declaration): Handle aspect specifications (P_Derived_Type_Def_Or_Private_Ext_Decl): Handle aspect specifications (P_Identifier_Declarations): Handle aspect specifications (P_Component_Items): Handle aspect specifications (P_Subtype_Declaration): Handle aspect specifications * par-ch6.adb (P_Subprogram): Handle aspect specifications * par-ch9.adb (P_Entry_Declaration): Handle aspect specifications * par.adb (Aspect_Specifications_Present): New function (P_Aspect_Specifications): New procedure * sem.adb (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. (Analyze_Formal_Package_Declaration): New name (add _Declaration) (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration) (Analyze_Protected_Type_Declaration): New name (add _Declaration) (Analyze_Single_Protected_Declaration): New name (add _Declaration) (Analyze_Single_Task_Declaration): New name (add _Declaration) (Analyze_Task_Type_Declaration): New name (add _Declaration) * sem_cat.adb (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. * sem_ch11.adb (Analyze_Exception_Declaration): Analyze aspect specifications. * sem_ch12.adb (Analyze_Formal_Object_Declaration): Handle aspect specifications. (Analyze_Formal_Package_Declaration): New name (add _Declaration) (Analyze_Formal_Package_Declaration): Handle aspect specifications (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration) (Analyze_Formal_Subprogram_Declaration): Handle aspect specifications (Analyze_Formal_Type_Declaration): Handle aspect specifications (Analyze_Generic_Package_Declaration): Handle aspect specifications (Analyze_Generic_Subprogram_Declaration): Handle aspect specifications (Analyze_Package_Instantiation): Handle aspect specifications (Analyze_Subprogram_Instantiation): Handle aspect specifications * sem_ch12.ads (Analyze_Formal_Package_Declaration): New name (add _Declaration). (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration) * sem_ch13.adb (Analyze_Aspect_Specifications): New procedure (Duplicate_Clause): New function, calls to this function are added to processing for all aspects. * sem_ch13.ads (Analyze_Aspect_Specifications): New procedure * sem_ch3.adb (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. * sem_ch3.ads (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Analyze aspect specifications. (Analyze_Subprogram_Declaration): Analyze aspect specifications * sem_ch7.adb (Analyze_Package_Declaration): Analyze aspect specifications. (Analyze_Private_Type_Declaration): Analyze aspect specifications * sem_ch9.adb (Analyze_Protected_Type_Declaration): Analyze aspect specifications. (Analyze_Protected_Type_Declaration): New name (add _Declaration) (Analyze_Single_Protected_Declaration): Analyze aspect specifications (Analyze_Single_Protected_Declaration): New name (add _Declaration) (Analyze_Single_Task_Declaration): Analyze aspect specifications (Analyze_Single_Task_Declaration): New name (add _Declaration) (Analyze_Task_Type_Declaration): Analyze aspect specifications (Analyze_Task_Type_Declaration): New name (add _Declaration) * sem_ch9.ads (Analyze_Protected_Type_Declaration): New name (add _Declaration). (Analyze_Single_Protected_Declaration): New name (add _Declaration) (Analyze_Single_Task_Declaration): New name (add _Declaration) (Analyze_Task_Type_Declaration): New name (add _Declaration) * sem_prag.adb: Use Get_Pragma_Arg systematically so that we do not have to generate unnecessary pragma argument associations (this matches the doc). Throughout do changes to accomodate aspect specifications, including specializing messages, handling the case of not going through all homonyms, and allowing for cancellation. * sinfo.ads, sinfo.adb: Clean up obsolete documentation for Flag1,2,3 (Aspect_Cancel): New flag (From_Aspect_Specification): New flag (First_Aspect): Removed flag (Last_Aspect): Removed flag * sprint.adb (Sprint_Aspect_Specifications): New procedure (Sprint_Node_Actual): Add calls to Sprint_Aspect_Specifications 2010-10-11 Bob Duff <duff@adacore.com> * sem_res.adb (Resolve_Actuals): Minor change to warning messages so they match in Ada 95, 2005, and 2012 modes, in the case where the language didn't change. Same thing for the run-time exception message. 2010-10-11 Javier Miranda <miranda@adacore.com> * debug.adb Document that switch -gnatd.p enables the CIL verifier. 2010-10-11 Robert Dewar <dewar@adacore.com> * s-htable.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165299 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-11 Emmanuel Briot <briot@adacore.com>charlet2010-10-111-2/+2
| | | | | | | | | | | | | * sinfo.adb: Use GNAT.HTable rather than System.HTable. * prj-nmsc.adb: Minor reformatting. 2010-10-11 Thomas Quinot <quinot@adacore.com> * sem_attr.adb (Type_Key): Code simplification. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165289 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-11 Arnaud Charlet <charlet@adacore.com>charlet2010-10-111-2/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_prag.adb (Check_Interrupt_Or_Attach_Handler): Do not emit error for AI05-0033 in CodePeer mode. 2010-10-11 Robert Dewar <dewar@adacore.com> * atree.h, atree.ads, atree.adb (Flag3): New flag (replaces Unused_1) * csinfo.adb: Aspect_Specifications is a new special field * einfo.adb (Flag3): New unused flag * exp_util.adb (Insert_Actions): Add processing for N_Aspect_Specification. * sem.adb: Add entry for N_Aspect_Specification. * sinfo.ads, sinfo.adb (N_Aspect_Specification): New node (Has_Aspect_Specifications): New flag (Permits_Aspect_Specifications): New function (Aspect_Specifications): New function (Set_Aspect_Specifications): New procedure * sprint.adb (Sprint_Node): Put N_At_Clause in proper alpha order (Sprint_Node): Add dummy entry for N_Aspect_Specification * treepr.adb (Flag3): New flag to be listed 2010-10-11 Vincent Celier <celier@adacore.com> * adaint.c: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165279 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-08 Robert Dewar <dewar@adacore.com>charlet2010-10-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * par-ch3.adb: Minor reformatting. 2010-10-08 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Make_DT): Do not generate dispatch tables for CIL/Java types. 2010-10-08 Robert Dewar <dewar@adacore.com> * par-ch8.adb (P_Use_Type_Clause): Recognize ALL keyword in Ada 2012 mode. * sinfo.adb (Use_Type_Clause): Add All_Present flag. * sinfo.ads (Use_Type_Clause): Add All_Present flag. * s-rident.ads: Add entry for No_Allocators_After_Elaboration, No_Anonymous_Allocators. 2010-10-08 Vincent Celier <celier@adacore.com> * bindgen.adb (Gen_Restrictions_Ada): No new line after last restriction, so that the last comma is always replaced with a left parenthesis. 2010-10-08 Javier Miranda <miranda@adacore.com> * sem_prag.adb (Analyze_Pragma): Add specific check on the type of the first formal of delegates. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165169 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-07 Robert Dewar <dewar@adacore.com>charlet2010-10-071-4/+4
| | | | | | | | | | | * gnat_rm.texi, exp_util.adb, sinfo.adb, sinfo.ads, sem_ch12.adb, sem.adb, gnat_ugn.texi, sem_util.ads, par-ch6.adb, targparm.ads, restrict.adb, sem_ch6.adb, sem_ch6.ads, sprint.adb, i-c.ads: Change spelling parametrize(d) => parameterize(d). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165103 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-07 Robert Dewar <dewar@adacore.com>charlet2010-10-071-0/+4
| | | | | | | | | | | | | | | | * exp_util.adb (Insert_Actions): Add handling of N_Parametrized_Expression. * par-ch6.adb (P_Subprogram): Add parsing of parametrized expression * sem.adb: Add entry for N_Parametrized_Expression * sem_ch6.adb (Analyze_Parametrized_Expression): New procedure * sem_ch6.ads (Analyze_Parametrized_Expression): New procedure * sinfo.ads, sinfo.adb: Add N_Parametrized_Expression * sprint.adb (Sprint_Node): Add handling for N_Parametrized_Expression * par-ch4.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165098 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-06-23 Robert Dewar <dewar@adacore.com>charlet2010-06-231-30/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Properly handle checking returns in generic case. (Check_Missing_Return): New procedure. 2010-06-23 Robert Dewar <dewar@adacore.com> * bindgen.adb, switch-b.adb: Minor reformatting. 2010-06-23 Javier Miranda <miranda@adacore.com> * frontend.adb (Frontend): Add call to initialize the new package SCIL_LL. * exp_ch7.adb (Wrap_Transient_Expression): Remove call to Adjust_SCIL_Node. (Wrap_Transient_Statement): Remove call to Adjust_SCIL_Node. * sem_ch5.adb (Analyze_Iteration_Scheme.Process_Bounds): Remove call to Adjust_SCIL_Node. * exp_util.adb (Insert_Actions): Remove code for N_SCIL_Dispatch_Table_Object_Init and N_SCIL_Tag_Init nodes. (Remove_Side_Effects): Remove calls to Adjust_SCIL_Node. * sinfo.adb (SCIL_Entity, SCIL_Tag_Value): Remove checks on N_SCIL_Tag_Init and N_SCIL_Dispatch_Table_Object_Init in the assertion. (SCIL_Related_Node, Set_SCIL_Related_Node): Removed. * sinfo.ads (SCIL_Related_Node): Field removed. (N_SCIL_Dispatch_Table_Object_Init): Node removed. (N_SCIL_Tag_Init): Node removed. * sem_scil.ads, sem_scil.adb (Adjust_SCIL_Node): Removed. (Check_SCIL_Node): New implementation. (Find_SCIL_Node): Removed. * sem.adb (Analyze): Remove management of N_SCIL_Dispatch_Table_Object_Init and N_SCIL_Tag_Init nodes. * sem_util.adb (Insert_Explicit_Dereference): Remove call to Adjust_SCIL_Node. * exp_ch4.adb (Expand_N_In): Code cleanup: remove call to Set_SCIL_Related_Node and avoid adding the SCIL node before the referenced node using Insert_Action because this is not longer required. (Expand_Short_Circuit_Operator): Remove call to SCIL node. * exp_ch6.adb (Expand_Call): Remove call to Adjust_SCIL_Node. * sem_ch4.adb (Analyze_Type_Conversion): Remove call to Adjust_SCIL_Node * exp_disp.adb (Expand_Dispatching_Call): Minor code reorganization because we no longer require to generate the SCIL node before the call. (Make_DT): Remove generation of SCI_Dispatch_Table_Object_Init node. Remove calls to Set_SCIL_Related_Node and avoid adding the SCIL nodes before the referenced node using Insert_Action because this is not longer required. * atree.adb (Allocate_Initialize_Node, Replace, Rewrite): Add call to update the SCIL_Node field. * sprint.adb (Sprint_Node_Actual): Remove code for N_SCIL_Dispatch_Table_Object_Init and N_SCIL_Tag_Init nodes. * treepr.adb (Print_Node): Print the SCIL node field (if available). * exp_ch3.adb (Build_Init_Procedure): Remove generation of SCIL_Tag_Init nodes. * scil_ll.ads, scil_ll.adb: New files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161244 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-06-18 Robert Dewar <dewar@adacore.com>charlet2010-06-181-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * checks.adb (Safe_To_Capture_In_Parameter_Value): Deal with case expression (cannot count on a particular branch being executed). * exp_ch4.adb (Expand_N_Case_Expression): New procedure. * exp_ch4.ads (Expand_N_Case_Expression): New procedure. * exp_util.adb (Insert_Actions): Deal with proper insertion of actions within case expression. * expander.adb (Expand): Add call to Expand_N_Case_Expression * par-ch4.adb Add calls to P_Case_Expression at appropriate points (P_Case_Expression): New procedure (P_Case_Expression_Alternative): New procedure * par.adb (P_Case_Expression): New procedure * par_sco.adb (Process_Decisions): Add dummy place holder entry for N_Case_Expression. * sem.adb (Analyze): Add call to Analyze_Case_Expression * sem_case.ads (Analyze_Choices): Also used for case expressions now, this is a documentation change only. * sem_ch4.ads, sem_ch4.adb (Analyze_Case_Expression): New procedure. * sem_ch6.adb (Fully_Conformant_Expressions): Add handling of case expressions. * sem_eval.ads, sem_eval.adb (Eval_Case_Expression): New procedure. * sem_res.adb (Resolve_Case_Expression): New procedure. * sem_scil.adb (Find_SCIL_Node): Add processing for N_Case_Expression_Alternative. * sinfo.ads, sinfo.adb (N_Case_Expression): New node. (N_Case_Expression_Alternative): New node. * sprint.adb (Sprint_Node_Actual): Add processing for new nodes N_Case_Expression and N_Case_Expression_Alternative. 2010-06-18 Robert Dewar <dewar@adacore.com> * par-ch7.adb, sem_warn.adb, types.ads, par-ch3.adb: Minor reformatting. * gnat1drv.adb: Fix typo. 2010-06-18 Robert Dewar <dewar@adacore.com> * par-prag.adb (Prag, case Style_Checks): All_Checks sets gnat style for -gnatg. * sem_prag.adb (Analyze_Pragma, case Style_Checks): All_Checks sets gnat style for -gnatg. * gnat_rm.texi: Add documentation for ALL_CHECKS in GNAT mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160971 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-06-18 Robert Dewar <dewar@adacore.com>charlet2010-06-181-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_res.adb (Analyze_Indexed_Component, Analyze_Selected_Component): Warn on assigning to packed atomic component. 2010-06-18 Robert Dewar <dewar@adacore.com> * sem_util.ads: Minor reformatting * einfo.ads, einfo.adb: Minor doc clarification (scope of decls in Expression_With_Actions). * snames.ads-tmpl: Minor comment fix 2010-06-18 Robert Dewar <dewar@adacore.com> * sem_prag.adb (Diagnose_Multiple_Pragmas): New procedure (Set_Imported): Use Import_Interface_Present to control message output * sinfo.ads, sinfo.adb (Import_Interface_Present): New flag * gnat_rm.texi: Document that we can have pragma Import and pragma Interface for the same subprogram. 2010-06-18 Robert Dewar <dewar@adacore.com> * lib-xref.adb (Generate_Reference): Fix bad reference to Has_Pragma_Unreferenced (clients should always use Has_Unreferenced). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160961 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-06-17 Robert Dewar <dewar@adacore.com>charlet2010-06-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_ch4.ads: Minor code reorganization (specs in alpha order). 2010-06-17 Robert Dewar <dewar@adacore.com> * debug.adb: New debug flag -gnatd.X to use Expression_With_Actions node when expanding short circuit form with actions present for right opnd. * exp_ch4.adb: Minor reformatting (Expand_Short_Circuit_Operator): Use new Expression_With_Actions node if right opeand has actions present, and debug flag -gnatd.X is set. * exp_util.adb (Insert_Actions): Handle case of Expression_With_Actions node. * nlists.adb (Prepend_List): New procedure (Prepend_List_To): New procedure * nlists.ads (Prepend_List): New procedure (Prepend_List_To): New procedure * sem.adb: Add processing for Expression_With_Actions * sem_ch4.adb (Analyze_Expression_With_Actions): New procedure * sem_ch4.ads (Analyze_Expression_With_Actions): New procedure * sem_res.adb: Add processing for Expression_With_Actions. * sem_scil.adb: Add processing for Expression_With_Actions * sinfo.ads, sinfo.adb (N_Expression_With_Actions): New node. * sprint.ads, sprint.adb: Add processing for Expression_With_Actions 2010-06-17 Doug Rupp <rupp@adacore.com> * sem_intr.adb (Check_Intrinsic_Operator): Check that the types involved both have underlying integer types. * exp_intr.adb (Expand_Binary_Operator) New subprogram to expand a call to an intrinsic operator when the operand types or sizes are not identical. * s-auxdec-vms_64.ads: Revert "+" "-" ops back to Address now that 64/32 Address/Integer works. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160929 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-06-17 Ed Schonberg <schonberg@adacore.com>charlet2010-06-171-0/+16
| | | | | | | | | | | | | | | | | | | | | | * sinfo.ads, sinfo.adb (Inherited_Discriminant): New flag on N_Component_Association nodes, to indicate that a component association of an extension aggregate denotes the value of a discriminant of an ancestor type that has been constrained by the derivation. * sem_aggr.adb (Discr_Present): use Inherited_Discriminant to prevent a double expansion of the aggregate appearing in a context that delays expansion, to prevent double insertion of discriminant values when the aggregate is reanalyzed. 2010-06-17 Arnaud Charlet <charlet@adacore.com> * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not use Allocator as the Related_Node of Return_Obj_Access in call to Make_Temporary below as this would create a sort of infinite "recursion". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160914 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-06-14 Robert Dewar <dewar@adacore.com>charlet2010-06-141-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * opt.ads (Check_Policy_List): Add some clarifying comments * sem_prag.adb (Analyze_Pragma, case Check): Set Pragma_Enabled flag on rewritten Assert pragma. 2010-06-14 Gary Dismukes <dismukes@adacore.com> * sem_ch6.adb (Check_Overriding_Indicator): Add a special check for controlled operations, so that they will be treated as overriding even if the overridden subprogram is marked Is_Hidden, as long as the overridden subprogram's parent subprogram is not hidden. 2010-06-14 Robert Dewar <dewar@adacore.com> * debug.adb: Entry for gnatw.d no longer specific for while loops * einfo.adb (First_Exit_Statement): New attribute for E_Loop * einfo.ads (First_Exit_Statement): New attribute for E_Loop * sem_ch5.adb (Analyze_Loop_Statement): Check_Infinite_Loop_Warning has new calling sequence to include test for EXIT WHEN. (Analyze_Exit_Statement): Chain EXIT statement into exit statement chain * sem_warn.ads, sem_warn.adb (Check_Infinite_Loop_Warning): Now handles EXIT WHEN case. * sinfo.adb (Next_Exit_Statement): New attribute of N_Exit_Statement node. * sinfo.ads (N_Pragma): Correct comment on Sloc field (points to PRAGMA, not to pragma identifier). (Next_Exit_Statement): New attribute of N_Exit_Statement node 2010-06-14 Robert Dewar <dewar@adacore.com> * sem_res.adb (Resolve_Short_Circuit): Fix sloc of "assertion/check would fail" msg. 2010-06-14 Robert Dewar <dewar@adacore.com> * par-ch2.adb (Scan_Pragma_Argument_Association): Clarify message for missing pragma argument identifier. 2010-06-14 Robert Dewar <dewar@adacore.com> * atree.ads, atree.adb (Ekind_In): New functions 2010-06-14 Robert Dewar <dewar@adacore.com> * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**N in stand alone context 2010-06-14 Robert Dewar <dewar@adacore.com> * usage.adb (Usage): Redo documentation of -gnatwa. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160743 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-06-14 Ed Schonberg <schonberg@adacore.com>charlet2010-06-141-0/+16
| | | | | | | | | | | | | | | | | | | | | * sinfo.ads, sinfo,adb (Withed_Body): New attribute of a with_clause. Indicates that there is an instantiation in the current unit that loaded the body of the unit denoted by the with_clause. * sem_ch12.adb (Mark_Context): When instanting a generic body, check whether a with_clause in the current context denotes the unit that holds the generic declaration, and mark the with_clause accordingly. (Instantiate_Package_Body): call Mark_Context. * sem.adb (Process_Bodies_In_Context): Use Withed_Body to determine whether a given body should be traversed before the spec of the main unit. 2010-06-14 Ed Falis <falis@adacore.com> * sysdep.c: Fix 653 build against vThreads headers git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160725 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-01-26 Robert Dewar <dewar@adacore.com>charlet2010-01-261-16/+16
| | | | | | | | | | | | | | | | | * par_sco.adb (Traverse_Declarations_Or_Statements): Only generate decisions for pragmas Assert, Check, Precondition, Postcondition if -gnata set. * scos.ads: Update comments. * get_scos.adb, put_scos.adb: Minor fix to code reading statement SCOs. Also remove obsolete code for CT (exit point) SCOs. 2010-01-26 Thomas Quinot <quinot@adacore.com> * switch-c.adb: Fix handling of -gnatz* git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156247 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-11-30 Robert Dewar <dewar@adacore.com>charlet2009-11-301-0/+16
| | | | | | | | | | | | | | | * scans.ads (Wide_Wide_Character_Found): New flag * scn.adb (Post_Scan): Set new flag Has_Wide_Wide_Character * scng.adb (Set_String): Set new flag Wide_Wide_Character_Found (Set_String): Fix failure to reset Wide_Character_Found * sinfo.adb (Has_Wide_Wide_Character): New flag in N_String_Literal * sinfo.ads (Has_Wide_Wide_Character): New flag in N_String_Literal * a-ngelfu.adb: Minor reformatting & code reorganization. * usage.adb: Fix typo in -gnatw.W line git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154804 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-11-30 Robert Dewar <dewar@adacore.com>charlet2009-11-301-2/+2
| | | | | | | | | | | | * osint.adb, prj-nmsc.adb, sem_prag.adb, sem_util.adb: Minor reformatting. * csinfo.adb: Terminate run if improper use of reserved flag * sinfo.ads, sinfo.adb (Is_Accessibility_Actual): Don't use reserved Flag12, used Flag13 instead. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154803 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-11-30 Vincent Celier <celier@adacore.com>charlet2009-11-301-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnatlink.adb (Process_Args): Call Executable_Name on argument of -o with Only_If_No_Suffix set to True. * osint.adb (Executable_Name): Do not add executable suffix if there is already a suffix and Only_If_No_Suffix is True. * osint.ads (Executable_Name): New Boolean parameter Only_If_No_Suffix, defaulted to False. 2009-11-30 Javier Miranda <miranda@adacore.com> * exp_atag.adb (Build_TSD): Change argument name because the actual is now the address of a tag (instead of the tag). Update implementation accordingly. (Build_CW_Membership): New implementation. Converted into a procedure because it has an additional out mode parameter. Its implementation has been rewritten to improve the generated code but also to facilitate referencing the relocated object node in the caller. * exp_atag.ads (Build_CW_Membership): Update profile and documentation. * sinfo.ads (N_SCIL_Membership_Test) New_Node. (SCIL_Tag_Value): New field of N_SCIL_Membership_Test nodes. (Is_Syntactic_Field): Add entry of new node. (SCIL_Tag_Value/Set_SCIL_Tag_Value): New subprograms. * sinfo.adb (SCIL_Related_Node, SCIL_Entity): Update assertions to handle N_SCIL_Membership_Test nodes. (SCIL_Tag_Value/Set_SCIL_Tag_Value): New subprograms. * sem.adb (Analyze): Add null management for new node. * sem_scil.adb (Find_SCIL_Node): Add null management for new node. (Check_SCIL_Node): Add checks of N_SCIL_Membership_Test nodes. * exp_ch4.adb (Tagged_Membership): Change profile from function to procedure. Add generation of SCIL node associated with class-wide membership test. (Expand_N_In): Complete decoration of SCIL nodes. * exp_intr.adb (Expand_Dispatching_Constructor_Call): Tune call to Build_CW_Membership because its profile has been changed. * exp_util.adb (Insert_Actions): Add null management for new node. * sprint.adb (Sprint_Node_Actual): Handle new node. * gcc-interface/trans.c Add no processing for N_SCIL_Membership_Test nodes. * gcc-interface/Make-lang.in: Update dependencies. 2009-11-30 Ed Schonberg <schonberg@adacore.com> * opt.ads: New flags Init_Or_Norm_Scalars_Config, Initialize_Scalars_Config, to capture the presence of the corresponding pragmas in a configuration file. * opt.adb (Register_, Save_, Set_, Restore_Opt_Configuration_Switches): handle new flags so that they are restored for each compilation unit. * frontend.adb: At the end of compilation, scan the context of the main unit to recover occurrences of pragma Initialize_Scalars, to annotate the ALI file accordingly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154792 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-09-16 Thomas Quinot <quinot@adacore.com>charlet2009-09-161-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * freeze.adb, exp_intr.adb (Expand_Intrinsic_Call): Leave calls to intrinsics untouched (to be expanded later on by gigi) if an external name has been specified. (Freeze_Entity): Do not generate a default external name for imported subprograms with convention Intrinsic (so that the above code can identify the case where an external name has been explicitly provided). * s-oscons-tmplt.c: Quote TARGET_OS early so that it is not erroneously replaced by something else due to an existing #define clause. 2009-09-16 Ed Schonberg <schonberg@adacore.com> * sinfo.ads, sinfo.adb (Is_Accessibility_Actual): New flag on Parameter_Association node, created for the extra actual generated for an access parameter of a function that dispatches on result, to prevent double generation of such actuals when the call is rewritten is a dispatching call. * exp_ch6.adb (Expand_Call): Set Is_Accessibility_Actual when needed. * exp_disp.adb (Expand_Dispatching_Call): Do not transfer extra actuals that carry this flag when rewriting the original call as a dispatching call, after propagating the controlling tag. 2009-09-16 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Add_Source): New parameter Source_Dir_Rank to be put in the source data. (Check_File): New parameter Source_Dir_Rank, to check if a duplicate source is allowed. (Find_Source_Dirs): New parameter Rank to be recorded with the source directories. (Search_Directories): Call Check_File with the rank of the directory * prj.adb (Project_Empty): Add new component Source_Dir_Ranks (Free): Free also Number_Lists (Reset): Init also Number_Lists * prj.ads (Number_List_Table): New dynamic table for lists of numbers (Source_Data): New component Source_Dir_Rank. Remove component Known_Order_Of_Source_Dirs, no longer needed. (Project_Data): New component Source_Dir_Ranks (Project_Tree_Data): New components Number_Lists git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151749 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-07-28 Javier Miranda <miranda@adacore.com>charlet2009-07-281-40/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat1drv.adb (Adjust_Global_Switches): Disable generation of SCIL nodes if we are not generating code. * frontend.adb (Check_SCIL_Node): New subprogram. Used to check attribute SCIL_Related_Node of SCIL dispatching nodes. (Check_SCIL_Nodes): New instantiation of Traverse_Proc. * sinfo.ads (Is_SCIL_Node,Set_Is_SCIL_Node): Removed (SCIL_Nkind,Set_SCIL_Nkind): Removed. (SCIL_Entity): Update documentation. (SCIL_Related_Node): Update documentation. (SCIL_Controlling_Tag): New attribute. (SCIL_Target_Prim): Update documentation. (N_Null_Statement): Remove attributes associated with SCIL nodes. (N_SCIL_Dispatch_Table_Object_Init): New node. (N_SCIL_Dispatch_Table_Tag_Init): New node. (N_SCIL_Dispatching_Call): New node. (N_SCIL_Tag_Init): New node. * sinfo.adb (Is_SCIL_Node,Set_Is_SCIL_Node): Removed (SCIL_Nkind,Set_SCIL_Nkind): Removed. (SCIL_Controlling_Tag/Set_SCIL_Controlling_Tag): New subprogram. (SCIL_Entity,Set_SCIL_Entity): Applicable only to SCIL nodes. (SCIL_Related_Node,Set_SCIL_Related_Node): Applicable only to SCIL nodes (SCIL_Target_Prim,Set_SCIL_Target_Prim): Applicable only to N_SCIL_Dispatching_Call nodes. * sem.adb (Analyze): No need to analyze SCIL nodes. * sem_aux.ads, sem_aux.adb (First_Non_SCIL_Node): New subprogram (Next_Non_SCIL_Node): New subprogram * sem_ch4.adb (Analyze_Type_Conversion): Adjust relocated SCIL dispatching nodes. * sem_ch5.adb (Analyze_Iteration_Scheme): Adjust relocated SCIL dispatching node. * sem_util.adb (Insert_Explicit_Dereference): Adjust relocated SCIL dispatching node. * exp_ch3.adb (Build_Array_Init_Proc): Skip SCIL nodes when processing null statement nodes. (Build_Init_Procedure): Generate new SCIL node. * exp_ch4.adb (Expand_N_And_Then): Adjust relocated SCIL dispatching node. * exp_ch6.adb (Is_Null_Procedure): Skip SCIL nodes. Required because they are currently implemented as special N_Null_Statement nodes. * exp_ch7.adb (Wrap_Transient_Statement): If the relocated node is a procedure call then check if some SCIL node references it and needs readjustment. * exp_disp.ads (SCIL_Node_Kind): Removed. (Adjust_SCIL_Node): New subprogram. (Find_SCIL_Node): New subprogram. (Get_SCIL_Node_Kind): Removed. (New_SCIL_Node): Removed. * exp_disp.adb (Adjust_SCIL_Node): New subprogram (Expand_Dispatching_Call): Generate new SCIL dispatching node including decoration of its new controlling_tag attribute. (Get_SCIL_Node_Kind): Removed. (Find_SCIL_Node): New subprogram. (Make_Secondary_DT): Generate new SCIL nodes. (Make_Tags): Generate new SCIL nodes. (New_SCIL_Node): Removed. * exp_util.adb (Insert_Actions): Handle SCIL nodes. (Remove_Side_Effects): Check if relocated nodes require readjustment of some SCIL dispatching node. * gcc-interface/trans.c (gnat_to_gnu): Do nothing with new SCIL nodes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150149 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-07-23 Sergey Rybin <rybin@adacore.com>charlet2009-07-231-20/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat_ugn.texi: Update doc on Misnamed_Identifiers rule. 2009-07-23 Javier Miranda <miranda@adacore.com> * sinfo.ads, sinfo.adb (SCIL_Entity/Set_SCIL_Entity): new subprograms (Entity/Set_Entity): not available in N_Null_Statement nodes (Is_Scil_Node): renamed as Is_SCIL_Node (Scil_Nkind): renamed as SCIL_Nkind (Scil_Related_Node): renamed as SCIL_Related_Node (Scil_Target_Prim): renamed as SCIL_Target_Prim (Set_Is_Scil_Node): Renamed as Set_Is_SCIL_Node (Set_Scil_Related_Node): Renamed as Set_SCIL_Related_Node (Set_Scil_Target_Prim): Renamed as Set_SCIL_Target_Prim Update documentation * exp_disp.ads (Scil_Node_Kind): Renamed as SCIL_Node_Kind (Get_Scil_Node_Kind): Renamed as Get_SCIL_Node_Kind (New_Scil_Node): Renamed as New_SCIL_Node * exp_disp.adb Update all occurrences of New_Scil_Node to New_SCIL_Node. (Get_Scil_Node_Kind): Renamed as Get_SCIL_Node_Kind (New_Scil_Node): Renamed as New_SCIL_Node * exp_ch3.adb Update occurrence of New_Scil_Node to New_SCIL_Node. 2009-07-23 Robert Dewar <dewar@adacore.com> * sem_prag.adb: No_Return is an Ada 2005 pragma, not a GNAT pragma * snames.ads-tmpl: No_Return is an Ada 2005 pragma, not a GNAT pragma * einfo.adb: Minor reformatting git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149984 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-07-23 Gary Dismukes <dismukes@adacore.com>charlet2009-07-231-2/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch6.adb (Check_Return_Subtype_Indication): Replace type equality with test of coverage, to allow specific type objects in extended returns of class-wide functions. Remove now-unnecessary special-case tests that allowed this in certain cases of expanded extended returns. 2009-07-23 Javier Miranda <miranda@adacore.com> * sinfo.ads,sinfo.adb (Entity/Set_Entity): Attribute available in N_Null_Statements (for SCIL nodes). (Is_Scil_Node/Set_Is_Scil_Node): New attribute (for SCIL nodes). (Scil_Nkind/Set_Scil_Nkind): New attribute (for SCIL nodes). (Scil_Related_Node/Set_Scil_Related_Node): New attribute (for SCIL nodes). (Scil_Target_Prim/Set_Scil_Target_Prim): New attribute (for SCIL nodes). * exp_disp.adb (Expand_Dispatching_Call): Add generation of SCIL node associated with dispatching call. (Get_Scil_Node_Kind): New function that returns the kind of SCIL node. (Make_DT, Make_Tags): Add generation of SCIL nodes associated with initialization of dispatch tables and initialization of tags. (New_Scil_Node): New function that creates a new SCIL node. (Build_Init_Procedure): Add generation of SCIL node associated with the initialization of tags done in the IP subprogram. 2009-07-23 Ed Schonberg <schonberg@adacore.com> * errout.adb (Error_Msg_NEL): If the entity in the initial message has Warnings_Off, do not emit continuation messages. * sem_ch10.adb: Set Is_Compilation_Unit on generated child subprogram spec. 2009-07-23 Emmanuel Briot <briot@adacore.com> * ali.adb: Minor comment update 2009-07-23 Vasiliy Fofanov <fofanov@adacore.com> * s-win32.ads (HANDLE): Define to be the same size as address type. Fix copyright. 2009-07-23 Olivier Hainque <hainque@adacore.com> * g-sse.ads: New file. Root of the SSE facilities trees, with general description and common declarations. * g-ssvety.ads: New file. Expose user level SSE vector types. * impunit.adb (Non_Imp_File_Names_95): Register new units. * gcc-interface/Makefile.in (x86 32/64 linux, win32): Add EXTRA_GNATRTL_NONTASKING_OBJS entries for SSE units. 2009-07-23 Ben Brosgol <brosgol@adacore.com> * gnat_ugn.texi: Wordsmithing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149974 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-07-22 Thomas Quinot <quinot@adacore.com>charlet2009-07-221-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_elab.adb (Insert_Elab_Check): When relocating an overloaded expression to insert an elab check using a conditional expression, be sure to carry the original list of interpretations to the new location. 2009-07-22 Gary Dismukes <dismukes@adacore.com> * gnat1drv.adb: Fix spelling error. 2009-07-22 Javier Miranda <miranda@adacore.com> * sem_type.ads, sem_type.adb (In_Generic_Actual): Leave this subprogram at the library level and fix a hidden bug in its implementation: its functionality for renaming objects was broken because N_Object_Renaming_Declarations nodes are not a subclass of N_Declaration nodes (as documented in sinfo.ads). * sem_util.adb (Check_Dynamically_Tagged_Expression): Include in this check nodes that are actuals of generic instantiations. 2009-07-22 Ed Schonberg <schonberg@adacore.com> * sinfo.ads, sinfo.adb (Pending_Context): New flag to indicate that the context of a compilation unit is being analyzed. Used to detect circularities created by with_clauses that are not detected by the loading machinery. * sem_ch10.adb (Analyze_Compilation_Unit): Set Pending_Context before analyzing the context of the current compilation unit, to detect possible circularities created by with_clauses. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149925 138bc75d-0d04-0410-961f-82ee72b054a4