aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/init.c
AgeCommit message (Collapse)AuthorFilesLines
2019-01-08[Ada] Bump copyright years to 2019Pierre-Marie de Rodat1-1/+1
From-SVN: r267683
2018-05-22[Ada] Don't define HAVE_ADJUST_CONTEXT_FOR_RAISE on VxWorks7 for AArch64Doug Rupp1-1/+1
2018-05-22 Doug Rupp <rupp@adacore.com> gcc/ada/ * init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for AArch64. From-SVN: r260534
2018-04-27re PR ada/85540 (gcc/ada/init.c:1282: suspicious expression ?)Eric Botcazou1-1/+1
PR ada/85540 * init.c (__gnat_handle_vms_condition): Add missing parentheses. From-SVN: r259698
2018-01-11[Ada] Bump copyright notices to 2018Arnaud Charlet1-1/+1
2018-01-11 Arnaud Charlet <charlet@adacore.com> gcc/ada/ Bump copyright notices to 2018. From-SVN: r256519
2018-01-11[Ada] Enable sigtramp for aarch64-vx7Doug Rupp1-2/+2
2018-01-11 Doug Rupp <rupp@adacore.com> gcc/ada/ * init.c (vxworks): Add macro checks for __aarch64__. From-SVN: r256494
2017-11-09[multiple changes]Pierre-Marie de Rodat1-0/+4
2017-11-09 Pascal Obry <obry@adacore.com> * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle only for foreign threads. We initialize the thread handle only if not yet initialized. This happens in Enter_Task for foreign threads only. But for native threads (Ada tasking) we do want to keep the real handle (from Create_Task) to be able to free the corresponding resources in Finalize_TCB (CloseHandle). 2017-11-09 Yannick Moy <moy@adacore.com> * sem_attr.adb (Analyze_Attribute): Default initialize P_Type, P_Base_Type. (Error_Attr_P): Fix name in pragma No_Return. (Unexpected_Argument): Add pragma No_Return. (Placement_Error): Add pragma No_Return. 2017-11-09 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the dispatch table is statically built. (Make_DT): Declare constant the Interface_Table object associated with an statically built dispatch table. For this purpose the Offset_To_Top value of each interface is computed using the dummy object. * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing the Offset_To_Top field of secondary dispatch tables when the dispatch table is statically built. (Initialize_Tag): Do not generate calls to Register_Interface_Offset when the dispatch table is statically built. * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst: Document the new GNAT restriction Static_Dispatch_Tables. * gnat_rm.texi: Regenerate. 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com> * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations to avoid a dormant bug. 2017-11-09 Jerome Lambourg <lambourg@adacore.com> * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0, as such capability is not available on the OS. * link.c: Make sure linker options for QNX are correct. * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread. * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings in particular a workaround with locks priority ceiling where a higher priority task is allowed to lock a lower ceiling priority lock. This also fixes the scheduling of FIFO tasks when the priority of a task is lowered. * libgnat/system-qnx-aarch64.ads: Fix priority ranges. 2017-11-09 Yannick Moy <moy@adacore.com> * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive message. * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true condition. * namet.adb (Copy_One_Character): Add assumption for static analysis, as knowledge that Hex(2) is in the range 0..255 is too complex for CodePeer. (Finalize): Add assumption for static analysis, as the fact that there are symbols in the table depends on a global invariant at this point in the program. * set_targ.adb (Check_Spaces): Justify CodePeer false positive message. * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always true. From-SVN: r254573
2017-11-08[multiple changes]Pierre-Marie de Rodat1-1/+99
2017-11-08 Piotr Trojanek <trojanek@adacore.com> * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Move declaration to package body. 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com> * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain the type of the renaming from its defining entity, rather then the subtype mark as there may not be a subtype mark. 2017-11-08 Jerome Lambourg <lambourg@adacore.com> * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads, libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb, libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads, libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c, terminals.c: Initial port of GNAT for aarch64-qnx 2017-11-08 Elisa Barboni <barboni@adacore.com> * exp_util.adb (Find_DIC_Type): Move... * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here. 2017-11-08 Justin Squirek <squirek@adacore.com> * sem_res.adb (Resolve_Allocator): Add info messages corresponding to the owner and corresponding coextension. 2017-11-08 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the following separate procedures. (Resolve_Delta_Array_Aggregate): Previous code form Resolve_Delta_Aggregate. (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest ARG decisions on the legality rules for delta aggregates for records: in the case of a variant record, components from different variants cannot be specified in the delta aggregate, and this must be checked statically. From-SVN: r254547
2017-09-13Minor edits.Arnaud Charlet1-1/+1
From-SVN: r252060
2017-04-25[multiple changes]Arnaud Charlet1-1/+1
2017-04-25 Javier Miranda <miranda@adacore.com> * exp_ch3.adb (Build_Initialization_Call): Handle subtypes of private types when searching for the underlying full view of a private type. 2017-04-25 Javier Miranda <miranda@adacore.com> * sem_res.adb (Set_Mixed_Mode_Operand): A universal real conditional expression can appear in a fixed-type context and must be resolved with that context to facilitate the code generation to the backend. 2017-04-25 Ed Schonberg <schonberg@adacore.com> * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag, to indicate whether during inline processing, when some unit U1 appears in the context of a unit U2 compiled for instantiation or inlining purposes, the body of U1 needs to be compiled as well. * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if context is a package declaration. * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration, Analyze_Generic_Package_Declaration): ditto. * inline.adb (Analyze_Inlined_Bodies): Check Body_Needed_For_Inlining. 2017-04-25 Ed Schonberg <schonberg@adacore.com> * par.adb (Current_Assign_Node): Global variable use to record the presence of a target_name in the right hand side of the assignment being parsed. * par-ch4.adb (P_Name): If the name is a target_name, mark the enclosing assignment node accordingly. * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node appropriately. * sem_ch5.adb (Analyze_Assignment): Disable expansion before analyzing RHS if the statement has target_names. * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle properly choices that are subtype marks. * exp_ch5.adb: Code cleanup. 2017-04-25 Bob Duff <duff@adacore.com> * s-memory.adb: Add a comment regarding efficiency. * atree.adb: Fix the assertion, and combine 2 assertions into one, "the source has an extension if and only if the destination does." * sem_ch3.adb, sem_ch13.adb: Address ??? comments. 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek> * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits conversion. 2017-04-25 Doug Rupp <rupp@adacore.com> * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp handling for ppc64-vx7. * sigtramp-vxworks-target.inc [SIGTRAMP_BODY]: Add section for ppc64-vx7. From-SVN: r247146
2017-04-25[multiple changes]Arnaud Charlet1-1/+1
2017-04-25 Tristan Gingold <gingold@adacore.com> * s-mmap.ads (Data): Add pragma Inline. 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com> * checks.adb (Insert_Valid_Check): Do not use a renaming to alias a volatile name because this will lead to multiple evaluations of the volatile name. Use a constant to capture the value instead. 2017-04-25 Doug Rupp <rupp@adacore.com> * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7. 2017-04-25 Ed Schonberg <schonberg@adacore.com> * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression): Add out parameter to indicate to caller that a wrapper must be constructed for an inherited primitive whose inherited pre/postcondition has called to overridden primitives. * freeze.adb (Check_Inherited_Conditions): Build wrapper body for inherited primitive that requires it. * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are legal primitive operations and belong to the list of bodies generated after the freeze point of a type. * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature of Build_Class_Wide_Expression. * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure to construct the specification of the wrapper subprogram created for an inherited operation. From-SVN: r247140
2016-10-12[multiple changes]Arnaud Charlet1-2/+2
2016-10-12 Jerome Lambourg <lambourg@adacore.com> * init.c: Make sure to call finit on x86_64-vx7 to reinitialize the FPU unit. 2016-10-12 Arnaud Charlet <charlet@adacore.com> * lib-load.adb (Load_Unit): Generate an error message even when Error_Node is null. 2016-10-12 Ed Schonberg <schonberg@adacore.com> * lib-writ.adb (Write_ALI): Disable optimization related to transitive limited_with clauses for now. 2016-10-12 Javier Miranda <miranda@adacore.com> * sem_attr.adb (Analyze_Attribute_Old_Result): Generating C code handle 'old located in inlined _postconditions procedures. (Analyze_Attribute [Attribute_Result]): Handle 'result when rewriting the attribute as a reference to the formal parameter _Result of inlined _postconditions procedures. 2016-10-12 Tristan Gingold <gingold@adacore.com> * s-rident.ads (Profile_Info): Remove Max_Protected_Entries restriction from GNAT_Extended_Ravenscar * sem_ch9.adb (Analyze_Protected_Type_Declaration): Not a controlled type on restricted runtimes. 2016-10-12 Gary Dismukes <dismukes@adacore.com> * sem_ch3.adb (Derive_Subprogram): Add test for Is_Controlled of Parent_Type when determining whether an inherited subprogram with one of the special names Initialize, Adjust, or Finalize should be derived with its normal name even when inherited as a private operation (which would normally result in the inherited operation having a special "hidden" name). 2016-10-12 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Call): If a function call returns a limited view of a type replace it with the non-limited view, which must be available when compiling call. This was already done elsewhere for non-overloaded calls, but needs to be done after resolution if function name is overloaded. 2016-10-12 Javier Miranda <miranda@adacore.com> * a-tags.adb (IW_Membership [private]): new overloaded subprogram that factorizes the code needed to check if a given type implements an interface type. (IW_Membership [public]): invoke the new internal IW_Membership function. (Is_Descendant_At_Same_Level): Fix this routine to implement RM 3.9 (12.3/3) From-SVN: r241036
2016-10-12[multiple changes]Arnaud Charlet1-1/+1
2016-10-12 Tristan Gingold <gingold@adacore.com> * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Add support for a secondary procedure in case of missing Ada.Calendar.Delays * rtsfind.ads (RTU_Id): Add System_Relative_Delays. (RE_Id): Add RO_RD_Delay_For. * rtsfind.adb (Output_Entity_Name): Handle correctly units RO_XX. * s-rident.ads: Remove No_Relative_Delays restriction for GNAT_Extended_Ravenscar. 2016-10-12 Ed Schonberg <schonberg@adacore.com> * sem_elab.adb (Within_Initial_Condition): When deternining the context of the expression, use the original node if it is a pragma, because Check pragmas are rewritten as conditionals when assertions are not enabled. 2016-10-12 Bob Duff <duff@adacore.com> * spitbol_table.ads, spitbol_table.adb (Adjust, Finalize): Add "overriding". 2016-10-12 Bob Duff <duff@adacore.com> * a-strunb-shared.ads, a-strunb-shared.adb (Finalize): Make sure Finalize is idempotent. (Unreference): Check for Empty_Shared_String, in case the reference count of the empty string wraps around. Also add "not null" in various places that can't be null. 2016-10-12 Jerome Lambourg <lambourg@adacore.com> * init.c: Fix sigtramp with the x86_64-vx7-vxsim target on Windows host. 2016-10-12 Vadim Godunko <godunko@adacore.com> * s-os_lib.ads (Is_Owner_Readable_File): Renamed from Is_Readable_File. (Is_Owner_Writable_File): Renamed from Is_Writable_File. (Is_Readable_File): Renames Is_Read_Accessible_File. (Is_Writable_File): Renames Is_Write_Accessible_File. From-SVN: r241035
2016-10-11ctrl_c.c: Do not use macro SA_RESTART for DJGPP.Andris Pavenis1-0/+8
2016-10-11 Andris Pavenis <andris.pavenis@iki.fi> * ctrl_c.c: Do not use macro SA_RESTART for DJGPP. * gsocket.h: Do not support sockets for DJGPP. * init.c (__gnat_install_handler): Implememt for DJGPP * sysdep.c: Include <io.h> for DJGPP (_setmode): Define to setmode for DJGPP (__gnat_set_mode): Add implementation for DJGPP (__gnat_localtime_tzoff): Use localtime_r for DJGPP * terminals.c: Add DJGPP to list of unsupported platforms. * env.c (__gnat_clearenv): use _gnat_unsetenv on all entries for DJGPP From-SVN: r240997
2016-04-27[multiple changes]Arnaud Charlet1-2/+6
2016-04-27 Arnaud Charlet <charlet@adacore.com> * aa_util.adb, aa_util.ads: Removed, no longer used. 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Pragma): An object renaming declaration resulting from the expansion of an object declaration is a suitable context for pragma Ghost. 2016-04-27 Doug Rupp <rupp@adacore.com> * init.c: Refine last checkin so the only requirement is the signaling compilation unit is compiled with the same mode as the compilation unit containing the initial landing pad. 2016-04-27 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal specifications for Default_Iterator, including overloaded cases where no interpretations are legal, and return types that are not iterator types. 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch5.adb (Expand_N_Assignment_Statement): Do not install an accessibility check when the left hand side of the assignment denotes a container cursor. * exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed. * sem_ch4.adb (Find_Indexing_Operations): New routine. (Try_Container_Indexing): Code cleanup. From-SVN: r235505
2016-04-27[multiple changes]Arnaud Charlet1-1/+6
2016-04-27 Arnaud Charlet <charleT@adacore.com> * sinput-l.ads, sem_ch13.adb: Minor editing. 2016-04-27 Doug Rupp <rupp@adacore.com> * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]: Bump the pc so the lower order bit is set. 2016-04-27 Ed Schonberg <schonberg@adacore.com> * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is enabled, report an empty range in a case construct. From-SVN: r235503
2016-04-18[multiple changes]Arnaud Charlet1-28/+16
2016-04-18 Ed Schonberg <schonberg@adacore.com> * sem_disp.adb (Check_Dispatching_Call): Major rewriting to handle some complex cases of tag indeterminate calls that are actuals in other dispatching calls that are themselves tag indeterminate. (Check_Dispatching_Context): Add parameter to support recursive check for an enclosing construct that may provide a tag for a tag-indeterminate call. 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add global variables Task_Input_Seen and Task_Output_Seen. (Analyze_Global_Item): Detect an illegal use of the current instance of a single protected/task type in a global annotation. (Analyze_Input_Output): Inputs and output related to the current instance of a task unit are now tracked. (Check_Usage): Require the presence of the current instance of a task unit only when one input/output is available. (Current_Task_Instance_Seen): New routine. (Is_CCT_Instance): New parameter profile. Update the comment on usage. The routine now properly recognizes several cases related to single protected/task types. 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com> * freeze.adb (Freeze_Entity): Use New_Freeze_Node to create a brand new freeze node. This handles a case where an ignored Ghost context is freezing something which is not ignored Ghost and whose freeze node should not be removed from the tree. (New_Freeze_Node): New routine. 2016-04-18 Jerome Lambourg <lambourg@adacore.com> * sigtramp.h (__gnat_set_is_vxsim) New function to tell sigtramp-vxworks to handle vxsim signal contexts. * sigtramp-vxworks.c (__gnat_sigtramp) Take into account the differences in the sigcontext structure between the expected regular x86 or x86_64 ones and the ones received in case of exexution on the vxworks simulator. * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide this information to sigtramp-vxworks.c. Remove the old mechanism for vxsim. * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete. 2016-04-18 Eric Botcazou <ebotcazou@adacore.com> * exp_ch3.adb (Inline_Init_Proc): New function returning whether the initialization procedure of a type should be inlined. Return again True for controlled type themselves. (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc. (Build_Record_Init_Proc): Likewise. From-SVN: r235110
2016-04-18sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack alignment for ↵Jerome Lambourg1-35/+20
x86_64. 2016-04-18 Jerome Lambourg <lambourg@adacore.com> * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack alignment for x86_64. * init.c: Better fix for guard page reset on x86_64-vx7. Do not try to retrieve the page that actually raised the signal as the probing mechanism used on x86_64 do not allow such retrieval. We thus just test if the guard page is active, and re-activate it if not. From-SVN: r235102
2016-04-18[multiple changes]Arnaud Charlet1-46/+87
2016-04-18 Arnaud Charlet <charlet@adacore.com> * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition added. 2016-04-18 Jerome Lambourg <lambourg@adacore.com> * affinity.c: Use the proper type for task id. * init.c (__gnat_inum_to_ivec): ivec is a pointer. From-SVN: r235101
2015-11-25[multiple changes]Arnaud Charlet1-5/+5
2015-11-25 Arnaud Charlet <charlet@adacore.com> * exp_util.adb (Remove_Side_Effects): Minimize extra temporaries and use of 'Reference when needed. 2015-11-25 Doug Rupp <rupp@adacore.com> * sigtramp-vxworks-target.inc (__x86_64__): Restore context for the sake of uniformity. * init.c (__gnat_inum_to_ivec): Add some casting to avoid warnings when sizeof(long) != sizeof(int) 2015-11-25 Yannick Moy <moy@adacore.com> * lib-xref-spark_specific.adb (SPARK_Entities): Add entries for consideration. (Add_SPARK_Scope): Take tasks into account. (Detect_And_Add_SPARK_Scope): Take tasks into account. (Enclosing_Subprogram_Or_Library_Package): Take tasks into account. From-SVN: r230878
2015-11-25[multiple changes]Arnaud Charlet1-8/+12
2015-11-25 Jerome Lambourg <lambourg@adacore.com> * init.c: Enable the signal trampoline on x86_64-vx7 * sigtramp-vxworks-target.inc: Implement the signal trampoline for x86_64 * tracebak.c: Remove the hook to use the generic unwinder on x86_64-vx7. 2015-11-25 Vincent Celier <celier@adacore.com> * gnatcmd.adb: When "gnat name -P" is called, invoke gprname directly if available. From-SVN: r230875
2015-11-25init.c (__gnat_is_stack_guard): Do not use mach calls for IOS simulator.Tristan Gingold1-2/+3
2015-11-25 Tristan Gingold <gingold@adacore.com> * init.c (__gnat_is_stack_guard): Do not use mach calls for IOS simulator. From-SVN: r230874
2015-11-13[multiple changes]Arnaud Charlet1-16/+11
2015-11-13 Eric Botcazou <ebotcazou@adacore.com> * sigtramp-ios.c, init.c: Minor cosmetic tweaks. 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com> * s-gloloc.adb, g-debpoo.adb: Minor reformatting. 2015-11-13 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Iterator_Specification): Improve error message for the case the iterable name (array or container) is a component that depends on a discriminant. 2015-11-13 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Indicate_Name_And_Type): If the analysis of one interpretation succeeds, set type of name in call, for completeness. (Try_Container_Indexing): If there are multiple indexing functions, collect possible interpretations that are compatible with given parameters, and add implicit dereference types when present. * sem_util.adb (Build_Explicit_Dereference): If the expression is an overloaded function call use the given discriminant to resolve the call, and set properly the type of the call and of the resulting dereference. 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Pragma): Pragma Constant_After_Elaboration can now apply to a variable without an initialization expression. 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch9.adb (Add_Matching_Formals): Parameter Actuals is now of mode IN OUT. Create a new list when list Actuals is not present. (Build_Contract_Wrapper): Create the wrapper only when the entry has at least on checked contract case or pre/postcondition. Ensure that the call to the original entry lacks an actual parameter list when the entry appears without formal parameters. (Expand_Entry_Declaration): Code cleanup. 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Continue the analysis after encountering an illegal aspect Part_Of. 2015-11-13 Ed Schonberg <schonberg@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference, case Overlaps_Storage): Add copies for nodes that represent the integer addresses of the two actuals, to prevent identical nodes in the tree, which the backend cannot handle properly. From-SVN: r230316
2015-11-13[multiple changes]Arnaud Charlet1-13/+15
2015-11-13 Bob Duff <duff@adacore.com> * sem_ch6.adb (Check_Private_Overriding): Change name of Parent_Is_Private to be Overrides_Private_Part_Op, and use Unit_Declaration_Node. 2015-11-13 Bob Duff <duff@adacore.com> * sinfo.ads: Minor comment fix. * sem_ch6.adb: Minor reformatting. 2015-11-13 Jerome Lambourg <lambourg@adacore.com> * tracebak.c: Do not use the GCC Unwinder to retrieve traceback for x86_64-vx7. 2015-11-13 Eric Botcazou <ebotcazou@adacore.com> * init.c [Darwin/arm64]: Fix typo. * sigtramp-armios.c: Remove. * sigtramp-ios.c: New file. 2015-11-13 Doug Rupp <rupp@adacore.com> * s-stchop-vxworks.adb (Set_Stack_Limit_For_Current_Task): Set stack limit to 12000 decimal vice 12000 hexadecimal. From-SVN: r230315
2015-11-13[multiple changes]Arnaud Charlet1-61/+27
2015-11-13 Eric Botcazou <ebotcazou@adacore.com> * init.c [Darwin/arm64]: Move __gnat_sigtramp implementation to... (__gnat_map_signal): New function. (__gnat_error_handler): Adjust the context and call above function. * sigtramp-armios.c: ...here. New file. 2015-11-13 Arnaud Charlet <charlet@adacore.com> * bcheck.adb (Check_Consistent_Restrictions): Do not check consistency of No_Dependence for runtime units. 2015-11-13 Tristan Gingold <gingold@adacore.com> * s-rident.ads (Restriction_Id): Add Pure_Barriers. * restrict.ads (Implementation_Restriction): Add Pure_Barriers. * exp_ch9.adb (Expand_Entry_Barrier): Create Is_Simple_Barrier_Name function, add Is_Pure_Barrier and Check_Pure_Barriers. 2015-11-13 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Get_Cursor_Type): To determine whether a function First is the proper Iterable primitive, use the base type of the first formal rather than the type. This is needed in the unusual case where the Iterable aspect is specified for an integer type. From-SVN: r230305
2015-11-13[multiple changes]Arnaud Charlet1-0/+1
2015-11-13 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Constant_Indexing_OK): If the indexing is the prefix of a procedure call assume that constant indexing is not chosen. 2015-11-13 Eric Botcazou <ebotcazou@adacore.com> * sigtramp.h: Fix formatting throughout, do not include other headers, add missing preprocessor condition and 'extern' keywords. * sigtramp-armdroid.c: Include <sys/ucontext.h>. * init.c [Android]: Likewise. From-SVN: r230304
2015-11-13[multiple changes]Arnaud Charlet1-10/+25
2015-11-13 Eric Botcazou <ebotcazou@adacore.com> * init.c [Darwin/arm64] (__gnat_sigtramp): Do not increment PC, fix CFI and add return sequence. 2015-11-13 Ed Schonberg <schonberg@adacore.com> * exp_fixd.adb (Expand_Convert_Float_To_Fixed): If the conversion comes from an attribute reference 'Round, the operation must round and not truncate. * sem_res.adb, sem_ch6.adb: Minor editing. From-SVN: r230302
2015-11-12[multiple changes]Arnaud Charlet1-0/+39
2015-11-12 Bob Duff <duff@adacore.com> * impunit.adb, lib-xref.ads, restrict.ads, scos.ads, sem_attr.ads, types.ads: Get rid of some global variables. * output.adb, output.ads: Move some global variables to the body. 2015-11-12 Yannick Moy <moy@adacore.com> * lib-xref-spark_specific.adb (Is_Constant_Object_Without_Variable_Input): Add special case for imported constants. 2015-11-12 Philippe Gil <gil@adacore.com> * g-debpoo.adb (Allocate): Avoid having allocations not handled. 2015-11-12 Ed Schonberg <schonberg@adacore.com> * checks.adb (Apply_Scalar_Range_Check): If the expression is a real literal and the context type has static bounds, remove range check when possible. 2015-11-12 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Collect_Primitive_Operations): If the type is derived from a type declared elsewhere that has an incomplete type declaration, the primitives are found in the scope of the type nat that of its ancestor. 2015-11-12 Arnaud Charlet <charlet@adacore.com> * switch-c.adb, debug.adb, osint-c.adb, gnat1drv.adb: Remove -gnatd.V debug switch. * exp_aggr.adb, exp_util.adb: Fix typos. 2015-11-12 Jerome Lambourg <lambourg@adacore.com> * init.c: Properly adjust PC values in case of signals. 2015-11-12 Bob Duff <duff@adacore.com> * sem_prag.adb (Check_Arg_Is_Library_Level_Local_Name): A pragma that comes from an aspect does not "come from source", so we need to test whether it comes from an aspect. From-SVN: r230253
2015-11-12[multiple changes]Arnaud Charlet1-2/+3
2015-11-12 Jerome Lambourg <lambourg@adacore.com> * init.c: Do not try to mess with the MSR values in RTP mode: not needed and forbidden. 2015-11-12 Ed Schonberg <schonberg@adacore.com> * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install full view of a type that has pragma Stream_Convert, because this indicates special processing for the stream operations of the type. From-SVN: r230240
2015-11-12[multiple changes]Arnaud Charlet1-2/+2
2015-11-12 Gary Dismukes <dismukes@adacore.com> * exp_ch5.adb, sem_ch3.adb, exp_util.ads, inline.adb, freeze.adb, sem_util.adb, sem_util.ads, par-ch6.adb, sem_elab.adb: Minor reformatting and a typo fix. 2015-11-12 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Preanalyze_Actuals): Add guard on use of Incomplete_Actuals, which are only stored for a package instantiation, in order to place the instance in the body of the enclosing unit. 2015-11-12 Ed Schonberg <schonberg@adacore.com> * exp_intr.adb: Add legality checks on calls to a Generic_Dispatching_Constructor: the given tag must be defined, it cannot be the tag of an abstract type, and its accessibility level must not be greater than that of the constructor. 2015-11-12 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Try_Container_Indexing, Constant_Indexing_OK): If the context is an overloaded call, assume that Constant_Indexing is not OK if an interpretation has an assignable parameter corresponding to the indexing expression. 2015-11-12 Jerome Lambourg <lambourg@adacore.com> * init.c (__gnat_error_handler): Force the SPE bit of the MSR when executing on e500v2 CPU. 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Constituent): Stop the analysis after detecting a misplaced constituent as this is a critical error. From-SVN: r230239
2015-10-23[multiple changes]Arnaud Charlet1-0/+1
2015-10-23 Hristian Kirtchev <kirtchev@adacore.com> * contracts.ads, contracts.adb: New unit. * exp_ch6.adb Add with and use clauses for Contracts. (Expand_Subprogram_Contract): Moved to Contracts. * exp_ch6.ads (Expand_Subprogram_Contract): Moved to Contracts. * sem_ch3.adb Add with and use clauses for Contracts. (Analyze_Object_Contract): Moved to Contracts. (Analyze_Declarations): Remove local variable Pack_Decl. Do not capture global references in contracts. Check the hidden states of a package body. * sem_ch6.adb Add with and use clauses in Contracts. (Analyze_Generic_Subprogram_Body): Do not capture global references in contracts. (Analyze_Subprogram_Body_Contract): Moved to Contracts. (Analyze_Subprogram_Body_Helper): Freeze the contract of the nearest enclosing package body. Always analyze the subprogram body contract. Do not expand the subprogram body contract. (Analyze_Subprogram_Contract): Moved to Contracts. * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Moved to Contracts. (Analyze_Subprogram_Contract): Moved to Contracts. * sem_ch7.adb Add with and use clauses for Contracts. (Analyze_Package_Body_Contract): Moved to Contracts. (Analyze_Package_Body_Helper): Freeze the contract of the nearest enclosing package body. (Analyze_Package_Contract): Moved to Contracts. * sem_ch7.ads (Analyze_Package_Body_Contract): Moved to Contracts. (Analyze_Package_Contract): Moved to Contracts. * sem_ch10.adb Add with and use clauses for Contracts. (Analyze_Compilation_Unit): Do not capture global references in contracts. (Analyze_Subprogram_Body_Stub_Contract): Moved to Contracts. * sem_ch10.ads (Analyze_Subprogram_Body_Stub_Contract): Moved to Contracts. * sem_ch12.adb Add with and use clauses for Contracts. (Analyze_Subprogram_Instantiation): Update the call to Instantiate_Subprogram_Contract. (Instantiate_Package_Body): Do not copy the entity of the spec when creating an entity for the body. Construct a brand new defining identifier for the body and inherit the Comes_From_Source flag from the spec. (Instantiate_Subprogram_Body): Remove Anon_Id to Act_Decl_Id and update all occurrences. Construct a brand new defining identifier for the body and inherit the Comes_From_Source flag from the spec. (Instantiate_Subprogram_Contract): Moved to Contracts. (Save_Global_References_In_Aspects): Moved to the spec of Sem_Ch12. (Save_Global_References_In_Contract): Moved to Contracts. * sem_ch12.ads (Save_Global_References_In_Aspects): Moved from the body of Sem_Ch12. (Save_Global_References_In_Contract): Moved to Contracts. * sem_prag.adb Add with and use clauses for Contracts. (Add_Item): Removed. All references to this routine have been replaced with calls to Append_New_Elmt. (Analyze_Constituent): Add special diagnostics for errors caused by freezing of contracts. (Analyze_Refined_State_In_Decl_Part): Add formal parameter Freeze_Id. Add new global variable Freeze_Posted. (Collect_Body_States): Removed. (Report_Unused_States): Removed. * sem_prag.ads (Analyze_Defined_State_In_Decl_Part): Add formal parameter Freeze_Id and update comment on usage. * sem_util.adb Remove with and use clauses for Sem_Ch12. (Add_Contract_Item): Moved to Contracts. (Check_Unused_Body_States): New routine. (Collect_Body_States): New routine. (Create_Generic_Contract): Moved to Contracts. (Inherit_Subprogram_Contract): Moved to Contracts. (Report_Unused_Body_States): New routine. * sem_util.ads (Add_Contract_Item): Moved to Contracts. (Check_Unused_Body_States): New routine. (Collect_Body_States): New routine. (Create_Generic_Contract): Moved to Contracts. (Inherit_Subprogram_Contract): Moved to Contracts. (Report_Unused_Body_States): New routine. * sinfo.adb (Is_Expanded_Contract): New routine. (Set_Is_Expanded_Contract): New routine. * sinfo.ads New attribute Is_Expanded_Contract along with placement in nodes. (Is_Expanded_Contract): New routine along with pragma Inline. (Set_Is_Expanded_Contract): New routine along with pragma Inline. * gcc-interface/Make-lang.in: Add entry for contracts.o 2015-10-23 Bob Duff <duff@adacore.com> * bindgen.adb, init.c, opt.ads, switch-b.adb: Implement new -Ea and -Es switches. * switch-b.ads: Minor comment fix. * bindusg.adb: Document new -Ea and -Es switches. * s-exctra.ads: Use -Es instead of -E. From-SVN: r229253
2015-10-23[multiple changes]Arnaud Charlet1-0/+50
2015-10-23 Hristian Kirtchev <kirtchev@adacore.com> * sem_util.adb (Denotes_Iterator): New routine. (Is_Iterator): Code cleanup. Factor out the detection of a predefined iterator. As a result this fixes a missing case where a tagged type implements interface Reversible_Iterator. 2015-10-23 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Eval_Attribute): Constant-fold 'Enabled if not within a generic unit, even if expander is not active, so that instances of container packages remain preelaborable in -gnatc mode. 2015-10-23 Tristan Gingold <gingold@adacore.com> * init.c (__gnat_sigtramp): New assembly function for arm64-darwin. (__gnat_error_handler): Use trampoline for arm64. 2015-10-23 Ed Schonberg <schonberg@adacore.com> * exp_ch3.adb (Expand_N_Object_Declaration): if the type of the object is a class-wide limited interface type, the expression is not restricted to the forms specified for limited types. 2015-10-23 Vincent Celier <celier@adacore.com> * gnatname.adb: Code clean up. * s-taasde.ads: Fix comment. From-SVN: r229240
2015-10-20[multiple changes]Arnaud Charlet1-3/+3
2015-10-20 Tristan Gingold <gingold@adacore.com> * sem_util.adb (Is_Protected_Self_Reference): Remove reference to UET_Address in comment. * sem_attr.adb (Check_Unit_Name): Adjust comment. (Analyze_Attribute): Remove handling of UET_Address. * sem_attr.ads (Attribute_Impl_Def): Remove Attribute_UET_Address. * snames.ads-tmpl Remove Name_UET_Address, Attribute_UET_Address. * exp_attr.adb (Expand_N_Attribute_Reference): Remove Attribute_UET_Address. 2015-10-20 Bob Duff <duff@adacore.com> * a-cbdlli.adb, a-cdlili.adb, a-chtgop.adb, a-cidlli.adb, * a-cobove.adb, a-coinve.adb, a-convec.adb, a-crbtgo.adb ("="): Avoid modifying the tampering counts unnecessarily. (Adjust): Zero tampering counts unconditionally. 2015-10-20 Jerome Lambourg <lambourg@adacore.com> * init.c: Fix build issue on arm-vx6 when building the RTP run-time. 2015-10-20 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Analyze_Object_Declaration): If the expression is an aggregate and compilation is in -gnatI mode (ignore rep clauses) do not delay resolution of aggregate, to prevent freeze actions out of order in the backend. 2015-10-20 Ed Schonberg <schonberg@adacore.com> * sem_prag.ads, sem_prag.adb (Build_Generic_Class_Condition): New procedure to construct a generic function for a class-wide precondition, to implement AI12-0113 concerning the new semantics of class-wide preconditions for overriding uperations. From-SVN: r229060
2015-10-20[multiple changes]Arnaud Charlet1-3/+4
2015-10-20 Jerome Lambourg <lambourg@adacore.com> * init.c (__gnat_vxsim_error_handler): Completely disable on VxWorks-7 as the VSBs used to build gcc do not support vxsim architecture. 2015-10-20 Claire Dross <dross@adacore.com> * a-cfdlli.ads, a-cfinve.ads, a-cofove.ads (Generic_Sorting): Explicit SPARK_Mode. * a-cfhase.ads, a-cforse.ads (Generic_Keys): Explicit SPARK_Mode. 2015-10-20 Tristan Gingold <gingold@adacore.com> * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Check for No_Implicit_Protected_Object_Allocations. * fe.h (Check_No_Implicit_Task_Alloc, Check_No_Implicit_Protected_Alloc): Define and declare. * restrict.ads, restrict.adb (Check_No_Implicit_Task_Alloc, Check_No_Implicit_Protected_Alloc): New procedures to check the restrictions. * s-rident.ads (No_Implicit_Task_Allocations) (No_Implicit_Protected_Object_Allocations): Declare new restrictions. 2015-10-20 Yannick Moy <moy@adacore.com> * sem_res.adb (Resolve_Selected_Component): Only set flag when component is defined in a variant part. * sem_util.adb, * sem_util.ads (Is_Declared_Within_Variant): Promote local query as publicy visible one for use in Resolve_Selected_Component. 2015-10-20 Philippe Gil <gil@adacore.com> * g-debpoo.adb: allow instrumented System.Memory to use Debug_Pool from foreign threads. * g-debpoo.adb (Print_Traceback): NEW print traceback if available added to support Stack_Trace_Depth = 0. (Print_Address): NEW print System.Address without no secondary stack use (Address_Image uses secondary stack) From-SVN: r229058
2015-10-20[multiple changes]Arnaud Charlet1-0/+15
2015-10-20 Yannick Moy <moy@adacore.com> * exp_ch9.adb (Expand_Entry_Barrier): Default initialize local variable Func. 2015-10-20 Jerome Lambourg <lambourg@adacore.com> * init.c (__gnat_error_handler for vxworks): Force SPE bit in the MSR when handling signals 2015-10-20 Arnaud Charlet <charlet@adacore.com> * einfo.ads, sem_ch12.adb, sem_ch6.adb, table.ads, s-stposu.ads, g-table.ads, g-dyntab.ads, makeutl.ads, a-crdlli.ads: Fix typos. 2015-10-20 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Loop_Statement): Element iterators over multidimensional arrays create additional loops during expansion. For such loops we create a label as a scope name. Attach this label properly to tree, for use in GNATProve over such element iterators. * sem_attr.adb (Analyze_Attribute, case Loop_Entry): The loop to which the attribute applies comes from source, not from expansion of an element iterator or a quantified expression. * exp_attr.adb (Expand_N_Attribute_Reference): Ditto. From-SVN: r229057
2015-10-20[multiple changes]Arnaud Charlet1-2/+2
2015-10-20 Bob Duff <duff@adacore.com> * a-coinve.adb, a-contai.adb: Update comments. * pprint.ads: Minor reformatting. 2015-10-20 Tristan Gingold <gingold@adacore.com> * env.c, init.c: Handle arm64-darwin like arm-darwin. * tracebak.c: Handle arm64-darwin. 2015-10-20 Bob Duff <duff@adacore.com> * s-trasym.adb (Symbolic_Traceback): When giving the traceback as hexadecimal code addresses, separate by blanks instead of LF. From-SVN: r229039
2015-10-20[multiple changes]Arnaud Charlet1-1/+4
2015-10-20 Thomas Quinot <quinot@adacore.com> * Makefile.rtl: add the following... * g-binenv.ads, g-binenv.adb: New unit providing runtime access to bind time captured values ("bind environment") * init.c: declare new global variable __gl_bind_env_addr. * bindgen.ads, bindgen.adb (Set_Bind_Env): record a bind environment key=value pair. (Gen_Bind_Env_String): helper to produce the bind environment data called in the binder generated file. (Gen_Output_File_Ada): Call the above (Gen_Adainit): Set __gl_bind_env_addr accordingly. * switch-b.adb: Support for command line switch -V (user interface to set a build environment key=value pair) * bindusg.adb: Document the above 2015-10-20 Vincent Celier <celier@adacore.com> * sem_prag.adb (Analyse_Pragma: Pragma Pure): Do not set the entity as Pure if Debug_Flag_U is set. From-SVN: r229031
2015-07-13Fix double word typos.Aldy Hernandez1-1/+1
From-SVN: r225726
2015-06-08configure.ac (*-*-dragonfly*): New configuration.John Marino1-3/+3
gnattools/ * configure.ac (*-*-dragonfly*): New configuration. * configure: Regenerate. gcc/ada/ * a-intnam-dragonfly.ads: New. * s-osinte-dragonfly.adb: Likewise. * s-osinte-dragonfly.ads: Likewise. * system-dragonfly-x86_64.ads: Likewise. * adaint.c: Add BSD macros. * cstreams.c: Likewise. * gsocket.h: Likewise. * link.c: Likewise. * socket.c: Likewise. * env.c: Add __DragonFly__, remove __FreeBSD__ macro. * init.c: Add __DragonFly__, change __gnat_install_handler prototype from empty to void. * initialize.c: Add __DragonFly__. * sysdep.c: Likewise. * s-osinte-freebsd.adb: Use __get_errno instead of __error. * tracebak.c: Set unwinder for i386 BSD. * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak x86_64 FreeBSD and x86 FreeBSD. From-SVN: r224207
2015-05-30adaint.c: Test for __linux__ instead of linux and __sun__ instead of sun.Eric Botcazou1-12/+12
* adaint.c: Test for __linux__ instead of linux and __sun__ instead of sun. Add missing leading underscore to AIX. Remove #elif 0. * adaint.h: Likewise. * cio.c: Likewise. * cstreams.c: Likewise. * env.c: Likewise. * gsocket.h: Likewise. * init.c: Likewise. Test for __i386__ instead of i386. * link.c: Likewise. * s-oscons-tmplt.c: Likewise. * sysdep.c: Likewise. * terminals.c: Likewise. Use BSD symbol instead of FREEBSD. * tracebak.c: Likewise. Test for __sparc__ instead of sparc. From-SVN: r223890
2015-05-26[multiple changes]Arnaud Charlet1-4/+4
2015-05-26 Doug Rupp <rupp@adacore.com> * init.c [vxworks]: Refine previous checkin. 2015-05-26 Robert Dewar <dewar@adacore.com> * exp_ch4.adb (Wrap_MA): New function. (Expand_N_Op_Expon): Use Wrap_MA. 2015-05-26 Bob Duff <duff@adacore.com> * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Do not use secondary stack to return limited records with defaulted discriminants. This is an efficiency improvement. * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb, sem_util.adb: Change the sense of Is_Indefinite_Subtype to be Is_Definite_Subtype. This is an improvement to readability (the double negative in "not Is_Indefinite_Subtype" was slightly confusing). Also disallow passing non-[sub]type entities, an unnecessary and slightly bug-prone flexibility. From-SVN: r223679
2015-05-26[multiple changes]Arnaud Charlet1-3/+5
2015-05-26 Robert Dewar <dewar@adacore.com> * sem_aggr.adb (Resolve_Array_Aggregate): Defend against bad bounds. * debug.adb: Document -gnatd.k. * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k. 2015-05-26 Robert Dewar <dewar@adacore.com> * gnat1drv.adb (Gnat1drv): Provide new arguments for Get_Target_Parameters. * restrict.adb (Set_Restriction_No_Specification_Of_Aspect): new procedure. (Set_Restriction_No_Use_Of_Attribute): new procedure. * restrict.ads (Set_Restriction_No_Specification_Of_Aspect): new procedure. (Set_Restriction_No_Use_Of_Attribute): new procedure. * s-rident.ads (Integer_Parameter_Restrictions): New subtype. * targparm.adb (Get_Target_Parameters): Allow new restriction pragmas No_Specification_Of_Aspect No_Use_Of_Attribute No_Use_Of_Pragma. * targparm.ads: New parameters for Get_Target_Parameters. * tbuild.adb (Set_NOD): New name for Set_RND. (Set_NSA): New procedure. (Set_NUA): New procedure. (Set_NUP): New procedure. * tbuild.ads (Make_SC): Minor reformatting. (Set_NOD): New name for Set_RND. (Set_NSA, Set_NUA, Set_NUP): New procedure. 2015-05-26 Ed Schonberg <schonberg@adacore.com> * a-stwise.adb (Find_Token): If source'first is not positive, an exception must be raised, as specified by RM 2005 A.4.3 (68/1). This must be checked explicitly, given that run-time files are normally compiled without constraint checks. * a-stzsea.adb (Find_Token): Ditto. 2015-05-26 Ed Schonberg <schonberg@adacore.com> * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate to fully implement RM 8.6 (17/3). which earlier only applied to synchronized types. Used to preanalyze aspects that include current instances of types, such as Predicate and Invariant. * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance. * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original expression of aspect and analyze it to provide proper type information. 2015-05-26 Robert Dewar <dewar@adacore.com> * rtsfind.ads: Add entries for RE_Exn[_Long]_Float. * s-exnllf.adb (Exn_Float): New function. (Exn_Long_Float): New function. (Exn_Long_Long_Float): Rewritten interface. (Exp): New name for what used to be Exn_Long_Long_Float. * s-exnllf.ads (Exn_Float): New function. (Exn_Long_Float): New function. 2015-05-26 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Find_Selected_Component): Do not emit an error on a selected component when the prefix is a type name that is a Current_Instance. * einfo.ads: Minor grammar fix. 2015-05-26 Doug Rupp <rupp@adacore.com> * init.c [vxworks] (sysLib.h): Only for x86. From-SVN: r223678
2015-05-26[multiple changes]Arnaud Charlet1-4/+30
2015-05-26 Ed Schonberg <schonberg@adacore.com> * sem_ch7.adb (Install_Private_Declarations, Swap_Private_Dependents): Ensure that both views of the dependent subtype are immediately visible if we are within their scope. This may be needed when a procedure body is both the parent of an instantiated child unit, and is itself used to inline a local function. 2015-05-26 Gary Dismukes <dismukes@adacore.com> * exp_prag.adb, gnat1drv.adb: Minor reformatting. 2015-05-26 Eric Botcazou <ebotcazou@adacore.com> * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit detecting exceptions to the rewriting, deal with implicit dereferences in the selected component case. 2015-05-26 Bob Duff <duff@adacore.com> * sem_ch13.adb (Analyze_One_Aspect): Do not require the expression of the Disable_Controlled aspect to be static in a generic template, because 'Enabled is not known until the instance. 2015-05-26 Doug Rupp <rupp@adacore.com> * init-vxsim.c: New file for vxsim ZCX * sigtramp-vxworks-vxsim.c: Likewise. * sigtramp-vxworks.c: Factor out target dependent bits into ... * sigtramp-vxworks-target.inc: ... here. * sigtramp.h: Add vxsim zcx protos. * init.c [vxworks...] (sysLib.h): Include. (__gnat_map_signal): Make global. [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if on vxsim. [...i386] (__gnat_install_handler): Test if on vxsim. 2015-05-26 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Iterator_Specification): For an element iterator over an array, if the component is aliased, the loop variable is aliased as well. 2015-05-26 Ed Schonberg <schonberg@adacore.com> * exp_ch6.adb (Expand_Actuals): For a function call with in-out parameters that is rewritten as an expression_with_actions, we preserve the original function call node for further use by the caller (typically Expand_Call). In the presence of validity checks, that function call, though it is labelled Analyzed to prevent an infinite recursion, may be rewritten as a temporary by Remove_Side_Effects. Ensure that the caller has access to the original function call to continue expansion. * atree.ads: Minor typo in comment. 2015-05-26 Javier Miranda <miranda@adacore.com> * sem_util.adb (Check_Function_Writable_Actuals): Add missing support to check the violation of writable actuals in array aggregates that have a nonstatic range. From-SVN: r223672
2015-05-12[multiple changes]Arnaud Charlet1-5/+2
2015-05-12 Thomas Quinot <quinot@adacore.com> * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications. Data_Rate): New literals B75, B110, B150, B300, B600. 2015-05-12 Doug Rupp <rupp@adacore.com> * init.c (__gnat_init_float) [vxworks]: For e500v2, do nothing and leave the responsibility to install the handler and enable the exceptions to the BSP. From-SVN: r223062
2015-03-04[multiple changes]Arnaud Charlet1-9/+9
2015-03-04 Robert Dewar <dewar@adacore.com> * sem_warn.adb: Minor reformatting. * init.c: Minor tweaks. 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com> * a-coinho-shared.adb: Fix clear of already empty holder. 2015-03-04 Robert Dewar <dewar@adacore.com> * exp_unst.adb (Check_Dynamic_Type): Ignore library level types. (Check_Uplevel_Reference_To_Type): Ignore call inside generic. (Note_Uplevel_Reference): Ignore call inside generic. (Note_Uplevel_Reference): Fix check for no entity field. (Unnest_Subprogram): Ignore call inside generic. (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name. (Visit_Node): Ignore calls to Imported subprograms. (Visit_Node): Fix problem in finding subprogram body in some cases. (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name. From-SVN: r221188
2014-11-20[multiple changes]Arnaud Charlet1-1/+1
2014-11-20 Arnaud Charlet <charlet@adacore.com> * s-taspri-solaris.ads: Replace 64 by long_long_integer'size. 2014-11-20 Olivier Hainque <hainque@adacore.com> * init.c (__gnat_map_signal for VxWorks): Use a common mapping scheme for VxWorks version >= 6, instead of falling back to the vx5 scheme for versions > 6. 2014-11-20 Ed Schonberg <schonberg@adacore.com> * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Use base type when constructing subtype indication for constrained target object. 2014-11-20 Jose Ruiz <ruiz@adacore.com> * projects.texi: Minor spelling fix. 2014-11-20 Bob Duff <duff@adacore.com> * gnat_ugn.texi: Add doc for --split-line-before-op switch in gnatpp. 2014-11-20 Vincent Celier <celier@adacore.com> * prj-attr.adb (Register_New_Package): Allow the registration of an already unknown package and make it known. From-SVN: r217873
2014-10-23[multiple changes]Arnaud Charlet1-1/+1
2014-10-23 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Expression_Function): Simplify analysis in generic context, and generate body in this case as well, to simplify ASIS traversals on the construct. 2014-10-23 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Complete_Object_Operation): Indicate that the scope of the operation (s) is referenced, to prevent spurious warnings about unused units. 2014-10-23 Johannes Kanig <kanig@adacore.com> * errout.adb (Error_Msg_Internal): Copy check flag, increment check msg count. * erroutc.adb (Delete_Msg) adjust check msg count. (Output_Msg_Text) handle check msg case (do nothing). (Prescan_Message) recognize check messages with severity prefixes. * errutil.adb (Error_Msg) handle check flag, adjust counter. 2014-10-23 Ed Schonberg <schonberg@adacore.com> * sem_eval.adb (Subtypes_Statically_Match): For a generic actual type, check for the presence of discriminants in its parent type, against the presence of discriminants in the context type. 2014-10-23 Tristan Gingold <gingold@adacore.com> * adaint.c: __gnat_get_file_names_case_sensitive: Default is true on arm-darwin. 2014-10-23 Arnaud Charlet <charlet@adacore.com> * pprint.adb (Expression_Image): Add handling of quantifiers. 2014-10-23 Ed Schonberg <schonberg@adacore.com> * exp_pakd.adb (Expand_Packed_Element_Reference): If the prefix is a source entity, generate a reference to it before transformation, because rewritten node might not generate a proper reference, leading to spurious warnings. 2014-10-23 Tristan Gingold <gingold@adacore.com> * init.c: Fix thinko in previous patch. 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch3.adb (Decimal_Fixed_Point_Type_Declaration): Inherit the rep chain of the implicit base type. (Floating_Point_Type_Declaration): Inherit the rep chain of the implicit base type. (Ordinary_Fixed_Point_Type_Declaration): Inherit the rep chain of the implicit base type. (Signed_Integer_Type_Declaration): Inherit the rep chain of the implicit base type. * sem_util.ads, sem_util.adb (Inherit_Rep_Item_Chain): New routine. 2014-10-23 Pascal Obry <obry@adacore.com> * g-regist.adb, g-regist.ads: Add support for reading 32bit or 64bit view of the registry. 2014-10-23 Ed Schonberg <schonberg@adacore.com> * exp_ch3.adb (Expand_N_Object_Declaration): If type is abstract, return without expanding expression, to prevent subsequent crash. * freeze.adb: better error message for illegal declaration. From-SVN: r216587
2014-10-20[multiple changes]Arnaud Charlet1-3/+11
2014-10-20 Tristan Gingold <gingold@adacore.com> * init.c (__gnat_is_stack_guard): Don't use mach_vm_region_recurse on arm-darwin. * raise-gcc.c: Add ATTRIBUTE_UNUSED to remove warnings for unused arguments. 2014-10-20 Hristian Kirtchev <kirtchev@adacore.com> * sem_attr.adb (Analyze_Attribute): Replace variables CS and PS with Proc_Id and Subp_Id to better illustrate their purpose. Account for the case where _Postconditions has not been generated yet and the context is aspect/pragma Refined_Post. In that scenario the expected prefix of attribute 'Result is the current scope. 2014-10-20 Robert Dewar <dewar@adacore.com> * par-ch4.adb (P_Expression): Handle extraneous comma/semicolon in middle of expression with logical operators. 2014-10-20 Robert Dewar <dewar@adacore.com> * par-ch13.adb (Possible_Misspelled_Aspect): New function. 2014-10-20 Steve Baird <baird@adacore.com> * pprint.adb: Improve Expression_Image function. From-SVN: r216477
2014-08-04[multiple changes]Arnaud Charlet1-1/+1
2014-08-04 Robert Dewar <dewar@adacore.com> * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads: Minor reformatting. 2014-08-04 Yannick Moy <moy@adacore.com> * expander.adb (Expand): Always perform special expansion in GNATprove mode, even when doing pre-analysis. 2014-08-04 Thomas Quinot <quinot@adacore.com> * repinfo.adb (List_Scalar_Storage_Order): List bit order if not default. Also list bit order if SSO is specified. Do not assume that bit order is always equal to scalar storage order. 2014-08-04 Thomas Quinot <quinot@adacore.com> * freeze.adb (Set_SSO_From_Default): Do not set scalar storage order to reverse SSO for a type that has an explicit native Bit_Order. 2014-08-04 Doug Rupp <rupp@adacore.com> * cal.c: Macro check for VxWorks7. * init.c (getpid): Likewise. * mkdir.c (__gnat_mkdir): Likewise. * sysdep.c (__gnat_is_file_not_found_error): Likewise. 2014-08-04 Gary Dismukes <dismukes@adacore.com> * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation of an invariant check in the case where No_Initialization is set, since the object is uninitialized. 2014-08-04 Thomas Quinot <quinot@adacore.com> * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute name, in addition to a pragma name. * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name, Is_Pragma_Name): Adjust accordingly. * sem_attr.ads, sem_attr.adb, exp_attr.adb (Attribute_Default_Scalar_Storage_Order): Add handling of new attribute. * gnat_rm.texi: Document the above. From-SVN: r213549
2014-07-29[multiple changes]Arnaud Charlet1-1/+1
2014-07-29 Ed Schonberg <schonberg@adacore.com> * gnat_rm.texi: No doc needed for Ada2012 aspect Implicit_dereference. 2014-07-29 Robert Dewar <dewar@adacore.com> * sem_attr.adb (Attribute_12): New array (Analyze_Attribute): Check impl-defined Ada 2012 attributes. (Check_Ada_2012_Attribute): Removed. 2014-07-29 Doug Rupp <rupp@adacore.com> * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM, PPC, and e500. * sigtramp-vxworks.c: New file. * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files. From-SVN: r213199
2014-07-29[multiple changes]Arnaud Charlet1-3/+1
2014-07-29 Doug Rupp <rupp@adacore.com> * init.c: Complete previous change. 2014-07-29 Robert Dewar <dewar@adacore.com> * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained array case. 2014-07-29 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Access_Attribute): If the prefix is a subprogram and the completion will appear in the same declarative part, create elaboration flag. * exp_util.adb (Set_Elaboration_Flag): If the subprogram body is a completion of a declaration in the same declarative part, and the subprogram has had its address taken, add elaboration check inside the subprogram body, to detect elaboration errors that may occur through indirect calls. From-SVN: r213189