summaryrefslogtreecommitdiffstats
path: root/gcc/ada
Commit message (Collapse)AuthorAgeFilesLines
...
* 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-10-1018-1231/+1598
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aspects.adb: Add entries in table Canonical_Aspects for aspects Refined_Depends and Refined_Global. * aspects.ads: Add entries in tables Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Declay, Aspect_On_Body_Or_Stub_OK for aspects Refined_Depends and Refined_Global. * einfo.adb (Contract): Subprogram bodies are now valid owners of contracts. (Set_Contract): Subprogram bodies are now valid owners of contracts. (Write_Field24_Name): Output the contract attribute for subprogram bodies. * exp_ch6.adb (Expand_Subprogram_Contract): New routine. * exp_ch6.ads (Expand_Subprogram_Contract): New routine. * par-prag.adb: Pragmas Refined_Depends and Refined_Global do not require any special processing by the parser. * sem_ch3.adb (Adjust_D): Renamed to Adjust_Decl. (Analyze_Declarations): Code reformatting. Analyze the contract of a subprogram body at the end of the declarative region. * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Subprogram bodies can now have contracts. Use Expand_Subprogram_Contract to handle the various contract assertions. (Analyze_Subprogram_Body_Contract): New null routine. (Analyze_Subprogram_Body_Helper): Subprogram bodies can now have contracts. Use Expand_Subprogram_Contract to handle the various contract assertions. (Analyze_Subprogram_Contract): Add local variable Nam. Update the call to Analyze_PPC_In_Decl_Part. Capture the pragma name in Nam. (Process_PPCs): Removed. * sem_ch6.ads (Analyze_Subprogram_Body_Contract): New routine. (Analyze_Subprogram_Contract): Update the comment on usage. * sem_ch13.adb (Analyze_Aspect_Specifications): Add null implementations for aspects Refined_Depends and Refined_Global. (Check_Aspect_At_Freeze_Point): Aspects Refined_Depends and Refined_Global do not need to be checked at the freeze point. * sem_prag.adb: Add entries in table Sig_Flags for pragmas Refined_Depends and Refined_Global. (Analyze_Contract_Cases_In_Decl_Part): Add local variable Restore. Use Restore to pop the scope. (Analyze_Depends_In_Decl_Part): Add local variable Restore. Use Restore to pop the scope. (Analyze_Global_In_Decl_List): Add local variable Restore. Use Restore to pop the scope. (Analyze_PPC_In_Decl_Part): Renamed to Analyze_Pre_Post_Condition_In_Decl_Part. (Analyze_Pragma): Add null implementations for pragmas Refined_Depends and Refined_Global. Refined_Pre and Refined_Post are now handled by routine Analyze_Refined_Pre_Post_Condition exclusively. (Analyze_Refined_Depends_In_Decl_Part): New null routine. (Analyze_Refined_Global_In_Decl_Part): New null routine. (Analyze_Refined_Pre_Post): Renamed to Analyze_Refined_Pre_Post_Condition. (Analyze_Refined_Pre_Post_Condition): Analyze the boolean expression. (Check_Precondition_Postcondition): Update the call to Analyze_PPC_In_Decl_Part. * sem_prag.ads: Add entries in table Pragma_On_Body_Or_Stub_OK for pragmas Refined_Depends and Refined_Global. (Analyze_PPC_In_Decl_Part): Renamed to Analyze_Pre_Post_Condition_In_Decl_Part. Update the comment on usage. (Analyze_Refined_Depends_In_Decl_Part): New routine. (Analyze_Refined_Global_In_Decl_Part): New routine. (Analyze_Test_Case_In_Decl_Part): Update the comment on usage. * sem_util.adb (Add_Contract_Item): Rename formal Item to Prag and update all occurrences. Subprogram body contracts can now contain pragmas Refined_Depends and Refined_Global. * sem_util.ads (Add_Contract_Item): Rename formal Item to Prag. Update the comment on usage. * sinfo.ads: Update the comment on structure and usage of N_Contract. * snames.ads-tmpl: Add new predefined names for Refined_Depends and Refined_Global. Add entries in table Pragma_Id for Refined_Depends and Refined_Global. 2013-10-10 Robert Dewar <dewar@adacore.com> * types.ads: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203365 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Thomas Quinot <quinot@adacore.com>charlet2013-10-105-151/+248
| | | | | | | | | | | | | | | | | | | | | | * s-taprop-posix.adb: Add missing comment. 2013-10-10 Robert Dewar <dewar@adacore.com> * freeze.adb (Freeze_Record_Type): Move choice checking to Analyze_Freeze_Entity (Freeze_Record_Type): Make sure all choices are properly frozen * sem_case.adb (Check_Choices): Remove misguided attempt to freeze choices (this is now done in Freeze_Record_Type where it belongs). (Check_Choices): Remove some analyze/resolve calls that are redundant since they are done in Analyze_Choices. * sem_ch13.adb (Analyze_Freeze_Entity): Do the error checking for choices in variant records here (moved here from Freeze.Freeze_Record_Type) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203364 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Thomas Quinot <quinot@adacore.com>charlet2013-10-104-15/+65
| | | | | | | | | | | | | | | | | | | * s-oscons-tmplt.c, s-taprop-posix.adb (CLOCK_REALTIME): Always define, possibly using a dummy placeholder value. (Compute_Deadline): For the case of an Absolute_Calendar deadline, if the target uses another clock than CLOCK_REALTIME as CLOCK_RT_Ada, compensate for possible different epoch. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully qualified reference to a generic child unit within itself, in an instantiation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203363 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Pascal Obry <obry@adacore.com>charlet2013-10-105-61/+122
| | | | | | | | | | | | | | | | | | | | | | | | | * prj-conf.adb: Minor typo fixes in comment. 2013-10-10 Thomas Quinot <quinot@adacore.com> * s-taprop-posix.adb (Compute_Deadline): New local subprogram, factors common code between Timed_Sleep and Timed_Delay. 2013-10-10 Robert Dewar <dewar@adacore.com> * freeze.adb (Freeze_Record_Type): Don't replace others if expander inactive. This avoids clobbering the ASIS tree in -gnatct mode. 2013-10-10 Robert Dewar <dewar@adacore.com> * sem_res.adb (Resolve_Op_Expon): Avoid crash testing for fixed-point case in preanalysis mode (error will be caught during full analysis). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203362 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Robert Dewar <dewar@adacore.com>charlet2013-10-105-232/+252
| | | | | | | | | | | | | | | * gnat_rm.texi: Refined_Pre and Refined_Post are now allowed as assertion identifiers for pragma Assertion_Policy. * sem_prag.adb (Is_Valid_Assertion_Kind): Add Refined_Pre/Refined_Post * sem_ch13.adb: Minor reformatting. 2013-10-10 Pascal Obry <obry@adacore.com> * prj-conf.adb: Code refactoring. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203361 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-10-107-146/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * einfo.adb: Remove Integrity_Level from the node usage list. (Has_Option): Update the implementation to match the new terminology. (Has_Property): Renamed to Has_Option. (Integrity_Level): Removed. (Is_External_State): New routine. (Is_Input_Only_State): Use Has_Option to determine whether a state is Input_Only. (Is_Input_State): Renamed to Is_Input_Only_State. (Is_Output_Only_State): Use Has_Option to determine whether a state is Output_Only. (Is_Output_State): Renamed to Is_Output_Only_State. (Is_Volatile_State): Use Has_Option to determine whether a state is volatile. (Set_Integrity_Level): Removed. (Write_Field8): Remove the entry for Integrity_Level. * einfo.ads: Remove Integrity_Level along with its documentation and usage in nodes. Rename Is_Input_State to Is_Input_Only_State. Rename Is_Output_State to Is_Output_Only_State. Update the documentation of Is_Volatile_State. Update the node structure of E_Abstract_Entity. (Integrity_Level): Removed along with pragma Inline. (Is_External_State): New routine. (Is_Input_State): Renamed to Is_Input_Only_State. (Is_Output_State): Renamed to Is_Output_Only_State. (Set_Integrity_Level): Removed along with pragma Inline. * sem_prag.adb (Analyze_Pragma): Update the checks regarding global items and abstract state modes. Update the implementation of pragma Abstract_State to reflect the new rules and terminology. * snames.ads-tmpl: Remove the predefined name for Integrity level. Add new predefined names for Input_Only, Non_Volatile, Output_Only and Part_Of. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * lib-xref.adb (Generate_Reference): Do not generate a reference within a _postcondition procedure: a proper source reference has already been generated when pre- analyzing the original aspect specification, and the use of a formal in a pre/postcondition should not count as a proper use in a subprogram body. 2013-10-10 Robert Dewar <dewar@adacore.com> * sem_eval.adb (Why_Non_Static): Fix bomb for deferred constant case git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203360 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-10-1013-280/+632
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aspects.adb: Add an entry for Aspect_Refined_Post in table Canonical_Aspect. * aspects.ads: Add an entry for Aspect_Refined_Post in tables Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay, Aspect_On_Body_Or_Stub_OK. Update the comment on the use of table Aspect_On_Body_Or_Stub_OK. * par-prag.adb: Add pragma Refined_Post to the list of pragmas that do not require special processing by the parser. * sem_attr.adb (Analyze_Attribute): Add special analysis for attributes 'Old and 'Result when code generation is disabled and they appear in aspect/pragma Refined_Post. (In_Refined_Post): New routine. * sem_ch6.adb (Analyze_Expression_Function): Move various aspects and/or pragmas that apply to an expression function to the corresponding spec or body. (Collect_Body_Postconditions): New routine. (Process_PPCs): Use routine Collect_Body_Postconditions to gather all postcondition pragmas. * sem_ch10.adb (Analyze_Proper_Body): Use routine Relocate_Pragmas_To_Body to move all source pragmas that follow a body stub to the proper body. (Move_Stub_Pragmas_To_Body): Removed. * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for aspect Refined_Post. (Check_Aspect_At_Freeze_Point): Aspect Refined_Post does not need delayed processing at the freeze point. * sem_prag.adb: Add an entry for pragma Refined_Post in table Sig_Flags. (Analyze_Pragma): Add processing for pragma Refined_Post. Update the processing of pragma Refined_Pre to use common routine Analyze_Refined_Pre_Post. (Analyze_Refined_Pre_Post): New routine. (Relocate_Pragmas_To_Body): New routine. * sem_prag.ads: Table Pragma_On_Stub_OK is now known as Pragma_On_Body_Or_Stub_OK. Update the comment on usage of table Pragma_On_Body_Or_Stub_OK. (Relocate_Pragmas_To_Body): New routine. * snames.ads-tmpl: Add new predefined name for Refined_Post. Add new Pragma_Id for Refined_Post. 2013-10-10 Robert Dewar <dewar@adacore.com> * exp_ch3.adb (Expand_N_Variant_Part): Now null, expansion of last choice to others is moved to Freeze_Record_Type. * freeze.adb (Freeze_Record_Type): Expand last variant to others if necessary (moved here from Expand_N_Variant_Part git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203359 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Robert Dewar <dewar@adacore.com>charlet2013-10-1028-292/+684
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-xref-spark_specific.adb, par-ch13.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_attr.adb, sem_ch6.adb, sem_ch13.adb, a-sequio.adb, s-atocou-builtin.adb: Minor reformatting. 2013-10-10 Thomas Quinot <quinot@adacore.com> * s-oscons-tmplt.c (NEED_PTHREAD_CONDATTR_SETCLOCK): This constant needs to be output to s-oscons.h, as it is tested by init.c. 2013-10-10 Robert Dewar <dewar@adacore.com> * exp_ch3.adb (Expand_N_Variant_Part): Don't expand choices, too early * exp_ch5.adb (Expand_N_Case_Statement): Use new Has_SP_Choice flag to avoid expanding choices when not necessary. * exp_util.adb: Minor reformatting * freeze.adb (Freeze_Record_Type): Redo expansion of variants * sem_aggr.adb: Minor reformatting * sem_case.ads, sem_case.adb: Major rewrite, separating Analysis and Checking of choices. * sem_ch3.adb (Analyze_Variant_Part): Rewrite to call new Analyze_Choices. * sem_ch4.adb (Analyze_Case_Expression): Call Analyze_Choices and Check_Choices * sem_ch5.adb (Analyze_Case_Statement): Call Analyze_Choices and Check_Choices * sem_util.adb: Minor reformatting * sinfo.ads, sinfo.adb (Has_SP_Choice): New flag. 2013-10-10 Vincent Celier <celier@adacore.com> * mlib-prj.adb (Build_Library): Do not issue link dynamic libraries with an Rpath, if switch -R was used. 2013-10-10 Tristan Gingold <gingold@adacore.com> * s-stalib.ads (Image_Index_Table_8, Image_Index_Table_16, Image_Index_Table_32): Remove as not used. * s-imgint.adb (Image_Integer): Call Set_Image_Integer and remove duplicated code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203358 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-10-104-18/+94
| | | | | | | | | | | | | | | | | | * sem_prag.adb (Analyze_Pragma): Provide a more precise error message when pragma Refined_Pre applies to an expression function that is not a completion. 2013-10-10 Thomas Quinot <quinot@adacore.com> * sem_attr.adb (Analyse_Attribute, case Attribute_Scalar_Storage_Order): a 'Scalar_Storage_Order attribute reference for a generic type is permitted in GNAT runtime mode. * a-sequio.adb (Read, Write): Use the endianness of the actual type to encode length information written to the file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203356 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Ed Schonberg <schonberg@adacore.com>charlet2013-10-1014-64/+460
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * par-ch13.adb (Aspect_Specifications_Present)): In earlier than Ada2012 mode, assume that a legal aspect name following "with" keyword is an older gnat switch and not a misplaced with_clause. 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com> * aspects.adb: Add an entry for Aspect_Refined_Pre in table Canonical_Aspect. (Aspects_On_Body_OK): Renamed to Aspects_On_Body_Or_Stub_OK. (Aspects_On_Body_Or_Stub_OK): Update the query in table Aspect_On_Body_OK. * aspects.ads: Add an entry for Aspect_Refined_Pre in tables Aspect_Id, Aspect_Argument, Aspect_Names, Aspect_Delay, Aspect_On_Body_Or_Stub_OK. Table Aspect_On_Body_OK is now known as Aspect_On_Body_Or_Stub_OK. Add a section of aspect specifications that apply to body stubs. (Aspects_On_Body_OK): Renamed to Aspects_On_Body_Or_Stub_OK. (Aspects_On_Body_Or_Stub_OK): Update the comment on usage. * par-prag.adb: Add pragma Refined_Pre to the list of pragmas that do not require special processing by the parser. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Delay the analysis of aspect specifications that apply to a body stub until the proper body is analyzed. * sem_ch10.adb: Add with and use clause for Sem_Ch13. (Analyze_Package_Body_Stub): Set the corresponding spec of the stub. (Analyze_Proper_Body): Relocate all pragmas that apply to a subprogram body stub to the declarations of the proper body. Analyze the aspect specifications of the stub when the proper body is not present. (Analyze_Protected_Body_Stub): Set the corresponding spec of the stub. (Analyze_Task_Body_Stub): Set the corresponding spec of the stub. (Move_Stub_Pragmas_To_Body): New routine. * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for aspect Refined_Pre. (Check_Aspect_At_Freeze_Point): Aspect Refined_Pre does not need delayed processing at the freeze point. * sem_prag.adb: Remove with and use clause for Snames. Add an entry for Pragma_Refined_Pre in table Sig_Flags. (Analyze_Pragma): Add processing for pragma Refined_Pre. * sem_prag.ads: Add with and use clause for Snames. Add table Pragma_On_Stub_OK. * sinfo.adb (Corresponding_Spec_Of_Stub): New routine. (Set_Corresponding_Spec_Of_Stub): New routine. * sinfo.ads: Add new attribute Corresponding_Spec_Of_Stub along with comment on usage and occurrences in nodes. (Corresponding_Spec_Of_Stub): New routine along with pragma Inline. (Set_Corresponding_Spec_Of_Stub): New routine along with pragma Inline. * snames.ads-tmpl: Add new predefined name for Refined_Pre. Add new Pragma_Id for Refined_Pre. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation): Improve error message when name in instantiation does not designate a generic unit of the right kind. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203355 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Robert Dewar <dewar@adacore.com>charlet2013-10-1020-102/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_ch3.adb (Expand_N_Variant_Part): Expand statically predicated subtype which appears in Discrete_Choices list. * exp_ch5.adb (Expand_N_Case_Statement): Expand statically predicated subtype which appears in Discrete_Choices list of case statement alternative. * exp_util.ads, exp_util.adb (Expand_Static_Predicates_In_Choices): New procedure. * sem_case.adb: Minor reformatting (Analyze_Choices): Don't expand out Discrete_Choices that are names of subtypes with static predicates. This is now done in the analyzer so that the -gnatct tree is properly formed for ASIS. * sem_case.ads (Generic_Choices_Processing): Does not apply to aggregates any more, so change doc accordingly, and remove unneeded Get_Choices argument. * sem_ch3.adb (Analyze_Variant_Part): Remove no longer used Get_Choices argument in instantiation of Generic_Choices_Processing. * sem_ch4.adb (Analyze_Case_Expression): Remove no longer used Get_Choices argument in instantiation of Generic_Choices_Processing. * sem_ch5.adb (Analyze_Case_Statement): Remove no longer used Get_Choices argument in instantiation of Generic_Choices_Processing. * sinfo.ads: For N_Variant_Part, and N_Case_Statement_Alternative, document that choices that are names of statically predicated subtypes are expanded in the code generation tree passed to the back end, but not in the ASIS tree generated for -gnatct. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * sem_ch7.adb: Revert previous change. 2013-10-10 Gary Dismukes <dismukes@adacore.com> * sem_ch13.adb (Analyze_Attribute_Definition_Clause): In the case where the Storage_Pool aspect is specified by an aspect clause and a renaming is used to capture the evaluation of the pool name, insert the renaming in front of the aspect's associated entity declaration rather than in front of the corresponding attribute definition (which hasn't been appended to the declaration list yet). 2013-10-10 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Is_Interface_Conformant): The controlling type of the interface operation is obtained from the ultimate alias of the interface primitive parameter, because that may be in fact an implicit inherited operation whose signature involves the type extension and not the desired interface. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * par-ch13.adb (Aspect_Specifications_Present): In Ada 2012, recognize an aspect specification with a misspelled name if it is followed by a a comma or semicolon. 2013-10-10 Vadim Godunko <godunko@adacore.com> * s-atocou.adb, s-atocou.ads, s-atocou-x86.adb, s-atocou-builtin.adb: Fix copyright notice. 2013-10-10 Yannick Moy <moy@adacore.com> * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package): Get enclosing subprogram for precondition/postcondition/contract cases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203350 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Robert Dewar <dewar@adacore.com>charlet2013-10-1010-53/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat_rm.texi: Minor fix. 2013-10-10 Robert Dewar <dewar@adacore.com> * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Address): Remove the Comes_From_Source test for the overlap warning. 2013-10-10 Robert Dewar <dewar@adacore.com> * sem_util.adb: Minor code reorganization (use Nkind_In). * sem_warn.adb: Minor code reorganization (optimization in Check_Unset_Reference). * exp_ch9.adb, exp_ch4.adb, sinfo.ads: Minor reformatting. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * sem_ch7.adb (Install_Parent_Private_Declarations): When instantiating a child unit, do not install private declaration of a non-generic ancestor of the generic that is also an ancestor of the current unit: its private part will be installed when private part of ancestor itself is analyzed. 2013-10-10 Thomas Quinot <quinot@adacore.com> * freeze.adb (Check_Component_Storage_Order): Retrieve component aliased status from type entities directly instead of going back to original component definition. * sem_ch7.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203349 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Robert Dewar <dewar@adacore.com>charlet2013-10-1014-129/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch13.adb (Analyze_Aspect_Specifications): For Address attribute, consider it to be set in source, because of aliasing considerations. (Analyze_Attribute_Definition_Clause): For the purpose of warning on overlays, take into account the aspect case. 2013-10-10 Robert Dewar <dewar@adacore.com> * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads, a-cofove.ads: Minor reformatting. 2013-10-10 Arnaud Charlet <charlet@adacore.com> * gnat_ugn.texi: Remove obsolete mention to -laddr2line. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_N_Case_Expression): Indicate that the generated variable used as a target of the expression needs no initialization. 2013-10-10 Jose Ruiz <ruiz@adacore.com> * exp_util.adb (Corresponding_Runtime_Package): Remove the condition related to No_Dynamic_Attachment which was wrong. Protected types with interrupt handlers (when not using a restricted profile) are always treated as protected types with entries, regardless of the No_Dynamic_Attachment restriction. * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Simplify the code using the result of Corresponding_Runtime_Package. (Install_Private_Data_Declarations): When having static handlers and a non restricted profile, we use the type Static_Interrupt_Protection always, so we removed an extra wrong condition looking at the No_Dynamic_Attachment restriction. Simplify the code using the result of Corresponding_Runtime_Package. (Make_Initialize_Protection): Simplify the code using the result of Corresponding_Runtime_Package. (Install_Private_Data_Declaration): The No_Dynamic_Attachment restriction has nothing to do with static handlers. Remove the extra erroneous condition that was creating the wrong data type. 2013-10-10 Hristian Kirtchev <kirtchev@adacore.com> * sem_util.adb (Is_Object_Reference): Attribute 'Old produces an object reference. * gnat_rm.texi: Define accessibility level of X'Update(...) result. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203348 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Yannick Moy <moy@adacore.com>charlet2013-10-109-45/+102
| | | | | | | | | | | | | | | | * gnat_rm.texi, a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads, a-cofove.ads: Update comment and doc of formal containers 2013-10-10 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): For Pre/Post conditions that apply to a subprogram body, preserve the placement and order of the generated pragmas, which must appear before other declarations in the body. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203347 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Bob Duff <duff@adacore.com>charlet2013-10-109-13/+606
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat_ugn.texi: Add gnat2xml doc. 2013-10-10 Doug Rupp <rupp@adacore.com> * s-vxwork-arm.ads: Fix interface to FP_CONTEXT. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specification): An aspect Import on a variable need not have a convention specified, as long as the implicit convention of the object, obtained from its type, is Ada or Ada-related. 2013-10-10 Robert Dewar <dewar@adacore.com> * cstand.adb (Standard_Unsigned_64): New internal type. * gnat_rm.texi: Update documentation on To_Address. * sem_attr.adb (Analyze_Attribute, case To_Address): Fix problem with out of range static values given as literals or named numbers. * stand.ads (Standard_Unsigned_64): New internal type. * stand.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203346 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Ed Schonberg <schonberg@adacore.com>charlet2013-10-103-3/+29
| | | | | | | | | | | | | | | * sem_ch4.adb (Analyze_Selected_Component, Has_Mode_Conformant_Spec): If selected component may be an indexing of a parameterless call to a protected function, and expansion is disabled, this is a valid candidate interpretation. 2013-10-10 Arnaud Charlet <charlet@adacore.com> * gnat_ugn.texi: Minor editing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203345 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Robert Dewar <dewar@adacore.com>charlet2013-10-1012-76/+625
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnatlink.adb: Minor reformatting. 2013-10-10 Yannick Moy <moy@adacore.com> * debug.adb: Free flag d.E and change doc for flag d.K. 2013-10-10 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Check_Precondition_Postcondition): If the pragma comes from an aspect spec, and the subprogram is a library unit, treat as a ppc in a declarative part in ASIS mode, so that expression in aspect is properly analyzed. In this case there is no later point at which the aspect specification would be examined. 2013-10-10 Bob Duff <duff@adacore.com> * opt.ads: Minor comment fix. 2013-10-10 Vadim Godunko <godunko@adacore.com> * a-coinho-shared.ads, a-coinho-shared.adb: New file. * s-atocou.ads: Add procedure to initialize counter. * s-atocou.adb: Likewise. * s-atocou-builtin.adb: Likewise. * s-atocou-x86.adb: Likewise. * gcc-interface/Makefile.in: Select special version of Indefinite_Holders package on platforms where atomic built-ins are supported. Update tools target pairs for PikeOS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203344 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-10 Robert Dewar <dewar@adacore.com>charlet2013-10-1011-101/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch3.adb: Minor reformatting. 2013-10-10 Robert Dewar <dewar@adacore.com> * sinput-c.adb (Load_File): Ensure Source_Align alignment. * sinput-d.adb (Create_Debug_Source): Ensure Source_Align alignment. * sinput-l.adb (Create_Instantiation_Source): Ensure Source_Align alignment. (Load_File): Ditto. * sinput.ads, sinput.adb (Get_Source_File_Index): New optimized (single line) version. * types.ads (Source_Align): New definition. (Source_Buffer): Document new alignment requirement. 2013-10-10 Robert Dewar <dewar@adacore.com> * sem_prag.adb (Analyze_Pragma, case Linker_Section): Allow this for types. 2013-10-10 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Minor adjustment to doc for To_Address attribute. 2013-10-10 Vadim Godunko <godunko@adacore.com> * s-stopoo.ads (Root_Storage_Pool): Add pragma Preelaborable_Initialization. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203343 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (OUTPUT_OPTION): Define as "-o $@".tromey2013-09-252-2/+6
| | | | | | | | | | | * configure.ac: Don't invoke AM_PROG_CC_C_O. (NO_MINUS_C_MINUS_O, OUTPUT_OPTION): Don't subst. * configure, config.in: Rebuild. gcc/ada * gcc-interface/Makefile.in (OUTPUT_OPTION): Define as "-o $@". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202896 138bc75d-0d04-0410-961f-82ee72b054a4
* PR ada/58264ebotcazou2013-09-182-49/+100
| | | | | | | | | | | * gcc-interface/trans.c (Attribute_to_gnu): Define GNAT_PREFIX local variable and use it throughout. <Attr_Length>: Note whether the prefix is the dereference of a pointer to unconstrained array and, in this case, capture the result for both Attr_First and Attr_Last. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202694 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: New.ebotcazou2013-09-182-0/+10
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202690 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/trans.c (gigi): Remove dead code.ebotcazou2013-09-182-12/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202688 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/trans.c (Subprogram_Body_to_gnu): Pop the stack ofebotcazou2013-09-182-0/+7
| | | | | | | return variables for subprograms using the CICO mechanism. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202684 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix glitchesebotcazou2013-09-141-3/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202589 138bc75d-0d04-0410-961f-82ee72b054a4
* Changelog entry for correction of thinko in the target pairhainque2013-09-131-0/+5
| | | | | | | | filter for darwin. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202579 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix thinko in the late conversion to the use of configure variables forhainque2013-09-131-1/+1
| | | | | | | | | | | the target pairs selection: * gcc-interface/Makefile.in: Fix darwin Filter to match on $target_os, not target_cpu. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202578 138bc75d-0d04-0410-961f-82ee72b054a4
* ChangeLog entry forhainque2013-09-121-0/+14
| | | | | | | | | | | | | | | | | * gcc-interface/Makefile.in: Import target_cpu, target_vendor, target_os and their host_ counterparts. Remove host_canonical and target_cpu_default, unused. Remove local ad-hoc computations of "host", "targ", "arch", "osys" and "manu". Replace uses of these by uses of the now imported family, hence back to filters against canonical values. Remove filters on e500 for target_cpu, expected to be canonicalized into powerpc. Invert the logic filtering on 64bit sparc for VxWorks. Simplify the filtering logic for bareboard tools target pairs, now using straight elf/eabi filters on the target_os part only. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202519 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-10-11 Thomas Schwinge <thomas@codesourcery.com>hainque2013-09-121-80/+72
| | | | | | | | | | | | | | | | | Olivier Hainque <hainque@adacore.com> * gcc-interface/Makefile.in: Import target_cpu, target_vendor, target_os and their host_ counterparts. Remove host_canonical and target_cpu_default, unused. Remove local ad-hoc computations of "host", "targ", "arch", "osys" and "manu". Replace uses of these by uses of the now imported family, hence back to filters against canonical values. Remove filters on e500 for target_cpu, expected to be canonicalized into powerpc. Invert the logic filtering on 64bit sparc for VxWorks. Simplify the filtering logic for bareboard tools target pairs, now using straight elf/eabi filters on the target_os part only. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202518 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Ed Schonberg <schonberg@adacore.com>charlet2013-09-1010-174/+481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch3.adb: sem_ch3.adb: (Replace_Anonymoous_Access_To_Protected_Subprogram): If the return type is itself an access to function, recurse to emit another anonymous type. gcc-interface/decl.c (gnat_to_gnu_entity): In ASIS mode (type_annotate_only) do not check whether access types have a set size. 2013-09-10 Robert Dewar <dewar@adacore.com> * err_vars.ads (Warning_Doc_Switch): Ignored in VMS mode. * errout.adb (Warning_Doc_Switch): Ignored in VMS mode. * errout.ads (Warning_Doc_Switch): Ignored in VMS mode. * inline.ads (Warnings): New component in Pending_Body_Info. * sem_ch12.adb (Pending_Body_Info): Save and restore warnings at instantiation point. * warnsw.adb (Save_Warnings): New function (Restore_Warnings): New procedure Remove special handling of Warning_Doc_Switch, cleaner to handle the VMS case in errout, than to introduce undocumented oddities here. * warnsw.ads (Warning_Record) : New type. (Save_Warnings): New function. (Restore_Warnings): New procedure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202467 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-1022-112/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sinput.adb (Check_For_BOM): Avoid reading past end of file. 2013-09-10 Robert Dewar <dewar@adacore.com> * errout.adb (Error_Msg_Ada_2012_Feature): New procedure. * errout.ads (Error_Msg_Ada_2012_Feature): New procedure. * inline.ads: Save/Restore Ada_Version_Pragma. * opt.adb: Save/Restore Ada_Version_Pragma. * opt.ads (Ada_Version_Pragma): New variable. * par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature. * prj.adb: Initialize Ada_Version_Pragma. * sem_attr.adb: Use Error_Msg_Ada_2012_Feature. * sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma. * sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma. * switch-c.adb: Initialize Ada_Version_Pragma. * sem_ch12.adb: Minor reformatting. 2013-09-10 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Process_Subtype): Discard constraint on access to class-wide type. Such constraints are not supported and are considered a language pathology. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202466 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-107-15/+50
| | | | | | | | | | | | | | | * gnatbind.adb: Correct starting date in --version string. * gnatdll.adb: Use Check_Version_And_Help_G to implement --help and --version. * gnatkr.adb: Use Check_Version_And_Help_G to implement --help and --version. * gnatlink.adb: Correct starting date in --version string. * gnatls.adb: Correct starting date in --version string. * make.adb: Correct starting date in --version string. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202465 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-104-4/+66
| | | | | | | | | | * switch-c.adb: Minor reformatting. * atree.ads (Original_Nodes): Add documentation on ASIS usage. * sinfo.ads: Add section on ASIS mode (documentation only). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202464 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-103-3/+32
| | | | | | | | | | | | | | * sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow REASON parameter in compiler units (bootstrap issues). 2013-09-10 Robert Dewar <dewar@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): Output warning if -gnateE specified for a target that does not support it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202463 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Ed Schonberg <schonberg@adacore.com>charlet2013-09-108-35/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Handle properly a subprogram body without previous spec. 2013-09-10 Gary Dismukes <dismukes@adacore.com> * sem_ch4.adb: Minor typo fixes. 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com> * aspects.adb (Aspects_On_Body_OK): New routine. * aspects.ads: Modify type Aspect_Expression to include the Optional_XXX variants. Update the contents of table Aspect_Argument. Add table Aspect_On_Body_OK. (Aspects_On_Body_OK): New routine. * par-ch13.adb (Get_Aspect_Specifications): Account for optional names and expressions when parsing an aspect. * sem_ch6.adb: Add with and use clause for Aspects. (Analyze_Subprogram_Body_Helper): Do not emit an error when analyzing a body with aspects that can be applied simultaneously to both spec and body. * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the corresponding pragma of an aspect that applies to a subprogram body in the declarative part. (Make_Aitem_Pragma): Do not generate a pragma with an empty argument list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202462 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-1013-19/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * switch-c.adb: Diagnose -gnatc given after -gnatRm. * gnat_ugn.texi: Add documentation for -gnatRm. * usage.adb: Minor reorganization (put style entries in proper order) Document -gnatRm switch. * sinfo.ads: Minor comment fix. 2013-09-10 Sergey Rybin <rybin@adacore.com frybin> * tree_io.ads: Update ASIS_Version_Number. 2013-09-10 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Access_Subprogram_Declaration): Check whether the designated type can appear in a parameterless call. * sem_ch4.adb (Analyze_Call): Do not insert an explicit dereference in the case of an indirect call through an access function that returns an array type. (Analyze_One_Call): Handle properly legal parameterless calls whose result is indexed, in constructs of the for F.all (I) * sem_ch6.ads (May_Need_Actuals): Make public, for use on access to subprogram types. * sem_res.adb (Resolve_Call): If the call is indirect, there is no entity to set on the name in the call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202461 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-09-1019-93/+556
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aspects.adb: Add entries in the Has_Aspect_Specifications_Flag table for package body and body stubs. (Move_Or_Merge_Aspects): New routine. (Remove_Aspects): New routine. * aspects.ads (Move_Aspects): Update comment on usage. (Move_Or_Merge_Aspects): New routine. (Remove_Aspects): New routine. * par-ch3.adb: Update the grammar of private_type_declaration, private_extension_declaration, object_renaming_declaration, and exception_renaming_declaration. (P_Subprogram): Parse the aspect specifications that apply to a body stub. * par-ch6.adb: Update the grammar of subprogram_body_stub and generic_instantiation. * par-ch7.adb: Update the grammar of package_declaration, package_specification, package_body, package_renaming_declaration, package_body_stub. (P_Package): Parse the aspect specifications that apply to a body, a body stub and package renaming. * par-ch9.adb: Update the grammar of entry_declaration, protected_body, protected_body_stub, task_body, and task_body_stub. (P_Protected): Add local variable Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect specifications that apply to a protected body and a protected body stub. (P_Task): Add local variable Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect specifications that apply to a task body and a task body stub. * par-ch12.adb: Update the grammar of generic_renaming_declaration. (P_Generic): Parse the aspect specifications that apply to a generic renaming. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not emit an error when analyzing aspects that apply to a body stub. Such aspects are relocated to the proper body. * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the aspect specifications that apply to a body. * sem_ch9.adb (Analyze_Protected_Body): Warn about user-defined aspects not being supported on protected bodies. Remove the aspect specifications. (Analyze_Single_Protected_Declaration): Analyze the aspects that apply to a single protected declaration. (Analyze_Task_Body): Warn about user-defined aspects not being supported on task bodies. Remove the aspect specifications. * sem_ch10.adb: Add with and use clause for Aspects. (Analyze_Package_Body_Stub): Propagate the aspect specifications from the stub to the proper body. * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the corresponding pragma of an aspect that applies to a body in the declarations of the body. * sinfo.ads: Update the gramma of expression_function, private_type_declaration, private_extension_declaration, object_renaming_declaration, exception_renaming_declaration, package_renaming_declaration, subprogram_renaming_declaration, generic_renaming_declaration, entry_declaration, subprogram_body_stub, package_body_stub, task_body_stub, generic_subprogram_declaration. 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Pragma): Add processing for aspect/pragma SPARK_Mode when it applies to a [library-level] subprogram or package [body]. 2013-09-10 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Document that -gnatc and -gnatR cannot be given together. * switch-c.adb (Scan_Front_End_Switches): Give error if both -gnatR and -gnatc given. 2013-09-10 Robert Dewar <dewar@adacore.com> * g-table.ads, g-table.adb (For_Each): New generic procedure (Sort_Table): New generic procedure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202460 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Thomas Quinot <quinot@adacore.com>charlet2013-09-106-14/+31
| | | | | | | | | | | | | | | | | | | * adaint.c (__gnat_is_executable_file_attr): Should be true for an executable regular file only only (not for a directory that has the executable permission). 2013-09-10 Ed Schonberg <schonberg@adacore.com> * sem_res.adb: Further work on operator calls in ASIS. 2013-09-10 Yannick Moy <moy@adacore.com> * sinfo.ads, sem_prag.ads, sem_ch13.adb: Minor correction and comment update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202459 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Thomas Quinot <quinot@adacore.com>charlet2013-09-104-8/+19
| | | | | | | | | | * aspects.ads, sem_ch13.adb: Minor reformatting. * adaint.c (__gnat_set_close_on_exec): Add comment documenting that this routine is shared between OS_Lib and Sockets. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202458 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-107-58/+159
| | | | | | | | | | | | | | | | * exp_prag.adb (Expand_Pragma_Check): Ignore pragma if Is_Ignored set. * sem_ch13.adb (Make_Aitem_Pragma): Set Is_Checked if needed. * sem_prag.adb (Check_Kind): Moved from spec (Analyze_Pragma): Make sure Is_Ignored/Is_Checked are set right (Analyze_Pragma, case Check): Ditto (Check_Applicable_Policy): Handle Statement_Assertion case Throughout, set and check the Is_Checked flag as appropriate. * sem_prag.ads (Check_Kind): Moved to body. * sinfo.ads, sinfo.adb (Is_Checked): New flag. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202457 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-1010-151/+655
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aspects.ads (Delay_Type): New type (Aspect_Delay): New table. * einfo.adb (Has_Delayed_Rep_Aspects): New flag (May_Inherit_Delayed_Rep_Aspects): New flag (Rep_Clause): Removed (use Get_Attribute_Representation_Clause). * einfo.ads (Has_Delayed_Rep_Aspects): New flag (May_Inherit_Delayed_Rep_Aspects): New flag * freeze.adb: Minor reformatting * sem_ch13.adb (Analyze_Aspect_Speficifications): Redo handling of delayed evaluation, including optimizing some cases and avoiding delays. (Analyze_Aspects_At_Freeze_Point): Now handled inheriting delayed rep aspects for type derivation case. (Inherit_Delayed_Rep_Aspects): New procedure * sem_ch13.ads (Analyze_Aspects_At_Freeze_Point): Now handled inheriting delayed rep aspects for type derivation case. * sem_ch3.adb (Build_Derived_Type): Set May_Inherit_Derived_Rep_Aspects if parent type flag Has_Delayed_Rep_Aspects is set 2013-09-10 Robert Dewar <dewar@adacore.com> * errout.adb (Finalize): Don't delete real errors with specific warning control. 2013-09-10 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Expand_N_Timed_Entry_Call, Expand_N_Conditional_Entry_Call, Expand_N_Asynchronous_Select): Handle properly a trigger that is a call to a primitive operation of a type that implements a limited interface, if the type itself is not limited. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202456 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-109-37/+56
| | | | | | | | | * sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb, exp_ch4.adb, sprint.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202455 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Yannick Moy <moy@adacore.com>charlet2013-09-105-24/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sinfo.ads: Document splitting of pre/post in N_Contract description. 2013-09-10 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_N_Op_Multiply): If the operation is of the form X * 2 ** N and it has been marked Is_Power_Of_2_For_Shift, add a mod operation if the result type is a binary modular type. 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Add local variable Context. Remove local variable Subp_Id. Start the context traversal from the current subprogram rather than the current scope. Update the scope traversal and error reporting. 2013-09-10 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Expand_N_Timed_Entry_Call): New procedure Rewrite_Triggering_Statements, to encapsulate the statements that follow the trigger of the entry call. This procedure is needed when the trigger is a dispatching call, because the expansion requires several copies of those statements. The procedure is more efficient, and preserves non-local references when the construct is within an instance. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202454 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Ed Schonberg <schonberg@adacore.com>charlet2013-09-105-13/+83
| | | | | | | | | | | | | | | | | | * sem_ch12.adb (Analyze_Package_Instantiation): If the instantiation is a compilation unit, analyze aspects before analyzing the package declaration for the instance. * sem_ch13.adb (Analyze_Aspect_Specifications): If the corresponding node is a package instantiation, insert generated pragmas at the head of visible declarations. * sem_prag.adb (Analyze_Pragma, case Preelaborate): In an instance do not ignore the pragma if it comes from an aspect specification in the instance, and not from the generic unit. * sprint.adb (Sprint_Node_Actual): For a package declaration that is an instantiation, print aspects after declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202453 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-104-16/+19
| | | | | | | | * einfo.adb, sem_prag.adb, rtsfind.ads: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202452 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-09-104-24/+105
| | | | | | | | | | | | | | | | | | | | | | * sem_prag.adb (Get_SPARK_Mode_Id): Handle the case where the pragma may appear without an argument. (Analyze_Global_List): Add expanded_name to the list of constructs that denote a single item. (Collect_Global_List): Add expanded_name to the list of constructs that denote a single item. 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Apply_Accessibility_Check): Add local constant Pool_Id and local variables Fin_Call and Free_Stmt. Finalize and deallocate a heap-allocated class-wide object after it has been determined that it violates the accessibility rules. * rtsfind.ads: Add new RTU_Id for System.Memory. Add new RE_Id and entry in RE_Unit_Table for RE_Free. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202451 138bc75d-0d04-0410-961f-82ee72b054a4
* PR ada/58239ebotcazou2013-09-013-3/+22
| | | | | | | | | | | | | | | | gnattools/ * Makefile.in (CXX_LFLAGS): New. (TOOLS_FLAGS_TO_PASS_NATIVE): Pass CXX and CXX_LFLAGS. (TOOLS_FLAGS_TO_PASS_RE): Likewise. (TOOLS_FLAGS_TO_PASS_CROSS): Pass CXX. gcc/ada/ * gcc-interface/Makefile.in (GCC_LINK_FLAGS): Add -static-libstdc++. (GCC_LINK): Use CXX instead of CC. * gcc-interface/Make-lang.in (CXX_LFLAGS): New. (ADA_TOOLS_FLAGS_TO_PASS): Pass CXX, and CXX_LFLAGS for native. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202150 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about aliasebotcazou2013-08-132-1/+6
| | | | | | | sets of derived types in ASIS mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201705 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/decl.c (gnat_to_gnu_entity): Replace True with true.ebotcazou2013-08-135-19/+33
| | | | | | | | | | | | | | | | (is_cplusplus_method): Likewise, and False with false. (components_need_strict_alignment): Likewise. * gcc-interface/misc.c (gnat_init_gcc_fp): Likewise. * gcc-interface/trans.c (Loop_Statement_to_gnu): Likewise. (Handled_Sequence_Of_Statements_to_gnu): Likewise. (add_cleanup): Likewise. (Sloc_to_locus1): Likewise. (Sloc_to_locus): Likewise. (set_expr_location_from_node): Likewise. * gcc-interface/utils.c (potential_alignment_gap): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201704 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/trans.c (set_end_locus_from_node): Clear column infoebotcazou2013-08-132-2/+11
| | | | | | | for the end_locus of a block if it does not come from an End_Label. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201703 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Ifebotcazou2013-08-134-16/+59
| | | | | | | | | | | | | | | there is no End_Label, attach cleanup actions to the sloc of the HSS node instead. (Exception_Handler_to_gnu_zcx): Associate cleanup actions with the sloc of the handler itself. (add_cleanup): Clear column information in sloc of cleanup actions. (Sloc_to_locus1): New static function. (Sloc_to_locus): Call it. (set_expr_location_from_node1): New static function. (set_expr_location_from_node): Call it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201702 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud