1. 11 Jan, 2018 3 commits
    • [Ada] Minor reformatting · 27d357ca
      2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
      
      gcc/ada/
      
      	* binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
      	Minor reformatting.
      
      From-SVN: r256518
      Hristian Kirtchev committed
    • [Ada] Warning on use of predefined operations on an actual fixed-point type · 07733aa1
      The compiler warns when a generic actual is a fixed-point type, because
      arithmetic operations in the instance will use the predefined operations on
      it, even if the type has user-defined primitive operations (unless formsl
      surprograms for these operations appear in the generic). This patch refines
      this warning to exclude the case where the formsal type is private, because
      in this case there can be no suspicious arithmetic operastions in the generic
      unit.
      
      2018-01-11  Ed Schonberg  <schonberg@adacore.com>
      
      gcc/ada/
      
      	* sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
      	formsl type corresponding to the actual fixed point type is private,
      	because in this case there can be no suspicious arithmetic operations
      	in the generic unless they reference a formal subprogram.  Clarify
      	warning.
      
      gcc/testsuite/
      
      	* gnat.dg/fixedpnt2.adb, gnat.dg/fixedpnt2.ads: New testcase.
      
      From-SVN: r256504
      Ed Schonberg committed
    • [Ada] Encoding of with clauses in ALI files · 94ce4941
      This patch modifies the encodings of with clauses in ALI files to adhere to the
      existing API. The encodigs are as follows:
      
         * Explicit with clauses are encoded on a 'W' line (same as before).
      
         * Implicit with clauses for ancestor units are encoded on a 'W' line (same
           as before).
      
         * Limited_with clauses are encoded on a 'Y' line (same as before).
      
         * ABE and RTSfind-related with clauses are encoded on a 'Z' line.
      
      ------------
      -- Source --
      ------------
      
      --  case_10_func.adb
      
      function Case_10_Func return Boolean is
      begin
         return True;
      end Case_10_Func;
      
      --  case_10_gen_func.ads
      
      generic
      function Case_10_Gen_Func return Boolean;
      
      --  case_10_gen_func.adb
      
      function Case_10_Gen_Func return Boolean is
      begin
         return True;
      end Case_10_Gen_Func;
      
      --  case_10_tasks.ads
      
      package Case_10_Tasks is
         task type Task_Typ is
         end Task_Typ;
      end Case_10_Tasks;
      
      --  case_10_tasks.adb
      
      package body Case_10_Tasks is
         task body Task_Typ is begin null; end Task_Typ;
      end Case_10_Tasks;
      
      --  case_10_gen.ads
      
      with Case_10_Func;
      with Case_10_Gen_Func;
      with Case_10_Tasks;
      
      generic
      package Case_10_Gen is
         Val : constant Boolean := Case_10_Func;
      
         function Inst is new Case_10_Gen_Func;
      
         Tsk : Case_10_Tasks.Task_Typ;
      end Case_10_Gen;
      
      --  case_10.ads
      
      with Case_10_Gen;
      
      package Case_10 is
         package Inst is new Case_10_Gen;
      end Case_10;
      
      ----------------------------
      -- Compilation and output --
      ----------------------------
      
      $ gcc -c case_10.ads
      $ grep "W " case_10.ali | sort
      $ grep "Z " case_10.ali | sort
      W case_10_gen%s		case_10_gen.ads		case_10_gen.ali
      Z case_10_func%b	case_10_func.adb	case_10_func.ali
      Z case_10_gen_func%s	case_10_gen_func.adb	case_10_gen_func.ali  ED
      Z case_10_tasks%s	case_10_tasks.adb	case_10_tasks.ali  AD
      Z system.soft_links%s	s-soflin.adb		s-soflin.ali
      Z system.tasking%s	s-taskin.adb		s-taskin.ali
      Z system.tasking.stages%s  s-tassta.adb		s-tassta.ali
      
      2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
      
      gcc/ada/
      
      	* ali.adb: Document the remaining letters available for ALI lines.
      	(Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
      	* ali.ads: Update type With_Record. Field
      	Implicit_With_From_Instantiation is no longer in use. Add field
      	Implicit_With.
      	* csinfo.adb (CSinfo): Remove the setup for attribute
      	Implicit_With_From_Instantiation.
      	* lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
      	either implicitly or explicitly withed.
      	(Is_Implicit_With_Clause): New routine.
      	(Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
      	confusion with the with clause attribute by the same name.
      	(Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
      	* rtsfind.adb (Maybe_Add_With): Code cleanup.
      	* sem_ch8.adb (Present_System_Aux): Code cleanup.
      	* sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
      	for a parent unit.
      	(Implicit_With_On_Parent): Mark the with clause as generated for a
      	parent unit.
      	* sem_ch12.adb (Inherit_Context): With clauses inherited by an
      	instantiation are no longer marked as Implicit_With_From_Instantiation
      	because they are already marked as implicit.
      	* sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
      	which marks implicit with clauses as related to an instantiation.
      	* sinfo.adb (Implicit_With_From_Instantiation): Removed.
      	(Parent_With): New routine.
      	(Set_Implicit_With_From_Instantiation): Removed.
      	(Set_Parent_With): New routine.
      	* sinfo.ads: Update the documentation of attribute Implicit_With.
      	Remove attribute Implicit_With_From_Instantiation along with
      	occurrences in nodes.  Add attribute Parent_With along with occurrences
      	in nodes.
      	(Implicit_With_From_Instantiation): Removed along with pragma Inline.
      	(Parent_With): New routine along with pragma Inline.
      	(Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
      	(Set_Parent_With): New routine along with pragma Inline.
      
      From-SVN: r256490
      Hristian Kirtchev committed
  2. 05 Dec, 2017 1 commit
    • [multiple changes] · 967947ed
      2017-12-05  Olivier Hainque  <hainque@adacore.com>
      
      	* s-dwalin.adb (Read_And_Execute_Isn): Adjust test checking for the end
      	of section. Add comments explaining the rationale of the computation.
      
      2017-12-05  Bob Duff  <duff@adacore.com>
      
      	* exp_ch11.adb: Minor refactoring.
      
      2017-12-05  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* debug.adb: Add debug switches d_a, d_e, and d_p, along with
      	documentation.
      	(Set_Underscored_Debug_Flag): New routine.
      	* debug.ads: Add the flags for all underscore switches.
      	(Set_Underscored_Debug_Flag): New routine.
      	* einfo.adb: Flag303 is now Suppress_Elaboration_Warnings.
      	(Suppress_Elaboration_Warnings): New routine.
      	(Set_Suppress_Elaboration_Warnings): New routine.
      	(Write_Entity_Flags): Add output for Suppress_Elaboration_Warnings.
      	* einfo.ads: Add new flag Suppress_Elaboration_Warnings.
      	(Suppress_Elaboration_Warnings): New routine along with pragma Inline.
      	(Set_Suppress_Elaboration_Warnings): New routine along with pragma
      	Inline.
      	* exp_ch3.adb (Build_Init_Procedure): Restore the behavior of the
      	legacy elaboration model.
      	(Default_Initialize_Object): Restore the behavior of the legacy
      	elaboration model.
      	* exp_ch9.adb: Add with and use clause for Sem_Elab.
      	(Build_Task_Activation_Call): Restore the behavior of the legacy
      	elaboration model.
      	* frontend.adb (Frontend): Restore the behavior of the legacy
      	elaboration model.
      	* opt.ads: Add new flags Legacy_Elaboration_Checks and
      	Relaxed_Elaboration_Checks, along with documentation.
      	* sem_attr.adb (Analyze_Access_Attribute): Restore the behavior of the
      	legacy elaboration model.
      	* sem_ch5.adb (Analyze_Assignment): Restore the behavior of the legacy
      	elaboration model.
      	* sem_ch7.adb (Analyze_Package_Declaration): Restore the behavior of
      	the legacy elaboration model.
      	* sem_ch8.adb (Attribute_Renaming): Restore the behavior of the legacy
      	elaboration model.
      	* sem_ch12.adb (Analyze_Instance_And_Renamings): Restore the behavior
      	of the legacy elaboration model.
      	(Analyze_Package_Instantiation): Restore the behavior of the legacy
      	elaboration model.
      	(Analyze_Subprogram_Instantiation): Restore the behavior of the legacy
      	elaboration model.
      	* sem_elab.adb: Update the documentation of the Processing phase.
      	Update the documentation on elaboration-related compilation
      	switches.  Update the documentation on adding a new target.  Add
      	Processing_Attributes which represent the state of the Processing
      	phase.  Resurrect the previous elaboration model as "legacy elaboration
      	model".
      	(Build_Call_Marker): This routine does not function when the legacy
      	elaboration model is in effect. Do not consider entry calls and requeue
      	statements when debug flag d_e is in effect. Do not consider calls to
      	subprograms which verify the runtime semantics of certain assertion
      	pragmas when debug flag d_p is in effect.
      	(Build_Variable_Reference_Marker): This routine does not function when
      	the legacy elaboration model is in effect.
      	(Check_Elaboration_Scenarios): This routine does not function when the
      	legacy elaboration model is in effect.
      	(Ensure_Prior_Elaboration): The various flags have now been replaced
      	with a state. Do not generate implicit Elaborate[_All] pragmas when
      	their creation has been suppressed.
      	(Ensure_Prior_Elaboration_Static): The with clause is marked based on
      	the requested pragma, not on the nature of the scenario.
      	(In_External_Context): Removed.
      	(Is_Assertion_Pragma_Target): New routine.
      	(Is_Potential_Scenario): Stop the traversal of a task body when
      	reaching an accept or select statement, and debug switch d_a is in
      	effect.
      	(Kill_Elaboration_Scenario): This routine does not function when the
      	legacy elaboration model is in effect.
      	(Process_Activation_Generic): The various flags have now been replaced
      	with a state.
      	(Process_Conditional_ABE): The various flags have now been replaced
      	with a state.
      	(Process_Conditional_ABE_Access): The various flags have now been
      	replaced with a state.
      	(Process_Conditional_ABE_Activation_Impl): The various flags have now
      	been replaced with a state. Do not process an activation call which
      	activates a task whose type is defined in an external instance, and
      	debug switch dL is in effect. Suppress the generation of implicit
      	Elaborate[_All] pragmas once a conditional ABE check has been
      	installed.
      	(Process_Conditional_ABE_Call): The various flags have now been
      	replaced with a state. Do not process a call which invokes a subprogram
      	defined in an external instance, and debug switch dL is in effect.
      	(Process_Conditional_ABE_Call_Ada): The various flags have now been
      	replaced with a state. Suppress the generation of implicit
      	Elaborate[_All] pragmas once a conditional ABE check has been
      	installed.
      	(Process_Conditional_ABE_Call_SPARK): The various flags have now been
      	replaced with a state.
      	(Process_Conditional_ABE_Instantiation): The various flags have now
      	been replaced with a state.
      	(Process_Conditional_ABE_Instantiation_Ada): The various flags have now
      	been replaced with a state. Suppress the generation of implicit
      	Elaborate[_All] pragmas once a conditional ABE check has been
      	installed.
      	(Process_Conditional_ABE_Instantiation_SPARK): The various flags have
      	now been replaced with a state.
      	(Process_Guaranteed_ABE_Activation_Impl): The various flags have now
      	been replaced with a state.
      	(Process_Single_Activation): The various flags have now been replaced
      	with a state.
      	(Record_Elaboration_Scenario): This routine does not function when the
      	legacy elaboration model is in effect.
      	(Traverse_Body): The various flags have now been replaced with a state.
      	* sem_elab.ads: Resurrect the pre-18.x elaboration model as "legacy
      	elaboration model".
      	* sem_prag.adb (Analyze_Pragma): Restore the behavior of the legacy
      	elaboration model.
      	* sem_res.adb (Resolve_Call): Restore the behavior of the legacy
      	elaboration model.
      	(Resolve_Entity_Name): Restore the behavior of the legacy elaboration
      	model.
      	* sem_util.adb (Mark_Elaboration_Attributes): This routine does not
      	function when the legacy elaboration model is in effect.
      	* sinfo.adb (Is_Known_Guaranteed_ABE): Update the assertion check.
      	(No_Elaboration_Check): New routine.
      	(Set_Is_Known_Guaranteed_ABE): Update the assertion check.
      	(Set_No_Elaboration_Check): New routine.
      	* sinfo.ads: Update the documentation of flag Is_Known_Guaranteed_ABE
      	along with occurrences in nodes.  Add new flag No_Elaboration_Check
      	along with occurrences in nodes.
      	* switch-c.adb (Scan_Front_End_Switches): Add processing for debug
      	switches with underscores.  Add processing for switches -gnatH and
      	-gnatJ.
      	* usage.adb (Usage): Add output for switches -gnatH and -gnatJ.
      	* doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
      	documentation to include the legacy and relaxed elaboration models.
      	* gnat_ugn.texi: Regenerate.
      
      2017-12-05  Arnaud Charlet  <charlet@adacore.com>
      
      	* doc/gnat_ugn/platform_specific_information.rst: Minor edit.
      	Improve doc on required packages for linux 32bits.
      
      2017-12-05  Doug Rupp  <rupp@adacore.com>
      
      	* tracebak.c (ppc64-vx7): USE_GCC_UNWINDER for 64bit.
      
      2017-12-05  Javier Miranda  <miranda@adacore.com>
      
      	* checks.adb (Generate_Range_Check): Force evaluation of the node in
      	more cases.  This patch was written to improve the code generated by
      	the CCG compiler but it is enabled for all targets since double
      	evaluation is always a potential source of inefficiency.
      
      2017-12-05  Gary Dismukes  <dismukes@adacore.com>
      
      	* doc/gnat_ugn/gnat_utility_programs.rst: Remove reference to obsolete
      	-fdump-xref switch.
      
      From-SVN: r255412
      Pierre-Marie de Rodat committed
  3. 16 Nov, 2017 1 commit
    • opt.ads: Elaboration warnings are now on by default. · 7fb62ca1
      2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* opt.ads: Elaboration warnings are now on by default. Add a comment
      	explaining why this is needed.
      	* sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration
      	warnings.
      	* sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of
      	elaboration warnings.
      	(Analyze_Subprogram_Instantiation): Preserve the status of elaboration
      	warnings.
      	* sem_elab.adb: Update the structure of Call_Attributes and
      	Instantiation_Attributes.
      	(Build_Call_Marker): Propagate the status of elaboration warnings from
      	the call to the marker.
      	(Extract_Call_Attributes): Extract the status of elaboration warnings.
      	(Extract_Instantiation_Attributes): Extract the status of elaboration
      	warnings.
      	(Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are
      	now dependent on the status of elaboration warnings.
      	(Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now
      	dependent on the status of elaboration warnings.
      	(Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics
      	are now dependent on the status of elaboration warnings.
      	(Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced
      	for formal Call_Attrs. Elaboration diagnostics are now dependent on the
      	status of elaboration warnings.
      	(Process_Guaranteed_ABE_Call): Elaboration diagnostics are now
      	dependent on the status of elaboration warnings.
      	(Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now
      	dependent on the status of elaboration warnings.
      	* sem_prag.adb (Analyze_Pragma): Remove the unjustified warning
      	concerning pragma Elaborate.
      	* sem_res.adb (Resolve_Call): Preserve the status of elaboration
      	warnings.
      	(Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node
      	from the procedure call to the entry call.
      	* sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter
      	Warnings.
      	(Mark_Elaboration_Attributes_Node): Preserve the status of elaboration
      	warnings
      	* sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter
      	Warnings. Update the comment on usage.
      	* sinfo.adb (Is_Dispatching_Call): Update to use Flag6.
      	(Is_Elaboration_Warnings_OK_Node): New routine.
      	(Set_Is_Dispatching_Call): Update to use Flag6.
      	(Set_Is_Elaboration_Warnings_OK_Node): New routine.
      	* sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new
      	attribute Is_Elaboration_Warnings_OK_Node along with occurrences
      	in nodes.
      	(Is_Elaboration_Warnings_OK_Node): New routine along with pragma
      	Inline.
      	(Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma
      	Inline.
      	* doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various
      	sections to indicate how to suppress elaboration warnings.  Document
      	switches -gnatwl and -gnatwL.
      	* gnat_ugn.texi: Regenerate.
      
      From-SVN: r254819
      Hristian Kirtchev committed
  4. 09 Nov, 2017 4 commits
    • [multiple changes] · 65e5747e
      2017-11-09  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
      	the pragma Compile_Time_Error when it appears in a generic package
      	declaration and uses an expanded name to denote the current unit.
      
      2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
      
      	* libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
      	* tracebak.c: Add support for tracebacks in QNX.
      
      2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
      
      2017-11-09  Yannick Moy  <moy@adacore.com>
      
      	* erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
      	justification.
      
      2017-11-09  Joel Brobecker  <brobecker@adacore.com>
      
      	* doc/gnat_ugn/platform_specific_information.rst: Document packages
      	needed on GNU/Linux by GNAT.
      	* gnat_ugn.texi: Regenerate.
      
      2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* contracts.adb (Analyze_Contracts): Remove the three parameter
      	version. This routine now only analyzes contracts and does not perform
      	any freezing actions.
      	(Analyze_Previous_Contracts): Removed.
      	(Freeze_Previous_Contracts): New routine.
      	* contracts.ads (Analyze_Previous_Contracts): Removed.
      	(Freeze_Previous_Contracts): New routine.
      	* sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
      	enclosing package spec regardless of whether the list denotes the
      	visible or private declarations.  Fix the removal of partial state
      	refinements when the context is a package spec.
      	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
      	contracts.
      	* sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
      	* sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
      	(Analyze_Protected_Body): Freeze previous contracts.
      	(Analyze_Task_Body): Freeze previous contracts.
      	* sem_prag.adb: Comment reformatting.
      
      2017-11-09  Bob Duff  <duff@adacore.com>
      
      	* libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
      	Export this so users can use it without importing
      	System.Tasking.Utilities.
      	* libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
      	that fails when Make_Independent is called on a user task.
      	* libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
      	capitalization style ((style) bad casing of "Master_of_Task").
      
      From-SVN: r254580
      Pierre-Marie de Rodat committed
    • [multiple changes] · 614bc51c
      2017-11-09  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
      	uninitialized variable uncovered by Codepeer.
      
      2017-11-09  Arnaud Charlet  <charlet@adacore.com>
      
      	* namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
      
      2017-11-09  Javier Miranda  <miranda@adacore.com>
      
      	* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
      	(Static_Dispatch_Tables): Minor rewording.
      	* gnat_rm.texi: Regenerate.
      
      2017-11-09  Justin Squirek  <squirek@adacore.com>
      
      	* sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
      	use_clauses within instances.
      	(Use_One_Package): Add condition to check for "hidden" open scopes to
      	avoid skipping over packages that have not been properly installed even
      	though they are visible.
      
      2017-11-09  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
      	private operation of a protected type, when the type has no visible
      	operations.
      
      From-SVN: r254578
      Pierre-Marie de Rodat committed
    • [multiple changes] · 5612989e
      2017-11-09  Javier Miranda  <miranda@adacore.com>
      
      	* rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
      	* exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
      	if available.
      
      2017-11-09  Bob Duff  <duff@adacore.com>
      
      	* exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
      	sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
      	sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
      	variables.
      
      From-SVN: r254577
      Pierre-Marie de Rodat committed
    • [multiple changes] · dcd5fd67
      2017-11-09  Yannick Moy  <moy@adacore.com>
      
      	* binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
      	* checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
      	use.  Default initialize Hi, Lo.
      	(Selected_Range_Checks): Retype Num_Checks more precisely.
      	(Determine_Range, Determine_Range_R): Default initialize Hi_Right,
      	Lo_Right.
      	* contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
      	Unmodified.
      	(Process_Postconditions): Mark parameter Stmts as Unmodified.
      	* exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
      	* exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
      	(Expand_Concatenate): Default initialize High_Bound.
      	(Optimize_Length_Comparison): Default initialize Ent, Index.
      	* exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
      	L_Lo.
      	* exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
      	Return_Stmt.
      	* exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
      	remove pragma Warnings(Off).
      	* exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
      	* exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
      	* freeze.adb (Check_Component_Storage_Order): Default initialize
      	Comp_Byte_Aligned rather than silencing messages with pragma
      	Warnings(Off), which does not work for CodePeer initialization
      	messages, and given that here the possible read of an unitialized value
      	depends on a proper use of parameters by the caller.
      	* inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
      	* sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
      	* sem_ch3.adb (Build_Derived_Array_Type): Default initialize
      	Implicit_Base.
      	* sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
      	pragma Warnings(Off).
      	(Analyze_Case_Expression): Rescope checking block within branch where
      	Others_Present is set by the call to Check_Choices.
      	* sem_ch5.adb (Analyze_Assignment): Default initialize
      	Save_Full_Analysis.
      	* sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
      	and restructure code to defend against previous errors, so that, in
      	that case, control does not flow to the elsif condition which read an
      	uninitialized Obj_Decl.
      	* sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
      	(Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
      	which seem to be left uninitialized and possibly read in some cases.
      	* sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
      	precisely.  This requires to exchange the test for exiting in case of
      	too many positions and the increment to Position, inside the loop.
      	* sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
      	which cannot be read uninitialized, but the reasons for that are quite
      	subtle.
      	* sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
      	* sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
      	Spec_Id.
      	* sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
      	and test for presence of non-null Opnd_Type before testing its scope,
      	in a test which would read its value uninitialized, and is very rarely
      	exercized (it depends on the presence of an extension of System).
      	* sem_spark.ads: Update comment to fix name of main analysis procedure.
      	* sem_warn.adb (Warn_On_Known_Condition): Default initialize
      	Test_Result.
      	* set_targ.adb (FailN): Mark procedure with No_Return.
      	* stylesw.adb (Save_Style_Check_Options): Delete useless code to
      	initialize all array Options to white space, as there is already code
      	doing the same for the remaining positions in Options at the end of the
      	procedure.
      
      2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
      	generic instantiations either.
      
      From-SVN: r254570
      Pierre-Marie de Rodat committed
  5. 20 Oct, 2017 2 commits
    • sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to compare a… · 8f8f531f
      sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to compare a dimensioned expression with a literal.
      
      gcc/ada/
      
      2017-10-20  Yannick Moy  <moy@adacore.com>
      
      	* sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
      	compare a dimensioned expression with a literal.
      	(Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
      	special value zero.
      	* doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
      	dimensionality system in GNAT.
      	* gnat_ugn.texi: Regenerate.
      
      2017-10-20  Yannick Moy  <moy@adacore.com>
      
      	* sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
      	inadequate silencing of errors.
      	* sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
      	checking the subprogram body generated from an expression function,
      	when this is done as part of the preanalysis done on expression
      	functions, as the subprogram body may not yet be attached in the AST.
      	The error if any will be issued later during the analysis of the body.
      	(Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
      
      2017-10-20  Arnaud Charlet  <charlet@adacore.com>
      
      	* sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
      	warning on ineffective use clause.
      
      2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
      	* exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
      	to issue the warning on the absence of local raise.
      	(Possible_Local_Raise): Do not issue the warning for Call_Markers.
      	(Warn_If_No_Local_Raise): New procedure to issue the warning on the
      	absence of local raise.
      	* sem_elab.adb: Add with and use clauses for Exp_Ch11.
      	(Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
      	where a scenario could give rise to raising Program_Error.
      	* sem_elab.adb: Typo fixes.
      	* fe.h (Warn_If_No_Local_Raise): Declare.
      	* gcc-interface/gigi.h (get_exception_label): Change return type.
      	* gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
      	simple vector of Entity_Id.
      	(gnu_storage_error_label_stack): Likewise.
      	(gnu_program_error_label_stack): Likewise.
      	(gigi): Adjust to above changes.
      	(Raise_Error_to_gnu): Likewise.
      	(gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
      	(N_Push_Constraint_Error_Label): Push the label onto the stack.
      	(N_Push_Storage_Error_Label): Likewise.
      	(N_Push_Program_Error_Label): Likewise.
      	(N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
      	a warning on the absence of local raise.
      	(N_Pop_Storage_Error_Label): Likewise.
      	(N_Pop_Program_Error_Label): Likewise.
      	(push_exception_label_stack): Delete.
      	(get_exception_label): Change return type to Entity_Id and adjust.
      	* gcc-interface/utils2.c (build_goto_raise): Change type of first
      	parameter to Entity_Id and adjust.  Set TREE_USED on the label.
      	(build_call_raise): Adjust calls to get_exception_label and also
      	build_goto_raise.
      	(build_call_raise_column): Likewise.
      	(build_call_raise_range): Likewise.
      	* doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
      	Document actual default behavior.
      
      2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
      
      	* einfo.ads: Minor consistent punctuation in comment.  All numbered
      	items in the comment of Is_Internal are now terminated with a period.
      
      2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
      
      	* exp_util.adb (Build_Temporary): Mark created temporary entity as
      	internal.
      
      2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
      
      	* sem_type.adb (In_Generic_Actual): Simplified.
      
      2017-10-20  Justin Squirek  <squirek@adacore.com>
      
      	* sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
      	verify a renaming exists for a generic formal before comparing it to
      	the actual as defaulted formals will not have a renamed_object.
      
      2017-10-20  Javier Miranda  <miranda@adacore.com>
      
      	* exp_ch6.adb (Replace_Returns): Fix wrong management of
      	N_Block_Statement nodes.
      
      gcc/testsuite/
      
      2017-10-20  Justin Squirek  <squirek@adacore.com>
      
      	* gnat.dg/default_pkg_actual.adb, gnat.dg/default_pkg_actual2.adb: New
      	testcases.
      
      From-SVN: r253945
      Pierre-Marie de Rodat committed
    • exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a component of an array aggregate if... · e201023c
      gcc/ada/
      
      2017-10-20  Bob Duff  <duff@adacore.com>
      
      	* exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
      	component of an array aggregate if it is initialized by a
      	build-in-place function call.
      	* exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
      	bip for nonlimited types.
      	* debug.adb: Document -gnatd.9.
      
      2017-10-20  Bob Duff  <duff@adacore.com>
      
      	* sem_ch12.adb: Remove redundant setting of Parent.
      
      2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
      	of the operands is a string literal.
      
      2017-10-20  Bob Duff  <duff@adacore.com>
      
      	* einfo.ads: Comment fix.
      
      2017-10-20  Clement Fumex  <fumex@adacore.com>
      
      	* switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
      
      2017-10-20  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_dim.adb (Extract_Power): Accept dimension values that are not
      	non-negative integers when the dimensioned base type is an Integer
      	type.
      
      gcc/testsuite/
      
      2017-10-20  Ed Schonberg  <schonberg@adacore.com>
      
      	* gnat.dg/dimensions.adb, gnat.dg/dimensions.ads: New testcase.
      
      From-SVN: r253941
      Pierre-Marie de Rodat committed
  6. 09 Oct, 2017 3 commits
    • [multiple changes] · 7f5e671b
      2017-10-09  Justin Squirek  <squirek@adacore.com>
      
      	* sem_ch3.adb: Rename Uses_Unseen_Priv into
      	Contains_Lib_Incomplete_Type.
      
      2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
      	sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
      	exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
      	prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
      	sem_ch10.adb, par-ch8.adb: Minor reformatting.
      
      From-SVN: r253566
      Pierre-Marie de Rodat committed
    • [multiple changes] · 90e491a7
      2017-10-09  Bob Duff  <duff@adacore.com>
      
      	* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
      	Defining_Identifier (Obj_Decl) in two places, because it might have
      	changed.
      	* exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
      	involving 'Input on (not visibly) derived types.
      
      2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* atree.adb: Add new soft link Rewriting_Proc.
      	(Rewrite): Invoke the subprogram attached to the rewriting soft link.
      	(Set_Rewriting_Proc): New routine.
      	* attree.ads: Add new access-to-subprogram type Rewrite_Proc.
      	(Set_Rewriting_Proc): New routine.
      	* checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
      	for *E*laboration flag to maintain consistency with other elaboration
      	flag generating subprograms.
      	* debug.adb: Document the new usage of flag -gnatdL.
      	* einfo.adb: Node19 is now used as Receiving_Entry.  Node39 is now used
      	as Protected_Subprogram.  Flag148 is now used as
      	Is_Elaboration_Checks_OK_Id.  Flag302 is now used as
      	Is_Initial_Condition_Procedure.
      	(Is_Elaboration_Checks_OK_Id): New routine.
      	(Is_Initial_Condition_Procedure): New routine.
      	(Protected_Subprogram): New routine.
      	(Receiving_Entry): New routine.
      	(SPARK_Pragma): Update assertion.
      	(SPARK_Pragma_Inherited): Update assertion.
      	(Suppress_Elaboration_Warnings): Removed.
      	(Set_Is_Elaboration_Checks_OK_Id): New routine.
      	(Set_Is_Initial_Condition_Procedure): New routine.
      	(Set_Protected_Subprogram): New routine.
      	(Set_Receiving_Entry): New routine.
      	(Set_SPARK_Pragma): Update assertion.
      	(Set_SPARK_Pragma_Inherited): Update assertion.
      	(Write_Entity_Flags): Update the output for Flag148 and Flag302.
      	(Write_Field19_Name): Add output for Receiving_Entry.
      	(Write_Field39_Name): Add output for Protected_Subprogram.
      	(Write_Field40_Name): Update the output for SPARK_Pragma.
      	* einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
      	Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
      	Remove attribute Suppress_Elaboration_Warnings.  Update the stricture
      	of various entities.
      	(Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
      	(Is_Initial_Condition_Procedure): New routine along with pragma Inline.
      	(Protected_Subprogram): New routine along with pragma Inline.
      	(Receiving_Entry): New routine along with pragma Inline.
      	(Suppress_Elaboration_Warnings): Removed.
      	(Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
      	Inline.
      	(Set_Is_Initial_Condition_Procedure): New routine along with pragma
      	Inline.
      	(Set_Protected_Subprogram): New routine along with pragma Inline.
      	(Set_Receiving_Entry): New routine along with pragma Inline.
      	(Set_Suppress_Elaboration_Warnings): Removed.
      	* exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
      	consistency with other finalizer generating subprograms.
      	(Default_Initialize_Object): Mark the block which wraps the call to
      	finalize as being part of initialization.
      	* exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
      	Initial_Condition.
      	(Expand_N_Package_Body): Directly expand pragma Initial_Condition.
      	(Next_Suitable_Statement): Update the comment on usage. Skip over call
      	markers generated by the ABE mechanism.
      	* exp_ch9.adb (Activation_Call_Loc): New routine.
      	(Add_Accept): Link the accept procedure to the original entry.
      	(Build_Protected_Sub_Specification): Link the protected or unprotected
      	version to the original subprogram.
      	(Build_Task_Activation_Call): Code cleanup. Use a source location which
      	is very close to the "begin" or "end" keywords when generating the
      	activation call.
      	* exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
      	* exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
      	process loops.
      	(Expand_SPARK_N_Loop_Statement): New routine.
      	(Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
      	call to the Default_Initial_Condition procedure.
      	(Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
      	* exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
      	effect.
      	(Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
      	(Insert_Actions): Add processing for N_Call_Marker.
      	(Kill_Dead_Code): Explicitly kill an elaboration scenario.
      	* exp_util.ads (Make_Invariant_Call): Update the comment on usage.
      	* frontend.adb: Initialize Sem_Elab. Process all saved top level
      	elaboration scenarios for ABE issues.
      	* gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
      	nodes.
      	* lib.adb (Earlier_In_Extended_Unit): New variant.
      	* sem.adb (Analyze): Ignore N_Call_Marker nodes.
      	(Preanalysis_Active): New routine.
      	* sem.ads (Preanalysis_Active): New routine.
      	* sem_attr.adb (Analyze_Access_Attribute): Save certain
      	elaboration-related attributes. Save the scenario for ABE processing.
      	* sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
      	effect. Save certain elaboration-related attributes.
      	* sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
      	attributes. Save the scenario for ABE processing.
      	* sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
      	mode in effect. Save certain elaboration-related attributes.
      	(Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
      	locating the first real statement.
      	(Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
      	certain elaboration-related attributes.
      	* sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
      	elaboration warnings.
      	* sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
      	generated for purposes of wrapping an attribute used as a generic
      	actual.
      	(Find_Direct_Name): Save certain elaboration-related attributes. Save
      	the scenario for ABE processing.
      	(Find_Expanded_Name): Save certain elaboration-related attributes. Save
      	the scenario for ABE processing.
      	* sem_ch9.adb (Analyze_Entry_Declaration): Save certain
      	elaboration-related attributes.
      	(Analyze_Requeue): Save certain elaboration-related attributes. Save
      	the scenario for ABE processing.
      	(Analyze_Single_Task_Declaration): Save certain elaboration-related
      	attributes.
      	(Analyze_Task_Type_Declaration): Save certain elaboration-related
      	attributes.
      	* sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
      	elaboration-related attributes.
      	(Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
      	effect. Save certain elaboration-related attributes.
      	(Analyze_Package_Instantiation): Save certain elaboration-related
      	attributes.  Save the scenario for ABE processing. Create completing
      	bodies in case the instantiation results in a guaranteed ABE.
      	(Analyze_Subprogram_Instantiation): Save certain elaboration-related
      	attributes Save the scenario for ABE processing. Create a completing
      	body in case the instantiation results in a guaranteed ABE.
      	(Provide_Completing_Bodies): New routine.
      	* sem_elab.ads: Brand new implementation.
      	* sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
      	Elaborate_Body): Do not suppress elaboration warnings.
      	* sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
      	operator.
      	(Resolve_Call): Save certain elaboration-related attributes. Save the
      	scenario for ABE processing.
      	(Resolve_Entity_Name): Do not perform any ABE processing here.
      	(Resolve_Entry_Call): Inherit certain attributes from the original call.
      	* sem_util.adb (Begin_Keyword_Location): New routine.
      	(Defining_Entity): Update the parameter profile. Add processing for
      	concurrent subunits that are rewritten as null statements.
      	(End_Keyword_Location): New routine.
      	(Find_Enclosing_Scope): New routine.
      	(In_Instance_Visible_Part): Code cleanup.
      	(In_Subtree): Update the parameter profile. Add new version.
      	(Is_Preelaborable_Aggregate): New routine.
      	(Is_Preelaborable_Construct): New routine.
      	(Mark_Elaboration_Attributes): New routine.
      	(Scope_Within): Update the parameter profile.
      	(Scope_Within_Or_Same): Update the parameter profile.
      	* sem_util.ads (Begin_Keyword_Location): New routine.
      	(Defining_Entity): Update the parameter profile and the comment on
      	usage.
      	(End_Keyword_Location): New routine.
      	(Find_Enclosing_Scope): New routine.
      	(In_Instance_Visible_Part): Update the parameter profile.
      	(In_Subtree): Update the parameter profile. Add new version.
      	(Is_Preelaborable_Aggregate): New routine.
      	(Is_Preelaborable_Construct): New routine.
      	(Mark_Elaboration_Attributes): New routine.
      	(Scope_Within): Update the parameter profile and the comment on usage.
      	(Scope_Within_Or_Same): Update the parameter profile and the comment on
      	usage.
      	* sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
      	to determine whether a loop has meaningful condition actions.
      	(Has_Condition_Actions): New routine.
      	* sinfo.adb (ABE_Is_Certain): Removed.
      	(Is_Declaration_Level_Node): New routine.
      	(Is_Dispatching_Call): New routine.
      	(Is_Elaboration_Checks_OK_Node): New routine.
      	(Is_Initialization_Block): New routine.
      	(Is_Known_Guaranteed_ABE): New routine.
      	(Is_Recorded_Scenario): New routine.
      	(Is_Source_Call): New routine.
      	(Is_SPARK_Mode_On_Node): New routine.
      	(No_Elaboration_Check): Removed.
      	(Target): New routine.
      	(Was_Attribute_Reference): New routine.
      	(Set_ABE_Is_Certain): Removed.
      	(Set_Is_Declaration_Level_Node): New routine.
      	(Set_Is_Dispatching_Call): New routine.
      	(Set_Is_Elaboration_Checks_OK_Node): New routine.
      	(Set_Is_Initialization_Block): New routine.
      	(Set_Is_Known_Guaranteed_ABE): New routine.
      	(Set_Is_Recorded_Scenario): New routine.
      	(Set_Is_Source_Call): New routine.
      	(Set_Is_SPARK_Mode_On_Node): New routine.
      	(Set_No_Elaboration_Check): Removed.
      	(Set_Target): New routine.
      	(Set_Was_Attribute_Reference): New routine.
      	* sinfo.ads: Remove attribute ABE_Is_Certain.  Attribute
      	Do_Discriminant_Check now utilizes Flag3.  Attribute
      	No_Side_Effect_Removal now utilizes Flag17.  Add new node
      	N_Call_Marker.  Update the structure of various nodes.
      	(ABE_Is_Certain): Removed along with pragma Inline.
      	(Is_Declaration_Level_Node): New routine along with pragma Inline.
      	(Is_Dispatching_Call): New routine along with pragma Inline.
      	(Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
      	(Is_Initialization_Block): New routine along with pragma Inline.
      	(Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
      	(Is_Recorded_Scenario): New routine along with pragma Inline.
      	(Is_Source_Call): New routine along with pragma Inline.
      	(Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
      	(No_Elaboration_Check): Removed along with pragma Inline.
      	(Target): New routine along with pragma Inline.
      	(Was_Attribute_Reference): New routine along with pragma Inline.
      	(Set_ABE_Is_Certain): Removed along with pragma Inline.
      	(Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
      	(Set_Is_Dispatching_Call): New routine along with pragma Inline.
      	(Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
      	Inline.
      	(Set_Is_Initialization_Block): New routine along with pragma Inline.
      	(Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
      	(Set_Is_Recorded_Scenario): New routine along with pragma Inline.
      	(Set_Is_Source_Call): New routine along with pragma Inline.
      	(Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
      	(Set_No_Elaboration_Check): Removed along with pragma Inline.
      	(Set_Target): New routine along with pragma Inline.
      	(Set_Was_Attribute_Reference): New routine along with pragma Inline.
      	* sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
      
      From-SVN: r253559
      Pierre-Marie de Rodat committed
    • exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking code so if… · 5168a9b3
      exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking code so if BIPAlloc is not passed in...
      
      gcc/ada/
      
      2017-10-09  Bob Duff  <duff@adacore.com>
      
      	* exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
      	code so if BIPAlloc is not passed in, it will likely raise
      	Program_Error instead of cause miscellaneous chaos.
      	(Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
      	as for the other Is_B-I-P... functions.
      	* sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
      	aggregate whose ancestor part is a build-in-place call returning a
      	nonlimited type, transform the assignment to the ancestor part to use a
      	temp.
      	* sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
      	creating an Itype for a library unit entity.
      	(Check_Initialization): Avoid spurious error message on
      	internally-generated call.
      	* sem_ch5.adb (Analyze_Assignment): Handle the case where the
      	right-hand side is a build-in-place call. This didn't happen when b-i-p
      	was only for limited types.
      	* sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
      	implies >= Ada 2005.
      	* sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
      	repeatedly.
      	* sem_util.adb (Next_Actual): Handle case of build-in-place call.
      
      2017-10-09  Arnaud Charlet  <charlet@adacore.com>
      
      	* doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
      
      2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
      
      	* libgnarl/s-taprob.adb: Minor whitespace fix.
      
      2017-10-09  Bob Duff  <duff@adacore.com>
      
      	* namet.ads: Minor comment fix.
      
      2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
      
      	* sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
      	just like other program units listed in Ada RM 10.1(1).
      
      2017-10-09  Justin Squirek  <squirek@adacore.com>
      
      	* sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
      
      2017-10-09  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
      	actual for a formal package is an instantiation of a child unit, create
      	a freeze node for the instance of the parent if it appears in the same
      	scope and is not frozen yet.
      
      2017-10-09  Pierre-Marie de Rodat  <derodat@adacore.com>
      
      	* exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
      	in-source documentation for tagged types's Offset_To_Top.
      
      2017-10-09  Bob Duff  <duff@adacore.com>
      
      	* exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
      	confusing.  Same for N_Loc.  Remove assumption that b-i-p implies
      	limited.  This is for the case of a function call that occurs as the
      	default for a record component.
      	(Expand_N_Object_Declaration): Deal with the case where expansion has
      	created an object declaration initialized with something like
      	F(...)'Reference.
      	* exp_ch3.adb: Minor reformatting.
      
      2017-10-09  Ed Schonberg  <schonberg@adacore.com>
      
      	* exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
      	the attribute is an object, but it may appear within a conversion. The
      	object itself must be retrieved when generating the range test that
      	implements the validity check on a scalar type.
      
      gcc/testsuite/
      
      2017-10-09  Ed Schonberg  <schonberg@adacore.com>
      
      	* gnat.dg/validity_check2.adb, gnat.dg/validity_check2_pkg.ads:
      	New testcase.
      
      From-SVN: r253548
      Pierre-Marie de Rodat committed
  7. 25 Sep, 2017 3 commits
    • [multiple changes] · 851e9f19
      2017-09-25  Justin Squirek  <squirek@adacore.com>
      
      	* aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
      	exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
      	gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
      	gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
      	libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
      	libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
      	libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
      	libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
      	libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
      	libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
      	put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
      	sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
      	Removal of ineffective use-clauses.
      	* exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
      	constant folded barriers.
      	* ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
      	Subtype_Marks and Names list in use-clause nodes to their new singular
      	counterparts (e.g. Subtype_Mark, Name).
      	* par.adb, par-ch8.adb (Append_Use_Clause): Created to set
      	Prev_Ids and More_Ids in use-clause nodes.
      	(P_Use_Clause): Modify to take a list as a parameter.
      	(P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
      	subtype_marks within an aggregate use-clauses into individual clauses.
      	* par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
      	P_Use_Clause to match its new behavior.
      	* sem.adb (Analyze): Mark use clauses for non-overloaded entities.
      	* sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
      	errors.
      	* sem_ch6.adb (Analyze_Generic_Subprogram_Body,
      	Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
      	the declarative region.
      	* sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
      	after analysis (Analyze_Package_Specification): Update use clause chain
      	when there is no body.
      	* sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
      	parameter to determine weither the installation of scopes should also
      	propagate on the use-clause "chain".
      	(Mark_Use_Clauses): Created to traverse use-clause chains and determine
      	what constitutes a valid "use" of a clause.
      	(Update_Use_Clause_Chain): Created to aggregate common machinary used
      	to clean up use-clause chains (and warn on ineffectiveness) at the end
      	of declaritive regions.
      	* sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
      	package name from a use-package clause.
      	(Analyze_Package_Name_List): Created to perform analysis on a list of
      	package names (similar to Analyze_Package_Name).
      	(Find_Most_Prev): Created to traverse to the beginning of a given
      	use-clause chain.
      	(Most_Decendant_Use_Clause): Create to identify which clause from a
      	given set is highest in scope (not always the most prev).
      	(Use_One_Package, Use_One_Type): Major cleanup and reorganization to
      	handle the new chaining algorithm, also many changes related to
      	redundant clauses. A new parameter has also been added to force
      	installation to handle certain cases.
      	* sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
      	Analyze_Task_Body): Mark use clauses on relevant entities.
      	* sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
      	Install_Parents): Add parameter to determine weither the installation
      	of scopes should also propagate on the use-clause "chain".
      	* sem_ch12.adb (Inline_Instance_Body): Add flag in call to
      	Install_Context to avoid redundant chaining of use-clauses.
      	* sem_ch13.adb: Minor reformatting.
      	* sem_res.adb (Resolve): Mark use clauses on operators.
      	(Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
      	entities.
      	* sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
      	Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
      	represent any given clause's usage/reference/necessity.
      	(Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
      	nodes to allow loose chaining of redundant clauses.
      	(Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
      	Set_More_Ids, Set_Name): Modify set procedure calls to reflect
      	reorganization in node fields.
      	* types.ads (Source_File_Index): Adjust index bounds.
      	(No_Access_To_Source_File): New constant.
      
      2017-09-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
      	the expression to be used in the generated attribute specification
      	(rather than relocating it) to avoid resolving a potentially malformed
      	tree when the expression is resolved through an ASIS-specific call to
      	Resolve_Aspect_Expressions.  This manifests itself as a crash on a
      	function with parameter associations.
      
      From-SVN: r253144
      Pierre-Marie de Rodat committed
    • [multiple changes] · f71b4cd4
      2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
      	for GNATprove.
      	(Resolve_Entry): Clean up predicate
      
      2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
      	than Program_Error because U_E is more in line with respect to the
      	intended behavior.
      
      2017-09-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
      	Storage_Size does not freeze, and thus can include references to
      	deferred constants.
      
      2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
      	reference when it appears within a pragma of no significance to SPARK.
      	(In_Insignificant_Pragma): New routine.
      	* sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
      
      2017-09-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
      	actual is a renaming, indicate that it is the renamed package that must
      	be frozen before the instantiation.
      
      2017-09-25  Yannick Moy  <moy@adacore.com>
      
      	* doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
      	of dimensionality system in GNAT UG.
      	* gnat_ugn.texi: Regenerate.
      
      2017-09-25  Yannick Moy  <moy@adacore.com>
      
      	* gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
      	GNATprove_Mode when switch -gnatdF used.
      
      2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
      
      	* adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
      	the backend.
      
      From-SVN: r253140
      Pierre-Marie de Rodat committed
    • [multiple changes] · aa11d1dd
      2017-09-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Save_References_In_Aggregate): Small correction to
      	previous change.
      
      2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
      	Minor reformatting.
      
      From-SVN: r253135
      Pierre-Marie de Rodat committed
  8. 18 Sep, 2017 1 commit
    • sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for reference… · 2eda24e9
      sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for reference types in the access-to-access case.
      
      gcc/ada/
      
      2017-09-18  Bob Duff  <duff@adacore.com>
      
      	* sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
      	reference types in the access-to-access case.
      
      2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
      	of the "aliased" keyword on the prefix from here to...
      	(Resolve_Attribute) <Attribute_Access>: ...here.  Remove useless call
      	to Check_No_Implicit_Aliasing.
      	* sinfo.ads (Non_Aliased_Prefix): Delete.
      	(Set_Non_Aliased_Prefix): Likewise.
      	* sinfo.adb (Non_Aliased_Prefix): Delete.
      	(Set_Non_Aliased_Prefix): Likewise.
      
      2017-09-18  Bob Duff  <duff@adacore.com>
      
      	* exp_ch5.adb (Build_Formal_Container_Iteration,
      	Expand_Formal_Container_Element_Loop): Convert the container to the
      	root type before passing it to the iteration operations, so it will be
      	of the right type.
      
      2017-09-18  Bob Duff  <duff@adacore.com>
      
      	* einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
      
      2017-09-18  Bob Duff  <duff@adacore.com>
      
      	* exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
      	and it's a bit-packed array, pass False to the Consider_IS parameter of
      	Needs_Simple_Initialization.
      
      2017-09-18  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
      	the preexisting body.
      	* sem_prag.adb (Check_Inline_Always_Placement): New routine.
      	(Process_Inline): Verify the placement of pragma Inline_Always. The
      	pragma must now appear on the initial declaration of the related
      	subprogram.
      
      2017-09-18  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch3.adb (Analyze_Declarations): In ASIS mode,  At the end of the
      	declarative list in a subprogram body, analyze aspext specifications to
      	provide basic semantic information, because otherwise the aspect
      	specifications might only be snalyzed during expansion, when related
      	subprograms are generated.
      
      2017-09-18  Bob Duff  <duff@adacore.com>
      
      	* exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
      	validity checks have rewritten the tree.
      
      2017-09-18  Bob Duff  <duff@adacore.com>
      
      	* sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
      
      2017-09-18  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Save_References_In_Aggregate): When constructing a
      	qualified exxpression for an aggregate in a generic unit, verify that
      	the scope of the type is itself visible and not hidden, so that the
      	qualified expression is correctly resolved in any instance.
      
      gcc/testsuite/
      
      2017-09-18  Bob Duff  <duff@adacore.com>
      
      	* gnat.dg/validity_check.adb: New testcase.
      
      2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* gnat.dg/overload.ads, gnat.dg/overload.adb: New testcase.
      
      2017-09-18  Bob Duff  <duff@adacore.com>
      
      	* gnat.dg/tagged_prefix_call.adb: New testcase.
      
      From-SVN: r252916
      Pierre-Marie de Rodat committed
  9. 08 Sep, 2017 6 commits
    • sem_aux.adb, [...] (Get_Called_Entity): New function to return the entity associated with the call. · 8437edb4
      2017-09-08  Yannick Moy  <moy@adacore.com>
      
      	* sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
      	return the entity associated with the call.
      	* sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
      	Replace the internal Get_Function_Id with the new
      	Sem_Aux.Get_Called_Entity.
      	(Iterate_Call_Parameters): New
      	procedure to iterate on formals and actuals at the same time.
      	* sem_ch12.adb (Analyze_Subprogram_Instantiation):
      	Set SPARK_Mode from spec when set, for analysis
      	of instance. Restore after analysis of instance.
      	(Instantiate_Subprogram_Body): Set SPARK_Mode from body when
      	set, for analysis of body instance. Restored automatically at
      	the end of the subprogram.
      	* gnat1drv.adb (Adjust_Global_Switches): Set
      	Check_Validity_Of_Parameters to False in GNATprove mode.
      	* opt.ads (Check_Validity_Of_Parameters): Document switch to
      	set option.
      
      From-SVN: r251900
      Yannick Moy committed
    • [multiple changes] · 333e4f86
      2017-09-08  Bob Duff  <duff@adacore.com>
      
      	* par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
      	Ada_2020, along the same lines as the other Ada version pragmas.
      
      2017-09-08  Gary Dismukes  <dismukes@adacore.com>
      
      	* sem_ch12.adb: Minor typo fixes and reformatting.
      
      2017-09-08  Yannick Moy  <moy@adacore.com>
      
      	* sem_aggr.adb (Resolve_Record_Aggregate):
      	Rewrite bounds of aggregate subexpressions which may depend on
      	discriminants of the enclosing aggregate.
      
      2017-09-08  Yannick Moy  <moy@adacore.com>
      
      	* sem_ch5.adb: Prevent assertion failure on illegal code.
      
      2017-09-08  Yannick Moy  <moy@adacore.com>
      
      	* lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
      	calling Renamed_Entity on an entity which cannot be a renaming.
      
      2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* exp_aggr.adb: Add with & use clause for Urealp.
      	(Aggr_Assignment_OK_For_Backend): Accept (almost all)
      	elementary types instead of just discrete types.
      	* sem_eval.adb (Expr_Value): Deal with N_Null for access types.
      	* gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
      	Be prepared for the FP zero value in the memset case.  Add small
      	guard.
      
      2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* s-htable.adb (Static_HTable.Reset): Use aggregate instead
      	of loop.
      
      From-SVN: r251894
      Arnaud Charlet committed
    • [multiple changes] · 683af98c
      2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
      	of New_Copy because the latter leaves the syntactic structure of
      	the tree inconsistent (a child is accessible through two parents)
      	and prevents proper replication of itypes by subsequent calls
      	to New_Copy_Tree.
      	* exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
      	New_Copy because the latter leaves the syntactic structure of the
      	tree inconsistent (a child is accessible through two parents)
      	and prevents proper replication of itypes by subsequent calls
      	to New_Copy_Tree.
      	* sem_util.adb (In_Subtree): New routine.
      	(New_Copy_Tree): Reimplemented.
      	* sem_util.ads (In_Subtree): New routine.
      	(New_Copy_Tree): Reimplemented.
      
      2017-09-08  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch13.adb (Resolve_Aspect_Expressions): The expression
      	for aspect Default_Value is a static scalar value, but it does
      	not freeze the type. Yhis allows for subsequent representation
      	clauses for the type.
      
      2017-09-08  Javier Miranda  <miranda@adacore.com>
      
      	* sem_ch8.adb (Find_Direct_Name.Undefined): Do
      	not add entries into the undefined reference table when we are
      	compiling with errors ignored.
      
      2017-09-08  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
      	check if the instance is within an enclosing instance body. The
      	formal package was legal in the enclosing generic, and is
      	legal in the enclosing instantiation.  This optimisation may be
      	applicable elsewhere, and it also removes spurious errors that
      	may arise with on-the-fly processing  of instantiations that
      	contain Inline_Always subprograms.
      
      2017-09-08  Vincent Celier  <celier@adacore.com>
      
      	* gnatcmd.adb: Disregard empty argument of GNAT driver.
      
      2017-09-08  Justin Squirek  <squirek@adacore.com>
      
      	* checks.adb (Insert_Valid_Check): Manually decorate
      	the generated temporary for range valdity checks.
      
      2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
      
      2017-09-08  Justin Squirek  <squirek@adacore.com>
      
      	* switch-c.adb (Scan_Front_End_Switches): Add new warning switch
      	case to handle underscore flags.
      	* warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
      	new procedure to handle underscores.
      
      From-SVN: r251893
      Arnaud Charlet committed
    • [multiple changes] · f0478a53
      2017-09-08  Arnaud Charlet  <charlet@adacore.com>
      
      	* sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
      	entities of named concurrent types as Ref_Id and not of anonymous
      	concurrent objects (because callers already know when a conversion
      	is necessary and can easily do it); also, do not expect protected
      	types or protected objects as Context_Id (because no flow-related
      	SPARK pragmas are attached there); reflect these changes in a
      	more precise comment.
      
      2017-09-08  Olivier Hainque  <hainque@adacore.com>
      
      	* g-altive.ads: Add documentation.
      
      2017-09-08  Bob Duff  <duff@adacore.com>
      
      	* sem_util.ads, debug.adb: Minor comment fix.
      	* erroutc.ads: Comment fix.
      
      2017-09-08  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
      	for compatibility of component types of formal and actual in an
      	instantiation of a child unit,	when the component type of the
      	formal is itself a formal of an enclosing generic.
      
      From-SVN: r251872
      Arnaud Charlet committed
    • [multiple changes] · cc3a2986
      2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_util.adb (Copy_Node_With_Replacement):
      	Update the Renamed_Object field of a replicated object renaming
      	declaration.
      
      2017-09-08  Patrick Bernardi  <bernardi@adacore.com>
      
      	* exp_ch9.adb (Is_Pure_Barrier): Allow type
      	conversions and components of objects. Simplified the detection
      	of the Count attribute by identifying the corresponding run-time
      	calls.
      
      2017-09-08  Yannick Moy  <moy@adacore.com>
      
      	* exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
      	sem_type.adb, sinfo.ads: Minor reformatting.
      
      2017-09-08  Ed Schonberg  <schonberg@adacore.com>
      
      	* freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
      	of Freeze_Profile, used to inhibit the freezing of the profile
      	of an expression function declared within a nested package, when
      	some type in the profile depends on a private type declared in
      	an enclosing package.
      
      2017-09-08  Bob Duff  <duff@adacore.com>
      
      	* gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
      	the subunit case. It's still OK to set it in the "missing subunits"
      	case, because that won't cause the obsolete .ali files that cause
      	confusion.
      
      2017-09-08  Bob Duff  <duff@adacore.com>
      
      	* sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
      	unclear why this didn't cause a warning.
      	* a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
      	pragmas. It's unclear why this didn't cause an error.
      
      From-SVN: r251869
      Arnaud Charlet committed
    • [multiple changes] · eb0f297f
      2017-09-08  Ed Schonberg  <schonberg@adacore.com>
      
              * sem_ch12.adb (Check_Generic_Parent): New procedure within
              Analyze_Associations, to handle actual packages that depend on
              previous instances.  If a package IAP that is an instantiation is
              used as an actual in a subsequent instantiation SI in the same
              scope, and IAP has a body, IAP must be frozen before SI. If
              the generic parent of IAP is itself declared in a previous
              instantiation in the same scope, that instantiation must also
              be frozen before SI.
              (Install_Body): Prevent double insertion of freeze node for
              instance.
      
      2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
      
              * sem_prag.adb (Resolve_State): Update the
              comment on documentation. Generate a reference to the state once
              resolution takes place.
      
      2017-09-08  Ed Schonberg  <schonberg@adacore.com>
      
              * sem_ch13.adb (Analyze_Aspect_Specifications, case
              Linker_Section): If the aspect applies to an object declaration
              with explicit initialization, do not delay the freezing of the
              object, to prevent access-before-elaboration in the generated
              initialization code.
      
      2017-09-08  Ed Schonberg  <schonberg@adacore.com>
      
              * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
              (Integer_Value (Item)) when the size of the fixed decimal type
              is larger than Integer.
      
      From-SVN: r251866
      Arnaud Charlet committed
  10. 07 Sep, 2017 1 commit
    • [multiple changes] · ed323421
      2017-09-07  Yannick Moy  <moy@adacore.com>
      
      	* a-exetim-mingw.ads: Add contract Global=>null
      	on all operations that are modeled as having no read or write
      	of global variables in SPARK.
      
      2017-09-07  Raphael Amiard  <amiard@adacore.com>
      
      	* a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
      	to Hmaps.Generic_Ops.
      	* a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
      	cursors.
      	* a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
      	cursors.
      	* a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
      	position in cursors.
      
      2017-09-07  Javier Miranda  <miranda@adacore.com>
      
      	* sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
      	allow disabling the generation of implicit pragma Elaborate_All
      	on task bodies.
      
      2017-09-07  Javier Miranda  <miranda@adacore.com>
      
      	* exp_disp.adb (Make_Tags): Avoid suffix counter
      	in the external name of the elaboration flag. Required to fix
      	the regressions introduced by the initial version of this patch.
      
      2017-09-07  Bob Duff  <duff@adacore.com>
      
      	* sem_ch6.adb (Analyze_Function_Return): Do not
      	insert an explicit conversion to force the displacement of the
      	"this" pointer to reference the secondary dispatch table in the
      	case where the return statement is returning a raise expression,
      	as in "return raise ...".
      
      2017-09-07  Arnaud Charlet  <charlet@adacore.com>
      
      	* sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
      	* sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
      	procedure from sem_disp.adb.
      	* sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
      	with Unit.
      	* sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
      	return the instantiation node for subprograms. Update references
      	to Get_Unit_Instantiation_Node.
      	* sem_ch7.adb (Install_Parent_Private_Declarations): update
      	reference to Get_Unit_Instantiation_Node.
      	* exp_dist.adb (Build_Package_Stubs): update reference to
      	Get_Unit_Instantiation_Node.
      	* sem_ch9.adb: minor typo in comment.
      	* lib-xref-spark_specific.adb
      	(Traverse_Declaration_Or_Statement): traverse into task type
      	definition.
      
      2017-09-07  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
      	to handle properly various cases of type conversions where the
      	target type and/or the expression carry dimension information.
      	(Dimension_System_Root); If a subtype carries dimension
      	information, obtain the source parent type that carries the
      	Dimension aspect.
      
      2017-09-07  Dmitriy Anisimkov  <anisimko@adacore.com>
      
      	* g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
      
      2017-09-07  Ed Schonberg  <schonberg@adacore.com>
      
      	* exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
      	If the prefix is a reference to an object, rewrite it as an
      	explicit dereference, as required by 3.7.2 (2) and as is done
      	with most other attributes whose prefix is an access value.
      
      2017-09-07  Bob Duff  <duff@adacore.com>
      
      	* par-ch13.adb: Set the Inside_Depends flag if we are inside a
      	Refined_Depends aspect.
      	* par-ch2.adb: Set the Inside_Depends flag if we are inside a
      	Refined_Depends pragma.
      	* scans.ads: Fix documentation of Inside_Depends flag.
      	* styleg.adb, styleg.ads: Minor reformatting and comment fixes.
      
      2017-09-07  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* exp_ch7.adb (Insert_Actions_In_Scope_Around):
      	Account for the case where the are no lists to insert, but the
      	secondary stack still requires management.
      	* a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
      	comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
      	lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
      	sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
      	Minor reformatting.
      
      From-SVN: r251842
      Arnaud Charlet committed
  11. 06 Sep, 2017 5 commits
    • [multiple changes] · c48e0f27
      2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
      
      2017-09-06  Yannick Moy  <moy@adacore.com>
      
      	* sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
      	global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
      
      2017-09-06  Bob Duff  <duff@adacore.com>
      
      	* sem_ch8.adb: Change Assert to be consistent with
      	other similar ones.
      
      2017-09-06  Bob Duff  <duff@adacore.com>
      
      	* binde.adb (Find_Elab_Order): Do not run Elab_Old unless
      	requested. Previously, the -do switch meant "run Elab_New and
      	Elab_Old and use the order chosen by Elab_Old, possibly with
      	debugging printouts comparing the two orders."	Now it means
      	"do not run Elab_New." This is of use if there are bugs that
      	cause Elab_New to crash.
      	(Elab_Position, Num_Chosen): Change type to Nat, to avoid various
      	type conversions.
      	* ali.ads (Elab_Position): Change type to Nat, to avoid various
      	type conversions.
      
      2017-09-06  Arnaud Charlet  <charlet@adacore.com>
      
      	* sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
      	reference to SPARK RM.
      
      2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* layout.adb: Use SSU short hand consistently throughout the file.
      
      2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* freeze.adb (Freeze_Record_Type)
      	<Sized_Component_Total_Round_RM_Size>: New local variable to
      	accumulate the rounded RM_Size of components.  Update it for
      	every component whose RM_Size is statically known.  Add missing
      	guard to check that bit packing is really required before issuing
      	the error about packing.  Swap condition for clarity's sake.
      	* sem_prag.adb (Usage_Error): fix reference to
      	SPARK RM in comment
      
      2017-09-06  Fedor Rybin  <frybin@adacore.com>
      
      	* makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
      	mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
      	mlib-tgt-specific.adb, mlib-tgt-specific.ads,
      	mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
      	mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
      	mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
      	mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
      	mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
      	prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
      	prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
      	prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
      	prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
      	prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
      	prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
      	prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
      	project manager sources.
      
      2017-09-06  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
      	entity of a mutable type and the right-hand side is a conditional
      	expression, resolve the alternatives of the conditional using
      	the base type of the target entity, because the alternatives
      	may have distinct subtypes. This is particularly relevant if
      	the alternatives are aggregates.
      
      From-SVN: r251797
      Arnaud Charlet committed
    • [multiple changes] · 4269edf0
      2017-09-06  Ed Schonberg  <schonberg@adacore.com>
      
      	* checks.adb (Apply_Predicate_Check): If the expression is an
      	aggregate that is the RHS of an assignment, apply the check to
      	the LHS after the assignment, rather than to the aggregate. This
      	is more efficient than creating a temporary for the aggregate,
      	and prevents back-end crashes when the aggregate includes a
      	dynamic "others' association.
      
      2017-09-06  Yannick Moy  <moy@adacore.com>
      
      	* sem_ch12.adb (Analyze_Instance_And_Renamings):
      	Set variable to ignore SPARK_Mode in instance before the analysis
      	of the generated package declaration.
      
      2017-09-06  Yannick Moy  <moy@adacore.com>
      
      	* sem_res.adb (Resolve_Call): Do not issue a
      	message for calls inside expression function, unless body was
      	seen and is candidate for inlining.
      
      2017-09-06  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
      	* sem_ch3.adb (Analyze_Declarations): In a generic subprogram
      	body. do not freeze the formals of the generic unit.
      
      2017-09-06  Gary Dismukes  <dismukes@adacore.com>
      
      	* errout.adb (Error_Msg): Separate the
      	treatment for warning vs. style messages in inlinings and
      	instantiations. Prevents blowups on calls to Warn_Insertion for
      	style messages, which should not be called in that case because
      	Warning_Msg_Char is not set.
      
      2017-09-06  Justin Squirek  <squirek@adacore.com>
      
      	* sem_prag.adb (Check_VFA_Conflicts): Created
      	to group all Volatile_Full_Access checks relating to other
      	representation pragmas (Mark_Component_Or_Object): Created
      	to centeralize the flagging of attributes for the record type
      	component case, a pragma applied individually to a component, and
      	the object case.
      	(Process_Atomic_Independent_Shared_Volatile):
      	Add propagation of certain pragmas to record components and move
      	evaluation of VFA checks
      
      From-SVN: r251793
      Arnaud Charlet committed
    • [multiple changes] · 5e9cb404
      2017-09-06  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
      	Do not warn on conditions that are not obeyed for Inline_Always
      	subprograms, when assertions are not enabled.
      
      2017-09-06  Arnaud Charlet  <charlet@adacore.com>
      
      	* sem_util.adb (Unique_Entity): For abstract states return their
      	non-limited view.
      
      2017-09-06  Bob Duff  <duff@adacore.com>
      
      	* sem_ch12.adb (Copy_Generic_Node): When we copy a node
      	that is a proper body corresponding to a stub, we defer the
      	adjustment of the sloc until after the correct adjustment has
      	been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
      	the adjustment, because it will be outside the range in (the old,
      	incorrect) S_Adjustment.
      	* inline.adb: Use named notation for readability and uniformity.
      	* sinput-l.adb: Minor improvements to debugging output printed
      	for Debug_Flag_L.
      	* sinput-l.ads (Create_Instantiation_Source): Minor comment
      	correction.
      
      2017-09-06  Vincent Celier  <celier@adacore.com>
      
      	* make.adb: Do not invoke gprbuild for -bargs -P.
      
      2017-09-06  Sylvain Dailler  <dailler@adacore.com>
      
      	* sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
      	case when Op is of kind N_Qualified_Expression. In this case,
      	the function is called recursively on the subexpression like in
      	other cases.
      	* make.adb: Minor reformatting
      
      2017-09-06  Justin Squirek  <squirek@adacore.com>
      
      	* einfo.adb (Set_Linker_Section_Pragma): Modify
      	Set_Linker_Section_Pragma to be consistant with the "getter"
      	Linker_Section_Pragma.
      	* exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
      	checking for container loops so that the index cursor is not
      	directly changable by the user with the use of E_Loop_Parameter.
      	* sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
      	* sem_warn.adb (Check_References): Revert previous change.
      
      From-SVN: r251789
      Arnaud Charlet committed
    • [multiple changes] · 315f0c42
      2017-09-06  Bob Duff  <duff@adacore.com>
      
      	* exp_util.adb (Is_Displace_Call): Make sure it works for indirect
      	calls and the like.
      
      2017-09-06  Yannick Moy  <moy@adacore.com>
      
      	* sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
      	declarations to only consider valid uses of Global/Depends those on
      	single concurrent objects.
      
      2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* sem_ch13.adb (Check_Record_Representation_Clause): Give an
      	error as soon as one of the specified components overlaps the
      	parent field.
      
      2017-09-06  Arnaud Charlet  <charlet@adacore.com>
      
      	* sem_prag.ads: minor fix typo in comment.
      
      2017-09-06  Justin Squirek  <squirek@adacore.com>
      
      	* sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
      	from source before checking source references.
      	* sem_warn.adb (Check_References): Add check for internal block
      	before recursing.
      
      2017-09-06  Vincent Celier  <celier@adacore.com>
      
      	* make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
      	make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
      	gnatname.adb: Remove the Project Manager from the GNAT tools.
      
      2017-09-06  Bob Duff  <duff@adacore.com>
      
      	* sem_util.ads: Minor comment fix.
      
      2017-09-06  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Analyze_Associations, case of Formal_Package):
      	Generate a freeze node for the actual of a formal package, if
      	the actual is declared in the same unit and has a corresponding
      	body, to prevent the current instance from being frozen before
      	the actual is.
      
      From-SVN: r251786
      Arnaud Charlet committed
    • [multiple changes] · 9fb1e654
      2017-09-06  Yannick Moy  <moy@adacore.com>
      
      	* treepr.adb (Print_Entity_Info): Do not print empty Elist.
      
      2017-09-06  Yannick Moy  <moy@adacore.com>
      
      	* inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
      	to subprograms in other units as possibly inlined.
      
      2017-09-06  Ed Schonberg  <schonberg@adacore.com>
      
      	* freeze.adb (Freeze_Entity): For a derived type that has no
      	explicit delayed aspects but may inherit delayed aspects from its
      	parent type, analyze aspect at freeze point for proper capture
      	of an inherited aspect.
      
      2017-09-06  Arnaud Charlet  <charlet@adacore.com>
      
      	* lib-xref.adb (Get_Through_Renamings): Get through subprogram
      	renamings; also, avoid repeated calls to Renamed_Object when getting
      	through object renamings.
      
      2017-09-06  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch3.adb (Array_Type_Declaration): Handle properly an
      	array type declaration in a private part, when an index is a
      	subtype indication of a discrete type with a private partial view.
      
      2017-09-06  Javier Miranda  <miranda@adacore.com>
      
      	* exp_ch4.adb (Expand_Modular_Op): Force generating
      	temporary to improve the generated code.
      
      2017-09-06  Tristan Gingold  <gingold@adacore.com>
      
      	* s-fatgen.adb: Minor typo fix in comment.
      
      2017-09-06  Ed Schonberg  <schonberg@adacore.com>
      
      	* exp_ch5.adb (Make_Field_Assign): If the type
      	of the right-hand side has stored constraint, use its values
      	(except for those that are renamings of parent discriminants)
      	to produce additional assignments for the discriminants of the
      	left-hand side, which are invisible in the righ-hand side and
      	not retrievable as selected components.
      
      2017-09-06  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_util.adb (Needs_One_Formal): The first formal of such a
      	function must be a controlling formal, so that Obj.F (X, Y)
      	can have the interpretation F(Obj)(X, Y).
      	* sem_util.ads: Clarify documentation.
      
      2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* table.ads, table.adb: Restore original implementation.
      	* namet.h (Names_Ptr): Adjust back.
      	(Name_Chars_Ptr): Likewise.
      	* uintp.h (Uints_Ptr): Likewise.
      	(Udigits_Ptr): Likewise.
      	* g-table.ads: Remove pragma Compiler_Unit_Warning.
      	* par_sco.adb: Do not with GNAT.Table and use Table consistently.
      	* scos.ads: Replace GNAT.Table with Table and adjust instantiations.
      	* spark_xrefs.ads: Likewise.
      	* scos.h: Undo latest changes.
      
      2017-09-06  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
      	No_Return flag to instance if pragma applies to generic unit. This
      	must be done explicitly because the pragma does not appear
      	directly in the generic declaration (unlike the corresponding
      	aspect specification).
      
      From-SVN: r251765
      Arnaud Charlet committed
  12. 28 Apr, 2017 2 commits
    • [multiple changes] · 66c19cd4
      2017-04-28  Javier Miranda  <miranda@adacore.com>
      
      	* atree.ads (Info_Messages): Removed.
      	(Warning_Info_Messages): New counter.
      	(Report_Info_Messages): New counter.
      	* err_vars.ads Update documentation.
      	* errout.adb (Delete_Warning_And_Continuations): Update
      	Info_Message occurrences.
      	(Error_Msg_Internal): Update Info_Message occurrences.
      	(Delete_Warning): Update Info_Message occurrences.
      	(Write_Error_Summary): Update Info_Message occurrences.
      	(Output_Messages): Update Info_Message occurrences.
      	(To_Be_Removed): Update Info_Message occurrences.
      	(Reset_Warnings): Update Info_Message occurrences.
      	* errutil.adb (Error_Msg): Update Info_Message occurrences.
      	(Finalize): Update Info_Message occurrences.
      	(Initialize): Update Info_Message occurrences.
      	* erroutc.adb (Delete_Msg): Update Info_Message occurrences.
      	(Compilation_Errors): Update Info_Message_Occurences.
      
      2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
      
              * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
              * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
              * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
              * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
              * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
              * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
              Y_Size.
              * sem_eval.adb (Why_Not_Static): Initialize Typ.
              * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
      
      From-SVN: r247390
      Arnaud Charlet committed
    • [multiple changes] · 85be939e
      2017-04-28  Bob Duff  <duff@adacore.com>
      
      	* sem_util.ads, sem_util.adb (Might_Raise): New function
      	that replaces Is_Exception_Safe, but has the opposite
      	sense. Is_Exception_Safe was missing various cases -- calls inside
      	a pragma Debug, calls inside an 'if' or assignment statement,
      	etc. Might_Raise now walks the entire subtree looking for things
      	that can raise.
      	* exp_ch9.adb (Is_Exception_Safe): Remove.
      	(Build_Protected_Subprogram_Body): Replace call to
      	Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
      	constants where possible).
      	* exp_ch7.adb: Rename Is_Protected_Body -->
      	Is_Protected_Subp_Body. A protected_body is something different
      	in the grammar.
      
      2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
      	* par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
      	(P_Discrete_Choice_List): Initialize Expr_Node variable.
      	* par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
      	(P_Protected): Likewise.
      	* sem_case.adb (Check_Duplicates):
      	Add pragma Warnings on variable.
      	* sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
      	* sem_ch4.adb (List_Operand_Interps):  Add pragma Warnings on variable.
      	* sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
      	(Analyze_Exit_Statement): Initialize Scope_Id variable.
      	(Analyze_Iterator_Specification): Initialize Bas variable.
      	* sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
      	Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
      	(Analyze_Accept_Statement): Initialize Task_Nam.
      
      2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* checks.adb (Install_Primitive_Elaboration_Check):
      	Do not generate an elaboration check if all checks have been
      	suppressed.
      
      2017-04-28  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch13.adb (Analyze_Aspect_Specifications, case
      	Interrupt_Handler and Attach_Handler): Generate reference
      	to protected operation to prevent spurious warnings about
      	unreferenced entities. Previous scheme failed with style checks
      	enabled.
      
      2017-04-28  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
      	that follows an expression function must not be relocated to
      	the generated body, because it applies to the code that follows.
      
      From-SVN: r247387
      Arnaud Charlet committed
  13. 27 Apr, 2017 3 commits
    • [multiple changes] · 8ab31c0c
      2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
      
      	* fe.h (Warn_On_Questionable_Layout): Declare.
      	* warnsw.ads (Warn_On_Record_Holes): Move down.
      	(Warn_On_Questionable_Layout): New boolean variable.
      	(Warning_Record): Add Warn_On_Questionable_Layout field.
      	* warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
      	(Restore_Warnings): Likewise.
      	(Save_Warnings): Likewise.
      	(Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
      	* gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
      	components_to_record.
      	(gnu_field_to_gnat): New function.
      	(warn_on_field_placement): Likewise.
      	(components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
      	parameters.  Rename local variables and adjust recursive call.
      	Rework final scan of the field list and implement warnings on the
      	problematic placement of specific sorts of fields.
      
      2017-04-27  Bob Duff  <duff@adacore.com>
      
      	* errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
      	* fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
      	* lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
      	* sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
      	* sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
      	* sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
      	For efficiency, cache results of Is_Internal_File_Name and
      	Is_Predefined_File_Name in the Units table. This avoids a lot
      	of repeated text processing.
      
      2017-04-27  Emmanuel Briot  <briot@adacore.com>
      
      	* g-comlin.adb (Sort_Sections): remove useless test.
      
      2017-04-27  Claire Dross  <dross@adacore.com>
      
      	* a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
      	allow the use of regular equality over elements in contracts.
      	(Formal_Model): Ghost package containing model functions that are
      	used in subprogram contracts.
      	(Current_To_Last): Removed, model functions should be used instead.
      	(First_To_Previous): Removed, model functions should be used instead.
      	(Strict_Equal): Removed, model functions should be used instead.
      	(No_Overlap): Removed, model functions should be used instead.
      	(Equivalent_Keys): Functions over cursors are removed. They were
      	awkward with explicit container parameters.
      	* a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
      	allow the use of regular equality over elements in contracts.
      	(Formal_Model): Ghost package containing model functions that
      	are used in subprogram contracts.
      	(Current_To_Last): Removed, model functions should be used instead.
      	(First_To_Previous): Removed, model functions should be used instead.
      	(Strict_Equal): Removed, model functions should be used instead.
      	(No_Overlap): Removed, model functions should be used instead.
      
      2017-04-27  Yannick Moy  <moy@adacore.com>
      
      	* gnat1drv.adb: Code cleanup.
      
      2017-04-27  Ed Schonberg  <schonberg@adacore.com>
      
      	* exp_util.adb (Replace_Entity): The prefix of a 'Result
      	attribute reference in a post- condition is the subprogram to
      	which the condition applies. If the condition is inherited
      	by a type extension, the prefix becomes a reference to the
      	inherited operation, but there is no need to create a wrapper
      	for this operation, because 'Result is expanded independently
      	when elaborating the postconditions.
      
      From-SVN: r247338
      Arnaud Charlet committed
    • [multiple changes] · 6dd86c75
      2017-04-27  Ed Schonberg  <schonberg@adacore.com>
      
      	* freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
      	subsidiary of Check_Inherited_Conditions, to build pragmas for an
      	operation whose ancestor has classwide pre/postconditions. This
      	is used both to check the legality of the inheritance in Ada
      	and in SPARK, and to determine whether a wrapper is needed for
      	an inherited operation.
      	* exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
      	Improve placement of error message for inherited classwide
      	conditions that become illegal on type derivation.
      
      2017-04-27  Yannick Moy  <moy@adacore.com>
      
      	* sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
      	SPARK_Mode from context on generic package.
      	* sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
      	useless test.
      
      2017-04-27  Claire Dross  <dross@adacore.com>
      
      	* a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
      	overflows in computations.
      	* a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
      	overflows in computations.
      	(Insert): Rewrite precondition to avoid overflows in computations.
      	* a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
      	overflows in computations.
      	(Insert): Rewrite precondition to avoid overflows in computations.
      
      From-SVN: r247318
      Arnaud Charlet committed
    • [multiple changes] · f32eb591
      2017-04-27  Gary Dismukes  <dismukes@adacore.com>
      
      	* sem_ch4.adb: Minor reformatting.
      
      2017-04-27  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Analyze_Associations): minor reformatting.
      	(Check_Fixed_Point_Actual): Do not emit a warning on a fixed
      	point type actual that has user-defined arithmetic primitives,
      	when there is a previous actual for a formal package that defines
      	a fixed-point type with the parent user-defined operator.
      
      2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* checks.adb (Generate_Range_Check): Reinstate part of previous change.
      	* sem_attr.adb (Resolve_Attribute): Generate a range check when
      	the component type allows range checks.
      
      2017-04-27  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_aux.adb (Is_Generic_Formal): Use original node to locate
      	corresponding declaration, because formal derived types are
      	rewritten as private extensions.
      
      2017-04-27  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
      	dimensions of operands if node has been analyzed already, because
      	previous analysis and dimension checking will have removed the
      	dimension information from the operands.
      
      2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* debug.adb: Document the use of switch -gnatd.s.
      	* einfo.ads Update the documentation on attribute
      	Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
      	the uses of these attributes from certain entities.
      	* exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
      	which determines whether the block should continue to manage
      	the secondary stack.
      	(Manages_Sec_Stack): New routine.
      
      2017-04-27  Bob Duff  <duff@adacore.com>
      
      	* atree.ads: Minor edit.
      
      2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sinfo.ads: Update the section on Ghost mode. Add
      	a section on SPARK mode. Update the placement of section on
      	expression functions.
      
      2017-04-27  Bob Duff  <duff@adacore.com>
      
      	* sinput.adb (Get_Source_File_Index): Don't
      	assert that S is in the right range in the case where this is
      	a .dg file under construction.
      
      2017-04-27  Yannick Moy  <moy@adacore.com>
      
      	* sem_util.adb (Check_Result_And_Post_State):
      	Handle more precisely each conjunct in expressions formed by
      	and'ing sub-expressions.
      
      From-SVN: r247295
      Arnaud Charlet committed
  14. 25 Apr, 2017 4 commits
    • contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract): Add a warning about… · f9a8f910
      contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract): Add a warning about SPARK mode management.
      
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
      	Add a warning about SPARK mode management. The routine now
      	saves and restores both the mode and associated pragma.
      	(Analyze_Entry_Or_Subprogram_Contract): Add a warning about
      	SPARK mode management. The routine now saves and restores both
      	the mode and associated pragma.
      	(Analyze_Object_Contract):
      	Add a warning about SPARK mode management. The routine
      	now saves and restores both the mode and associated pragma.
      	(Analyze_Package_Body_Contract): Add a warning about SPARK mode
      	management.  The routine now saves and restores both the mode
      	and associated pragma.	(Analyze_Package_Contract): Add a warning
      	about SPARK mode management. The routine now saves and restores
      	both the mode and associated pragma.
      	(Analyze_Task_Contract):
      	Add a warning about SPARK mode management. The routine now saves
      	and restores both the mode and associated pragma.
      	* expander.adb (Expand): Change the way the Ghost mode is saved
      	and restored.
      	* exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
      	saved and restored.
      	* exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
      	and restored.
      	* exp_util.adb (Build_DIC_Procedure_Body):
      	Change the way the Ghost mode is saved and restored.
      	(Build_DIC_Procedure_Declaration): Change the way the Ghost
      	mode is saved and restored.
      	(Build_Invariant_Procedure_Body):
      	Change the way the Ghost mode is saved and restored.
      	(Build_Invariant_Procedure_Declaration): Change the way the Ghost
      	mode is saved and restored.
      	(Make_Predicate_Call): Change the
      	way the Ghost mode is saved and restored.
      	* freeze.adb (Freeze_Entity): Change the way the Ghost mode is
      	saved and restored.
      	* ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
      	and its assignment.
      	(Mark_And_Set_Ghost_Body): Remove parameter
      	Mode and its assignment.
      	(Mark_And_Set_Ghost_Completion):
      	Remove parameter Mode and its assignment.
      	(Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
      	assignment.
      	(Mark_And_Set_Ghost_Instantiation): Remove parameter
      	Mode and its assignment.
      	(Mark_And_Set_Ghost_Procedure_Call):
      	Remove parameter Mode and its assignment.
      	(Set_Ghost_Mode):
      	Remove parameter Mode and its assignment.
      	* ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
      	and update the comment on usage.
      	(Mark_And_Set_Ghost_Body):
      	Remove parameter Mode and update the comment on usage.
      	(Mark_And_Set_Ghost_Completion): Remove parameter Mode and
      	update the comment on usage.
      	(Mark_And_Set_Ghost_Declaration):
      	Remove parameter Mode and update the comment on usage.
      	(Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
      	update the comment on usage.
      	(Mark_And_Set_Ghost_Procedure_Call):
      	Remove parameter Mode and update the comment on usage.
      	(Set_Ghost_Mode): Remove parameter Mode and update the comment
      	on usage.
      	* lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
      	types.
      	* lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
      	of obsolete field SPARK_Mode_Pragma.
      	(Load_Main_Source): Remove
      	the assignment of obsolete field SPARK_Mode_Pragma.
      	(Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
      	* lib-writ.adb (Add_Preprocessing_Dependency): Remove
      	the assignment of obsolete field SPARK_Mode_Pragma.
      	(Ensure_System_Dependency): Remove the assignment of obsolete
      	field SPARK_Mode_Pragma.
      	* rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
      	mode management. Change the way Ghost and SPARK modes are saved
      	and restored.
      	* sem.adb (Analyze): Change the way the Ghost mode is saved
      	and restored.
      	* sem_ch3.adb (Analyze_Object_Declaration): Change the way the
      	Ghost mode is saved and restored.
      	(Process_Full_View): Change
      	the way the Ghost mode is saved and restored.
      	* sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
      	mode is saved and restored.
      	* sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
      	mode is saved and restored.
      	(Analyze_Subprogram_Body_Helper):
      	Change the way the Ghost mode is saved and restored.
      	* sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
      	Ghost mode is saved and restored.
      	* sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
      	management. Save the SPARK mode-related data prior to any changes
      	to the scope stack and contexts. The mode is then reinstalled
      	before the subunit is analyzed in order to restore the original
      	view of the subunit.
      	* sem_ch12.adb (Analyze_Package_Instantiation): Update the
      	warning on region management.  Change the way the Ghost and
      	SPARK modes are saved and restored.
      	(Inline_Instance_Body):
      	Add a warning about SPARK mode management. Code clean up.
      	(Analyze_Subprogram_Instantiation): Update the warning on region
      	management.  Change the way the Ghost and SPARK modes are saved
      	and restored.
      	(Instantiate_Package_Body): Update the warning
      	on region management. Change the way the Ghost and SPARK modes
      	are saved and restored.
      	(Instantiate_Subprogram_Body): Update
      	the warning on region management. Change the way the Ghost and
      	SPARK modes are saved and restored.
      	(Set_Instance_Env): Add a
      	warning about SPARK mode management. Change the way SPARK mode
      	is saved and restored.
      	* sem_ch13.adb (Build_Predicate_Functions):
      	Change the way the Ghost mode is saved and restored.
      	(Build_Predicate_Function_Declaration): Change the way the Ghost
      	mode is saved and restored.
      	* sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
      	mode management. Change the way SPARK mode is saved and restored.
      	* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
      	Change the way the Ghost mode is saved and restored.
      	(Analyze_Initial_Condition_In_Decl_Part): Change the way
      	the Ghost mode is saved and restored.
      	(Analyze_Pragma):
      	Change the way the Ghost mode is saved and restored.
      	(Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
      	Ghost mode is saved and restored.
      	* sem_util.adb (Install_SPARK_Mode): New routine.
      	(Restore_SPARK_Mode): New routine.
      	(Save_SPARK_Mode_And_Set): Removed.
      	(Set_SPARK_Mode): New routine.
      	* sem_util.ads (Install_SPARK_Mode): New routine.
      	(Restore_SPARK_Mode): New routine.
      	(Save_SPARK_Mode_And_Set): Removed.
      	(Set_SPARK_Mode): New routine.
      
      From-SVN: r247230
      Hristian Kirtchev committed
    • [multiple changes] · 1f70c47f
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_util.adb (Is_Post_State): A reference to a
      	generic in out parameter is considered a change in the post-state
      	of a subprogram.
      
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
      	declaration of a subprogram instance within its wrapper package,
      	skip over null statements that may result from the rewriting of
      	ignored pragmas.
      
      2017-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* exp_attr.adb (Expand_Attribute_Reference, case 'Read):
      	If the type is an unchecked_union, replace the attribute with
      	a Raise_Program_Error (rather than inserting such before the
      	attribute reference) to handle properly the case where we are
      	processing a component of a larger record, and we need to prevent
      	further expansion for the unchecked union.
      	(Expand_Attribute_Reference, case 'Write): If the type is
      	an unchecked_union, check whether enclosing scope is a Write
      	subprogram. Replace attribute with a Raise_Program_Error if the
      	discriminants of the unchecked_union type have not default values
      	because such a use is erroneous..
      
      2017-04-25  Tristan Gingold  <gingold@adacore.com>
      
      	* exp_ch9.adb (Expand_N_Task_Type_Declaration):
      	Add relative_deadline to task record on edf profile.
      	(Make_Initialize_Protection): Pass deadline_floor value on edf profile.
      	(Make_Task_Create_Call): Pass relative_deadline value.
      	* par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
      	* s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
      	(Profile_Info): Add info for GNAT_Ravenscar_EDF.
      	* sem_prag.adb (Set_Ravenscar_Profile): Handle
      	GNAT_Ravenscar_EDF (set scheduling policy).
      	(Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
      	pragma.
      	(Sig_Flags): Add choice for Pragma_Deadline_Floor.
      	* snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
      	New names.
      	(Pragma_Deadline_Floor): New pragma.
      	* targparm.adb (Get_Target_Parameters): Recognize
      	GNAT_Ravenscar_EDF profile.
      
      From-SVN: r247221
      Arnaud Charlet committed
    • [multiple changes] · cf9a473e
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
      	(Ignore_SPARK_Mode_Pragmas): New routine.
      	(Set_Ignore_SPARK_Mode_Pragmas): New routine.
      	(Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
      	* einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
      	related entities.
      	(Ignore_SPARK_Mode_Pragmas): New routine
      	along with pragma Inline.
      	(Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
      	* opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
      	Ignore_SPARK_Mode_Pragmas_In_Instance.
      	* sem_ch6.adb (Analyze_Subprogram_Body_Helper):
      	Save and restore the value of global flag
      	Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
      	of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
      	the corresponding spec or the body must ignore all SPARK_Mode
      	pragmas found within.
      	(Analyze_Subprogram_Declaration): Mark
      	the spec when it needs to ignore all SPARK_Mode pragmas found
      	within to allow the body to infer this property in case it is
      	instantiated or inlined later.
      	* sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
      	value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
      	the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
      	when the corresponding spec also ignored all SPARK_Mode pragmas
      	found within.
      	(Analyze_Package_Declaration): Mark the spec when
      	it needs to ignore all SPARK_Mode pragmas found within to allow
      	the body to infer this property in case it is instantiated or
      	inlined later.
      	* sem_ch12.adb (Analyze_Formal_Package_Declaration):
      	Save and restore the value of flag
      	Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
      	formal spec when it needs to ignore all SPARK_Mode
      	pragmas found within to allow the body to infer this
      	property in case it is instantiated or inlined later.
      	(Analyze_Package_Instantiation): Save and restore the value
      	of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
      	the instance spec when it needs to ignore all SPARK_Mode
      	pragmas found within to allow the body to infer this
      	property in case it is instantiated or inlined later.
      	(Analyze_Subprogram_Instantiation): Save and restore the value
      	of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
      	instance spec and anonymous package when they need to ignore
      	all SPARK_Mode pragmas found within to allow the body to infer
      	this property in case it is instantiated or inlined later.
      	(Instantiate_Package_Body): Save and restore the value of global
      	flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
      	global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
      	corresponding instance spec also ignored all SPARK_Mode pragmas
      	found within.
      	(Instantiate_Subprogram_Body): Save and restore the
      	value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
      	the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
      	when the corresponding instance spec also ignored all SPARK_Mode
      	pragmas found within.
      	* sem_prag.adb (Analyze_Pragma): Update the reference to
      	Ignore_Pragma_SPARK_Mode.
      	* sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
      	all SPARK_Mode pragmas defined within yields mode "off".
      
      2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
      
      2017-04-25  Bob Duff  <duff@adacore.com>
      
      	* exp_atag.adb (Build_CW_Membership): Add "Suppress =>
      	All_Checks" to avoid generating unnecessary checks.
      	* exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
      	All_Checks".
      	* sem.ads: Fix comment.
      	* expander.ads: Fix comment.
      	* exp_atag.ads: Fix comment: "Index = 0" should be
      	"Index >= 0".
      
      2017-04-25  Gary Dismukes  <dismukes@adacore.com>
      
      	* s-taprop-linux.adb: Minor editorial fixes.
      
      From-SVN: r247182
      Arnaud Charlet committed
    • [multiple changes] · b03d3f73
      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
      Arnaud Charlet committed
  15. 19 Jan, 2017 1 commit
    • [multiple changes] · 4f94fa11
      2017-01-19  Javier Miranda  <miranda@adacore.com>
      
      	* exp_ch6.adb (Expand_Call): Remove side effects on
      	actuals that are allocators with qualified expression since the
      	initialization of the object is performed by means of individual
      	statements (and hence it must be done before the call).
      
      2017-01-19  Ed Schonberg  <schonberg@adacore.com>
      
      	* sem_ch3.adb (Analyze_Declarations): Minor reformatting.
      	(Build_Derived_Enumeration_Type): If the derived type inherits a
      	dynamic predicate from its parent, the bounds of the type must
      	freeze because an explicit constraint is constructed for the
      	type and the corresponding range is elaborated now.
      
      2017-01-19  Arnaud Charlet  <charlet@adacore.com>
      
      	* sem_attr.ads: minor fix of inconsistent casing in comment
      	* lib-writ.ads: minor align comments in columns
      	* sem_ch3.adb: Minor reformatting.
      	* spark_xrefs.ads: minor fix typo in SPARK-related comment
      	* table.ads: minor style fix in comment
      	* lib-xref-spark_specific.adb
      	(Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
      	* sem_ch12.adb: minor whitespace fix
      	* freeze.adb: Add comment.
      	* sem_util.adb (Unique_Name): for instances of
      	generic subprograms ignore the name of the wrapper package.
      
      2017-01-19  Javier Miranda  <miranda@adacore.com>
      
      	* exp_aggr.adb (Resolve_Record_Aggregate):
      	Factorize code needed for aggregates of limited and unlimited
      	types in a new routine.
      	(Pass_Aggregate_To_Back_End): New subprogram.
      
      2017-01-19  Yannick Moy  <moy@adacore.com>
      
      	* sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
      
      From-SVN: r244622
      Arnaud Charlet committed