summaryrefslogtreecommitdiff
path: root/gcc/ada
Commit message (Collapse)AuthorAgeFilesLines
* 2012-08-06 Vincent Pucci <pucci@adacore.com>charlet2012-08-064-67/+73
| | | | | | | | | | | | | | | | | | | | | | | * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Use of Known_Static_Esize instead of Known_Esize and Known_Static_RM_Size instead of Known_RM_Size in order to properly call UI_To_Int. Don't check the size of the component type in case of generic. * sem_ch9.adb (Allows_Lock_Free_Implementation): Use of Known_Static_Esize instead of Known_Esize and Known_Static_RM_Size instead of Known_RM_Size in order to properly call UI_To_Int. Don't check the size of the component type in case of generic. 2012-08-06 Hristian Kirtchev <kirtchev@adacore.com> * checks.adb (Discrete_Range_Cond): Do not try to optimize on the assumption that the type of an expression can always fit in the target type of a conversion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190156 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-30 Robert Dewar <dewar@adacore.com>charlet2012-07-309-252/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * bindusg.adb: Clarify file in -A lines. 2012-07-30 Robert Dewar <dewar@adacore.com> * freeze.adb: Minor reformatting. 2012-07-30 Robert Dewar <dewar@adacore.com> * gnatcmd.adb, makeutl.adb, makeutl.ads: Minor code reorganization. 2012-07-30 Vincent Pucci <pucci@adacore.com> * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Minor reformatting. * sem_ch9.adb (Allows_Lock_Free_Implementation): Minor reformatting. Capture the correct error message in case of a quantified expression. 2012-07-30 Thomas Quinot <quinot@adacore.com> * g-socket.adb (Get_Socket_Option, Set_Socket_Option): On Windows, the value is a milliseconds count in a DWORD, not a struct timeval. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189979 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-30 Hristian Kirtchev <kirtchev@adacore.com>charlet2012-07-308-50/+79
| | | | | | | | | | | | | | | | | | | | | | * sem_ch12.adb (Earlier): Add local variables T1 and T2. Minor code refactoring. 2012-07-30 Thomas Quinot <quinot@adacore.com> * gnatcmd.adb, make.adb, makeutl.adb, makeutl.ads (Test_If_Relative_Path): Rename to Ensure_Absolute_Path to better reflect what this subprogram does. Rename argument Including_L_Switch to For_Gnatbind, and also exempt -A from rewriting. * bindusg.adb: Document optional =file argument to gnatbind -A. 2012-07-30 Ed Schonberg <schonberg@adacore.com> * freeze.adb (Freeze_Entity): Do no apply restriction check on storage pools to access to subprogram types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189978 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-30 Robert Dewar <dewar@adacore.com>charlet2012-07-3023-105/+201
| | | | | | | | | | | | | * par_sco.adb, a-cihama.adb, a-coinve.adb, exp_ch7.adb, a-ciorse.adb, exp_ch9.adb, sem_dim.adb, par-ch13.adb, sem_ch9.adb, a-cidlli.adb, a-cimutr.adb, freeze.adb, a-ciormu.adb, sem_res.adb, sem_attr.adb, a-cihase.adb, exp_ch4.adb, sem_ch4.adb, a-ciorma.adb, s-tasinf-linux.ads, sem_ch13.adb, a-coinho.adb: Minor reformatting. Add comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189977 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-30 Vincent Pucci <pucci@adacore.com>charlet2012-07-302-4/+12
| | | | | | | | | * sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict implicit dereferences of access values. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189975 138bc75d-0d04-0410-961f-82ee72b054a4
* * system-darwin-ppc64.ads: Add Support_Atomic_Primitives, set to True.iains2012-07-272-0/+5
| | | | | | | | | -- This line and those below it will be ignored M ChangeLog M system-darwin-ppc64.ads git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189916 138bc75d-0d04-0410-961f-82ee72b054a4
* * expr.c (expand_expr_real_1): Do not expand operand #1 and #2ebotcazou2012-07-252-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | of BIT_FIELD_REF for ignored results. * fold-const.c (fold_ternary_loc) <BIT_FIELD_REF>: Check that the CONSTRUCTOR has vector type before using vector accessors on it. * gimplify.c (gimplify_compound_lval): Do not gimplify operand #1 and #2 of BIT_FIELD_REF. (gimplify_expr) <BIT_FIELD_REF>: Likewise. * tree-nested.c (convert_nonlocal_reference_op) <BIT_FIELD_REF>: Do not process operand #1 and #2. (convert_local_reference_op): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Remove superfluous breaks throughout. <BIT_FIELD_REF>: Reuse operand #1 and #2 directly. * tree.c (stabilize_reference) <BIT_FIELD_REF>: Do not stabilize operand #1 and #2. (UPDATE_FLAGS): Do not consider operand #2 of BIT_FIELD_REF. (build6_stat): Delete. * tree.h (build6_stat, build6, build6_stat_loc, build6_loc): Likewise. ada/ * gcc-interface/utils2.c (gnat_stabilize_reference) <BIT_FIELD_REF>: Do not stabilize operand #1 and #2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189864 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-23 Tristan Gingold <gingold@adacore.com>charlet2012-07-234-139/+160
| | | | | | | | | | | | | | | * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Use End_Label sloc when possible for sloc of the TRY_CATCH_EXPR node. 2012-07-23 Olivier Hainque <hainque@adacore.com> * gcc-interface/Makefile.in: Adjust processing of Linker_Options for VxWorks. * gcc-interface/Make-lang.in: Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189777 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-23 Arnaud Charlet <charlet@adacore.com>charlet2012-07-238-14/+43
| | | | | | | | | | | | | | | | | | | | | | | * s-tasinf-linux.ads: Fix typo. 2012-07-23 Thomas Quinot <quinot@adacore.com> * exp_ch7.adb, switch-m.adb, exp_ch3.adb, freeze.adb: Minor reformatting 2012-07-23 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): If original loop carries an identifier, preserve it when rewriting it as a standard loop to validate exit statements that may reference that name in the body of the loop. 2012-07-23 Thomas Quinot <quinot@adacore.com> * exp_ch9.adb: Minor code cleanup. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189776 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-23 Ed Schonberg <schonberg@adacore.com>charlet2012-07-239-94/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch4.adb (Analyze_Selected_Component): When checking for potential ambiguities with class-wide operations on synchronized types, attach the copied node properly to the tree, to prevent errors during expansion. 2012-07-23 Yannick Moy <moy@adacore.com> * sem_ch5.adb (Analyze_Loop_Statement): Make sure the loop body is analyzed in Alfa mode. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_res.adb: Adjust previous change. 2012-07-23 Vincent Pucci <pucci@adacore.com> * sem_ch9.adb (Allows_Lock_Free_Implementation): Flag Lock_Free_Given renames previous flag Complain. Description updated. Henceforth, catch every error messages issued by this routine when Lock_Free_Given is True. Declaration restriction updated: No non-elementary parameter instead (even in parameter) New subprogram body restrictions implemented: No allocator, no address, import or export rep items, no delay statement, no goto statement, no quantified expression and no dereference of access value. 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com> * checks.adb (Determine_Range): Add local variable Btyp. Handle the case where the base type of an enumeration subtype is private. Replace all occurrences of Base_Type with Btyp. * exp_attr.adb (Attribute_Valid): Handle the case where the base type of an enumeration subtype is private. Replace all occurrences of Base_Type with Btyp. * sem_util.adb (Get_Enum_Lit_From_Pos): Add local variable Btyp. Handle the case where the base type of an enumeration subtype is private. Replace all occurrences of Base_Type with Btyp. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189775 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-23 Ed Schonberg <schonberg@adacore.com>charlet2012-07-2315-66/+438
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * par-ch6.adb (P_Mode): in Ada 2005, a mode indicator can apply to a formal object of an anonymous access type. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Try_Container_Indexing): A user-defined indexing aspect can have more than one index, e.g. to describe indexing of a multidimensional object. 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Apply_Accessibility_Check): Reimplemented. The check is now more complex and contains optional finalization part and mandatory deallocation part. 2012-07-23 Gary Dismukes <dismukes@adacore.com> * a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb, a-ciormu.adb, a-ciorse.adb, a-coinho.adb, a-coinve.adb, a-cidlli.adb: Unsuppress Accessibility_Check for Element_Type allocators. 2012-07-23 Vasiliy Fofanov <fofanov@adacore.com> * projects.texi: Fix typo. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Explicit_Derenference): If prefix is overloaded, remove those interpretations whose designated type does not match the context, to avoid spurious ambiguities that may be caused by the Ada 2012 conversion rule for anonymous access types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189774 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-23 Vincent Celier <celier@adacore.com>charlet2012-07-2315-262/+482
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g-spitbo.adb (Substr (String)): Return full string and do not raise exception when Start is 1 and Len is exactly the length of the string parameter. * g-spitbo.ads: Fix spelling error in the name of exception Index_Error. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * par.adb: new subprogram Get_Aspect_Specifications. * par-ch6.adb (P_Subprogram): handle subprogram bodies with aspect specifications. * par-ch13.adb (Get_Aspect_Specifications): extracted from P_Aspect_Specifications. Collect aspect specifications in some legal context, but do not attach them to any declaration. Used when parsing subprogram declarations or bodies that include aspect specifications. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If aspects are present, analyze them, or reject them if the subprogram as a previous spec. 2012-07-23 Vasiliy Fofanov <fofanov@adacore.com> * gnat_ugn.texi: Omit section on other platforms/runtimes support in gnattest for vms version. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Handle properly aspects that can be specified on a subprogram body: CPU, Priority, and Interrupt_Priority. 2012-07-23 Claire Dross <dross@adacore.com> * a-cfdlli.ads: Switch definition of Constant_Reference_Type and Empty_List. 2012-07-23 Thomas Quinot <quinot@adacore.com> * par_sco.adb (Process_Decisions.Output_Header): For the guard on an alternative in a SELECT statement, use the First_Sloc of the guard expression (not its topmost sloc) as the decision location, because this is what is referenced by dominance markers. 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Requires_Hooking): Examine the original expression of an object declaration node because a function call that returns on the secondary stack may have been rewritten into something else. 2012-07-23 Vincent Pucci <pucci@adacore.com> * sem_dim.adb (Analyze_Dimension_Has_Etype): For identifier, propagate dimension when entity is a non-dimensionless constant. (Analyze_Dimension_Object_Declaration): Propagate dimension from the expression to the entity when type is a dimensioned type and object is a constant. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Analyze_Attribute, case 'Old): if the prefix is not an entity name, expand at once so that code generated by the expansion of the prefix is not generated before the constant that captures the old value is properly inserted and analyzed. 2012-07-23 Thomas Quinot <quinot@adacore.com> * exp_ch9.adb (Ensure_Statement_Present): Mark generated NULL statement as Comes_From_Source so that GIGI does not eliminate it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189773 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com>charlet2012-07-2343-54/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Inst is now a local variable. Retrieve the related instance when processing a subprogram instantiation. Such instances appear as wrapper packages. 2012-07-23 Vincent Pucci <pucci@adacore.com> * system-aix64.ads, system-aix.ads, system-darwin-ppc.ads, system-hpux.ads, system-linux-alpha.ads, system-linux-hppa.ads, system-linux-ppc.ads, system-linux-s390.ads, system-linux-s390x.ads, system-linux-sh4.ads, system-linux-sparc.ads, system-lynxos-ppc.ads, system-mingw.ads, system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms_64.ads, * system-vxworks-arm.ads, system-vxworks-m68k.ads, system-vxworks-mips.ads, system-vxworks-ppc.ads, system-vxworks-sparcv9.ads: Support_Atomic_Primitives set to False. * system-darwin-x86.ads, system-darwin-x86_64.ads, system-freebsd-x86.ads, system-freebsd-x86_64.ads, system-hpux-ia64.ads, system-linux-ia64.ads, system-linux-x86.ads, system-linux-x86_64.ads, system-lynxos-x86.ads, system-mingw-x86_64.ads, system-solaris-x86.ads, system-solaris-x86_64.ads, system-vms-ia64.ads, system-vxworks-x86.ads: Support_Atomic_Primitives set to True. * s-atopri.adb (Lock_Free_Read_X): New body. (Lock_Free_Try_Write_X): Support_Atomic_Primitives check added. (Lock_Free_Try_Write_64): New body. * s-atopri.ads: New type uint. (Sync_Compare_And_Swap_64): __sync_val_compare_and_swap_8 intrinsic import. (Lock_Free_Read_X): Body moved to s-atopri.adb. (Lock_Free_Try_Write_64): Similar to other Lock_Free_Try_Write_X routines. * targparm.adb: New enumeration literal SAP (Support_Atomic_Primitives) for type Targparm_Tags. New constant SAP_Str. New component SAP_Str'Access for array Targparm_Str. (Get_Target_Parameters): Parse Support_Atomic_Primitives_On_Target flag. * targparm.ads: New back-end code generation flag Support_Atomic_Primitives_On_Target 2012-07-23 Vincent Pucci <pucci@adacore.com> * gnat_ugn.texi: Dimensionality checking documentation updated. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Make_Inline): If the pragma applies to a subprogram renaming, set inline flags on both the renamed entity and on the renaming, so that some ASIS queries can be handled consistently in the absence of expansion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189772 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-23 Fedor Rybin <frybin@adacore.com>charlet2012-07-235-21/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat_ugn.texi: Removing obsolete limitation of gnattest to support only ada05. Updating gnattest support for other platforms/run-times section to reflect the usage of taget prefix in gnattest calls. Fixing missed obsolete --stub-default option name. 2012-07-23 Robert Dewar <dewar@adacore.com> * uintp.adb: Minor reformatting. 2012-07-23 Olivier Hainque <hainque@adacore.com> * system-vxworks-ppc.ads: Replace the default Linker_Options requesting crtbe by a commented out request for -nostartfiles. 2012-07-23 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Check_Naming): Do not get the exceptions names in a virtual project. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189771 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-23 Robert Dewar <dewar@adacore.com>charlet2012-07-239-27/+39
| | | | | | | | | | * layout.adb, sem_prag.adb, sem.ads, freeze.adb, switch-m.adb, exp_disp.adb, system-vxworks-ppc.ads, exp_ch6.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189770 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-23 Tristan Gingold <gingold@adacore.com>charlet2012-07-232-0/+6
| | | | | | | | | * gcc-interface/trans.c: (Handled_Sequence_Of_Statements_to_gnu): Set location on TRY_CATCH_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189769 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Try to ensureebotcazou2012-07-192-1/+18
| | | | | | | | that an object of CW type initialized to a value is sufficiently aligned for this value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189682 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Do notebotcazou2012-07-192-6/+13
| | | | | | | | | look up the REP part of the base type in advance. Deal with that of the variant types. (get_rep_part): Be prepared for record types with fields. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189666 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/trans.c (stmt_group_may_fallthru): New function.ebotcazou2012-07-182-6/+30
| | | | | | | | (gnat_to_gnu) <N_Block_Statement>: Use it to find out whether the block needs to be translated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189612 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-17 Vincent Pucci <pucci@adacore.com>charlet2012-07-175-24/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat_ugn.texi: GNAT dimensionality checking documentation updated with System.Dim.Mks modifications. 2012-07-17 Ed Schonberg <schonberg@adacore.com> * exp_ch3.adb: sloc of array init_proc is sloc of type declaration. 2012-07-17 Tristan Gingold <gingold@adacore.com> * raise-gcc.c (get_call_site_action_for): Remove useless init expression for p. (get_action_description_for): Do not overwrite action->kind. 2012-07-17 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Add local variables Attr and Conversion_Added. Add local constant Typ. Retrieve the original attribute after the arithmetic check machinery has modified the node. Add a conversion to the target type when the prefix of attribute Max_Size_In_Storage_Elements is a controlled type. 2012-07-17 Gary Dismukes <dismukes@adacore.com> * exp_ch6.adb (Expand_Inlined_Call): For each actual parameter of mode 'out' or 'in out' that denotes an entity, reset Last_Assignment on the entity so that any assignments to the corresponding formal in the inlining will not trigger spurious warnings about overwriting assignments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189570 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-17 Tristan Gingold <gingold@adacore.com>charlet2012-07-1712-136/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat_rm.texi: Adjust previous change. 2012-07-17 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Process_Import_Or_Interface): If the pragma comes from an aspect, it applies to the corresponding entity without further check. 2012-07-17 Olivier Hainque <hainque@adacore.com> * initialize.c (__gnat_initialize for VxWorks): Remove section with call to __gnat_vxw_setup_for_eh. * system-vxworks-ppc.ads: Add -auto-register to -crtbe, relying on the VxWorks constructor mechanism for network loaded modules by default. 2012-07-17 Tristan Gingold <gingold@adacore.com> * adaint.c: Minor reformatting. 2012-07-17 Pascal Obry <obry@adacore.com> * s-regexp.adb (Adjust): Fix access violation in Adjust. 2012-07-17 Ed Schonberg <schonberg@adacore.com> * freeze.adb (Freeze_Entity): Warn if an imported subprogram has pre/post conditions, because these will not be enforced. 2012-07-17 Eric Botcazou <ebotcazou@adacore.com> * exp_ch7.adb (Process_Transient_Objects): Put all the finalization blocks and the final raise statement into a wrapper block. 2012-07-17 Vincent Pucci <pucci@adacore.com> * s-atopri.adb (Lock_Free_Try_Write_X): Atomic_Compare_Exchange_X replaced by Sync_Compare_And_Swap_X. (Lock_Free_Try_Write_64): Removed. * s-atopri.ads (Sync_Compare_And_Swap_X): Replaces previous routine Atomic_Compare_Exchange_X. (Lock_Free_Read_64): Renaming of Atomic_Load_64. (Lock_Free_Try_Write_64): Renaming of Sync_Compare_And_Swap_64. 2012-07-17 Vincent Celier <celier@adacore.com> * switch-m.adb (Normalize_Compiler_Switches): Recognize new switches -gnatn1 and -gnatn2. 2012-07-17 Vincent Pucci <pucci@adacore.com> * gnat_ugn.texi: GNAT dimensionality checking documentation updated with System.Dim.Mks modifications. 2012-07-17 Ed Schonberg <schonberg@adacore.com> * exp_ch3.adb: sloc of array init_proc is sloc of type declaration. 2012-07-17 Tristan Gingold <gingold@adacore.com> * raise-gcc.c (get_call_site_action_for): Remove useless init expression for p. (get_action_description_for): Do not overwrite action->kind. 2012-07-17 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Add local variables Attr and Conversion_Added. Add local constant Typ. Retrieve the original attribute after the arithmetic check machinery has modified the node. Add a conversion to the target type when the prefix of attribute Max_Size_In_Storage_Elements is a controlled type. 2012-07-17 Gary Dismukes <dismukes@adacore.com> * exp_ch6.adb (Expand_Inlined_Call): For each actual parameter of mode 'out' or 'in out' that denotes an entity, reset Last_Assignment on the entity so that any assignments to the corresponding formal in the inlining will not trigger spurious warnings about overwriting assignments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189569 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-17 Tristan Gingold <gingold@adacore.com>charlet2012-07-1711-73/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * treepr.adb, treepr.ads: Revert previous patch, unneeded. 2012-07-17 Robert Dewar <dewar@adacore.com> * s-assert.ads: Fix comments to make it clear that this is used for all assertions, not just pragma Assert. 2012-07-17 Jerome Guitton <guitton@adacore.com> * par_sco.ads: Minor typo fix. 2012-07-17 Gary Dismukes <dismukes@adacore.com> * layout.adb (Layout_Type): In the case where the target is AAMP, use 32 bits (a single pointer) rather than 64 bits for an anonymous access-to-subprogram type if the type is library-level and Is_Local_Anonymous_Access is True. 2012-07-17 Jose Ruiz <ruiz@adacore.com> * s-tassta.adb, s-tarest.adb (Create_Task, Create_Restricted_Task, Initialize): Add comments explaining that the CPU affinity value that is passed to the run-time library can be either Unspecified_CPU, to indicate that the task inherits the affinity of its activating task, or a value in the range of CPU_Range but no greater than Number_Of_CPUs. 2012-07-17 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Make_DT): Remove decoration of Ada.Tags entities. (Make_Tags): Add decoration of Ada.Tags entities. 2012-07-17 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Check_Statement_Sequence): When locating the last significant statement in a sequence, ignore iserted nodes that typically come from expansion of controlled operations. 2012-07-17 Tristan Gingold <gingold@adacore.com> * gnat_rm.texi: Document foreign exceptions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189568 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-17 Robert Dewar <dewar@adacore.com>charlet2012-07-173-3/+8
| | | | | | | | * sem_prag.adb, treepr.ads: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189567 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-17 Robert Dewar <dewar@adacore.com>charlet2012-07-177-45/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | * exp_ch9.adb: Minor code reorganization. * exp_ch3.adb: Minor code improvement. 2012-07-17 Tristan Gingold <gingold@adacore.com> * seh_init.c (__gnat_SEH_error_handler): Not compiled anymore on Windows 64 (+ SEH), as it is unused. 2012-07-17 Tristan Gingold <gingold@adacore.com> * treepr.ads (psloc): Declare. * treepr.adb (psloc): New debug procedure to print a sloc. (Print_Sloc): New procedure, from ... (Print_Node_Subtree): ... this. Call Print_Sloc. 2012-07-17 Javier Miranda <miranda@adacore.com> * sem_prag.adb (CPP_Class): Transform obsolescent pragma CPP_Class into CPP convention automatically. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189566 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-16 Tristan Gingold <gingold@adacore.com>charlet2012-07-162-0/+9
| | | | | | | | * decl.c (intrin_return_compatible_p): Map Address to void *. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189536 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-16 Thomas Quinot <quinot@adacore.com>charlet2012-07-163-5/+53
| | | | | | | | | | | | | | | | | | | | * exp_ch9.adb (Ensure_Statement_Present): New subprogram. (Expand_N_Asynchronous_Select, Expand_N_Selective_Accept.Process_Accept_Alternative, Expand_N_Selective_Accept.Process_Delay_Alternative, Expand_N_Timed_Entry_Call): For an alternative with no trailing statements, introduce a null statement to carry the sloc of the initial special statement (accept, delay, or entry call) in the alternative, for coverage analysis purposes. 2012-07-16 Thomas Quinot <quinot@adacore.com> * sem_eval.adb (In_Subrange_Of): Fix typo in test for scalar arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189535 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-16 Robert Dewar <dewar@adacore.com>charlet2012-07-1611-366/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * a-exexpr.adb, freeze.adb, a-exexpr-gcc.adb, a-except-2005.adb, sem_eval.adb, s-fileio.adb: Minor reformatting. 2012-07-16 Javier Miranda <miranda@adacore.com> * sem_prag.adb (Analyze_Pragma): Remove support for obsolescent pragma CPP_Class. * sem_ch13.adb (Analyze_Freeze_Entity): Add missing error on Ada derivations of CPP types. Found updating the tests affected by the removal of pragma CPP_Class. 2012-07-16 Thomas Quinot <quinot@adacore.com> * back_end.adb: Minor reformatting. 2012-07-16 Thomas Quinot <quinot@adacore.com> * exp_ch9.adb (Expand_N_Selective_Accept.Process_Accept_Alternative): Remove junk test that was always true. For the case of no statements following the ACCEPT, jump directly to End_Lab instead of introducing an intermediate jump. (Expand_N_Selective_Accept.Process_Delay_Alternative): Fix predicate testing for presence of statements following the DELAY. that was always true. For the case of no statements following the ACCEPT, jump directly to End_Lab instead of introducing an intermediate jump. (Expand_N_Selective_Accept): Fix incorrect insertion point for end label. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189534 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-16 Thomas Quinot <quinot@adacore.com>charlet2012-07-164-85/+23
| | | | | | | | | | | | | | | * gnat_rm.texi: Minor documentation improvements. 2012-07-16 Yannick Moy <moy@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Allow Pre and Pre'Class aspects on the same declaration. * sem_prag.adb (Chain_PPC): Allow Pre and Pre'Class aspects on the same hierarchy of primitive operations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189533 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-16 Thomas Quinot <quinot@adacore.com>charlet2012-07-1611-178/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * freeze.adb (Check_Component_Storage_Order): Do not reject a nested composite with different scalar storage order if it is byte aligned. 2012-07-16 Thomas Quinot <quinot@adacore.com> * gnat_rm.texi: Update documentation for Scalar_Storage_Order. 2012-07-16 Tristan Gingold <gingold@adacore.com> * a-exexpr.adb (Propagate_Exception): Adjust call to Exception_Traces procedures. * a-exexpr-gcc.adb (Setup_Current_Excep): Now a function that returns an access to the Ada occurrence. (Propagate_GCC_Exception): Adjust calls. * raise.h (struct Exception_Occurrence): Declare. * a-exextr.adb: Remove useless pragma. (Notify_Handled_Exception, Notify_Unhandled_Exception) (Unhandled_Exception_Terminate): Add Excep parameter. * a-except.adb (Notify_Handled_Exception, Notify_Unhandled_Exception) (Unhandled_Exception_Terminate): Add Excep parameter. (Process_Raise_Exception): Adjust calls. * a-except-2005.adb (Notify_Handled_Exception, Notify_Unhandled_Exception) (Unhandled_Exception_Terminate): Add Excep parameter. (Raise_Exception): Calls Raise_Exception_Always. * raise-gcc.c (__gnat_setup_current_excep, __gnat_notify_handled_exception) (__gnat_notify_unhandled_exception): Adjust declarations. (PERSONALITY_FUNCTION): Adjust calls. (__gnat_personality_seh0): Remove warning. 2012-07-16 Javier Miranda <miranda@adacore.com> * sem_eval.adb (Test_Expression_Is_Foldable): Adding documentation. (Eval_Relational_Op): Adding documentation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189532 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-16 Robert Dewar <dewar@adacore.com>charlet2012-07-1613-258/+453
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * freeze.adb, g-debpoo.adb, exp_ch3.adb: Minor reformatting. 2012-07-16 Thomas Quinot <quinot@adacore.com> * s-oscons-tmplt.c: Add definitions of E2BIG and EILSEQ. 2012-07-16 Tristan Gingold <gingold@adacore.com> * a-exexpr.adb (Propagate_Continue): New function replacing Raise_Current_Excep. (Allocate_Occurrence): New function. (Propagate_Exception): Add Excep parameter, remove call to Call_Chain. * a-exexpr-gcc.adb (GNAT_GCC_Exception): Occurrence component is now aliased. (To_GCC_Exception): Convert from Address. (Allocate_Occurrence): Allocate an Unwind exception occurrence. (Setup_Current_Excep): Fill the machine occurrence in case of foreign exception. (Propagate_Exception): Add Excep parameter, remove call to Call_Chain. * a-except.adb (Set_Exception_C_Msg, Set_Exception_Msg): add Excep parameter. (Raise_Exception, Raise_Exception_Always, Raise_Exception_No_Defer): Adjust calls to the above procedures. (Raise_From_Signal_Handler, Raise_With_Location_And_Msg) (Rcheck_PE_Finalize_Raised_Exception): Likewise. * a-except-2005.adb (Set_Exception_C_Msg, Set_Exception_Msg): add Excep parameter. (Propagate_Exception): Likewise. (Allocate_Occurrence): New function. (Raise_Current_Excep): Removed. (Complete_Occurrence): New function to save the call chain. (Complete_And_Propagate_Occurrence): New procedure. (Create_Occurrence_From_Signal_Handler): New function to build an occurrence without propagating it. (Create_Machine_Occurrence_From_Signal_Handler): Likewise, but return the machine occurrence. (Raise_From_Signal_Handler): Use Create_Occurrence_From_Signal_Handler. (Raise_Exception, Raise_Exception_Always, Raise_Exception_No_Defer): Adjust calls to the above procedures. Allocate the occurrence at the beginning. (Raise_With_Location_And_Msg, Raise_With_Msg) (Rcheck_PE_Finalize_Raised_Exceptionm Reraise): Likewise. (Reraise_Occurrence): Use Reraise_Occurrence_Always. (Reraise_Occurrence_Always): Use Reraise_Occurrence_No_Defer. (Reraise_Occurrence_No_Defer): Preserve machine occurrence. (Save_Occurrence): Do not save machine occurrence. * a-except-2005.ads (Exception_Occurrence): Add Machine_Occurrence component. (Null_Occurrence): Consider it. * a-exexda.adb (Set_Exception_C_Msg, Set_Exception_Msg): add Excep parameter. 2012-07-16 Tristan Gingold <gingold@adacore.com> * seh_init.c (__gnat_map_SEH): New function extracted from __gnat_SEH_error_handler. * raise-gcc.c: __gnat_personality_seh0: Directly transforms Windows system exception into GCC one when possible, in order to save stack room (particularly useful when Storage_Error will be propagated). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189530 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-16 Robert Dewar <dewar@adacore.com>charlet2012-07-1612-83/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * a-direct.adb, g-dirope.adb: Minor reformatting. 2012-07-16 Tristan Gingold <gingold@adacore.com> * a-except.ads, a-except-2005.ads: Remove outdated comment. 2012-07-16 Robert Dewar <dewar@adacore.com> * sem_ch6.adb (Subprogram_Name_Greater): Fix algorithm to conform to documentation. 2012-07-16 Ed Schonberg <schonberg@adacore.com> * gnat1drv.adb (Check_Library_Items): Removed, no longer used. 2012-07-16 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Array_Type_Declaration): if component type has invariants, the array type itself requires an invariant procedure. * exp_ch3.ads, exp_ch3.adb (Build_Array_Invariant_Proc): new procedure, to build a checking procedure that applies the invariant check on some type T to each component of an array of T's. Code is similar to the construction of the init_proc for an array, and handles multidimensional arrays by recursing over successive dimensions. 2012-07-16 Hristian Kirtchev <kirtchev@adacore.com> * g-debpoo.adb: Revert previous change. 2012-07-16 Hristian Kirtchev <kirtchev@adacore.com> * freeze.adb (Freeze_Entity): Insert the itype reference to a library-level class-wide subtype after the freeze node of the equivalent record type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189526 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-16 Pascal Obry <obry@adacore.com>charlet2012-07-167-23/+65
| | | | | | | | | | | | | | | | | * s-crtl.ads (mkdir): New routine, support encoding. * adaint.h (__gnat_mkdir): Update spec to pass encoding. * mkdir.c (__gnat_mkdir): Add encoding parameter. * a-direct.adb (Create_Directory): Use CRTL.mkdir, parse encoding in form parameter. * g-dirope.adb (Make_Dir): Update to pass encoding parameter. 2012-07-16 Pascal Obry <obry@adacore.com> * adaint.c: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189525 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/steven2012-07-163-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * system.h (dump_file): Do not define. * tree-pass.h: Include dumpfile.h, which is a new file containing... (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name, dump_file, dump_flags, dump_file_name, get_dump_file_info, struct dump_file_info): all of this, moved to... * dumpfile.h: Here, new file. * tree-dump.h: Include dumpfile.h, but not tree-pass.h. (dump_stmt): Remove prototype for C++ specific function. (dump_enumerated_decls): Move prototype from here... * tree-flow.h (dump_enumerated_decls): ... to here. (get_ref_base_and_extent) Move prototype from here ... * tree.h (get_ref_base_and_extent) ... to here. * tree-ssa-live.c: Do not inclde tree-pretty-print.h, because gimple-pretty-print.h is enough. Do not include tree-dump.h, include timevar.h and dumpfile.h instead. (struct numbered_tree_d, compare_decls_by_uid, dump_enumerated_decls_push, dump_enumerated_decls): Move from here ... * tree-dfa.c:(struct numbered_tree_d, compare_decls_by_uid, dump_enumerated_decls_push, dump_enumerated_decls):... to here. Do not include timevar.h. * tree.c: Do not include timevar.h. * tree-cfg.c: Do not include langhooks.h, tree-pretty-print.h, and timevar.h. (dump_cfg_stats): Use current_function_name. (gimple_cfg2vcg): Likewise. (dump_function_to_file): Likewise. * df-scan.c: Do not include tree-pass.h and timevar.h. Include dumpfile.h. (df_entry_block_bitmap_verify, df_exit_block_bitmap_verify): Do not use print_current_pass. * df-problems.c: Include dumpfile.h. Always define REG_DEAD_DEBUGGING, avoid #ifdef code, because it leads to errors in the code not selected. (df_note_compute): Do not print_rtl_with_bb here. Fix compilation bug if REG_DEAD_DEBUGGING is not 0, get_insns is not available here. * lcm.c: Include dumpfile.h. Remove obsolete include of insn-attr.h. * dojump.c (do_compare_rtx_and_jump): Remove failure printing for missing probability notes. * stmt.c: Include dumpfile.h. (emit_case_decision_tree): Re-enable printing expand details only if TDF_DETAILS. * alias.c, auto-inc-dec.c, bb-reorder.c, caller-save.c, cfg.c, cfgcleanup.c, cfgexpand.c, cfgloop.c, cfgloopmanip.c, cgraph.c, cgraphclones.c, cgraphunit.c, combine.c, combine-stack-adj.c, coverage.c, cprop.c, cse.c, cselib.c, dbgcnt.c, dce.c, df-core.c, dse.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, final.c, function.c, fwprop.c, gcse.c, gimple-fold.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c, graphite-dependences.c, graphite-interchange.c, graphite-optimize-isl.c, graphite-poly.c, graphite-sese-to-poly.c, haifa-sched.c, hw-doloop.c, ifcvt.c, ipa.c, ipa-cp.c, ipa-inline-analysis.c, ipa-inline.c, ipa-inline-transform.c, ipa-prop.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, ira.c, ira-emit.c, jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, loop-unroll.c, loop-unswitch.c, lower-subreg.c, lto-section-out.c, lto-streamer-in.c, matrix-reorg.c, mcf.c, mode-switching.c, modulo-sched.c, omega.c, omp-low.c, passes.c, plugin.c, postreload.c, postreload-gcse.c, predict.c, print-rtl.c, print-tree.c, profile.c, recog.c, ree.c, regcprop.c, reginfo.c, regmove.c, regrename.c, reg-stack.c, reload1.c, reorg.c, sched-rgn.c, sched-vis.c, sel-sched.c, sel-sched-ir.c, store-motion.c, tracer.c, trans-mem.c, tree-affine.c, tree-call-cdce.c, tree-cfgcleanup.c, tree-chrec.c, tree-data-ref.c, tree-diagnostic.c, tree-dump.c, tree-eh.c, tree-flow-inline.h, tree-if-conv.c, tree-into-ssa.c, tree-mudflap.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-outof-ssa.c, tree-predcom.c, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c,, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-loop.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-loop-niter.c, tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-propagate.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-sink.c, tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-ter.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-loop.c, tree-vect-loop-manip.c, tree-vectorizer.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, value-prof.c, var-tracking.c, web.c: Include tree-pass.h only if needed. If tree-pass.h is included, do not include timevar.h and dumpfile.h. If tree-pass.h is not included but dump_file, or dump_flags, or the TDF_* flags are used, include dumpfile.h. If gimple-pretty-print.h is included, don't include tree-pretty-print.h. Remove assorted unnecessary includes. * config/mn10300/mn10300.c, config/c6x/c6x.c, config/ia64/ia64.c, config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c, config/spu/spu.c, config/mep/mep.c, config/i386/i386.c: Include dumpfile.h. * config/rl78/rl78.c: Include dumpfile.h instead of tree-pass.h. * arm/t-arm, avr/t-avr, i386/t-i386, ia64/t-ia64, mep/t-mep, spu/t-spu-elf: Fix dependencies. c-family/ * c-gimplify.c: Include dumpfile.h instead of tree-dump.h. * c-ada-spec.c: Likewise. * c-dump.c (dump_stmt): Move to cp/dump.c, the only user. c/ * c-decl.c: Include dumpfile.h instead of tree-dump.h. * Make-lang.in: Fix dependencies. cp/ * dump.c (dump_stmt): Moved here from c-dump.c. * optimize.c: Include dumpfile.h instead of tree-dump.h. * class.c: Likewise. * decl2.c: Likewise. * Make-lang.in: Fix dependencies. fortran/ * f95-lang.c: Include dumpfile.h instead of tree-dump.h. * Make-lang.in: Fix dependencies. java/ * java-gimplify.c Include dumpfile.h instead of tree-dump.h * Make-lang.in: Fix dependencies. lto/ * lto.c: Do not include timevar.h. * Make-lang.in: Fix dependencies. ada/ * gcc-interface/utils.c: Include timevar.h. * Make-lang.in: Fix dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189519 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-16 Vasiliy Fofanov <fofanov@adacore.com>charlet2012-07-165-41/+142
| | | | | | | | | | | | | | | | | | | * ug_words, vms_data.ads: Document VMS qualifiers for -gnatn1/2 switches. 2012-07-16 Bob Duff <duff@adacore.com> * sinfo.ads: Minor comment fix. 2012-07-16 Bob Duff <duff@adacore.com> * sem_elab.adb (Within_Elaborate_All): Walk the with clauses to find pragmas Elaborate_All that may be found in the transitive closure of the dependences. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189517 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-16 Robert Dewar <dewar@adacore.com>charlet2012-07-165-24/+32
| | | | | | | | | * exp_pakd.adb, freeze.adb, sem_util.adb, vms_data.ads: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189516 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-12 Vasiliy Fofanov <fofanov@adacore.com>charlet2012-07-1213-59/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vms_data.ads: Add VMS qualifiers for -gnatn1/2 switches. 2012-07-12 Thomas Quinot <quinot@adacore.com> * exp_ch5.adb, exp_pakd.adb, rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_aggr.adb (Exp_Aggr.Packed_Array_Aggregate_Handled): Simplify processing for reverse storage order aggregate. (Exp_Pakd.Byte_Swap): New utility routine used by... (Exp_Pakd.Expand_Bit_Packed_Element_Set, Expand_Packed_Element_Reference): For the case of a free-standing packed array with reverse storage order, perform byte swapping. (Rtsfind): Make new entities RE_Bswap_{16,32,64} available. (Freeze.Check_Component_Storage_Order): New utility routine to enforce legality rules for nested composite types whose enclosing composite has an explicitly defined Scalar_Storage_Order attribute. (Sem_Util.In_Reverse_Storage_Order_Object): Renamed from Sem_Util.In_Reverse_Storage_Order_Record, as SSO now applies to array types as well. (Exp_Ch5.Expand_Assign_Array): Remove now unnecessary kludge for change of scalar storage order in assignments. The Lhs and Rhs now always have the same scalar storage order. 2012-07-12 Hristian Kirtchev <kirtchev@adacore.com> * g-debpoo.adb (Allocate): Add local constant No_Element. Initialize the allocated memory chunk to No_Element. 2012-07-12 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly the case of an instance of a child unit where a formal derived type DT is an extension of a type T declared in a parent unit, and the actual in the instance of the child is the type T declared in the parent instance, and that actual is not a derived type. 2012-07-12 Eric Botcazou <ebotcazou@adacore.com> Tristan Gingold <gingold@adacore.com> * system-hpux-ia64.ads: Enable ZCX by default. * gcc-interface/Makefile.in: Use alternate stack on ia64-hpux. Change soext to .so. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189439 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-12 Robert Dewar <dewar@adacore.com>charlet2012-07-1214-910/+1072
| | | | | | | | | | | | | | | | | | | | | | | | | * s-atopri.adb, s-atopri.ads: Minor reformatting. 2012-07-12 Robert Dewar <dewar@adacore.com> * ali.adb: Add circuitry to read new named form of restrictions lines. * debug.adb: Add doc for new -gnatd.R switch (used positional notation for output of restrictions data in ali file). * lib-writ.adb: Implement new named format for restrictions lines. * lib-writ.ads: Add documentation for new named format for restrictions in ali files. * restrict.adb, restrict.ads, sem_prag.adb: Update comments. * rident.ads: Go back to withing System.Rident * s-rident.ads: Add extensive comment on dealing with consistency checking. 2012-07-12 Thomas Quinot <quinot@adacore.com> * par_sco.adb, scos.ads: Emit detailed SCOs for SELECT statements. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189438 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-12 Robert Dewar <dewar@adacore.com>charlet2012-07-127-206/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_disp.adb: Minor reformatting * s-bytswa.ads: Minor comment update. 2012-07-12 Vincent Pucci <pucci@adacore.com> * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Atomic_Load_N replaced by Lock_Free_Read_N. Atomic_Compare_Exchange_N replaced by Lock_Free_Try_Write_N. Renaming of several local variables. For procedure, Expected_Comp declaration moved to the declaration list of the procedure. * rtsfind.ads: RE_Atomic_Compare_Exchange_8, RE_Atomic_Compare_Exchange_16, RE_Atomic_Compare_Exchange_32, RE_Atomic_Compare_Exchange_64, RE_Atomic_Load_8, RE_Atomic_Load_16, RE_Atomic_Load_32, RE_Atomic_Load_64, RE_Atomic_Synchronize, RE_Relaxed removed. RE_Lock_Free_Read_8, RE_Lock_Free_Read_16, RE_Lock_Free_Read_32, RE_Lock_Free_Read_64, RE_Lock_Free_Try_Write_8, RE_Lock_Free_Try_Write_16, RE_Lock_Free_Try_Write_32, RE_Lock_Free_Try_Write_64 added. * s-atopri.adb: New file. * s-atopri.ads (Atomic_Compare_Exchange_8): Renaming of parameters. Import primitive __sync_val_compare_and_swap_1. (Atomic_Compare_Exchange_16): Renaming of parameters. Import primitive __sync_val_compare_and_swap_2. (Atomic_Compare_Exchange_32): Renaming of parameters. Import primitive __sync_val_compare_and_swap_4. (Atomic_Compare_Exchange_64): Renaming of parameters. Import primitive __sync_val_compare_and_swap_8. (Atomic_Load_8): Ptr renames parameter X. (Atomic_Load_16): Ptr renames parameter X. (Atomic_Load_32): Ptr renames parameter X. (Atomic_Load_64): Ptr renames parameter X. (Lock_Free_Read_8): New routine. (Lock_Free_Read_16): New routine. (Lock_Free_Read_32): New routine. (Lock_Free_Read_64): New routine. (Lock_Free_Try_Write_8): New routine. (Lock_Free_Try_Write_16): New routine. (Lock_Free_Try_Write_32): New routine. (Lock_Free_Try_Write_64): New routine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189437 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-12 Robert Dewar <dewar@adacore.com>charlet2012-07-1213-359/+440
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_attr.adb, exp_ch9.adb, sem_ch9.adb, exp_aggr.adb: Minor reformatting. 2012-07-12 Vincent Pucci <pucci@adacore.com> * sem_dim.adb (Analyze_Dimension_Function_Call): Reformatting of error msgs for elementary functions. 2012-07-12 Vincent Pucci <pucci@adacore.com> * sem_attr.adb (Eval_Attribute): Minor reformatting. 2012-07-12 Pascal Obry <obry@adacore.com> * prj-nmsc.adb (Check_Library_Attributes): Allow the same library project in different project tree (different aggregated projects). 2012-07-12 Thomas Quinot <quinot@adacore.com> * s-bytswa.adb, g-bytswa.adb, g-bytswa.ads, s-bytswa.ads: Further reorganization of byte swapping routines. 2012-07-12 Ed Schonberg <schonberg@adacore.com> * sem_disp.adb (Check_Dispatching_Context): Refine legality checks on tagg indeterminate calls to abstract operations, that appear in the context of other calls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189436 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-12 Thomas Quinot <quinot@adacore.com>charlet2012-07-128-209/+336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * s-bytswa.adb (Swapped2.Bswap16): Remove local function, no longer needed. 2012-07-12 Javier Miranda <miranda@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): For attributes 'access, 'unchecked_access and 'unrestricted_access, iff the current instance reference is located in a protected subprogram or entry then rewrite the access attribute to be the name of the "_object" parameter. 2012-07-12 Tristan Gingold <gingold@adacore.com> * raise.h: Revert previous patch: structure is used in init.c by vms. 2012-07-12 Vincent Celier <celier@adacore.com> * make.adb (Binding_Phase): If --subdirs was used, but not -P, change the working directory to the specified subdirectory before invoking gnatbind. (Linking_Phase): If --subdirs was used, but not -P, change the working directory to the specified subdirectory before invoking gnatlink. 2012-07-12 Vincent Pucci <pucci@adacore.com> * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): For a procedure, instead of replacing each Comp reference by a reference to Current_Comp, make a renaming Comp of Current_Comp that rewrites the original renaming generated by the compiler during the analysis. Move the declarations of the procedure inside the generated block. (Process_Stmts): Moved in the body of Build_Lock_Free_Unprotected_Subprogram_Body. (Process_Node): Moved in the body of Build_Lock_Free_Unprotected_Subprogram_Body. * sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict any non-elementary out parameters in protected procedures. 2012-07-12 Thomas Quinot <quinot@adacore.com> * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Scalar_Storage_Order): Attribute applies to base type only. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189435 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-12 Ed Schonberg <schonberg@adacore.com>charlet2012-07-1211-287/+561
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_aggr.adb (Convert_To_Positional): Increase acceptable size of static aggregate when Static_Elaboration_Desired is requested. Add a warning if the request cannot be satisfied either because some components or some array bounds are non-static. 2012-07-12 Thomas Quinot <quinot@adacore.com> * exp_pakd.adb: Minor reformatting. 2012-07-12 Tristan Gingold <gingold@adacore.com> * tracebak.c: Fix warnings. * raise-gcc.c (__gnat_adjust_context): New function (__gnat_personality_seh0): Call __gnat_adjust_context to adjust PC in machine frame for exceptions that occur in the current function. 2012-07-12 Thomas Quinot <quinot@adacore.com> * g-bytswa.adb, g-bytswa.ads, s-bytswa.adb, s-bytswa.ads, Makefile.rtl: Move GNAT.Byte_Swapping to System (with a renaming under GNAT) so that it is usable in expanded code. 2012-07-12 Tristan Gingold <gingold@adacore.com> * s-osinte-hpux.ads: Increase alternate stack size on hpux. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189434 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-12 Javier Miranda <miranda@adacore.com>charlet2012-07-126-109/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_ch3.adb (Make_Neq_Body): Fix typo in comment. 2012-07-12 Eric Botcazou <ebotcazou@adacore.com> * tb-gcc.c (trace_callback): On IA-64/HP-UX, use workaround only if USE_LIBUNWIND_EXCEPTIONS is defined. * init.c: Further tweaks for IA-64/HP-UX. 2012-07-12 Tristan Gingold <gingold@adacore.com> * raise-gcc.c: Do not include unwind-dw2-fde.h. Adjust comments. (db_region_for): Second argument is ip. Do not recompute ip. (action_kind): Remove typedef, add unhandler enum const. (action_descriptor): Adjust type of kind field. (db_action_for): Second argument is ip, do not recompute it. (get_call_site_action_for): First argument is call_site, do not recompute it. Remove useless return. (is_handled_by): Now return enum action_kind. Handle GNAT_ALL_OTHERS first. Return unhandler for GNAT_UNHANDLED_OTHERS. (get_action_description_for): First argument is now ip, do not recompute it. Adjust code for call to is_handled_by. (__gnat_notify_unhandled_exception): Add prototype. (PERSONALITY_FUNCTION): Call get_ip_from_context. Adjust calls. Handle unhandler case. (__gnat_cleanupunwind_handler): Add comments, add ATTRIBUTE_UNUSED on arguments. (__gnat_Unwind_RaiseException, __gnat_Unwind_ForcedUnwind): Define only once. * raise.h: Makes struct Exception_Data opaque. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189433 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-12 Robert Dewar <dewar@adacore.com>charlet2012-07-127-40/+273
| | | | | | | | | | | | | | | | | * make.adb, sem_ch9.adb, prj.adb, s-rident.ads, snames.ads-tmpl: Minor reformatting. 2012-07-12 Javier Miranda <miranda@adacore.com> * exp_ch3.adb (Is_User_Defined_Equality): New subprogram. (Make_Neq_Body): New subprogram. (Make_Predefined_Primitive_Specs): Adding local variable Has_Predef_Eq_ Renaming to ensure that we enable the machinery which handles renamings of predefined primitive operators. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189432 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-09 Pascal Obry <obry@adacore.com>charlet2012-07-093-9/+63
| | | | | | | | | | | | | | * prj.adb (For_Every_Project_Imported_Context): Make sure we callback with the project having sources. Minor reformatting. 2012-07-09 Eric Botcazou <ebotcazou@adacore.com> * make.adb: Fix typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189385 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove duplicate entries.ebotcazou2012-07-091-3192/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189381 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-09 Vincent Pucci <pucci@adacore.com>charlet2012-07-0912-45/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch9.adb (Check_Node): Allow attributes that denote static function for lock-free implementation. (Is_Static_Function): New routine. 2012-07-09 Tristan Gingold <gingold@adacore.com> * tracebak.c: Adjust skip_frames on Win64. 2012-07-09 Tristan Gingold <gingold@adacore.com> * init.c: Add __gnat_adjust_context_for_raise for ia64/hpux. * raise-gcc.c: __gnat_cleanupunwind_handler: Do not call _Unwind_GetGR on hpux when using libgcc unwinder. Part of 2012-07-09 Vincent Pucci <pucci@adacore.com> * exp_attr.adb, sem_attr.adb: Minor reformatting. * par-ch13.adb, par-ch4.adb, par-util.adb: Reformatting considering that internal attribute names are not defined anymore in the main attribute names list. * snames.adb-tmpl (Get_Attribute_Id): Special processinf for names CPU, Dispatching_Domain and Interrupt_Priority. (Is_Internal_Attribute_Name): Minor reformatting. * snames.ads-tmpl: New list of internal attribute names. Internal attributes moved at the end of the attribute Id list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189380 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-09 Robert Dewar <dewar@adacore.com>charlet2012-07-0914-43/+72
| | | | | | | | | | | | | | | | | | | | * freeze.adb: Minor code reorganization (use Ekind_In). * exp_attr.adb, sem_ch9.adb par-ch4.adb, s-taprop-mingw.adb, sem_attr.adb, exp_ch8.adb, snames.adb-tmpl, par-util.adb, sem_ch13.adb, snames.ads-tmpl: Minor reformatting. 2012-07-09 Tristan Gingold <gingold@adacore.com> * raise-gcc.c: Adjust previous patch. 2012-07-09 Vincent Celier <celier@adacore.com> * make.adb (Compilation_Phase): Do not build libraries in Codepeer mode (do not call Library_Phase). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189379 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-09 Ed Schonberg <schonberg@adacore.com>charlet2012-07-0910-80/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_ch13.adb: Extend previous change to elementary types. 2012-07-09 Javier Miranda <miranda@adacore.com> * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): Reverse previous patch since unconditionally handling as renaming_as_body renamings of predefined dispatching equality and unequality operator cause visibility problems with private overridings of the equality operator (see ACATS C854001). 2012-07-09 Vincent Pucci <pucci@adacore.com> * exp_attr.adb (Signal_Bad_Attribute): Raise Program_Error in case of internal attribute names (already rejected by the parser). * par-ch13.adb (P_Representation_Clause): Complain if an internal attribute name that comes from source occurs. * par-ch4.adb (P_Name): Complain if an internal attribute name occurs in the context of an attribute reference. * par-util.adb (Signal_Bad_Attribute): Don't complain about mispelling attribute with internal attributes. * sem_attr.adb (Analyze_Attribute): Raise Program_Error in case of internal attribute names (already rejected by the parser). * snames.adb-tmpl (Is_Internal_Attribute_Name): New routine. * snames.ads-tmpl: Attributes CPU, Dispatching_Domain and Interrupt_Priority are marked as INT attributes since they don't denote real attribute and are only used internally in the compiler. (Is_Internal_Attribute_Name): New routine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189378 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-09 Thomas Quinot <quinot@adacore.com>charlet2012-07-0917-291/+943
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * einfo.adb (Set_Reverse_Storage_Order): Update assertion, flag is now valid for array types as well. 2012-07-09 Tristan Gingold <gingold@adacore.com> * tracebak.c: Implement __gnat_backtrace for Win64 SEH. 2012-07-09 Robert Dewar <dewar@adacore.com> * einfo.ads: Minor reformatting. 2012-07-09 Javier Miranda <miranda@adacore.com> * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): Handle as renaming_as_body renamings of predefined dispatching equality and unequality operators. 2012-07-09 Robert Dewar <dewar@adacore.com> * rident.ads: Do not instantiate r-ident.ads, this is now an independent unit. 2012-07-09 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Write_DT): Avoid runtime crash of this debugging routine. * sem_disp.adb (Find_Dispatching_Time): Protect this routine against partially decorated entities. 2012-07-09 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Check_Size): Reject a size clause that specifies a value greater than Int'Last for a scalar type. 2012-07-09 Vincent Pucci <pucci@adacore.com> * sem_ch9.adb (Allows_Lock_Free_Implementation): type must support atomic operation moved to the protected body case. No non-elementary out parameter moved to the protected declaration case. Functions have only one lock-free restriction. (Analyze_Protected_Type_Declaration): Issue a warning when Priority given with Lock_Free. 2012-07-09 Vincent Pucci <pucci@adacore.com> * sem_dim.adb: Grammar of aspect Dimension fixed. 2012-07-09 Vincent Pucci <pucci@adacore.com> * freeze.adb (Freeze_Record_Type): Code reorg in order to avoid pushing and popping the scope stack whenever a delayed aspect occurs. 2012-07-09 Gary Dismukes <dismukes@adacore.com> * s-os_lib.ads: Remove pragma Elaborate_Body, as this is now unnecessary due to recently added pragma Preelaborate. 2012-07-09 Jose Ruiz <ruiz@adacore.com> * s-taprop-mingw.adb (Set_Priority): Remove the code that was previously in place to reorder the ready queue when a task drops its priority due to the loss of inherited priority. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189377 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-09 Robert Dewar <dewar@adacore.com>charlet2012-07-0915-39/+69
| | | | | | | | | | | | | | | | | | | | * layout.adb, i-cstrea.ads, a-ststio.ads, prj-util.ads, sem_cat.adb, s-commun.ads, s-ficobl.ads, s-os_lib.ads, s-fileio.ads: Minor reformatting. 2012-07-09 Eric Botcazou <ebotcazou@adacore.com> * raise-gcc.c: Update comments. Fix typo. 2012-07-09 Thomas Quinot <quinot@adacore.com> * einfo.adb, einfo.ads, sem_attr.adb, sem_ch13.adb: Attribute Scalar_Storage_Order can be defined or queried for array types as well as record types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189376 138bc75d-0d04-0410-961f-82ee72b054a4