1. 26 Oct, 2015 40 commits
    • s-os_lib.ads, [...] (Kill): New routine. · 3fee081a
      2015-10-26  Pascal Obry  <obry@adacore.com>
      
      	* s-os_lib.ads, s-os_lib.adb (Kill): New routine. This routine
      	makes visible support for killing processes in expect.c.
      	* expect.c (__gnat_kill): Removed from here.
      	* adaint.c (__gnat_kill): Added here to be usable in the compiler
      	(System.OS_Lib).
      	* make.adb (Sigint_Intercepted): Use the Kill routine from
      	System.OS_Lib.
      
      From-SVN: r229348
      Pascal Obry committed
    • einfo.ads, [...] (Needs_Typedef, [...]): Removed, no longer used. · fbf90e54
      2015-10-26  Arnaud Charlet  <charlet@adacore.com>
      
      	* einfo.ads, einfo.adb, exp_unst.adb (Needs_Typedef,
      	Set_Needs_Typedef): Removed, no longer used.
      
      From-SVN: r229347
      Arnaud Charlet committed
    • tree-vect-loop.c (vect_create_epilog_for_reduction): Fix VEC_COND_EXPR types. · 512854fe
      2015-10-26  Alan Hayward <alan.hayward@arm.com>
      
      	* tree-vect-loop.c (vect_create_epilog_for_reduction): Fix
      	VEC_COND_EXPR types.
      
      From-SVN: r229346
      Alan Hayward committed
    • [multiple changes] · aafc151a
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* einfo.adb (First_Component): Update the assertion to allow
      	for concurrent types.
      	(First_Component_Or_Discriminant): Update the assertion to allow for
      	concurrent types.
      	* einfo.ads: Update the documentation of attributes First_Component
      	and First_Component_Or_Discriminant along with uses in entities.
      
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_res.adb (Resolve_Actuals): An effectively
      	volatile object may act as an actual when the corresponding
      	formal is of a non-scalar effectively volatile type, not just
      	a non-scalar volatile type.
      
      2015-10-26  Bob Duff  <duff@adacore.com>
      
      	* sinfo.ads, sem_util.ads: Update comments.
      
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_prag.adb (Analyze_Refined_Depends_Global_Post): When dealing with
      	protected entries or protected subprograms, use the enclosing protected
      	type to ensure that the protected type declaration is declared
      	in a package spec. Remove an obsolete attempt to ensure the
      	aggregate for of pragma Refined_State as this routine is never
      	called in that case.
      
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* exp_ch5.adb (Expand_Iterator_Loop_Over_Container): For
      	an element iterator loop, the element is a constant if the
      	container object is a constant, even if the container type has
      	a Variable_Indexing aspect.
      
      From-SVN: r229345
      Arnaud Charlet committed
    • [auto-inc-dec.c] Account for cost of move operation in FORM_PRE_ADD and FORM_POST_ADD cases · 477ee35f
      	* auto-inc-dec.c (insert_move_insn_before): Delete.
      	(attempt_change): Remember to cost the simple move in the
      	FORM_PRE_ADD and FORM_POST_ADD cases.
      
      From-SVN: r229344
      Kyrylo Tkachov committed
    • [multiple changes] · a2667f14
      2015-10-26  Bob Duff  <duff@adacore.com>
      
      	* s-fileio.adb (Fopen_Mode): Use "r+" for Out_File/Stream_IO,
      	so the file won't be truncated on 'fopen', as required by
      	AI95-00283-1.
      
      2015-10-26  Bob Duff  <duff@adacore.com>
      
      	* gnat1drv.adb, prj.adb, sem_ch6.adb, s-regpat.adb,
      	sem_prag.adb: Fix typos.
      	* einfo.ads, restrict.ads: Minor comment fixes.
      	* err_vars.ads, sem_util.adb, errout.ads: Code clean up.
      
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch5.adb (Analyze_Assignment): Do not check that the
      	Left-hand side is legal in an inlined body, check is done on
      	the original template.
      
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* exp_util.ads, exp_util.adb (Find_Primitive_Operations): New
      	subprogram to retrieve by name the possibly overloaded set of
      	primitive operations of a type.
      	* sem_ch4.adb (Try_Container_Indexing): Use
      	Find_Primitive_Operations to handle overloaded indexing operations
      	of a derived type.
      
      From-SVN: r229343
      Arnaud Charlet committed
    • osint-c.ads: Minor comment update. · b204e984
      2015-10-26  Arnaud Charlet  <charlet@adacore.com>
      
      	* osint-c.ads: Minor comment update.
      
      2015-10-26  Arnaud Charlet  <charlet@adacore.com>
      
      	* s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
      	s-osinte-darwin.ads, s-osinte-android.ads, s-osinte-freebsd.ads,
      	s-taprop-posix.adb (Get_Page_Size): C function returns an int. Adjust
      	callers accordingly.
      
      From-SVN: r229342
      Arnaud Charlet committed
    • [multiple changes] · 356ffab8
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* exp_ch4.adb (Is_OK_Object_Reference): New routine.
      	(Substitute_Valid_Check): Perform the 'Valid subsitution but do
      	not suggest the use of the attribute if the left hand operand
      	does not denote an object as it leads to illegal code.
      
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* exp_unst.adb: Minor reformatting.
      
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch6.adb: Improve error msg.
      
      From-SVN: r229341
      Arnaud Charlet committed
    • [multiple changes] · ec6cfc5d
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_disp.adb (Check_Controlling_Type): Handle properly the
      	case of an incomplete type whose full view is tagged, when a
      	primitive operation of the type is declared between the two views.
      
      2015-10-26  Bob Duff  <duff@adacore.com>
      
      	* adaint.c (__gnat_locate_exec_on_path): If the PATH environment
      	variable is not set, do not return NULL, because we can still find
      	the executable if it includes a directory name.
      
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_elab.adb (Elab_Warning): Under dynamic elaboration, when
      	elaboration warnings are enabled, emit proper warning header
      	when triggered by an access attribute.
      
      2015-10-26  Steve Baird  <baird@adacore.com>
      
      	* exp_ch11.adb: If CodePeer_Mode is true, generate simplified
      	SCIL for exception declarations.
      	* exp_ch11.adb (Expand_N_Exception_Declaration) If CodePeer_Mode
      	is True, initialize the Full_Name component of the exception
      	record to null instead of to the result of an unchecked
      	conversion.
      
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* exp_unst.adb (Note_Uplevel_Ref) : Handle properly a reference
      	that denotes a function returning a constrained array, that has
      	been rewritten as a procedure.
      	* makeutl.ads: Minor edit.
      
      From-SVN: r229340
      Arnaud Charlet committed
    • Minor reformatting. · bed87f4f
      From-SVN: r229339
      Arnaud Charlet committed
    • [multiple changes] · 363f2c58
      2015-10-26  Yannick Moy  <moy@adacore.com>
      
      	* lib-xref-spark_specific.adb (Traverse_Protected_Declaration): New
      	procedure for traversal.
      	(Add_SPARK_Xrefs): Remove debugging code.
      	(Traverse_Declaration_Or_Statement): Call the new traversal
      	procedure.
      
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_prag.adb (Analyze_Pragma): Pragma
      	Extensions_Visible can now appear on an abstract subprogram
      	declaration.
      
      From-SVN: r229338
      Arnaud Charlet committed
    • [multiple changes] · 24fd21c3
      2015-10-26  Yannick Moy  <moy@adacore.com>
      
      	* lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Use character 'r' to
      	denote a reference to a constant which may have variable input, and
      	thus may be treated as a variable in GNATprove, instead of the
      	character 'c' used for constants.
      
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_util.adb (Object_Access_Level): Only aliased formals of
      	functions have the accessibility level of the point of call;
      	aliased formals of procedures have the same level as unaliased
      	formals.
      	(New_Copy_Tree): Add guard on copying itypes. From code reading.
      
      From-SVN: r229337
      Arnaud Charlet committed
    • [config/sh/sh.c] Fix PR68091: Return false for non shmedia targets in sh_vector_mode_supported_p · 529ce461
      	PR target/68091
      	* config/sh/sh.c (sh_vector_mode_supported_p): Use
      	TARGET_SHMEDIA_FPU instead of TARGET_FPU_ANY.
      
      From-SVN: r229336
      Kaz Kojima committed
    • Code clean ups. · e310115e
      From-SVN: r229335
      Arnaud Charlet committed
    • [multiple changes] · ca7e6c26
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* inline.adb: Minor reformatting.
      
      2015-10-26  Yannick Moy  <moy@adacore.com>
      
      	* get_spark_xrefs.adb (get_SPARK_Xrefs): Remove obsolete
      	assertion.
      	* lib-xref-spark_specific.adb (Traverse_Declaration_Or_Statement):
      	New procedure to factor duplicated code and add
      	treatment of protected entries.
      	(Add_SPARK_Scope, Traverse_Declarations_Or_Statements): Call the new
      	procedure Traverse_Declaration_Or_Statement. Use same character used in
      	normal xrefs for SPARK xrefs, for a given entity used as scope.
      	* spark_xrefs.ads Document character used for entries.
      	* sem_prag.adb (Check_Loop_Pragma_Placement): Account for possible
      	introduction of declarations and statements by the expansion, between
      	two otherwise consecutive loop pragmas.
      	* sem_util.ads, sem_util.adb (Is_Suspension_Object): Lifted from nested
      	function.
      	(Is_Descendant_Of_Suspension_Object): nested function lifted.
      
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_attr.adb (Eval_Attribute): Attribute 'Enum_Rep can be folded
      	when its prefix denotes a constant, an enumeration literal or
      	an enumeration type. Use the expression of the attribute in the
      	enumeration type form, otherwise use the prefix to fold.
      
      From-SVN: r229334
      Arnaud Charlet committed
    • [multiple changes] · f99ff327
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* aspects.adb Add an entry for entry bodies in table
      	Has_Aspect_Specifications_Flag.
      	(Aspects_On_Body_Or_Stub_OK): Entry bodies now allow for certain
      	aspects.
      	* contracts.adb (Add_Contract_Items): Code cleanup. Add
      	processing for entry bodies, entry declarations and task units.
      	(Analyze_Subprogram_Body_Contract): Renamed
      	to Analyze_Entry_Or_Subprogram_Body_Contract. Do not
      	analyze the contract of an entry body unless annotating the
      	original tree.
      	(Analyze_Subprogram_Contract): Renamed to
      	Analyze_Entry_Or_Subprogram_Contract.  Do not analyze the contract
      	of an entry declaration unless annotating the original tree.
      	(Analyze_Task_Contract): New routine.
      	* contracts.ads (Add_Contract_Item): Update the comment on usage.
      	(Analyze_Package_Body_Contract): Update comment on usage.
      	(Analyze_Package_Contract): Update the comment on usage.
      	(Analyze_Subprogram_Body_Contract): Renamed to
      	Analyze_Entry_Or_Subprogram_Body_Contract.
      	(Analyze_Subprogram_Body_Stub_Contract): Update the comment on usage.
      	(Analyze_Subprogram_Contract): Renamed to
      	Analyze_Entry_Or_Subprogram_Contract.
      	(Analyze_Task_Contract): New routine.
      	* einfo.adb (Contract): Restructure the assertion to include
      	entries and task units.
      	(SPARK_Pragma): This attribute now applies to operators.
      	(SPARK_Pragma_Inherited): This flag now applies to operators.
      	(Set_Contract): Restructure the assertion to include entries and task
      	units.
      	(Set_SPARK_Pragma): This attribute now applies to operators.
      	(Set_SPARK_Pragma_Inherited): This flag now applies to operators.
      	(Write_Field34_Name): Write out all Ekinds that have a contract.
      	(Write_Field40_Name): SPARK_Pragma now applies to operators.
      	* einfo.ads: Update the documentation of attribute Contract along
      	with usage in nodes.  Update the documentation of attributes
      	SPARK_Pragma and SPARK_Pragma_Inherited.
      	* exp_ch6.adb (Freeze_Subprogram): Update the call to
      	Analyze_Subprogram_Contract.
      	* par-ch9.adb (P_Entry_Barrier): Do not parse keyword "is" as it
      	is not part of the entry barrier production.
      	(P_Entry_Body): Parse the optional aspect specifications. Diagnose
      	misplaced aspects.
      	* sem_attr.adb (Analyze_Attribute_Old_Result): Update the call
      	to Find_Related_Subprogram_Or_Body.
      	* sem_aux.adb (Unit_Declaration_Node) Add an entry for entry
      	declarations and bodies.
      	* sem_ch3.adb (Analyze_Declarations): Analyze the contracts of
      	entry declarations, entry bodies and task units.
      	* sem_ch6.adb (Analyze_Generic_Subprogram_Body):
      	Update the call to Analyze_Subprogram_Body_Contract.
      	(Analyze_Subprogram_Body_Helper): Update the call to
      	Analyze_Subprogram_Body_Contract.
      	* sem_ch9.adb (Analyze_Entry_Body): Analyze the aspect
      	specifications and the contract.
      	* sem_ch10.adb (Analyze_Compilation_Unit): Update the call to
      	Analyze_Subprogram_Contract.
      	* sem_ch12.adb (Save_References_In_Pragma): Update the call to
      	Find_Related_Subprogram_Or_Body.
      	* sem_ch13.adb (Analyze_Aspects_On_Body_Or_Stub): Use
      	Unique_Defining_Entity rather than rummaging around in nodes.
      	(Diagnose_Misplaced_Aspects): Update comment on usage. Update the
      	error messages to accomondate the increasing number of contexts.
      	* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
      	Update the call to Find_Related_Subprogram_Or_Body.
      	(Analyze_Depends_Global): Update the call to
      	Find_Related_Subprogram_Or_Body. Add processing for entry
      	declarations.
      	(Analyze_Depends_In_Decl_Part): Update the call
      	to Find_Related_Subprogram_Or_Body. Task units have no formal
      	parameters to install.	(Analyze_Global_In_Decl_Part): Update
      	the call to Find_Related_Subprogram_Or_Body. Task units have no
      	formal parameters to install.
      	(Analyze_Global_Item): Use Fix_Msg to handle the increasing number of
      	contexts.
      	(Analyze_Pragma): Update the call to Find_Related_Subprogram_Or_Body.
      	Perform full analysis when various pragmas appear in an entry body.
      	(Analyze_Pre_Post_Condition): Update the call to
      	Find_Related_Subprogram_Or_Body. Perform full analysis when the pragma
      	appears in an entry body.
      	(Analyze_Pre_Post_Condition_In_Decl_Part): Update the call to
      	Find_Related_Subprogram_Or_Body.
      	(Analyze_Refined_Depends_Global_Post): Update
      	the call to Find_Related_Subprogram_Or_Body. Use
      	Fix_Msg to handle the increasing number of contexts.
      	(Analyze_Refined_Depends_In_Decl_Part): Update
      	the call to Find_Related_Subprogram_Or_Body. Use
      	Unique_Defining_Entity to obtain the entity of the
      	spec. Use Fix_Msg to handle the increasing number of contexts.
      	(Analyze_Refined_Global_In_Decl_Part): Update the call to
      	Find_Related_Subprogram_Or_Body. Use Unique_Defining_Entity to obtain
      	the entity of the spec. Use Fix_Msg to handle the increasing number of
      	contexts.
      	(Analyze_Test_Case_In_Decl_Part): Update the call to
      	Find_Related_Subprogram_Or_Body.
      	(Check_Dependency_Clause): Use Fix_Msg to handle the increasing number
      	of contexts.
      	(Check_Mode_Restriction_In_Enclosing_Context): Use
      	Fix_Msg to handle the increasing number of contexts.
      	(Collect_Subprogram_Inputs_Outputs): Use the refined
      	versions of the pragmas when the context is an entry body or
      	a task body.
      	(Find_Related_Subprogram_Or_Body): Renamed to
      	Find_Related_Declaration_Or_Body.  Add processing for entries
      	and task units.
      	(Fix_Msg): New routine.
      	(Role_Error): Use Fix_Msg to handle the increasing number of contexts.
      	* sem_prag.ads (Find_Related_Subprogram_Or_Body): Renamed to
      	Find_Related_Declaration_Or_Body.  Update the comment on usage.
      	* sem_util.adb (Is_Entry_Body): New routine.
      	(Is_Entry_Declaration): New routine.
      	* sem_util.ads (Is_Entry_Body): New routine.
      	(Is_Entry_Declaration): New routine.
      
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* inline.adb (Has_Excluded_Declaration): A subtype declaration
      	with a predicate aspect generates a subprogram, and therefore
      	prevents the inlining of the enclosing subprogram.
      	* osint.ads: Fix typo.
      
      From-SVN: r229333
      Arnaud Charlet committed
    • sem_case.adb (Check_Choice_Set): Choose initial choice range below low bound of type... · 1f145d79
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_case.adb (Check_Choice_Set): Choose initial choice range
      	below low bound of type, to prevent spurious errors on case
      	statements whose expressions have an integer subtype with a
      	static predicate.
      	* sem_util.ads: Fix typo.
      
      From-SVN: r229332
      Ed Schonberg committed
    • [multiple changes] · 21d7ef70
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* exp_ch4.adb (Expand_N_Case_Expression): In the scope of a
      	predicate function, delay the expansion of the expression only
      	if the target type has a specified Static_ Predicate aspect,
      	because the expression is processed later. A dynamic predicate
      	must be expanded in standard fashion.
      
      2015-10-26  Claire Dross  <dross@adacore.com>
      
      	* a-nudira.ads: Remove SPARK_Mode as it currently causes an error.
      
      2015-10-26  Arnaud Charlet  <charlet@adacore.com>
      
      	* sem_aggr.adb, sem_type.adb, sem_ch12.adb, sem_res.adb, sem_ch4.adb,
      	sem_ch8.adb, exp_aggr.adb, sem_eval.adb, s-fatgen.adb, a-tienio.adb:
      	Fix typos.
      
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_ch13.adb (Analyze_Aspect_Specifications): The processing
      	for aspects Abstract_State, Ghost, Initial_Condition, Initializes
      	and Refined_State no longer have to take SPARK_Mode into account.
      	(Insert_After_SPARK_Mode): Removed.
      	(Insert_Pragma): Update profile and comment on usage. The routine can
      	now insert a pragma after the "header" of an instance.
      	* sem_prag.adb (Analyze_If_Available): New routine.
      	(Analyze_Pragma): Do not reset the Analyzed flag of various
      	SPARK pragmas as they use the Is_Analyzed_Pragma attribute to
      	avoid reanalysis. Various pragmas now trigger the analysis
      	of related pragmas that depend on or are dependent on the
      	current pragma. Remove the declaration order checks related
      	to pragmas Abstract_State, Initial_Condition and Initializes.
      	(Analyze_Pre_Post_Condition): Analyze pragmas SPARK_Mode and
      	Volatile_Function prior to analyzing the pre/postcondition.
      	(Check_Declaration_Order): Removed.
      	(Check_Distinct_Name): Ensure that a potentially duplicated pragma
      	Test_Case is not the pragma being analyzed.
      	(Is_Followed_By_Pragma): Removed.
      
      From-SVN: r229331
      Arnaud Charlet committed
    • [multiple changes] · 2ba4f1fb
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch6.adb: Handle subprogram bodies without previous specs.
      
      2015-10-26  Claire Dross  <dross@adacore.com>
      
      	* a-nudira.ads: Specify appropriate SPARK_Mode so that the unit
      	can be used in SPARK code.
      
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* contracts.adb (Analyze_Subprogram_Body_Contract): Do not analyze
      	pragmas Refined_Global and Refined_Depends because these pragmas
      	are now fully analyzed when encountered.
      	(Inherit_Pragma): Update the call to attribute Is_Inherited.
      	* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Add a guard
      	to prevent reanalysis. Mark the pragma as analyzed at the end of
      	the processing.
      	(Analyze_Depends_Global): New parameter profile
      	and comment on usage. Do not fully analyze the pragma, this is
      	now done at the outer level.
      	(Analyze_Depends_In_Decl_Part): Add a guard to prevent reanalysis.
      	Mark the pragma as analyzed at the end of the processing.
      	(Analyze_External_Property_In_Decl_Part): Add a guard to prevent
      	reanalysis.  Mark the pragma as analyzed at the end of the processing.
      	(Analyze_Global_In_Decl_Part): Add a guard to prevent reanalysis. Mark
      	the pragma as analyzed at the end of the processing.
      	(Analyze_Initial_Condition_In_Decl_Part): Add a guard to prevent
      	reanalysis.  Mark the pragma as analyzed at the end of the processing.
      	(Analyze_Initializes_In_Decl_Part): Add a guard to prevent reanalysis.
      	Mark the pragma as analyzed at the end of the processing.
      	(Analyze_Pragma): Reset the Analyzed flag on various pragmas that
      	require delayed full analysis. Contract_Cases is now analyzed
      	immediately when it applies to a subprogram body stub. Pragmas Depends,
      	Global, Refined_Depends and Refined_Global are now analyzed
      	in pairs when they appear in a subprogram body [stub].
      	(Analyze_Pre_Post_Condition_In_Decl_Part): Add a guard to
      	prevent reanalysis.  Mark the pragma as analyzed at the end of
      	the processing.
      	(Analyze_Refined_Depends_Global_Post): Update the comment on usage.
      	(Analyze_Refined_Depends_In_Decl_Part): Add a guard to prevent
      	reanalysis. Mark the pragma as analyzed at the end of the processing.
      	(Analyze_Refined_Global_In_Decl_Part): Add a guard to prevent
      	reanalysis. Mark the pragma as analyzed at the end of the processing.
      	(Analyze_Refined_State_In_Decl_Part): Add a guard to prevent
      	reanalysis. Mark the pragma as analyzed at the end of the processing.
      	(Analyze_Test_Case_In_Decl_Part): Add a guard to prevent reanalysis.
      	Mark the pragma as analyzed at the end of the processing.
      	(Is_Followed_By_Pragma): New routine.
      	* sinfo.adb (Is_Analyzed_Pragma): New routine.
      	(Is_Inherited): Renamed to Is_Inherited_Pragma.
      	(Set_Is_Analyzed_Pragma): New routine.
      	(Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma.
      	* sinfo.ads Rename attribute Is_Inherited to Is_Inherited_Pragma
      	and update occurrences in nodes.
      	(Is_Analyzed_Pragma): New routine along with pragma Inline.
      	(Is_Inherited): Renamed to Is_Inherited_Pragma along with pragma Inline.
      	(Set_Is_Analyzed_Pragma): New routine along with pragma Inline.
      	(Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma along
      	with pragma Inline.
      
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* par-ch3.adb (P_Component_Items): When style checks are enabled,
      	apply them to component declarations in a record type declaration
      	or extension.
      
      From-SVN: r229330
      Arnaud Charlet committed
    • [multiple changes] · ed962eda
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_util.adb (Is_Suspension_Object): Ensure that the scope of "Ada"
      	is Standard_Standard.
      
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_res.adb (Is_OK_Volatile_Context): A subprogram call is an OK
      	context for a reference to an effectively volatile object.
      	(Resolve_Actuals): Add references to SPARK RM.
      	(Within_Procedure_Call): Removed.
      	(Within_Subprogram_Call): New routine.
      
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch6.adb (Check_Aggregate_Accessibility): A reference to a
      	formal parameter in an aggregate does not need an accesibility
      	check only if the formal is aliased.
      
      From-SVN: r229329
      Arnaud Charlet committed
    • [multiple changes] · 877a5a12
      2015-10-26  Claire Dross  <dross@adacore.com>
      
      	* sem_aux.ads (Number_Components): Can return 0 when called on
      	an empty record.
      
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* contracts.adb (Analyze_Subprogram_Body_Contract): Use
      	Unique_Defining_Entity instead of Corresponding_Spec_Of.
      	* einfo.adb SPARK_Pragma and SPARK_Aux_Pragma are now Node40 and
      	Node41 respectively.
      	(SPARK_Aux_Pragma): Update the assertion and node querry.
      	(SPARK_Aux_Pragma_Inherited): Update the assertion and node query.
      	(SPARK_Pragma): Update the assertion and node query.
      	(SPARK_Pragma_Inherited): Update the assertion and node query.
      	(Set_SPARK_Aux_Pragma): Update the assertion and node setting.
      	(Set_SPARK_Aux_Pragma_Inherited): Update the assertion and node setting.
      	(Set_SPARK_Pragma): Update the assertion and node setting.
      	(Set_SPARK_Pragma_Inherited): Update the assertion and node setting.
      	(Write_Field32_Name): Remove the output for SPARK_Pragma.
      	(Write_Field33_Name): Remove the output for SPARK_Aux_Pragma.
      	(Write_Field40_Name): Add output for SPARK_Pragma.
      	(Write_Field41_Name): Add output for SPARK_Aux_Pragma.
      	* einfo.ads Rewrite the documentation on attributes
      	SPARK_Pragma, SPARK_Aux_Pragma, SPARK_Pragma_Inherited and
      	SPARK_Aux_Pragma_Inherited. Update their uses in nodes.
      	* exp_ch4.adb (Create_Anonymous_Master): Use
      	Unique_Defining_Entity instead of Corresponding_Spec_Of.
      	* exp_ch9.adb (Expand_Entry_Declaration): Mark the barrier
      	function as such.
      	(Expand_N_Task_Body): Mark the task body as such.
      	(Expand_N_Task_Type_Declaration): Mark the task body as such.
      	* exp_unst.adb (Visit_Node): Use Unique_Defining_Entity instead
      	of Corresponding_Spec_Of.
      	* sem_attr.adb (Analyze_Attribute_Old_Result): Use
      	Unique_Defining_Entity instead of Corresponding_Spec_Of.
      	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Entry barrier
      	functions do not inherit the SPARK_Mode from the context.
      	(Build_Subprogram_Declaration): The matching spec is now marked
      	as a source construct to mimic the original stand alone body.
      	* sem_ch7.adb (Analyze_Package_Body_Helper): Code cleanup.
      	* sem_ch9.adb Add with and use clauses for Contracts.
      	(Analyze_Entry_Body): An entry body freezes the contract of
      	the nearest enclosing package body. The entry body now inherits
      	the SPARK_Mode from the context.
      	(Analyze_Entry_Declaration): A protected entry declaration now inherits
      	the SPARK_Mode from the context.
      	(Analyze_Protected_Body): A protected body freezes
      	the contract of the nearest enclosing package body. Set the
      	Etype of a protected body as this is neede for proper aspect
      	analysis. Protected bodies can now carry meaningful aspects and
      	those are now analyzed.
      	(Analyze_Protected_Type_Declaration): A protected type now inherits the
      	SPARK_Mode from the context.
      	(Analyze_Task_Body): A task body freezes the contract of the
      	nearest enclosing package body. Set the Etype of a task body
      	as this is needed for proper aspect analysis. A task body
      	now inherits the SPARK_Mode from the context.  Task bodies
      	can now carry meaningful aspects and those are now analyzed.
      	(Analyze_Task_Type_Declaration): A task type declaration now
      	inherits the SPARK_Mode of from the context.
      	* sem_ch10.adb (Analyze_Protected_Body_Stub): Protected body
      	stubs can now carry meaningful aspects.
      	(Analyze_Task_Body_Stub): Task body stubs can now carry meaningful
      	aspects.
      	* sem_ch13.adb (Analyze_Aspect_Specifications): Aspects SPARK_Mode
      	Warnings now use routine Insert_Pragma as means of insertion into
      	the tree.
      	(Insert_After_SPARK_Mode): Clean up documentation.
      	(Insert_Pragma): Clean up documentation. The routine is now
      	capable of operating on synchronized units.
      	* sem_prag.adb (Add_Entity_To_Name_Buffer): New routine.
      	(Analyze_Contract_Cases_In_Decl_Part): Use
      	Unique_Defining_Entity instead of Corresponding_Spec_Of.
      	(Analyze_Depends_Global): Use Unique_Defining_Entity instead
      	of Corresponding_Spec_Of.
      	(Analyze_Depends_In_Decl_Part): Use Unique_Defining_Entity instead of
      	Corresponding_Spec_Of.
      	(Analyze_Global_In_Decl_Part): Use Unique_Defining_Entity instead of
      	Corresponding_Spec_Of.
      	(Analyze_Pragma): Use Unique_Defining_Entity instead of
      	Corresponding_Spec_Of.
      	Update the detection of an illegal pragma Ghost when it applies
      	to a task or protected unit. Reimplement the handling of
      	pragma SPARK_Mode.
      	(Analyze_Pre_Post_Condition_In_Decl_Part): Use Unique_Defining_Entity
      	instead of Corresponding_Spec_Of.
      	(Analyze_Test_Case_In_Decl_Part): Use Unique_Defining_Entity instead of
      	Corresponding_Spec_Of.
      	(Check_Library_Level_Entity): Update the comment on usage.
      	Reimplemented to offer a more specialized errror context.
      	(Check_Pragma_Conformance): Update profile and comment on usage.
      	Handle error message output on single protected or task units.
      	(Collect_Subprogram_Inputs_Outputs): Use Unique_Defining_Entity
      	instead of Corresponding_Spec_Of.
      	(Process_Body): New routine.
      	(Process_Overloadable): New routine.
      	(Process_Private_Part): New routine.
      	(Process_Statement_Part): New routine.
      	(Process_Visible_Part): New routine.
      	(Set_SPARK_Context): New routine.
      	(Set_SPARK_Flags): Removed.
      	* sem_util.adb (Corresponding_Spec_Of): Removed.
      	(Unique_Entity): Reimplemented to handle many more cases.
      	* sem_util.ads (Corresponding_Spec_Of): Removed.
      	(Unique_Defining_Entity): Update the comment on usage.
      	* sinfo.ads (Is_Entry_Barrier_Function): Update the assertion.
      	(Is_Task_Body_Procedure): New routine.
      	(Set_Is_Entry_Barrier_Function): Update the assertion.
      	(Set_Is_Task_Body_Procedure): New routine.
      	* sinfo.adb Update the documentation of attribute
      	Is_Entry_Barrier_Function along with use in nodes. Add new
      	attribute Is_Task_Body_Procedure along with use in nodes.
      	(Is_Task_Body_Procedure): New routine along with pragma Inline.
      	(Set_Is_Task_Body_Procedure): New routine along with pragma Inline.
      
      From-SVN: r229328
      Arnaud Charlet committed
    • [multiple changes] · 078b1a5f
      2015-10-26  Gary Dismukes  <dismukes@adacore.com>
      
      	* sem_ch13.adb: Minor reformatting.
      
      2015-10-26  Steve Baird  <baird@adacore.com>
      
      	* exp_disp.adb: Omit most dispatch table initialization code
      	if Generate_SCIL is true.
      
      2015-10-26  Arnaud Charlet  <charlet@adacore.com>
      
      	* sinfo.ads, exp_ch3.adb: Revert previous change.
      	(Build_Record_Init_Proc): Do not build an aggregate if
      	Modify_Tree_For_C.
      
      From-SVN: r229327
      Arnaud Charlet committed
    • [multiple changes] · e4bda610
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch6.adb (Find_Corresponding_Spec): Reject a subprogram
      	body whose signature is type conformant with a previous expression
      	function.
      
      2015-10-26  Bob Duff  <duff@adacore.com>
      
      	* treepr.adb: Code clean up.
      
      From-SVN: r229326
      Arnaud Charlet committed
    • freeze.adb (Check_Component_Storage_Order): Skip a record component if it has… · dc9111cf
      freeze.adb (Check_Component_Storage_Order): Skip a record component if it has Complex_Representation.
      
      2015-10-26  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* freeze.adb (Check_Component_Storage_Order): Skip a record
      	component if it has Complex_Representation.
      	(Freeze_Record_Type): If the type has Complex_Representation, skip the
      	regular treatment of Scalar_Storage_Order attribute and instead issue
      	a warning if it is present.
      
      From-SVN: r229325
      Eric Botcazou committed
    • Add make_restrict_var_constraints · 930e85a3
      2015-10-26  Tom de Vries  <tom@codesourcery.com>
      
      	* tree-ssa-structalias.c (make_restrict_var_constraints): New function,
      	factored out of ...
      	(intra_create_variable_infos): ... here.
      
      From-SVN: r229324
      Tom de Vries committed
    • Add vars in intra_create_variables_info · 306fa91b
      2015-10-26  Tom de Vries  <tom@codesourcery.com>
      
      	* tree-ssa-structalias.c (intra_create_variable_infos): Add
      	restrict_pointer_p and recursive_restrict_p variables.
      
      From-SVN: r229323
      Tom de Vries committed
    • Inline get_vi_for_tree into intra_create_variable_infos · e541e62f
      2015-10-26  Tom de Vries  <tom@codesourcery.com>
      
      	* tree-ssa-structalias.c (intra_create_variable_infos): Inline
      	get_vi_for_tree call.
      
      From-SVN: r229322
      Tom de Vries committed
    • [multiple changes] · 77237288
      2015-10-26  Bob Duff  <duff@adacore.com>
      
      	* sem_ch13.adb (Check_Iterator_Functions): For a Default_Iterator
      	aspect, make sure an implicitly declared interpretation is
      	overridden by an explicit one.
      	* sem_util.ads: Update comment.
      
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_ch7.adb, sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only source
      	bodies should "freeze" the contract of the nearest enclosing
      	package body.
      
      From-SVN: r229321
      Arnaud Charlet committed
    • 2015-10-26 Joel Brobecker <brobecker@adacore.com brobecker> · 02886c2e
      	* adaint.c (__gnat_lwp_self): Replace current implementation re-using
      	the Linux one, which uses an __NR_gettid syscall rather than
      	pthread_self.
      
      2015-10-26  Arnaud Charlet  <charlet@adacore.com>
      
      	* sinfo.ads, exp_ch3.adb (Build_Array_Init_Proc,
      	Build_Record_Init_Proc): Do not inline init procs when
      	Modify_Tree_For_C is True.
      
      2015-10-26  Bob Duff  <duff@adacore.com>
      
      	* errout.ads: Minor comment fix.
      	* einfo.ads: Minor style fix.
      
      2015-10-26  Bob Duff  <duff@adacore.com>
      
      	* sem_ch3.adb (Derive_Interface_Subprogram): Fix
      	Is_Abstract_Subprogram, which might have been calculated
      	incorrectly, because we're passing Ultimate_Alias (Subp) (and
      	its dispatching type) to Derive_Subprogram, instead of the true
      	parent subprogram and type.
      
      2015-10-26  Bob Duff  <duff@adacore.com>
      
      	* sem_ch13.adb (Check_Iterator_Functions): When
      	printing the "default iterator must be unique" error message,
      	also print references to the places where the duplicates are
      	declared. This makes the message clearer.
      
      From-SVN: r229320
      Arnaud Charlet committed
    • Fix race on temp file in gfortran tests. · 51022ff7
      2015-10-26  Christophe Lyon  <christophe.lyon@linaro.org>
      
      	* gfortran.dg/chmod_1.f90: Add suffix to the temporary filename to
      	make it unique per testcase.
      	* gfortran.dg/chmod_2.f90: Likewise.
      	* gfortran.dg/chmod_3.f90: Likewise.
      	* gfortran.dg/direct_io_8.f90: Likewise.
      	* gfortran.dg/f2003_inquire_1.f03: Likewise.
      	* gfortran.dg/f2003_io_1.f03: Likewise.
      	* gfortran.dg/f2003_io_2.f03: Likewise.
      	* gfortran.dg/f2003_io_8.f03: Likewise.
      	* gfortran.dg/inquire_size.f90: Likewise.
      	* gfortran.dg/namelist_66.f90: Likewise.
      	* gfortran.dg/namelist_82.f90: Likewise.
      	* gfortran.dg/namelist_87.f90: Likewise.
      	* gfortran.dg/open_negative_unit_1.f90: Likewise.
      	* gfortran.dg/open_new.f90: Likewise.
      	* gfortran.dg/stat_1.f90: Likewise.
      	* gfortran.dg/stat_2.f90: Likewise.
      	* gfortran.dg/streamio_15.f90: Likewise.
      	* gfortran.dg/unf_read_corrupted_1.f90: Likewise.
      
      From-SVN: r229319
      Christophe Lyon committed
    • [multiple changes] · a9fdbccb
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Analyze_Formal_Package_Declaration): Do not set
      	Box_Present when the formal part is (others => <>) even though
      	it is equivalent to a formal part (<>), because ASIS tools depend
      	on the syntactic setting of this flag.
      
      2015-10-26  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_ch13.adb: Minor reformatting.
      	* einfo.ads: Minor typo.
      
      2015-10-26  Joel Brobecker  <brobecker@adacore.com brobecker>
      
      	* adaint.c (__gnat_open_new_temp): Use mkstemp on Android.
      
      From-SVN: r229318
      Arnaud Charlet committed
    • [optabs.c] Fix PR 67989: Handle const0_rtx target in expand_atomic_compare_and_swap · f8ac2f07
      	PR middle-end/67989
      	* optabs.c (expand_atomic_compare_and_swap): Handle case when
      	ptarget_oval or ptarget_bool are const0_rtx.
      
      	* g++.dg/pr67989.C: New test.
      
      From-SVN: r229317
      Kyrylo Tkachov committed
    • sem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up. · 8c14315a
      
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up.
      	* sem_ch13.adb (Check_Inherited_Indexing): New inner procedure
      	of Check_Indexing_Functions, to verify that a derived type with an
      	Indexing aspect is not inheriting such an aspect from an ancestor.
      	(Check_Indexing_Functions): Call Check_Inherited_Indexing within
      	an instance.
      
      From-SVN: r229316
      Ed Schonberg committed
    • Fix race on temp file in gfortran streamio_*.f90 tests · 013a83cc
      	* gfortran.dg/streamio_4.f90, gfortran.dg/streamio_5.f90,
      	* gfortran.dg/streamio_6.f90, gfortran.dg/streamio_7.f90,
      	* gfortran.dg/streamio_10.f90, gfortran.dg/streamio_12.f90: Add
      	suffix to the temporary filename to make it unique per testcase.
      
      From-SVN: r229315
      Maxim Kuvyrkov committed
    • [multiple changes] · e96b7045
      2015-10-26  Gary Dismukes  <dismukes@adacore.com>
              
              * a-reatim.adb, contracts.adb, contracts.ads: Minor reformatting and
              typo corrections.
      
      2015-10-26  Ed Schonberg  <schonberg@adacore.com>
              
              * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
              recheck the consistency betwen the freeze point and the end of
              declarations for the expression in an aspect specification,
              because it was done already in the analysis of the generic.
              Furthermore, the delayed analysis of an aspect of the instance
              may produce spurious errors when the generic is a child unit
              that references entities in the parent (which might not be in
              scope at the freeze point of the instance).
      
      2015-10-26  Yannick Moy  <moy@adacore.com>
              
              * sem_res.adb (Resolve_Call): Issue info message
              instead of warning when call cannot be inlined in GNATprove mode.
      
      2015-10-26  Arnaud Charlet  <charlet@adacore.com>
              
              * exp_ch6.adb (Build_Procedure_Form): Use _result as the
              name of the extra parameter, cleaner than a random temp name.
              * gnat1drv.adb (Gnat1drv): Code clean up.
      
      From-SVN: r229314
      Arnaud Charlet committed
    • function.h (MINIMUM_METHOD_BOUNDARY): New macro. · c1fffdf1
      2015-10-26  Christian Bruel  <christian.bruel@st.com>
      
      	* function.h (MINIMUM_METHOD_BOUNDARY): New macro.
      	* cp/decl.c (grokfndecl): Set DECL_ALIGN with MINIMUM_METHOD_BOUNDARY.
      	* cp/method.c (implicitly_declare_fn): Likewise.
      	* cp/lambda.c (maybe_add_lambda_conv_op): Likewise. Remove VBIT setting.
      	* java/class.c (add_method_1): Likewise.
      
      From-SVN: r229313
      Christian Bruel committed
    • alloc-pool.h (base_pool_allocator): Use placement new. · 5929c659
      2015-10-26  Richard Biener  <rguenther@suse.de>
      
      	* alloc-pool.h (base_pool_allocator): Use placement new.
      	(base_pool_allocator::remove): Likewise.  Compute size outside of
      	flag_checking.
      
      From-SVN: r229312
      Richard Biener committed
    • Move int rounding folds to match.pd · 543a9bcd
      Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
      
      gcc/
      	* builtins.c (do_real_to_int_conversion): New function.
      	(fold_fixed_mathfn, fold_builtin_int_roundingfn): Delete.
      	(fold_builtin_1): Handle constant {i,l,ll}{ceil,floor,round}{f,,l}
      	arguments here.
      	* match.pd: Add rules previously handled by fold_fixed_mathfn
      	and fold_builtin_int_roundingfn.
      
      gcc/testsuite/
      	* gcc.dg/torture/builtin-minmax-1.c: Don't run at -O0.
      
      From-SVN: r229311
      Richard Sandiford committed
    • Use macros to define built-in operator lists · 257aecb4
      No functional change.  This should be a slight readability improvement
      on its own, but becomes more important with the next patch.
      
      Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
      
      gcc/
      	* match.pd: Use macros to define built-in operator lists.
      
      From-SVN: r229310
      Richard Sandiford committed
    • Fix scripto · 0eb72c5d
      From-SVN: r229309
      Richard Sandiford committed