PR target/82524
[official-gcc.git] / gcc / ada / ChangeLog
blob3e1f53762c0e767033d0ed6b1efb312f2591fbeb
1 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
3         * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
4         operating on trees as wide_ints.
6 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
8         * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
9         as a scoping construct when it is byproduct of exception handling.
11 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
13         * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
14         semantic field Target of node N_Call_Marker.
16 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
18         * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
19         attempts to copy a limited value, when the allocator is the expression
20         in an expression function.
22 2017-10-09  Joel Brobecker  <brobecker@adacore.com>
24         * doc/share/conf.py: Tell the style checker that this is a Python
25         fragment, and therefore that pyflakes should not be run to validate
26         this file.
28 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
30         * einfo.ads (Is_Boolean_Type): Add pragma Inline.
31         (Is_Entity_Name): Likewise.
32         (Is_String_Type): Likewise.
33         * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
34         and remove useless comparisons on the base types.
35         (Covers): Use simple tests for Standard_Void_Type.  Move up cheap tests
36         on T2.  Always test Is_Private_Type before Full_View_Covers.
38 2017-10-09  Bob Duff  <duff@adacore.com>
40         * exp_ch4.adb: Minor refactoring.
42 2017-10-09  Javier Miranda  <miranda@adacore.com>
44         * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
45         not components.
47 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
49         * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
50         are verified only in the static model.
52 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
54         * sem_ch5.adb (Analyze_Iterator_Specification,
55         Check_Reverse_Iteration): Check that the domain of iteration supports
56         reverse iteration when it is a formal container.  This requires the
57         presence of a Previous primitive in the Iterable aspect.
58         * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
59         primitives Last and Previous to support reverse iteration over formal
60         containers.
61         (Validate_Iterable_Aspect): Add check for reverse iteration operations.
62         * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
63         for reverse iteration using primitives Last and Previous in generated
64         loop.
66 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
68         * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
69         of the Defining_Program_Unit_Name, which is an identifier, in order to
70         construct the string for the fully qualified name.
72 2017-10-09  Justin Squirek  <squirek@adacore.com>
74         * sem_ch3.adb: Rename Uses_Unseen_Priv into
75         Contains_Lib_Incomplete_Type.
77 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
79         * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
80         sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
81         exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
82         prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
83         sem_ch10.adb, par-ch8.adb: Minor reformatting.
85 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
87         * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
88         in the static model.
89         (Is_Suitable_Variable_Assignment): This scenario is now only relevant
90         in the static model.
91         (Is_Suitable_Variable_Reference): This scenario is now only relevant in
92         the static model.
94 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
96         * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
97         expressions when the enclosing scope is a subprogram body and the next
98         declaration is a body that freezes entities previously declared in the
99         scope.
101 2017-10-09  Justin Squirek  <squirek@adacore.com>
103         * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
104         ghost packages and living packages in use clauses.
105         (Use_One_Type, Note_Redundant_Use): Correct warning messages
107 2017-10-09  Justin Squirek  <squirek@adacore.com>
109         * osint.ads: Document new parameter FD for Read_Source_File.
111 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
113         * exp_util.adb (Make_Predicate_Call): If the type of the expression to
114         which the predicate check applies is tagged, convert the expression to
115         that type. This is in most cases a no-op, but is relevant if the
116         expression is clas-swide, because the predicate function being invoked
117         is not a primitive of the type and cannot take a class-wide actual.
119 2017-10-09  Gary Dismukes  <dismukes@adacore.com>
121         * exp_disp.adb: Minor reformatting.
123 2017-10-09  Arnaud Charlet  <charlet@adacore.com>
125         * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
127 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
129         * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
130         GNATprove.
131         (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
133 2017-10-09  Bob Duff  <duff@adacore.com>
135         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
136         immediately if the call has already been processed (by a previous call
137         to Make_Build_In_Place_Call_In_Anonymous_Context).
138         * sem_elab.adb: Minor typo fixes.
140 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
142         * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
143         predicate, do not replace an identifier that matches the type if the
144         identifier is a selector in a selected component, because this
145         indicates a reference to some homograph of the type itself, and  not to
146         the current occurence in the predicate.
148 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
150         * repinfo.adb (List_Record_Layout): Tweak formatting.
151         (Write_Val): Remove superfluous spaces in back-end layout mode.
153 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
155         * sem_res.adb (Property_Error): Remove.
156         (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
157         current wording of the rule.
159 2017-10-09  Justin Squirek  <squirek@adacore.com>
161         * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
162         before analyzing a given scope due to an expression function.
163         (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
165 2017-10-09  Bob Duff  <duff@adacore.com>
167         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
168         Defining_Identifier (Obj_Decl) in two places, because it might have
169         changed.
170         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
171         involving 'Input on (not visibly) derived types.
173 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
175         * atree.adb: Add new soft link Rewriting_Proc.
176         (Rewrite): Invoke the subprogram attached to the rewriting soft link.
177         (Set_Rewriting_Proc): New routine.
178         * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
179         (Set_Rewriting_Proc): New routine.
180         * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
181         for *E*laboration flag to maintain consistency with other elaboration
182         flag generating subprograms.
183         * debug.adb: Document the new usage of flag -gnatdL.
184         * einfo.adb: Node19 is now used as Receiving_Entry.  Node39 is now used
185         as Protected_Subprogram.  Flag148 is now used as
186         Is_Elaboration_Checks_OK_Id.  Flag302 is now used as
187         Is_Initial_Condition_Procedure.
188         (Is_Elaboration_Checks_OK_Id): New routine.
189         (Is_Initial_Condition_Procedure): New routine.
190         (Protected_Subprogram): New routine.
191         (Receiving_Entry): New routine.
192         (SPARK_Pragma): Update assertion.
193         (SPARK_Pragma_Inherited): Update assertion.
194         (Suppress_Elaboration_Warnings): Removed.
195         (Set_Is_Elaboration_Checks_OK_Id): New routine.
196         (Set_Is_Initial_Condition_Procedure): New routine.
197         (Set_Protected_Subprogram): New routine.
198         (Set_Receiving_Entry): New routine.
199         (Set_SPARK_Pragma): Update assertion.
200         (Set_SPARK_Pragma_Inherited): Update assertion.
201         (Write_Entity_Flags): Update the output for Flag148 and Flag302.
202         (Write_Field19_Name): Add output for Receiving_Entry.
203         (Write_Field39_Name): Add output for Protected_Subprogram.
204         (Write_Field40_Name): Update the output for SPARK_Pragma.
205         * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
206         Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
207         Remove attribute Suppress_Elaboration_Warnings.  Update the stricture
208         of various entities.
209         (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
210         (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
211         (Protected_Subprogram): New routine along with pragma Inline.
212         (Receiving_Entry): New routine along with pragma Inline.
213         (Suppress_Elaboration_Warnings): Removed.
214         (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
215         Inline.
216         (Set_Is_Initial_Condition_Procedure): New routine along with pragma
217         Inline.
218         (Set_Protected_Subprogram): New routine along with pragma Inline.
219         (Set_Receiving_Entry): New routine along with pragma Inline.
220         (Set_Suppress_Elaboration_Warnings): Removed.
221         * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
222         consistency with other finalizer generating subprograms.
223         (Default_Initialize_Object): Mark the block which wraps the call to
224         finalize as being part of initialization.
225         * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
226         Initial_Condition.
227         (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
228         (Next_Suitable_Statement): Update the comment on usage. Skip over call
229         markers generated by the ABE mechanism.
230         * exp_ch9.adb (Activation_Call_Loc): New routine.
231         (Add_Accept): Link the accept procedure to the original entry.
232         (Build_Protected_Sub_Specification): Link the protected or unprotected
233         version to the original subprogram.
234         (Build_Task_Activation_Call): Code cleanup. Use a source location which
235         is very close to the "begin" or "end" keywords when generating the
236         activation call.
237         * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
238         * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
239         process loops.
240         (Expand_SPARK_N_Loop_Statement): New routine.
241         (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
242         call to the Default_Initial_Condition procedure.
243         (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
244         * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
245         effect.
246         (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
247         (Insert_Actions): Add processing for N_Call_Marker.
248         (Kill_Dead_Code): Explicitly kill an elaboration scenario.
249         * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
250         * frontend.adb: Initialize Sem_Elab. Process all saved top level
251         elaboration scenarios for ABE issues.
252         * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
253         nodes.
254         * lib.adb (Earlier_In_Extended_Unit): New variant.
255         * sem.adb (Analyze): Ignore N_Call_Marker nodes.
256         (Preanalysis_Active): New routine.
257         * sem.ads (Preanalysis_Active): New routine.
258         * sem_attr.adb (Analyze_Access_Attribute): Save certain
259         elaboration-related attributes. Save the scenario for ABE processing.
260         * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
261         effect. Save certain elaboration-related attributes.
262         * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
263         attributes. Save the scenario for ABE processing.
264         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
265         mode in effect. Save certain elaboration-related attributes.
266         (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
267         locating the first real statement.
268         (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
269         certain elaboration-related attributes.
270         * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
271         elaboration warnings.
272         * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
273         generated for purposes of wrapping an attribute used as a generic
274         actual.
275         (Find_Direct_Name): Save certain elaboration-related attributes. Save
276         the scenario for ABE processing.
277         (Find_Expanded_Name): Save certain elaboration-related attributes. Save
278         the scenario for ABE processing.
279         * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
280         elaboration-related attributes.
281         (Analyze_Requeue): Save certain elaboration-related attributes. Save
282         the scenario for ABE processing.
283         (Analyze_Single_Task_Declaration): Save certain elaboration-related
284         attributes.
285         (Analyze_Task_Type_Declaration): Save certain elaboration-related
286         attributes.
287         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
288         elaboration-related attributes.
289         (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
290         effect. Save certain elaboration-related attributes.
291         (Analyze_Package_Instantiation): Save certain elaboration-related
292         attributes.  Save the scenario for ABE processing. Create completing
293         bodies in case the instantiation results in a guaranteed ABE.
294         (Analyze_Subprogram_Instantiation): Save certain elaboration-related
295         attributes Save the scenario for ABE processing. Create a completing
296         body in case the instantiation results in a guaranteed ABE.
297         (Provide_Completing_Bodies): New routine.
298         * sem_elab.ads: Brand new implementation.
299         * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
300         Elaborate_Body): Do not suppress elaboration warnings.
301         * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
302         operator.
303         (Resolve_Call): Save certain elaboration-related attributes. Save the
304         scenario for ABE processing.
305         (Resolve_Entity_Name): Do not perform any ABE processing here.
306         (Resolve_Entry_Call): Inherit certain attributes from the original call.
307         * sem_util.adb (Begin_Keyword_Location): New routine.
308         (Defining_Entity): Update the parameter profile. Add processing for
309         concurrent subunits that are rewritten as null statements.
310         (End_Keyword_Location): New routine.
311         (Find_Enclosing_Scope): New routine.
312         (In_Instance_Visible_Part): Code cleanup.
313         (In_Subtree): Update the parameter profile. Add new version.
314         (Is_Preelaborable_Aggregate): New routine.
315         (Is_Preelaborable_Construct): New routine.
316         (Mark_Elaboration_Attributes): New routine.
317         (Scope_Within): Update the parameter profile.
318         (Scope_Within_Or_Same): Update the parameter profile.
319         * sem_util.ads (Begin_Keyword_Location): New routine.
320         (Defining_Entity): Update the parameter profile and the comment on
321         usage.
322         (End_Keyword_Location): New routine.
323         (Find_Enclosing_Scope): New routine.
324         (In_Instance_Visible_Part): Update the parameter profile.
325         (In_Subtree): Update the parameter profile. Add new version.
326         (Is_Preelaborable_Aggregate): New routine.
327         (Is_Preelaborable_Construct): New routine.
328         (Mark_Elaboration_Attributes): New routine.
329         (Scope_Within): Update the parameter profile and the comment on usage.
330         (Scope_Within_Or_Same): Update the parameter profile and the comment on
331         usage.
332         * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
333         to determine whether a loop has meaningful condition actions.
334         (Has_Condition_Actions): New routine.
335         * sinfo.adb (ABE_Is_Certain): Removed.
336         (Is_Declaration_Level_Node): New routine.
337         (Is_Dispatching_Call): New routine.
338         (Is_Elaboration_Checks_OK_Node): New routine.
339         (Is_Initialization_Block): New routine.
340         (Is_Known_Guaranteed_ABE): New routine.
341         (Is_Recorded_Scenario): New routine.
342         (Is_Source_Call): New routine.
343         (Is_SPARK_Mode_On_Node): New routine.
344         (No_Elaboration_Check): Removed.
345         (Target): New routine.
346         (Was_Attribute_Reference): New routine.
347         (Set_ABE_Is_Certain): Removed.
348         (Set_Is_Declaration_Level_Node): New routine.
349         (Set_Is_Dispatching_Call): New routine.
350         (Set_Is_Elaboration_Checks_OK_Node): New routine.
351         (Set_Is_Initialization_Block): New routine.
352         (Set_Is_Known_Guaranteed_ABE): New routine.
353         (Set_Is_Recorded_Scenario): New routine.
354         (Set_Is_Source_Call): New routine.
355         (Set_Is_SPARK_Mode_On_Node): New routine.
356         (Set_No_Elaboration_Check): Removed.
357         (Set_Target): New routine.
358         (Set_Was_Attribute_Reference): New routine.
359         * sinfo.ads: Remove attribute ABE_Is_Certain.  Attribute
360         Do_Discriminant_Check now utilizes Flag3.  Attribute
361         No_Side_Effect_Removal now utilizes Flag17.  Add new node
362         N_Call_Marker.  Update the structure of various nodes.
363         (ABE_Is_Certain): Removed along with pragma Inline.
364         (Is_Declaration_Level_Node): New routine along with pragma Inline.
365         (Is_Dispatching_Call): New routine along with pragma Inline.
366         (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
367         (Is_Initialization_Block): New routine along with pragma Inline.
368         (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
369         (Is_Recorded_Scenario): New routine along with pragma Inline.
370         (Is_Source_Call): New routine along with pragma Inline.
371         (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
372         (No_Elaboration_Check): Removed along with pragma Inline.
373         (Target): New routine along with pragma Inline.
374         (Was_Attribute_Reference): New routine along with pragma Inline.
375         (Set_ABE_Is_Certain): Removed along with pragma Inline.
376         (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
377         (Set_Is_Dispatching_Call): New routine along with pragma Inline.
378         (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
379         Inline.
380         (Set_Is_Initialization_Block): New routine along with pragma Inline.
381         (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
382         (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
383         (Set_Is_Source_Call): New routine along with pragma Inline.
384         (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
385         (Set_No_Elaboration_Check): Removed along with pragma Inline.
386         (Set_Target): New routine along with pragma Inline.
387         (Set_Was_Attribute_Reference): New routine along with pragma Inline.
388         * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
390 2017-10-09  Bob Duff  <duff@adacore.com>
392         * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
394 2017-10-09  Bob Duff  <duff@adacore.com>
396         * freeze.ads: Minor comment fixed.
398 2017-10-09  Bob Duff  <duff@adacore.com>
400         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
401         care of unchecked conversions in addition to regular conversions. This
402         takes care of a case where a type is derived from a private untagged
403         type that is completed by a tagged controlled type.
405 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
407         * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
408         rewriting a class-wide condition, handle properly the case where the
409         controlling argument of the operation to which the condition applies is
410         an access to a tagged type, and the condition includes a dispatching
411         call with an implicit dereference.
413 2017-10-09  Bob Duff  <duff@adacore.com>
415         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
416         the code at the end of this procedure that was setting the type of a
417         class-wide object to the specific type returned by a function call.
418         Treat this case as indefinite instead.
420 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
422         * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
423         Suppress spurious ambiguity error when two traversals of the homonym
424         chain (first directly, and then through an examination of relevant
425         interfaces) retrieve the same operation, when other irrelevant homonyms
426         of the operatioh are also present.
428 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
430         * sem_util.adb (Object_Access_Level): If the object is the return
431         statement of an expression function, return the level of the function.
432         This is relevant when the object involves an implicit conversion
433         between access types and the expression function is a completion, which
434         forces the analysis of the expression before rewriting it as a body, so
435         that freeze nodes can appear in the proper scope.
437 2017-10-09  Bob Duff  <duff@adacore.com>
439         * atree.adb: Make nnd apply to everything "interesting", including
440         Rewrite.  Remove rrd.
442 2017-10-09  Javier Miranda  <miranda@adacore.com>
444         * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
445         processing the declaration of the dummy object internally created by
446         Make_DT to compute the offset to the top of components referencing
447         secondary dispatch tables.
448         (Initialize_Tag): Do not initialize the offset-to-top field if it has
449         been initialized initialized.
450         * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
451         * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
452         (Make_DT): Create a dummy constant object if we can statically build
453         secondary dispatch tables.
454         (Make_Secondary_DT): For statically allocated secondary dispatch tables
455         use the dummy object to compute the offset-to-top field value by means
456         of the attribute 'Position.
458 2017-10-09  Bob Duff  <duff@adacore.com>
460         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
461         code so if BIPAlloc is not passed in, it will likely raise
462         Program_Error instead of cause miscellaneous chaos.
463         (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
464         as for the other Is_B-I-P... functions.
465         * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
466         aggregate whose ancestor part is a build-in-place call returning a
467         nonlimited type, transform the assignment to the ancestor part to use a
468         temp.
469         * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
470         creating an Itype for a library unit entity.
471         (Check_Initialization): Avoid spurious error message on
472         internally-generated call.
473         * sem_ch5.adb (Analyze_Assignment): Handle the case where the
474         right-hand side is a build-in-place call. This didn't happen when b-i-p
475         was only for limited types.
476         * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
477         implies >= Ada 2005.
478         * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
479         repeatedly.
480         * sem_util.adb (Next_Actual): Handle case of build-in-place call.
482 2017-10-09  Arnaud Charlet  <charlet@adacore.com>
484         * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
486 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
488         * libgnarl/s-taprob.adb: Minor whitespace fix.
490 2017-10-09  Bob Duff  <duff@adacore.com>
492         * namet.ads: Minor comment fix.
494 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
496         * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
497         just like other program units listed in Ada RM 10.1(1).
499 2017-10-09  Justin Squirek  <squirek@adacore.com>
501         * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
503 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
505         * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
506         actual for a formal package is an instantiation of a child unit, create
507         a freeze node for the instance of the parent if it appears in the same
508         scope and is not frozen yet.
510 2017-10-09  Pierre-Marie de Rodat  <derodat@adacore.com>
512         * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
513         in-source documentation for tagged types's Offset_To_Top.
515 2017-10-09  Bob Duff  <duff@adacore.com>
517         * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
518         confusing.  Same for N_Loc.  Remove assumption that b-i-p implies
519         limited.  This is for the case of a function call that occurs as the
520         default for a record component.
521         (Expand_N_Object_Declaration): Deal with the case where expansion has
522         created an object declaration initialized with something like
523         F(...)'Reference.
524         * exp_ch3.adb: Minor reformatting.
526 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
528         * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
529         the attribute is an object, but it may appear within a conversion. The
530         object itself must be retrieved when generating the range test that
531         implements the validity check on a scalar type.
533 2017-10-05  Eric Botcazou  <ebotcazou@adacore.com>
535         PR ada/82393
536         * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
537         * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
539 2017-10-02  Eric Botcazou  <ebotcazou@adacore.com>
540             Pierre-Marie de Rodat  <derodat@adacore.com>
542         PR ada/82384
543         * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
544         (time_t): Change from derived type to subtype.
545         (timeval): Use suseconds_t for tv_usec.
546         * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
548 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
550         * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
551         handling the form (plus/mult (convert @0) @1).
553 2017-09-29  Bob Duff  <duff@adacore.com>
555         * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
556         what we had before.
557         (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
558         change. Set the Etype in the class-wide case. This fixes a regression
559         in the libadalang test suite.
561 2017-09-29  Joel Brobecker  <brobecker@adacore.com>
563         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
564         doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
565         in comment markup.
566         * gnat_ugn.texi: Regenerate.
568 2017-09-29  Justin Squirek  <squirek@adacore.com>
570         * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
571         fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
572         gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
573         sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
574         for checking source file status and error message and/or call to
575         Read_Source_File.
576         * libgnat/s-os_lib.ads: Add new potential value constant for
577         uninitialized file descriptors.
578         * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
579         return result of IO to encompass a read access failure in addition to a
580         file-not-found error.
582 2017-09-29  Bob Duff  <duff@adacore.com>
584         * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
585         functions returning nonlimited types. Allow for qualified expressions
586         and type conversions.
587         (Expand_N_Extended_Return_Statement): Correct the computation of
588         Func_Bod to allow for child units.
589         (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
590         limited (initialization of In_Place_Expansion), and implies >= Ada
591         2005.
592         (Is_Build_In_Place_Result_Type): New function to accompany
593         Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
594         sometimes we just have the type on our hands, not the function.  For
595         now, does the same thing as the old version, so build-in-place is
596         disabled for nonlimited types, except that you can use -gnatd.9 to
597         enable it.
598         * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
599         accompany Is_Build_In_Place_Function and
600         Is_Build_In_Place_Function_Call, because sometimes we just have the
601         type on our hands, not the function.
602         (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
603         cases.
604         (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
605         questionable code at the end that was setting the Etype.
606         * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
607         determine whether "return (...agg...);" is returning from a
608         build-in-place function.
609         (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
610         Remove assumption that b-i-p implies limited (initialization of
611         In_Place_Expansion).
612         (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
613         an unchecked conversion.  Add assertions.
614         (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
615         secondary stack here, just because the type needs finalization.  That
616         code is obsolete.
617         (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
618         For "return (...agg...);" don't assume b-i-p implies limited.
619         Needs_Finalization does not imply secondary stack.
620         (Expand_Array_Aggregate): Named notation.  Reverse the sense of
621         Component_OK_For_Backend -- more readability with fewer double
622         negatives.
623         * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
624         b-i-p implies >= Ada 2005.
625         * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
626         b-i-p implies >= Ada 2005.  Remove Adjust if we're building the return
627         object of an extended return statement in place.
628         * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
629         Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
630         b-i-p implies >= Ada 2005.
631         * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
632         b-i-p implies >= Ada 2005.
633         * exp_ch7.adb: Comment fix.
634         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
635         assumptions that b-i-p implies >= Ada 2005.
636         * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
637         b-i-p implies >= Ada 2005.
638         * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
639         (Expr), in case Pool_Id is not set.
640         (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
641         qualified or converted.
642         (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
643         (Param)) = N_Identifier; that's all it could be.
644         * sinfo.ads: Comment fixes.
645         * snames.ads-tmpl: Comment fixes.
646         * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
648 2017-09-29  Justin Squirek  <squirek@adacore.com>
650         * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
651         all cases related to marking entity identifiers.
653 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
655         * adaint.c (win32_wait): Properly handle error and take into account
656         the WIN32 limitation on the number of simultaneous wait objects.
658 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
660         * cal.c: Minor proofreading.
662 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
664         * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
665         * gnat_ugn.texi: Regenerate.
667 2017-09-29  Bob Duff  <duff@adacore.com>
669         * lib-xref.ads: Comment fix.
671 2017-09-29  Bob Duff  <duff@adacore.com>
673         * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
674         Discriminants can't need finalization.
676 2017-09-29  Ed Schonberg  <schonberg@adacore.com>
678         * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
679         for types in expression if the function is within a generic unit.
680         * sem_res.adb (Resolve): In a generic context do not freeze an
681         expression, unless it is an entity. This exception is solely for the
682         purpose of detecting illegal uses of deferred constants in generic
683         units.
684         * sem_res.adb: Minor reformatting.
686 2017-09-29  Justin Squirek  <squirek@adacore.com>
688         * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
689         redundant warnings.
691 2017-09-29  Yannick Moy  <moy@adacore.com>
693         * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
695 2017-09-29  Eric Botcazou  <ebotcazou@adacore.com>
697         * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
698         * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
699         Document the effect of pragma Optimize_Alignment (Space) on non-packed
700         record types.
701         * gnat_rm.texi: Regenerate.
703 2017-09-25  Justin Squirek  <squirek@adacore.com>
705         * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
706         exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
707         gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
708         gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
709         libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
710         libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
711         libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
712         libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
713         libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
714         libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
715         put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
716         sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
717         Removal of ineffective use-clauses.
718         * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
719         constant folded barriers.
720         * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
721         Subtype_Marks and Names list in use-clause nodes to their new singular
722         counterparts (e.g. Subtype_Mark, Name).
723         * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
724         Prev_Ids and More_Ids in use-clause nodes.
725         (P_Use_Clause): Modify to take a list as a parameter.
726         (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
727         subtype_marks within an aggregate use-clauses into individual clauses.
728         * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
729         P_Use_Clause to match its new behavior.
730         * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
731         * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
732         errors.
733         * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
734         Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
735         the declarative region.
736         * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
737         after analysis (Analyze_Package_Specification): Update use clause chain
738         when there is no body.
739         * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
740         parameter to determine weither the installation of scopes should also
741         propagate on the use-clause "chain".
742         (Mark_Use_Clauses): Created to traverse use-clause chains and determine
743         what constitutes a valid "use" of a clause.
744         (Update_Use_Clause_Chain): Created to aggregate common machinary used
745         to clean up use-clause chains (and warn on ineffectiveness) at the end
746         of declaritive regions.
747         * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
748         package name from a use-package clause.
749         (Analyze_Package_Name_List): Created to perform analysis on a list of
750         package names (similar to Analyze_Package_Name).
751         (Find_Most_Prev): Created to traverse to the beginning of a given
752         use-clause chain.
753         (Most_Decendant_Use_Clause): Create to identify which clause from a
754         given set is highest in scope (not always the most prev).
755         (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
756         handle the new chaining algorithm, also many changes related to
757         redundant clauses. A new parameter has also been added to force
758         installation to handle certain cases.
759         * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
760         Analyze_Task_Body): Mark use clauses on relevant entities.
761         * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
762         Install_Parents): Add parameter to determine weither the installation
763         of scopes should also propagate on the use-clause "chain".
764         * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
765         Install_Context to avoid redundant chaining of use-clauses.
766         * sem_ch13.adb: Minor reformatting.
767         * sem_res.adb (Resolve): Mark use clauses on operators.
768         (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
769         entities.
770         * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
771         Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
772         represent any given clause's usage/reference/necessity.
773         (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
774         nodes to allow loose chaining of redundant clauses.
775         (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
776         Set_More_Ids, Set_Name): Modify set procedure calls to reflect
777         reorganization in node fields.
778         * types.ads (Source_File_Index): Adjust index bounds.
779         (No_Access_To_Source_File): New constant.
781 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
783         * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
784         the expression to be used in the generated attribute specification
785         (rather than relocating it) to avoid resolving a potentially malformed
786         tree when the expression is resolved through an ASIS-specific call to
787         Resolve_Aspect_Expressions.  This manifests itself as a crash on a
788         function with parameter associations.
790 2017-09-25  Yannick Moy  <moy@adacore.com>
792         * exp_spark.adb (Expand_SPARK_Indexed_Component,
793         Expand_SPARK_Selected_Component): New procedures to insert explicit
794         dereference if required.
795         (Expand_SPARK): Call the new procedures.
797 2017-09-25  Patrick Bernardi  <bernardi@adacore.com>
799         * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
800         libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
801         libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
802         libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
803         libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
805 2017-09-25  Vasiliy Fofanov  <fofanov@adacore.com>
807         * adaint.c (win32_wait): Properly handle error and take into account
808         the WIN32 limitation on the number of simultaneous wait objects.
810 2017-09-25  Yannick Moy  <moy@adacore.com>
812         * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
813         invariant procedure in GNATprove mode.
814         * sem_ch5.adb (Analyze_Assignment): Likewise.
816 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
818         * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
819         "back-end" in comments.
821 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
823         * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
824         call that appears in a classwide precondition and that mentions an
825         access formal of the subprogram, must use the accessibility level of
826         the actual in the call. This is one case in which a reference to a
827         formal parameter appears outside of the body of the subprogram.
829 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
831         * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
832         for GNATprove.
833         (Resolve_Entry): Clean up predicate
835 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
837         * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
838         than Program_Error because U_E is more in line with respect to the
839         intended behavior.
841 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
843         * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
844         Storage_Size does not freeze, and thus can include references to
845         deferred constants.
847 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
849         * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
850         reference when it appears within a pragma of no significance to SPARK.
851         (In_Insignificant_Pragma): New routine.
852         * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
854 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
856         * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
857         actual is a renaming, indicate that it is the renamed package that must
858         be frozen before the instantiation.
860 2017-09-25  Yannick Moy  <moy@adacore.com>
862         * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
863         of dimensionality system in GNAT UG.
864         * gnat_ugn.texi: Regenerate.
866 2017-09-25  Yannick Moy  <moy@adacore.com>
868         * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
869         GNATprove_Mode when switch -gnatdF used.
871 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
873         * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
874         the backend.
876 2017-09-25  Javier Miranda  <miranda@adacore.com>
878         * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
879         expansion of user-defined enumeration types when the generation of
880         names for enumeration literals is suppressed.
882 2017-09-25  Gary Dismukes  <dismukes@adacore.com>
884         * libgnarl/s-taprop__linux.adb: Minor reformatting.
886 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
888         * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
889         that appear as selector names of parameter associations, as these are
890         never resolved by visibility.
892 2017-09-25  Justin Squirek  <squirek@adacore.com>
894         * sem_res.adb (Resolve_Entry): Generate reference for index entities.
896 2017-09-25  Doug Rupp  <rupp@adacore.com>
898         * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
900 2017-09-25  Javier Miranda  <miranda@adacore.com>
902         * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
903         (Expand_User_Defined_Enumeration_Image): New subprogram.
904         (Expand_Image_Attribute): Enable speed-optimized expansion of
905         user-defined enumeration types when we are compiling with optimizations
906         enabled.
908 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
910         * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
911         routine is already provided by Einfo.
912         * einfo.adb (Has_Null_Abstract_State): Replace with the body from
913         Sem_Util, which had better comments and avoided double calls to
914         Abstract_State.
916 2017-09-25  Bob Duff  <duff@adacore.com>
918         * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
920 2017-09-25  Doug Rupp  <rupp@adacore.com>
922         * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
923         (Compute_Base_Monotonic_Clock): New function.
924         (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
925         (Timed_Delay): Likewise.
926         (Monotonic_Clock): Likewise.
927         * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
929 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
931         * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
932         previous change.
934 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
936         * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
937         Minor reformatting.
939 2017-09-20  Alexandre Oliva <aoliva@redhat.com>
941         * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
943 2017-09-18  Bob Duff  <duff@adacore.com>
945         * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
946         reference types in the access-to-access case.
948 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
950         * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
951         of the "aliased" keyword on the prefix from here to...
952         (Resolve_Attribute) <Attribute_Access>: ...here.  Remove useless call
953         to Check_No_Implicit_Aliasing.
954         * sinfo.ads (Non_Aliased_Prefix): Delete.
955         (Set_Non_Aliased_Prefix): Likewise.
956         * sinfo.adb (Non_Aliased_Prefix): Delete.
957         (Set_Non_Aliased_Prefix): Likewise.
959 2017-09-18  Bob Duff  <duff@adacore.com>
961         * exp_ch5.adb (Build_Formal_Container_Iteration,
962         Expand_Formal_Container_Element_Loop): Convert the container to the
963         root type before passing it to the iteration operations, so it will be
964         of the right type.
966 2017-09-18  Bob Duff  <duff@adacore.com>
968         * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
970 2017-09-18  Bob Duff  <duff@adacore.com>
972         * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
973         and it's a bit-packed array, pass False to the Consider_IS parameter of
974         Needs_Simple_Initialization.
976 2017-09-18  Hristian Kirtchev  <kirtchev@adacore.com>
978         * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
979         the preexisting body.
980         * sem_prag.adb (Check_Inline_Always_Placement): New routine.
981         (Process_Inline): Verify the placement of pragma Inline_Always. The
982         pragma must now appear on the initial declaration of the related
983         subprogram.
985 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
987         * sem_ch3.adb (Analyze_Declarations): In ASIS mode,  At the end of the
988         declarative list in a subprogram body, analyze aspext specifications to
989         provide basic semantic information, because otherwise the aspect
990         specifications might only be snalyzed during expansion, when related
991         subprograms are generated.
993 2017-09-18  Bob Duff  <duff@adacore.com>
995         * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
996         validity checks have rewritten the tree.
998 2017-09-18  Bob Duff  <duff@adacore.com>
1000         * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
1002 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
1004         * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
1005         qualified exxpression for an aggregate in a generic unit, verify that
1006         the scope of the type is itself visible and not hidden, so that the
1007         qualified expression is correctly resolved in any instance.
1009 2017-09-18  Bob Duff  <duff@adacore.com>
1011         * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
1012         mark refers to the current instance. Set the type to Any_Type in that
1013         case, to avoid later crashes.
1015 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
1017         * exp_ch3.adb (Replace_Discriminant_References): New procedure,
1018         subsidiary of Build_Assignment, used to handle the initialization code
1019         for a mutable record component whose default value is an aggregate that
1020         sets the values of the discriminants of the components.
1022 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
1024         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
1025         the entity as being volatile for an overlay that toggles the scalar
1026         storage order.
1028 2017-09-18  Fedor Rybin  <frybin@adacore.com>
1030         * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
1031         options -U main and --harness-only are not compatible.
1033 2017-09-18  Hristian Kirtchev  <kirtchev@adacore.com>
1035         * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
1037 2017-09-18  Piotr Trojanek  <trojanek@adacore.com>
1039         * einfo.ads (Is_Imported): Update comment, as this
1040         routine also applies to constants.
1042 2017-09-18  Yannick Moy  <moy@adacore.com>
1044         * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
1045         holding state.
1047 2017-09-18  Justin Squirek  <squirek@adacore.com>
1049         * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
1050         constant indication for Pragma_Linker_Section.
1052 2017-09-18  Bob Duff  <duff@adacore.com>
1054         Alternate fix for PR ada/71358
1055         * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
1056         Instead, make a local copy of Config, and if it's null, allocate an
1057         empty Command_Line_Configuration_Record, so we won't crash on null
1058         pointer dereference.
1060 2017-09-16  Eric Botcazou  <ebotcazou@adacore.com>
1062         * libgnarl/a-intnam__rtems.ads: Update copyright date.
1063         * libgnarl/s-interr__hwint.adb: Likewise.
1064         * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
1065         * libgnarl/s-osinte__rtems.adb: Likewise.
1066         * libgnarl/s-osinte__rtems.ads: Likewise.
1068 2017-09-13  Nicolas Roche  <roche@adacore.com>
1070         * Make-lang.in: In the fallback mechanim, parse the associated .ali
1071         file and try to guess the locations of dependencies.
1073 2017-09-13  Eric Botcazou  <ebotcazou@adacore.com>
1075         * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
1076         the suppression status of Alignment_Check on the current scope.
1077         (Alignment_Checks_Suppressed): New function to use the saved instead of
1078         the current suppression status of Alignment_Check.
1079         (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
1080         (Analyze_Attribute_Definition_Clause): Instead of manually appending to
1081         the table, call Register_Address_Clause_Check.
1082         (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
1083         recorded address clause instead of its entity.
1085 2017-09-13  Jerome Guitton  <guitton@adacore.com>
1087         * libgnarl/s-tpopsp__vxworks-tls.adb,
1088         libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
1089         (Self): Register thread if task id is null.
1091 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
1093         * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
1095 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
1097         * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
1098         from an entity to only scope index, as a mapping from an entity to the
1099         same entity was useless.
1100         (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
1101         to E.
1102         (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
1103         to E.
1104         (Is_Constant_Object_Without_Variable_Input): remove local "Result"
1105         variable, just use return statements.
1107 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
1109         * libgnarl/s-vxwext__kernel-smp.adb,
1110         libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
1111         New file.
1113 2017-09-13  Hristian Kirtchev  <kirtchev@adacore.com>
1115         * einfo.adb: Flag42 is now Is_Controlled_Active.
1116         (Is_Controlled): This attribute is now synthesized.
1117         (Is_Controlled_Active): This attribute is now an explicit flag rather
1118         than a synthesized attribute.   (Set_Is_Controlled): Removed.
1119         (Set_Is_Controlled_Active): New routine.
1120         (Write_Entity_Flags): Update the output for Flag42.
1121         * einfo.ads: Update the documentation of the following attributes:
1122         Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
1123         and Is_Controlled_Active have swapped their functionality.
1124         (Is_Controlled): Renamed to Is_Controlled_Active.
1125         (Is_Controlled_Active): Renamed to Is_Controlled.
1126         (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
1127         * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
1128         Is_Controlled.
1129         * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
1130         (Needs_Finalization): Code clean up. Remove the tests for
1131         Disable_Controlled because a) they were incorrect as they would reject
1132         a type which is sublect to the aspect, but may contain controlled
1133         components, and b) they are no longer necessary.
1134         * exp_util.ads (Needs_Finalization): Update comment on documentation.
1135         * freeze.adb (Freeze_Array_Type): Restore the original use of
1136         Is_Controlled.
1137         (Freeze_Record_Type): Restore the original use of Is_Controlled.
1138         * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
1139         Is_Controlled.
1140         (Array_Type_Declaration): Restore the original use of Is_Controlled.
1141         (Build_Derived_Private_Type): Restore the original use of
1142         Is_Controlled.
1143         (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
1144         type derived from Ada.Finalization.[Limited_]Controlled.
1145         (Build_Derived_Type): Restore the original use of Is_Controlled.
1146         (Record_Type_Definition): Restore the original use of Is_Controlled.
1147         * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
1148         Is_Controlled.
1149         * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
1150         (Analyze_Aspect_Specifications): Use routine
1151         Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
1153 2017-09-13  Vincent Celier  <celier@adacore.com>
1155         * clean.adb (Gnatclean): Fix error when looking for target
1156         of <target>-gnatclean
1158 2017-09-13  Javier Miranda  <miranda@adacore.com>
1159             Ed Schonberg  <schonberg@adacore.com>
1161         * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
1162         expanded name that designates the current instance of a child unit in
1163         its own body and appears as the prefix of a reference to an entity
1164         local to the child unit.
1166 2017-09-12  Bob Duff  <duff@adacore.com>
1168         * sem_warn.adb: Minor comment.
1170 2017-09-12  Bob Duff  <duff@adacore.com>
1172         * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
1173         libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
1174         be Default_Initialized_Item, and apply pragma Unmodified to it,
1175         to suppress the warning.
1177 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
1179         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
1180         for access types.
1182 2017-09-12  Yannick Moy  <moy@adacore.com>
1184         * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
1185         together with Global when ignoring one in CodePeer mode.
1187 2017-09-12  Javier Miranda  <miranda@adacore.com>
1189         * sem_ch3.adb (Analyze_Declarations): In nested
1190         package declarations that have a private part enable missing check
1191         of the RM rule 13.1.1(11/3): usage names in aspect definitions are
1192         resolved at the end of the immediately enclosing declaration list.
1194 2017-09-12  Bob Duff  <duff@adacore.com>
1196         * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
1197         Empty.
1199 2017-09-12  Georges-Axel Jaloyan  <jaloyan@adacore.com>
1201         * debug.adb: Reserving flag -gnatdF for safe pointer checking.
1202         * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
1203         dF flag.
1204         * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
1205         in preparation for the evolution of the SPARK language that
1206         includes a pointer analysis for checking non-aliasing of access
1207         types. The Check_Safe_Pointers function is the entry point, and
1208         will traverse the AST and raise compile-time errors everytime
1209         it detects non-begign aliasing.  Detailed comments are present
1210         in the sem_spark.ads file.
1211         * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
1212         functions to iterate over the list of globals of a subprogram.
1213         * libgnat/system.ads: Add restriction No_Finalization.
1214         * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
1215         dependency on g-dynhta.adb.
1217 2017-09-12  Bob Duff  <duff@adacore.com>
1219         * sem_ch6.adb (Analyze_Expression_Function): Call
1220         Check_Dynamically_Tagged_Expression.
1221         * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
1222         "and then Is_Tagged_Type (Typ)" because there is an earlier
1223         "Assert (Is_Tagged_Type (Typ))".
1225 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
1227         * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
1229 2017-09-11  Arnaud Charlet  <charlet@adacore.com>
1231         * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
1232         * doc/gnat_ugn/platform_specific_information.rst: Remove doc
1233         for no longer supported platforms.
1234         * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
1235         description of the semantics for dimensionality analysis.
1236         * gnat_ugn.texi: Regenerated.
1238 2017-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1240         * freeze.adb (Has_Incomplete_Compoent): Delete.
1241         (Freeze_Profile):
1242         Do not inhibit the freezing of the profile of an expression
1243         function here.
1244         (Freeze_Subprogram): Do not re-create extra formals.
1245         * sem_ch6.adb (Analyze_Expression_Function): Always
1246         pre-analyze the expression if the function is not a completion.
1247         (Analyze_Subprogram_Body_Helper): For the body generated
1248         from an expression function that is not a completion, do
1249         not freeze the profile and temporary mask the types declared
1250         outside the expression that are not yet frozen.
1251         * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
1252         during the pre-analysis of an expression function.
1254 2017-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1256         * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
1257         (gigi): Likewise.
1259 2017-09-11  Yannick Moy  <moy@adacore.com>
1261         * lib-xref-spark_specific.adb: Minor rewrite.
1263 2017-09-11  Jerome Lambourg  <lambourg@adacore.com>
1265         * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
1266         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
1267         renaming into account.
1269 2017-09-11  Jerome Lambourg  <lambourg@adacore.com>
1271         * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
1272         * gcc-interface/Makefile.in: Take this renaming into account.
1274 2017-09-11  Arnaud Charlet  <charlet@adacore.com>
1276         * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
1277         longer used.
1279 2017-09-11  Yannick Moy  <moy@adacore.com>
1281         * sem_util.adb (Check_Result_And_Post_State):
1282         Do not issue a warning about missing reference to an outcome if
1283         the subprogram is ghost and has no outputs.
1284         * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
1285         reformatting.
1287 2017-09-11  Yannick Moy  <moy@adacore.com>
1289         * gnat1drv.adb (Adjust_Global_Switches): Set
1290         Check_Validity_Of_Parameters to False in GNATprove mode.
1291         * opt.ads (Check_Validity_Of_Parameters): Document switch to
1292         set option.
1294 2017-09-09  Pierre-Marie de Rodat  <derodat@adacore.com>
1296         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
1297         generate debug info for inner record types if -fgnat-encodings=minimal.
1298         (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
1299         type as the debug type.
1301 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
1303         * gcc-interface/decl.c (components_to_record): Do not reorder in non-
1304         packed record types if pragma Optimize_Alignment (Space) is enabled.
1306 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
1308         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
1309         limits for expression functions.
1310         (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
1312 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
1314         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
1315         layout of the record from the parent type only if both are or are not
1316         unchecked unions.
1317         (is_stored_discriminant): Return false for an unchecked union.
1319 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
1321         * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
1322         return NULL_EXPR.
1324 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
1326         * gcc-interface/decl.c (promote_object_alignment): New function taken
1327         from...
1328         (gnat_to_gnu_entity) <E_Variable>: ...here.  Invoke it.
1329         (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
1330         create a padding type on success before doing the atomic check.
1332 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
1334         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
1335         promotion to static memory earlier in the processing.
1337 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
1339         * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
1340         and TYPE_BY_REFERENCE_P flags on types after various promotions.
1341         * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
1342         Consider all kinds of entities.
1344 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
1346         * gcc-interface/utils.c (convert): When converting to a padding type,
1347         reuse an existing CONSTRUCTOR if it has got the right size.
1349 2017-09-08  Nicolas Roche  <roche@adacore.com>
1351         * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
1352         source in libgnat/
1353         * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
1354         a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
1355         i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
1356         a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
1357         a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
1358         s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
1359         a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
1360         s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
1361         a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
1362         a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
1363         a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
1364         a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
1365         a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
1366         s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
1367         a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
1368         s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
1369         s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
1370         a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
1371         a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
1372         system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
1373         a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
1374         a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
1375         s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
1376         g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
1377         g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
1378         g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
1379         a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
1380         calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
1381         a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
1382         a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
1383         a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
1384         a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
1385         directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
1386         system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
1387         system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
1388         a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
1389         system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
1390         g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
1391         a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
1392         s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
1393         s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
1394         g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
1395         a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
1396         a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
1397         g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
1398         a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
1399         a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
1400         a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
1401         g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
1402         a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
1403         a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
1404         s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
1405         a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
1406         s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
1407         s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
1408         s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
1409         a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
1410         system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
1411         s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
1412         g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
1413         g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
1414         s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
1415         s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
1416         g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
1417         g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
1418         g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
1419         system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
1420         g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
1421         g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
1422         s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
1423         i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
1424         g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
1425         s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
1426         g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
1427         s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
1428         a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
1429         a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
1430         g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
1431         s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
1432         g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
1433         g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
1434         a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
1435         a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
1436         s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
1437         s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
1438         a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
1439         a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
1440         a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
1441         s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
1442         s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
1443         s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
1444         a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
1445         a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
1446         s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
1447         a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
1448         a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
1449         s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
1450         a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
1451         g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
1452         a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
1453         a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
1454         s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
1455         a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
1456         g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
1457         a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
1458         s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
1459         system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
1460         a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
1461         a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
1462         s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
1463         s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
1464         g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
1465         s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
1466         g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
1467         system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
1468         g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
1469         g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
1470         a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
1471         a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
1472         g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
1473         a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
1474         system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
1475         s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
1476         g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
1477         a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
1478         a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
1479         a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
1480         s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
1481         s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
1482         g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
1483         a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
1484         a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
1485         a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
1486         a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
1487         g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
1488         g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
1489         a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
1490         g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
1491         a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
1492         s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
1493         a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
1494         s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
1495         s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
1496         a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
1497         s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
1498         a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
1499         s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
1500         g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
1501         g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
1502         a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
1503         s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
1504         a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
1505         a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
1506         a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
1507         s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
1508         s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
1509         a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
1510         a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
1511         system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
1512         s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
1513         a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
1514         a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
1515         s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
1516         s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
1517         a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
1518         a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
1519         i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
1520         s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
1521         a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
1522         s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
1523         g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
1524         s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
1525         a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
1526         a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
1527         a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
1528         a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
1529         s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
1530         a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
1531         a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
1532         a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
1533         g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
1534         s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
1535         g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
1536         a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
1537         system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
1538         a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
1539         s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
1540         a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
1541         g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
1542         i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
1543         s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
1544         a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
1545         g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
1546         s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
1547         s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
1548         a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
1549         a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
1550         a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
1551         a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
1552         a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
1553         g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
1554         s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
1555         a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
1556         a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
1557         a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
1558         s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
1559         s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
1560         s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
1561         s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
1562         g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
1563         a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
1564         s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
1565         a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
1566         a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
1567         a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
1568         s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
1569         a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
1570         s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
1571         a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
1572         g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
1573         i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
1574         s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
1575         s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
1576         a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
1577         s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
1578         s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
1579         s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
1580         s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
1581         a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
1582         s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
1583         a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
1584         s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
1585         s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
1586         s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
1587         s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
1588         s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
1589         a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
1590         g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
1591         a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
1592         s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
1593         system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
1594         g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
1595         a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
1596         a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
1597         a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
1598         s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
1599         a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
1600         g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
1601         a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
1602         s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
1603         a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
1604         a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
1605         a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
1606         a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
1607         s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
1608         g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
1609         g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
1610         system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
1611         s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
1612         s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
1613         a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
1614         g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
1615         a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
1616         s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
1617         s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
1618         s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
1619         unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
1620         s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
1621         g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
1622         a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
1623         s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
1624         a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
1625         a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
1626         to libgnat subdirectory.
1628 2017-09-08  Yannick Moy  <moy@adacore.com>
1630         * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
1631         return the entity associated with the call.
1632         * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
1633         Replace the internal Get_Function_Id with the new
1634         Sem_Aux.Get_Called_Entity.
1635         (Iterate_Call_Parameters): New
1636         procedure to iterate on formals and actuals at the same time.
1637         * sem_ch12.adb (Analyze_Subprogram_Instantiation):
1638         Set SPARK_Mode from spec when set, for analysis
1639         of instance. Restore after analysis of instance.
1640         (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
1641         set, for analysis of body instance. Restored automatically at
1642         the end of the subprogram.
1643         * gnat1drv.adb (Adjust_Global_Switches): Set
1644         Check_Validity_Of_Parameters to False in GNATprove mode.
1645         * opt.ads (Check_Validity_Of_Parameters): Document switch to
1646         set option.
1648 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1650         * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
1651         (New_Copy_Tree): ...there.  Reset the hash tables only if they
1652         were used in the previous invocation.
1653         * s-htable.adb: Fix typo.
1655 2017-09-08  Bob Duff  <duff@adacore.com>
1657         * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
1659 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1661         * sem_aggr.adb: minor style fix.
1663 2017-09-08  Bob Duff  <duff@adacore.com>
1665         * sprint.adb (Write_Corresponding_Source): Ignore if there is
1666         no current source file.
1667         (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
1668         Print something helpful in case N is invalid.
1669         * sprint.ads: Minor comment fix.
1671 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1673         * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
1674         access types.
1676 2017-09-08  Bob Duff  <duff@adacore.com>
1678         * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
1679         Ada_2020, along the same lines as the other Ada version pragmas.
1681 2017-09-08  Gary Dismukes  <dismukes@adacore.com>
1683         * sem_ch12.adb: Minor typo fixes and reformatting.
1685 2017-09-08  Yannick Moy  <moy@adacore.com>
1687         * sem_aggr.adb (Resolve_Record_Aggregate):
1688         Rewrite bounds of aggregate subexpressions which may depend on
1689         discriminants of the enclosing aggregate.
1691 2017-09-08  Yannick Moy  <moy@adacore.com>
1693         * sem_ch5.adb: Prevent assertion failure on illegal code.
1695 2017-09-08  Yannick Moy  <moy@adacore.com>
1697         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
1698         calling Renamed_Entity on an entity which cannot be a renaming.
1700 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1702         * exp_aggr.adb: Add with & use clause for Urealp.
1703         (Aggr_Assignment_OK_For_Backend): Accept (almost all)
1704         elementary types instead of just discrete types.
1705         * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
1706         * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
1707         Be prepared for the FP zero value in the memset case.  Add small
1708         guard.
1710 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1712         * s-htable.adb (Static_HTable.Reset): Use aggregate instead
1713         of loop.
1715 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
1717         * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
1718         of New_Copy because the latter leaves the syntactic structure of
1719         the tree inconsistent (a child is accessible through two parents)
1720         and prevents proper replication of itypes by subsequent calls
1721         to New_Copy_Tree.
1722         * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
1723         New_Copy because the latter leaves the syntactic structure of the
1724         tree inconsistent (a child is accessible through two parents)
1725         and prevents proper replication of itypes by subsequent calls
1726         to New_Copy_Tree.
1727         * sem_util.adb (In_Subtree): New routine.
1728         (New_Copy_Tree): Reimplemented.
1729         * sem_util.ads (In_Subtree): New routine.
1730         (New_Copy_Tree): Reimplemented.
1732 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1734         * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
1735         for aspect Default_Value is a static scalar value, but it does
1736         not freeze the type. Yhis allows for subsequent representation
1737         clauses for the type.
1739 2017-09-08  Javier Miranda  <miranda@adacore.com>
1741         * sem_ch8.adb (Find_Direct_Name.Undefined): Do
1742         not add entries into the undefined reference table when we are
1743         compiling with errors ignored.
1745 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1747         * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
1748         check if the instance is within an enclosing instance body. The
1749         formal package was legal in the enclosing generic, and is
1750         legal in the enclosing instantiation.  This optimisation may be
1751         applicable elsewhere, and it also removes spurious errors that
1752         may arise with on-the-fly processing  of instantiations that
1753         contain Inline_Always subprograms.
1755 2017-09-08  Vincent Celier  <celier@adacore.com>
1757         * gnatcmd.adb: Disregard empty argument of GNAT driver.
1759 2017-09-08  Justin Squirek  <squirek@adacore.com>
1761         * checks.adb (Insert_Valid_Check): Manually decorate
1762         the generated temporary for range valdity checks.
1764 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1766         * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
1768 2017-09-08  Justin Squirek  <squirek@adacore.com>
1770         * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
1771         case to handle underscore flags.
1772         * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
1773         new procedure to handle underscores.
1775 2017-09-08  Javier Miranda  <miranda@adacore.com>
1777         * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
1778         divisions with fixed point results to avoid generating twice
1779         the runtime check on divide by zero.
1780         * checks.adb (Apply_Divide_Checks): Ensure that operands are
1781         not evaluated twice (once for their runtime checks and once for
1782         their regular computation).
1784 2017-09-08  Yannick Moy  <moy@adacore.com>
1786         * sem_prag.adb (Analyze_Part_Of): Add missing
1787         return statements after issuing errors.  Add detection of
1788         out-of-order item and single concurrent type.
1790 2017-09-08  Nicolas Roche  <roche@adacore.com>
1792         * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
1793         s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
1794         s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
1795         s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
1796         a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
1797         a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
1798         s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
1799         s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
1800         a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
1801         s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
1802         s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
1803         s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
1804         s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
1805         s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
1806         s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
1807         s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
1808         s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
1809         s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
1810         a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
1811         s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
1812         s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
1813         s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
1814         s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
1815         s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
1816         s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
1817         s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
1818         s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
1819         a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
1820         s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
1821         s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
1822         s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
1823         a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
1824         s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
1825         s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
1826         s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
1827         a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
1828         s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
1829         s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
1830         s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
1831         s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
1832         s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
1833         a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
1834         g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
1835         a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
1836         g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
1837         s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
1838         s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
1839         g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
1840         s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
1841         s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
1842         s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
1843         s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
1844         a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
1845         a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
1847 2017-09-08  Arnaud Charlet <charlet@adacore.com>
1849         * doc/share/conf.py, doc/share/latex_elements.py,
1850         doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
1851         highlighting.
1853 2017-09-08  Arnaud Charlet <charlet@adacore.com>
1855         * gnat_rm.texi, gnat_ugn.texi,
1856         doc/gnat_ugn/the_gnat_compilation_model.rst,
1857         doc/gnat_ugn/getting_started_with_gnat.rst,
1858         doc/gnat_ugn/inline_assembler.rst,
1859         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1860         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
1861         doc/gnat_ugn/about_this_guide.rst,
1862         doc/gnat_ugn/platform_specific_information.rst,
1863         doc/gnat_ugn/example_of_binder_output.rst,
1864         doc/gnat_ugn/gnat_and_program_execution.rst,
1865         doc/gnat_ugn/gnat_utility_programs.rst,
1866         doc/gnat_rm/implementation_of_specific_ada_features.rst,
1867         doc/gnat_rm/interfacing_to_other_languages.rst,
1868         doc/gnat_rm/implementation_defined_aspects.rst,
1869         doc/gnat_rm/intrinsic_subprograms.rst,
1870         doc/gnat_rm/implementation_defined_characteristics.rst,
1871         doc/gnat_rm/implementation_advice.rst,
1872         doc/gnat_rm/implementation_defined_attributes.rst,
1873         doc/gnat_rm/compatibility_and_porting_guide.rst,
1874         doc/gnat_rm/standard_library_routines.rst,
1875         doc/gnat_rm/the_gnat_library.rst,
1876         doc/gnat_rm/implementation_defined_pragmas.rst,
1877         doc/gnat_rm/representation_clauses_and_pragmas.rst,
1878         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1879         doc/gnat_rm/obsolescent_features.rst,
1880         doc/gnat_rm/about_this_guide.rst,
1881         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
1882         doc/gnat_rm/implementation_of_ada_2012_features.rst,
1883         doc/gnat_ugn.rst,
1884         doc/gnat_rm.rst: Update documentation.
1886 2017-09-08  Arnaud Charlet <charlet@adacore.com>
1888         * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
1889         s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
1890         * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
1892 2017-09-08  Bob Duff  <duff@adacore.com>
1894         * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
1895         New routine to read the Tag robustly.
1896         * exp_attr.adb (Input): Change the expansion of 'Input,
1897         in the class-wide case, to call String_Input_Tag instead of
1898         String_Input_Blk_IO.
1900 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1902         * s-rident.ads (Restriction_Id): reorder enum
1903         literals, so that Pure_Barriers is no longer in range of the
1904         Cunit_Boolean_Restrictions subtype.
1906 2017-09-08  Nicolas Roche  <roche@adacore.com>
1908         * a-taster.ads, a-taster.adb: Move to libgnarl
1909         * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
1910         Add support for files in libgnarl.
1912 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1914         * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
1915         accessibility check to an interface conversion, whose purpose
1916         is to perform a pointer adjustment in a dispatching call.
1917         * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
1918         when the actual is a construct that involves a dereference of an
1919         expression that includes a formal of the enclosing subprogram,
1920         In such cases, the accessibility level of the actual is that of
1921         the corresponding formal, which is passed in as an additional
1922         actual in the outer call.
1924 2017-09-08  Bob Duff  <duff@adacore.com>
1926         * exp_intr.adb (Add_Source_Info): Do not decode
1927         file names; they were not encoded in the first place.
1929 2017-09-08  Bob Duff  <duff@adacore.com>
1931         * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
1932         exceptions instead of crashes. Check for absurdly long strings
1933         and empty strings. Empty strings cause trouble because they can
1934         have super-null ranges (e.g. 100..10), which causes Ext_Copy to
1935         be empty, which causes an array index out of bounds.
1936         * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
1937         instead of crashes.
1939 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1941         * sem_util.adb (Is_CCT_Instance): allow use in
1942         the context of protected types.
1944 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1946         * a-tigeli.adb: minor remove extra whitespace.
1948 2017-09-08  Gary Dismukes  <dismukes@adacore.com>
1950         * par-ch4.adb: Reformatting of an error message.
1952 2017-09-08  Javier Miranda  <miranda@adacore.com>
1954         * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
1955         identifiers to ensure their correct decoration of names on
1956         aspect expressions.
1958 2017-09-08  Yannick Moy  <moy@adacore.com>
1960         * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
1961         not skip a loop coming from source which is rewritten into a loop.
1963 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1965         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
1966         wrapper has convention Ada, to prevent spurious warnings on
1967         unconstrained array parameters.
1969 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1971         * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
1972         (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
1974 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1976         * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
1978 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1980         * exp_intr.adb (Append_Entity_Name): Move to ...
1981         * sem_util.ads, sem_util.adb: ... here to share it.
1982         (Subprogram_Name): New subprogram, to compute the name of the enclosing
1983         subprogram/entity.
1984         * errutil.adb (Error_Msg): Fill new field Node.
1985         * erroutc.ads (Subprogram_Name_Ptr): New.
1986         (Error_Msg_Object): New field Node.
1987         * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
1988         * errout.adb (Error_Msg): New variant with node id parameter.
1989         Fill new parameter Node when emitting messages. Revert previous
1990         changes for Include_Subprogram_In_Messages.
1991         * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
1992         generating warning message.
1994 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1996         * par-ch4.adb (P_Iterated_Component_Association): Place construct
1997         under -gnat2020 flag, given that it is a future feature of
1998         the language.
1999         * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
2000         defining identifier as referenced to prevent spurious warnings:
2001         corresponding loop is expanded into one or more loops whose
2002         variable has the same name, and the expression uses those names
2003         and not the original one.
2005 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
2007         * sem_elab.adb (Check_A_Call): Do not consider
2008         references to internal variables for SPARK semantics.
2010 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
2012         * inline.adb (In_Package_Spec): refine type of
2013         the parameter from Node_Id to Entity_Id.
2015 2017-09-08  Justin Squirek  <squirek@adacore.com>
2017         * exp_ch5.adb (Expand_Formal_Container_Loop):
2018         Reset the scope of the loop parameter after it is reanalyzed.
2020 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
2022         * sem_util.ads (Set_Rep_Info): New inline procedure.
2023         * sem_util.adb (Set_Rep_Info): Implement it.
2024         * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
2025         always copy the representation aspects onto the subtype.
2027 2017-09-08  Georges-Alex Jaloyan  <jaloyan@adacore.com>
2029         * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
2030         Correction of the return type from access type to option type.
2031         (Simple_HTable): Moving the Instance_Data to ads file.
2033 2017-09-08  Yannick Moy  <moy@adacore.com>
2035         * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
2037 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
2039         * opt.ads (Include_Subprogram_In_Messages): New variable.
2040         * errout.ads (Current_Subprogram_Ptr): New variable.
2041         * errout.adb (Error_Msg): Prepend current subprogram info
2042         in messages if Include_Subprogram_In_Messages is set.
2043         * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
2044         Current_Subprogram.
2045         * gnat1drv.adb (Adjust_Global_Switches): Set
2046         Include_Subprogram_In_Messages when -gnatdJ is set.
2047         * debug.adb: Document and reserve -gnatdJ.
2049 2017-09-08  Georges-Axel Jaloyan  <jaloyan@adacore.com>
2051         * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
2052         functions to iterate over simple hastables.
2053         (Load_Factor_HTable): Remove obsolete and inefficient implementation.
2055 2017-09-08  Javier Miranda  <miranda@adacore.com>
2057         * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
2058         missing checks on the presence of Entity() before checking the
2059         entity attributes.
2061 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
2063         * sem_ch6.adb (Analyze_Expression_Function): Reorder some
2064         statements, use local variable and remove unnecessary processing.
2066 2017-09-08  Javier Miranda  <miranda@adacore.com>
2068         * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
2069         subprogram.
2070         (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
2071         (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
2072         subprogram.
2073         (Unqual_BIP_Iface_Function_Call): New subprogram.
2074         * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
2075         subprogram containing code that was previously inside
2076         Make_Build_In_Place_Call_In_Object_Declaration since it is also
2077         required for one of the new subprograms.
2078         (Expand_Actuals):
2079         Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
2080         (Expand_N_Extended_Return_Statement): Extend the
2081         cases covered by an assertion on expected BIP object
2082         declarations.
2083         (Make_Build_In_Place_Call_In_Assignment):
2084         Removing unused code; found working on this ticket.
2085         (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
2086         that replaces the internal name of the renaming declaration
2087         into the new subprogram Replace_Renaming_Declaration_Id.
2088         (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
2089         (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
2090         New subprogram.
2091         (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
2092         subprogram.
2093         (Unqual_BIP_Iface_Function_Call): New subprogram.
2094         * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
2095         subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
2096         * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
2097         subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
2098         * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
2099         subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
2100         (Expand_N_Indexed_Component): Invoke the new subprogram
2101         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
2102         (Expand_N_Selected_Component): Invoke the new subprogram
2103         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
2104         (Expand_N_Slice): Invoke the new subprogram
2105         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
2106         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
2107         Invoke the new subprogram
2108         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
2110 2017-09-08  Javier Miranda  <miranda@adacore.com>
2112         * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
2113         access to interface types.  Remove also the accessibility check.
2115 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
2117         * sem_ch6.adb (Freeze_Expr_Types): Really freeze
2118         all the types that are referenced by the expression.
2119         (Analyze_Expression_Function): Call Freeze_Expr_Types for
2120         a completion instead of manually freezing the type of the
2121         expression.
2122         (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
2124 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2126         * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
2127         New procedure, auxiliary to Expand_Pragma_Check, to handle
2128         references to the discriminants of a protected type within a
2129         precondition of a protected operation. This is needed because
2130         the original precondition has been analyzed in the context of
2131         the protected declaration, but in the body of the operation
2132         references to the discriminants have been replaved by references
2133         to the discriminants of the target object, and these references
2134         are only created when expanding the protected body.
2136 2017-09-08  Yannick Moy  <moy@adacore.com>
2138         * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
2139         Loop_Variant.
2141 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2143         * exp_attr.adb (Build_Record_VS_Func): If the record is an
2144         unchecked union, do not emit checks for its (non-existent)
2145         discriminants, or for variant parts that depend on them.
2147 2017-09-08  Justin Squirek  <squirek@adacore.com>
2149         * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
2150         Find_Comparison_Type.Try_One_Interp): Add check for generic
2151         instances.
2153 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
2155         * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
2156         exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
2157         repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
2158         exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
2159         remaining references to AAMP_On_Target.
2161 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2163         * style.adb: Fix typo.
2165 2017-09-08  Javier Miranda  <miranda@adacore.com>
2167         * einfo.adb (Underlying_Type): Add missing support for class-wide
2168         types that come from the limited view.
2169         * exp_attr.adb (Attribute_Address): Check class-wide type
2170         interfaces using the underlying type to handle limited-withed
2171         types.
2172         (Attribute_Tag): Check class-wide type interfaces using
2173         the underlying type to handle limited-withed types.
2175 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2177         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
2178         over a subtype of a type with a static predicate, taking into
2179         account the predicate function of the parent type and the bounds
2180         given in the loop specification.
2181         * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
2182         a loop specification that is a subtype indication whose type mark
2183         is a type with a static predicate, inherit predicate function,
2184         used to build case statement for rewritten loop.
2186 2017-09-08  Justin Squirek  <squirek@adacore.com>
2188         * lib-load.adb: Modify printing of error message to exclude file
2189         line number.
2191 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
2193         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
2194         don't inline subprograms declared in both visible and private
2195         parts of a package.
2196         (In_Package_Spec): previously In_Package_Visible_Spec; now
2197         detects subprograms declared both in visible and private parts
2198         of a package spec.
2200 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2202         * exp_util.adb (Build_Invariant_Procedure_Declaration): If
2203         the type is an anonymous array in an object declaration, whose
2204         component type has an invariant, use the object declaration
2205         as the insertion point for the invariant procedure, given that
2206         there is no explicit type declaration for an anonymous array type.
2208 2017-09-08  Bob Duff  <duff@adacore.com>
2210         * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
2212 2017-09-08  Bob Duff  <duff@adacore.com>
2214         * a-strfix.adb (Trim): Compute Low and High only if needed.
2216 2017-09-08  Justin Squirek  <squirek@adacore.com>
2218         * lib-load.adb (Load_Main_Source): Add error output in the case a
2219         source file is missing.
2221 2017-09-08  Bob Duff  <duff@adacore.com>
2223 PR ada/80888
2224         * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
2225         Default_WCEM by default (i.e. if the encoding is not specified
2226         by the Form string).
2228 2017-09-08  Bob Duff  <duff@adacore.com>
2230         * s-trasym.ads (Hexa_Traceback): If
2231         Suppress_Hex is True, print "..." instead of a hexadecimal
2232         address.
2233         * s-trasym.adb: Ignore No_Hex in this version.
2234         Misc cleanup.
2236 2017-09-08  Bob Duff  <duff@adacore.com>
2238         * debug.adb: Minor reformatting.
2240 2017-09-08  Bob Duff  <duff@adacore.com>
2242         * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
2243         code so it doesn't trigger an "uninit var" warning.
2245 2017-09-08  Nicolas Roche  <roche@adacore.com>
2247         * s-hibaen.ads: Remove obsolete file.
2249 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
2251         * a-locale.ads: Add comment explaining the state of this package.
2253 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
2255         * sem_util.adb (Is_CCT_Instance): Allow calls in the context
2256         of packages.
2257         * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
2258         allow calls in the context of package spec (for pragma
2259         Initializes) and bodies (for pragma Refined_State).
2261 2017-09-08  Bob Duff  <duff@adacore.com>
2263         * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
2264         new Exp.
2266 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
2268         * debug.adb (dA): Adjust comment.
2269         * gnat1drv.adb (Gnat1drv): Likewise.
2270         * opt.ads (List_Representation_Info_Extended): New variable.
2271         * repinfo.adb (List_Record_Info): Split implementation into...
2272         (Compute_Max_Length): ...this.  Recurse on records if requested.
2273         (List_Record_Layout): Likewise.
2274         * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
2275         statement, accept '0' and set List_Representation_Info_Extended
2276         on 'e'.
2277         * usage.adb (Usage): Document new -gnatRe variant.
2279 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2281         * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
2282         Do not save the given entity in the global variable Default_Pool
2283         if the pragma appears within a generic unit.
2285 2017-09-08  Bob Duff  <duff@adacore.com>
2287         * errout.adb (Delete_Warning): Do not
2288         decrement Warnings_Treated_As_Errors. This is called before
2289         Warnings_Treated_As_Errors has been incremented to account for
2290         this warning. Decrementing it here can lead to negative values
2291         of Warnings_Treated_As_Errors, raising Constraint_Error in
2292         checks-on builds, and causing the compiler to return an error
2293         code in checks-off builds.
2295 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
2297         * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
2298         entities of named concurrent types as Ref_Id and not of anonymous
2299         concurrent objects (because callers already know when a conversion
2300         is necessary and can easily do it); also, do not expect protected
2301         types or protected objects as Context_Id (because no flow-related
2302         SPARK pragmas are attached there); reflect these changes in a
2303         more precise comment.
2305 2017-09-08  Olivier Hainque  <hainque@adacore.com>
2307         * g-altive.ads: Add documentation.
2309 2017-09-08  Bob Duff  <duff@adacore.com>
2311         * sem_util.ads, debug.adb: Minor comment fix.
2312         * erroutc.ads: Comment fix.
2314 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2316         * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
2317         for compatibility of component types of formal and actual in an
2318         instantiation of a child unit,  when the component type of the
2319         formal is itself a formal of an enclosing generic.
2321 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
2323         * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
2324         sem_prag.adb to make it available for GNATprove; for concurrent
2325         types replace custom scope climbing with Scope_Same_Or_Within; for
2326         single concurrent objects add scope climbing (with Scope_Within),
2327         which was not there (that's the primary semantic change of this
2328         commit); also, when comparing a single concurrent object with
2329         its corresponding concurrent type rely on equality of types,
2330         not of objects (because that's simpler to code).
2331         * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
2332         (Analyze_Global_Item): adjust special-casing of references to the
2333         current instance of a concurrent unit in the Global contracts
2334         of task types and single tasks objects; similar for references
2335         in the protected operations and entries of protected types and
2336         single protected objects (in all these cases the current instance
2337         behaves as an implicit parameter and must not be mentioned in
2338         the Global contract).
2340 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
2342         * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
2343         function calls returning a record within a subprogram call,
2344         for C generation.
2346 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2348         * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
2349         name that designates the current instance of a child unit in its
2350         own body and appears as the prefix of a reference to an entity
2351         local to the child unit.
2352         * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
2353         Minor reformatting.
2355 2017-09-08  Yannick Moy  <moy@adacore.com>
2357         * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
2358         may be intentional.
2360 2017-09-08  Tristan Gingold  <gingold@adacore.com>
2362         * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
2363         warnings on internal units in configurable run time mode.
2365 2017-09-08  Bob Duff  <duff@adacore.com>
2367         * sem_ch3.adb (Build_Derived_Private_Type): Inherit
2368         representation items from interfaces that the derived type
2369         implements, not just from the parent type.
2370         * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
2371         this to return an empty list when there are no interfaces.
2372         * einfo.ads, sem_ch13.adb: Minor comment fixes.
2373         * sem_attr.adb: Minor comment fix.
2375 2017-09-08  Doug Rupp  <rupp@adacore.com>
2377         * sigtramp-vxworks.c [i386]: Adjust the kernel context for
2378         x86-vx7.
2380 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
2382         * exp_ch4.adb (Expand_N_Allocator): Generate a
2383         call to Allocate_Any_Controlled when the allocation does not
2384         require any initialization.
2386 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
2388         * sem_util.adb (Copy_Node_With_Replacement):
2389         Update the Renamed_Object field of a replicated object renaming
2390         declaration.
2392 2017-09-08  Patrick Bernardi  <bernardi@adacore.com>
2394         * exp_ch9.adb (Is_Pure_Barrier): Allow type
2395         conversions and components of objects. Simplified the detection
2396         of the Count attribute by identifying the corresponding run-time
2397         calls.
2399 2017-09-08  Yannick Moy  <moy@adacore.com>
2401         * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
2402         sem_type.adb, sinfo.ads: Minor reformatting.
2404 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2406         * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
2407         of Freeze_Profile, used to inhibit the freezing of the profile
2408         of an expression function declared within a nested package, when
2409         some type in the profile depends on a private type declared in
2410         an enclosing package.
2412 2017-09-08  Bob Duff  <duff@adacore.com>
2414         * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
2415         the subunit case. It's still OK to set it in the "missing subunits"
2416         case, because that won't cause the obsolete .ali files that cause
2417         confusion.
2419 2017-09-08  Bob Duff  <duff@adacore.com>
2421         * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
2422         unclear why this didn't cause a warning.
2423         * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
2424         pragmas. It's unclear why this didn't cause an error.
2426 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
2428         * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
2429         Reimplemented.
2430         (Expand_SPARK_Potential_Renaming): Code clean up.
2431         * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
2432         the item does not have a proper entity.
2433         (Analyze_Input_Item): Add a guard in case the item does not have a
2434         proper entity.
2435         (Collect_States_And_Objects): Include object renamings in the
2436         items being collected.
2437         (Resolve_State): Update the documentation of this routine.
2438         * sem_util.adb (Entity_Of): Add circuitry to handle
2439         renamings of function results.
2440         (Remove_Entity): New routine.
2441         (Remove_Overloaded_Entity): Take advantage of factorization.
2442         * sem_util.ads (Entity_Of): Update the documentation
2443         of this routine.
2444         (Remove_Entity): New routine.
2445         (Remove_Overloaded_Entity): Update the documentation of this
2446         routine.
2448 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
2450         * repinfo.adb (List_Record_Info): During first loop,
2451         do not override the normalized position and first bit
2452         if they have already been set.  Move fallback code
2453         for the packed case to the case where it belongs.
2454         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
2455         Also adjust the normalized position of components.
2456         (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
2458 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2460         * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
2461         the placement of a primitive operation O that renames an operation
2462         R declared in an inner package, and which is thus not a primitive
2463         of the dispatching type of O. In this case O is a new primitive
2464         and does not inherit its dispatch table position from R (which
2465         has none).
2467 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2469         * sem_dim.adb (Analyze_Dimension_If_Expression,
2470         Analyze_Dimension_Case_Expression): new subprograms to verify
2471         the dimensional correctness of Ada2012 conditional expressions,
2472         and set properly the dimensions of the construct.
2473         * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
2474         call Analyze_Dimension.
2476 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2478         * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
2479         loop on an interface declared as a private extension of another
2480         synchronized interface.
2482 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2484         * sem_ch12.adb (Check_Generic_Parent): New procedure within
2485         Analyze_Associations, to handle actual packages that depend on
2486         previous instances.  If a package IAP that is an instantiation is
2487         used as an actual in a subsequent instantiation SI in the same
2488         scope, and IAP has a body, IAP must be frozen before SI. If
2489         the generic parent of IAP is itself declared in a previous
2490         instantiation in the same scope, that instantiation must also
2491         be frozen before SI.
2492         (Install_Body): Prevent double insertion of freeze node for
2493         instance.
2495 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
2497         * sem_prag.adb (Resolve_State): Update the
2498         comment on documentation. Generate a reference to the state once
2499         resolution takes place.
2501 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2503         * sem_ch13.adb (Analyze_Aspect_Specifications, case
2504         Linker_Section): If the aspect applies to an object declaration
2505         with explicit initialization, do not delay the freezing of the
2506         object, to prevent access-before-elaboration in the generated
2507         initialization code.
2509 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
2511         * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
2512         (Integer_Value (Item)) when the size of the fixed decimal type
2513         is larger than Integer.
2515 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
2517         PR ada/82127
2518         * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
2519         in order of increasing position in more cases.
2521 2017-09-07  Yannick Moy  <moy@adacore.com>
2523         * a-exetim-mingw.ads: Add contract Global=>null
2524         on all operations that are modeled as having no read or write
2525         of global variables in SPARK.
2527 2017-09-07  Raphael Amiard  <amiard@adacore.com>
2529         * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
2530         to Hmaps.Generic_Ops.
2531         * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
2532         cursors.
2533         * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
2534         cursors.
2535         * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
2536         position in cursors.
2538 2017-09-07  Javier Miranda  <miranda@adacore.com>
2540         * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
2541         allow disabling the generation of implicit pragma Elaborate_All
2542         on task bodies.
2544 2017-09-07  Javier Miranda  <miranda@adacore.com>
2546         * exp_disp.adb (Make_Tags): Avoid suffix counter
2547         in the external name of the elaboration flag. Required to fix
2548         the regressions introduced by the initial version of this patch.
2550 2017-09-07  Bob Duff  <duff@adacore.com>
2552         * sem_ch6.adb (Analyze_Function_Return): Do not
2553         insert an explicit conversion to force the displacement of the
2554         "this" pointer to reference the secondary dispatch table in the
2555         case where the return statement is returning a raise expression,
2556         as in "return raise ...".
2558 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
2560         * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
2561         * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
2562         procedure from sem_disp.adb.
2563         * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
2564         with Unit.
2565         * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
2566         return the instantiation node for subprograms. Update references
2567         to Get_Unit_Instantiation_Node.
2568         * sem_ch7.adb (Install_Parent_Private_Declarations): update
2569         reference to Get_Unit_Instantiation_Node.
2570         * exp_dist.adb (Build_Package_Stubs): update reference to
2571         Get_Unit_Instantiation_Node.
2572         * sem_ch9.adb: minor typo in comment.
2573         * lib-xref-spark_specific.adb
2574         (Traverse_Declaration_Or_Statement): traverse into task type
2575         definition.
2577 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
2579         * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
2580         to handle properly various cases of type conversions where the
2581         target type and/or the expression carry dimension information.
2582         (Dimension_System_Root); If a subtype carries dimension
2583         information, obtain the source parent type that carries the
2584         Dimension aspect.
2586 2017-09-07  Dmitriy Anisimkov  <anisimko@adacore.com>
2588         * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
2590 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
2592         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
2593         If the prefix is a reference to an object, rewrite it as an
2594         explicit dereference, as required by 3.7.2 (2) and as is done
2595         with most other attributes whose prefix is an access value.
2597 2017-09-07  Bob Duff  <duff@adacore.com>
2599         * par-ch13.adb: Set the Inside_Depends flag if we are inside a
2600         Refined_Depends aspect.
2601         * par-ch2.adb: Set the Inside_Depends flag if we are inside a
2602         Refined_Depends pragma.
2603         * scans.ads: Fix documentation of Inside_Depends flag.
2604         * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
2606 2017-09-07  Hristian Kirtchev  <kirtchev@adacore.com>
2608         * exp_ch7.adb (Insert_Actions_In_Scope_Around):
2609         Account for the case where the are no lists to insert, but the
2610         secondary stack still requires management.
2611         * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
2612         comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
2613         lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
2614         sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
2615         Minor reformatting.
2617 2017-09-07  Vincent Celier  <celier@adacore.com>
2619         * clean.adb: Do not get the target parameters before calling
2620         gprclean.
2622 2017-09-07  Nicolas Roche  <roche@adacore.com>
2624         * s-osinte-solaris-posix.ads: Removed.
2626 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
2628         * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
2629         single concurrent objects.
2631 2017-09-07  Javier Miranda  <miranda@adacore.com>
2633         * s-regexp.ads: Fix documentation of the globbing grammar.
2635 2017-09-07  Gary Dismukes  <dismukes@adacore.com>
2637         * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
2639 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
2641         * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
2642         in CodePeer mode, to support more legacy code automatically.
2644 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
2646         * exp_disp.adb (Replace_Formals): If thr formal is classwide,
2647         and thus not a controlling argument, preserve its type after
2648         rewriting because it may appear in an nested call with a classwide
2649         parameter.
2651 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
2653         * comperr.adb (Delete_SCIL_Files): Handle case of
2654         N_Package_Instantiation.
2656 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
2658         * sem_ch10.adb (Remove_Private_With_Clause): If a private with
2659         clause for a unit U appears in a context that includes a regular
2660         with_clause on U, rewrite the redundant private clause into a null
2661         statement, rather than removing it altogether from the context,
2662         so that ASIS tools can reconstruct the original source.
2664 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
2666         * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
2667         for aspect Small can be of any real type (not only a universal
2668         real literal) as long as it is a static constant.
2670 2017-09-07  Thomas Quinot  <quinot@adacore.com>
2672         * par_sco.adb: Minor reformatting.
2674 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
2676         * s-parame-ae653.ads: Removed.
2678 2017-09-07  Nicolas Roche  <roche@adacore.com>
2680         * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
2681         s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
2682         s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
2683         s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
2684         s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
2685         s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
2687 2017-09-07  Yannick Moy  <moy@adacore.com>
2689         * a-ngelfu.ads Add preconditions to all functions
2690         listed in Ada RM A.5.1(19-33) as having constraints on inputs.
2692 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
2694         * lib-xref.adb (Generate_Reference): ignore
2695         references to entities which are Part_Of single concurrent
2696         objects.
2698 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
2700         * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
2701         comment.
2703 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
2705         * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
2706         Null_Task_Id is passed.
2708 2017-09-07  Javier Miranda  <miranda@adacore.com>
2710         * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
2711         attribute. Defined for record types and subtypes.
2712         * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
2713         (Init_Tags_List) to facilitate generating separate code in the
2714         IP routine to initialize the object components and for completing
2715         the elaboration of dispatch tables.
2716         * exp_ch3.adb (Build_Init_Procedure): Improve the code
2717         generated in the IP routines by means of keeping separate
2718         the initialization of the object components from the
2719         initialization of its dispatch tables.  (Init_Secondary_Tags):
2720         Adding new formal (Init_Tags_List) and adjusting calls to
2721         Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
2722         adjusting also calls to Ada.Tags.Register_Interface_Offset
2723         because the type of one of its formals has been changed.
2724         * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
2725         modified. Instead of receiving a pointer to an object this
2726         routine receives now a primary tag.
2727         (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
2728         additional formal: the tag of the primary dispatch table.
2729         * exp_disp.ads (Elab_Flag_Needed): New subprogram.
2730         * exp_disp.adb (Elab_Flag_Needed): New subprogram.
2731         (Make_Tags): Adding the declaration of the elaboration flag (if needed).
2732         * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
2733         formal in calls to Init_Secondary_Tags.
2735 2017-09-07  Javier Miranda  <miranda@adacore.com>
2737         * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
2738         subprogram.
2739         * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
2740         applied to generic subprograms.
2742 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
2744         * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
2745         (because it refers to the anonymous concurrent object, not its type);
2746         fix condition for emitting error message about task/protected type,
2748 2017-09-07  Bob Duff  <duff@adacore.com>
2750         * binde.adb (Debug_Flag_Old): If both -do and -dp
2751         are specified, behave as if just -do was specified, rather than
2752         using a mixture.
2754 2017-09-07  Nicolas Roche  <roche@adacore.com>
2756         * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
2757         system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
2759 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
2761         * sem_prag.adb (Find_Role): The Global_Seen flag
2762         is now consulted not only for abstract states and variables,
2763         but for all kinds of items.
2764         (Collect_Subprogram_Inputs_Outputs): Do not process formal
2765         generic parameters, because unlike ordinary formal parameters,
2766         generic formals only act as input/ outputs if they are explicitly
2767         mentioned in a Global contract.
2769 2017-09-07  Yannick Moy  <moy@adacore.com>
2771         * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
2772         predicate procedure. Check predicate pragma/aspect with Ghost entity.
2773         * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
2774         reformatting.
2776 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
2778         * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
2779         (code cleanup);
2780         * sem_ch3.adb (Build_Derived_Record_Type):i Call
2781         Copy_Dimensions_Of_Components after creating the copy of the
2782         record declaration.
2783         * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
2784         derived recor type, copy the dikensions if any of each component
2785         of the parent record to the corresponding component declarations
2786         of the derived record. These expressions are used among other
2787         things as default values in aggregates with box associations.
2788         * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
2789         repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
2790         Minor reformatting.
2792 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
2794         * sem_util.adb: Remove extra space after THEN.
2796 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
2798         * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
2799         also mark the renamed subprogram as referenced.
2801 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
2803         * par-ch6.adb (P_Subprogram): Improve error message on null
2804         procedure with misplaced aspect specification, which the parser
2805         first attempts to interpret as a malformed expression function.
2807 2017-09-07  Gary Dismukes  <dismukes@adacore.com>
2809         * sem_attr.adb (Analyze_Attribute_Old_Result):
2810         Allow attributes Result and Old in the case of an expression
2811         function.
2813 2017-09-07  Justin Squirek  <squirek@adacore.com>
2815         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
2816         Volatile to subcomponents.
2818 2017-09-07  Bob Duff  <duff@adacore.com>
2820         * exp_ch7.adb (Find_Last_Init): Check for the
2821         case where a build-in-place function call has been replaced by a
2822         'Reference attribute reference.
2824 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
2826         * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
2827         nodes.
2829 2017-09-07  Bob Duff  <duff@adacore.com>
2831         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
2832         Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
2833         secondary stack for all functions that return limited tagged
2834         types -- just do it for dispatching calls.  Misc cleanup.
2835         * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
2836         remove qualifications and type conversions. Fix various bugs
2837         where only a single level of qualification or conversion was
2838         removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
2839         instead of "X".
2840         * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
2841         cleanup.
2843 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
2845         * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
2846         do not create actual subtypes that may generate further predicate
2847         functions.
2848         * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
2849         of body is a predicate function as well.
2850         (Resolve_Aspect_Expressions, Resolve_Name): For a component
2851         association, only the expression needs resolution, not the name.
2852         (Resolve_Aspect_Expressions, case Predicates): Construct and
2853         analyze the predicate function declaration in the scope of the
2854         type, before making the type and its discriminants visible.
2856 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
2858         * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
2859         only if the record type itself comes from source.
2861 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
2863         * sem_ch5.adb: Minor reformatting and a typo fix
2865 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
2867         * sinput-l.ads: minor remove extra period at the end of comment
2869 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
2871         * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
2872         E_Discriminant.
2873         (Find_Role): remove support for E_Discriminant.
2875 2017-09-06  Javier Miranda  <miranda@adacore.com>
2877         * exp_ch6.adb (Expand_Simple_Function_Return):
2878         Add missing implicit type conversion to force displacement of the
2879         "this" pointer.
2881 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2883         * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
2885 2017-09-06  Yannick Moy  <moy@adacore.com>
2887         * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
2888         global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
2890 2017-09-06  Bob Duff  <duff@adacore.com>
2892         * sem_ch8.adb: Change Assert to be consistent with
2893         other similar ones.
2895 2017-09-06  Bob Duff  <duff@adacore.com>
2897         * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
2898         requested. Previously, the -do switch meant "run Elab_New and
2899         Elab_Old and use the order chosen by Elab_Old, possibly with
2900         debugging printouts comparing the two orders."  Now it means
2901         "do not run Elab_New." This is of use if there are bugs that
2902         cause Elab_New to crash.
2903         (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
2904         type conversions.
2905         * ali.ads (Elab_Position): Change type to Nat, to avoid various
2906         type conversions.
2908 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
2910         * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
2911         reference to SPARK RM.
2913 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
2915         * layout.adb: Use SSU short hand consistently throughout the file.
2917 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
2919         * freeze.adb (Freeze_Record_Type)
2920         <Sized_Component_Total_Round_RM_Size>: New local variable to
2921         accumulate the rounded RM_Size of components.  Update it for
2922         every component whose RM_Size is statically known.  Add missing
2923         guard to check that bit packing is really required before issuing
2924         the error about packing.  Swap condition for clarity's sake.
2925         * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
2927 2017-09-06  Fedor Rybin  <frybin@adacore.com>
2929         * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
2930         mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
2931         mlib-tgt-specific.adb, mlib-tgt-specific.ads,
2932         mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
2933         mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
2934         mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
2935         mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
2936         mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
2937         prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
2938         prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
2939         prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
2940         prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
2941         prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
2942         prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
2943         prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
2944         project manager sources.
2946 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2948         * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
2949         entity of a mutable type and the right-hand side is a conditional
2950         expression, resolve the alternatives of the conditional using
2951         the base type of the target entity, because the alternatives
2952         may have distinct subtypes. This is particularly relevant if
2953         the alternatives are aggregates.
2955 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2957         * checks.adb (Apply_Predicate_Check): If the expression is an
2958         aggregate that is the RHS of an assignment, apply the check to
2959         the LHS after the assignment, rather than to the aggregate. This
2960         is more efficient than creating a temporary for the aggregate,
2961         and prevents back-end crashes when the aggregate includes a
2962         dynamic "others' association.
2964 2017-09-06  Yannick Moy  <moy@adacore.com>
2966         * sem_ch12.adb (Analyze_Instance_And_Renamings):
2967         Set variable to ignore SPARK_Mode in instance before the analysis
2968         of the generated package declaration.
2970 2017-09-06  Yannick Moy  <moy@adacore.com>
2972         * sem_res.adb (Resolve_Call): Do not issue a
2973         message for calls inside expression function, unless body was
2974         seen and is candidate for inlining.
2976 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2978         * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
2979         * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
2980         body. do not freeze the formals of the generic unit.
2982 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
2984         * errout.adb (Error_Msg): Separate the
2985         treatment for warning vs. style messages in inlinings and
2986         instantiations. Prevents blowups on calls to Warn_Insertion for
2987         style messages, which should not be called in that case because
2988         Warning_Msg_Char is not set.
2990 2017-09-06  Justin Squirek  <squirek@adacore.com>
2992         * sem_prag.adb (Check_VFA_Conflicts): Created
2993         to group all Volatile_Full_Access checks relating to other
2994         representation pragmas (Mark_Component_Or_Object): Created
2995         to centeralize the flagging of attributes for the record type
2996         component case, a pragma applied individually to a component, and
2997         the object case.
2998         (Process_Atomic_Independent_Shared_Volatile):
2999         Add propagation of certain pragmas to record components and move
3000         evaluation of VFA checks
3002 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3004         * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
3005         Do not warn on conditions that are not obeyed for Inline_Always
3006         subprograms, when assertions are not enabled.
3008 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
3010         * sem_util.adb (Unique_Entity): For abstract states return their
3011         non-limited view.
3013 2017-09-06  Bob Duff  <duff@adacore.com>
3015         * sem_ch12.adb (Copy_Generic_Node): When we copy a node
3016         that is a proper body corresponding to a stub, we defer the
3017         adjustment of the sloc until after the correct adjustment has
3018         been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
3019         the adjustment, because it will be outside the range in (the old,
3020         incorrect) S_Adjustment.
3021         * inline.adb: Use named notation for readability and uniformity.
3022         * sinput-l.adb: Minor improvements to debugging output printed
3023         for Debug_Flag_L.
3024         * sinput-l.ads (Create_Instantiation_Source): Minor comment
3025         correction.
3027 2017-09-06  Vincent Celier  <celier@adacore.com>
3029         * make.adb: Do not invoke gprbuild for -bargs -P.
3031 2017-09-06  Sylvain Dailler  <dailler@adacore.com>
3033         * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
3034         case when Op is of kind N_Qualified_Expression. In this case,
3035         the function is called recursively on the subexpression like in
3036         other cases.
3037         * make.adb: Minor reformatting
3039 2017-09-06  Justin Squirek  <squirek@adacore.com>
3041         * einfo.adb (Set_Linker_Section_Pragma): Modify
3042         Set_Linker_Section_Pragma to be consistant with the "getter"
3043         Linker_Section_Pragma.
3044         * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
3045         checking for container loops so that the index cursor is not
3046         directly changable by the user with the use of E_Loop_Parameter.
3047         * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
3048         * sem_warn.adb (Check_References): Revert previous change.
3050 2017-09-06  Bob Duff  <duff@adacore.com>
3052         * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
3053         calls and the like.
3055 2017-09-06  Yannick Moy  <moy@adacore.com>
3057         * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
3058         declarations to only consider valid uses of Global/Depends those on
3059         single concurrent objects.
3061 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
3063         * sem_ch13.adb (Check_Record_Representation_Clause): Give an
3064         error as soon as one of the specified components overlaps the
3065         parent field.
3067 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
3069         * sem_prag.ads: minor fix typo in comment.
3071 2017-09-06  Justin Squirek  <squirek@adacore.com>
3073         * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
3074         from source before checking source references.
3075         * sem_warn.adb (Check_References): Add check for internal block
3076         before recursing.
3078 2017-09-06  Vincent Celier  <celier@adacore.com>
3080         * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
3081         make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
3082         gnatname.adb: Remove the Project Manager from the GNAT tools.
3083         * gcc-interface/Makefile.in: ditto.
3085 2017-09-06  Bob Duff  <duff@adacore.com>
3087         * sem_util.ads: Minor comment fix.
3089 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3091         * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
3092         Generate a freeze node for the actual of a formal package, if
3093         the actual is declared in the same unit and has a corresponding
3094         body, to prevent the current instance from being frozen before
3095         the actual is.
3097 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
3099         * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
3101 2017-09-06  Yannick Moy  <moy@adacore.com>
3103         * sem_warn.adb: Minor refactoring.
3105 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3107         * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
3108         to retrieve the inherited classwide precondition/postcondition
3109         of a subprogram.
3110         * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
3111         freezing a subprogram, to complete the generation of the
3112         corresponding checking code.
3114 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3116         * exp_util.adb (Is_Controlled_Indexing): New routine.
3117         (Is_Displace_Call): Use routine Strip to remove indirections.
3118         (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
3119         missing case of controlled generalized indexing.
3120         (Is_Source_Object): Use routine Strip to remove indirections.
3121         (Strip): New routine.
3123 2017-09-06  Bob Duff  <duff@adacore.com>
3125         * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
3126         we include the proper header. Otherwise, we just declare the necessary
3127         things from the capabilities library. This is so we can build on
3128         machines without that library, while still enabling that library.
3129         At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
3130         simply return 0 if the library is not present, or not included
3131         in the link.
3133 2017-09-06  Pierre-Marie de Rodat  <derodat@adacore.com>
3135         * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
3136         for renamings that involve function calls in prefix form.
3138 2017-09-06  Bob Duff  <duff@adacore.com>
3140         * sem_ch3.adb (Analyze_Subtype_Declaration):
3141         Set Has_Delayed_Freeze on a subtype of an incomplete type.
3143 2017-09-06  Pierre-Marie de Rodat  <derodat@adacore.com>
3145         * par_sco.adb (Extend_Statement_Sequence): When the accept statement
3146         has no parameter specification and no entry index, use the entry name
3147         as the end of the generated SCO statement.
3149 2017-09-06  Steve Baird  <baird@adacore.com>
3151         * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
3152         uses of 'Image and related attributes as having side effects in
3153         order to avoid replicating such uses.
3154         * pprint.ads (Expression_Image) Add new generic formal flag
3155         Hide_Temp_Derefs.  The flag defaults to False; CodePeer will
3156         (eventually) override the default.
3157         * pprint.adb (Expression_Image) If the new flag is set, then
3158         suppress the ".all" suffix when displaying a dereference whose
3159         prefix is a use of a value-capturing compiler temp of the sort
3160         generated by Expr_Util.Remove_Side_Effects .
3161         * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
3162         sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
3163         Minor reformatting.
3164         * inline.adb: Minor wording change.
3166 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
3168         * sem_ch7.adb: Update comment.
3170 2017-09-06  Yannick Moy  <moy@adacore.com>
3172         * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
3173         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
3174         * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
3175         with slight modification from Is_Subp_Or_Entry_Inside_Protected,
3176         so that applies to any entity.
3178 2017-09-06  Yannick Moy  <moy@adacore.com>
3180         * sem_ch3.adb (Derived_Type_Declaration): Use
3181         Incomplete_Or_Partial_View rather than local Find_Partial_View.
3183 2017-09-06  Javier Miranda  <miranda@adacore.com>
3185         * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
3186         following ISO-8861.
3188 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3190         * sem_dim.adb (Analyze_Dimension): In an instance, a type
3191         conversion takes its dimensions from the expression, not from
3192         the context type.
3193         (Dimensions_Of_Operand): Ditto.
3195 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3197         * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
3198         null procedures when GNAT coverage is used, so that their (empty)
3199         bodies are properly covered.
3201 2017-09-06  Bob Duff  <duff@adacore.com>
3203         * sem_ch13.adb (Resolve_Aspect_Expressions): If
3204         the entity is a type with discriminants, make the discriminants
3205         directly visible in aspect clauses.
3207 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3209         * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
3210         Universal_Real and the context is a floating-point type, resolve
3211         both operands to the target type.
3213 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3215         * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
3216         sem_ch3.adb, sem_util.adb: Minor reformatting.
3218 2017-09-06  Yannick Moy  <moy@adacore.com>
3220         * freeze.adb (Check_Inherited_Conditions): Rewriting
3221         of inherited preconditions and postconditions should only occur
3222         in GNATprove mode, that is, when GNATprove_Mode is True, not to
3223         be confused with SPARK_Mode being On.
3225 2017-09-06  Yannick Moy  <moy@adacore.com>
3227         * sem_warn.adb (Check_References): Take into
3228         account possibility of attribute reference as original node.
3230 2017-09-06  Yannick Moy  <moy@adacore.com>
3232         * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
3233         use of attribute.
3235 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
3237         * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
3238         on the procedure created to encapsulate the body.
3239         * sem_ch7.adb: Add with clause for GNAT.HTable.
3240         (Entity_Table_Size): New constant.
3241         (Entity_Hash): New function.
3242         (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
3243         (Is_Subprogram_Ref): Rename into...
3244         (Scan_Subprogram_Ref): ...this. Record references to subprograms in
3245         the table instead of bailing out on them. Scan the value of constants
3246         if it is not known at compile time.
3247         (Contains_Subprograms_Refs): Rename into...
3248         (Scan_Subprogram_Refs): ...this.
3249         (Has_Referencer): Scan the body of all inlined subprograms. Reset the
3250         Is_Public flag on subprograms if they are not actually referenced.
3251         (Hide_Public_Entities): Beef up comment on the algorithm.
3252         Reset the table of subprograms on entry.
3254 2017-09-06  Yannick Moy  <moy@adacore.com>
3256         * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
3258 2017-09-06  Javier Miranda  <miranda@adacore.com>
3260         * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
3261         cannot handle a type conversion of an array as an aggregate
3262         component.
3264 2017-09-06  Bob Duff  <duff@adacore.com>
3266         * g-comlin.adb (Try_Help): Remove ".exe" so we
3267         get the same results on windows and unix.
3269 2017-09-06  Justin Squirek  <squirek@adacore.com>
3271         * exp_imgv.adb (Expand_Image_Attribute),
3272         (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
3273         Added case to handle new-style 'Image expansion
3274         (Rewrite_Object_Image): Moved from exp_attr.adb
3275         * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
3276         attribute cases so that the relevant subprograms in exp_imgv.adb
3277         handle all expansion.
3278         (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
3279         * sem_attr.adb (Analyze_Attribute): Modified Image attribute
3280         cases to call common function Analyze_Image_Attribute.
3281         (Analyze_Image_Attribute): Created as a common path for all
3282         image attributes (Check_Object_Reference_Image): Removed
3283         * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
3284         Removed and refactored into Is_Object_Image (Is_Object_Image):
3285         Created as a replacement for Is_Image_Applied_To_Object
3287 2017-09-06  Yannick Moy  <moy@adacore.com>
3289         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
3290         message for missing input.
3292 2017-09-06  Yannick Moy  <moy@adacore.com>
3294         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
3295         of protected subprograms and entries.
3296         * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
3297         New function to detect when a subprogram of entry is defined
3298         inside a protected object.
3300 2017-09-06  Bob Duff  <duff@adacore.com>
3302         * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
3303         whether the current process has the CAP_SYS_NICE capability.
3304         * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
3305         ceiling priorities if the current process has the CAP_SYS_NICE
3306         capability.
3308 2017-09-06  Bob Duff  <duff@adacore.com>
3310         * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
3311         check back to the body, because SPARK is not yet ready for
3312         "or else raise Constraint_Error".
3314 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3316         * exp_ch6.adb (Expand_Call_Helper): Replace call to null
3317         procedure by a single null statement, after evaluating the
3318         actuals that require it.
3320 2017-09-06  Javier Miranda  <miranda@adacore.com>
3322         * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
3323         Generating C code improve the code that checks the use of nested
3324         aggregates to initialize object declarations.
3326 2017-09-06  Yannick Moy  <moy@adacore.com>
3328         * sem_ch3.adb (Derived_Type_Declaration): Detect
3329         violations of new rule SPARK RM 3.4(1).  Also refactor existing
3330         check to use the new function Find_Partial_View.
3332 2017-09-06  Vincent Celier  <celier@adacore.com>
3334         * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P...  The code
3335         from the Prj hierarchy has been removed from the GNAT driver.
3337 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3339         * sem_type.adb (Interface_Present_In_Ancestor): Within an
3340         expression function, or within a spec expression (default value,
3341         etc) a reference to an incomplete type is legal: legality of
3342         the operation will be checked when some related entity (type,
3343         object or subprogram) is frozen.
3345 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
3347         * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
3348         adjustments and a typo fix.
3350 2017-09-06  Yannick Moy  <moy@adacore.com>
3352         * sem_res.adb (Resolve_Call): Do not issue info
3353         message about inlining of calls to functions in assertions,
3354         for functions whose body has not been seen yet.
3356 2017-09-06  Bob Duff  <duff@adacore.com>
3358         * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
3359         we can use modern Ada in this package.
3360         * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
3361         Move Ada.Command_Line.Response_File to System.Response_File,
3362         and make Ada.Command_Line.Response_File into a rename of
3363         System.Response_File. This is to avoid having gnatbind depend
3364         Ada.Command_Line, which would damage the bootstrap process now
3365         that Ada.Command_Line contains modern Ada (the raise expression).
3366         * gnatbind.adb: Avoid dependence on
3367         Ada.Command_Line. Depend on System.Response_File instead
3368         of Ada.Command_Line.Response_File. Change one call to
3369         Ada.Command_Line.Command_Name to use Fill_Arg.  Change one call
3370         to Ada.Command_Line.Argument_Count to use Arg_Count.
3371         * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
3373 2017-09-06  Bob Duff  <duff@adacore.com>
3375         * frontend.adb (Frontend): Skip -gnatec=gnat.adc
3376         switch, because we've already read gnat.adc by default.
3378 2017-09-06  Bob Duff  <duff@adacore.com>
3380         * exp_ch5.adb (Get_Default_Iterator): Replace
3381         "Assert(False)" with "return Iter", because if an iterable
3382         type is derived from a noniterable one, then we won't find an
3383         overriding or inherited default iterator.
3385 2017-09-06  Yannick Moy  <moy@adacore.com>
3387         * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
3388         literal index used to access a string is null or negative.
3390 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3392         * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
3393         allowed on loop parameters.
3394         (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
3395         on loop parameters.
3396         (Write_Field15_Name): Update the output for
3397         Status_Flag_Or_Transient_Decl.
3398         * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
3399         to loop parameters. Update the documentation of the attribute
3400         and the E_Loop_Parameter entity.
3401         * exp_ch7.adb (Process_Declarations): Remove the bogus guard
3402         which assumes that cursors can never be controlled.
3403         * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
3404         guard which assumes that cursors can never be controlled.
3406 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3408         * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
3409         sem_warn.adb: Minor reformatting.
3411 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3413         * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
3414         fix and preserve older GNAT warning on overlapping actuals that
3415         are not elementary types.
3417 2017-09-06  Justin Squirek  <squirek@adacore.com>
3419         * sem_attr.adb: Comment correction.
3421 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
3423         * sem_util.adb: Minor reformatting.
3425 2017-09-06  Yannick Moy  <moy@adacore.com>
3427         * a-comlin.ads (Argument): Add precondition for analysis.
3429 2017-09-06  Yannick Moy  <moy@adacore.com>
3431         * sem_res.adb (Resolve): Update message for function call as statement.
3433 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3435         * sem_ch6.adb (Check_Returns): Clean up warnings coming from
3436         generated bodies for renamings that are completions, when renamed
3437         procedure is No_Return.
3438         * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
3439         rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
3440         with No_Return, the renamed entity must be No_Return as well.
3442 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3444         * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
3445         Minor reformatting.
3447 2017-09-06  Justin Squirek  <squirek@adacore.com>
3449         * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
3450         attribute cases (Rewrite_Object_Reference_Image): Created to
3451         aid the rewriting of new-style 'Image attributes.
3452         * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
3453         (Check_Object_Reference_Image): Created to handle verification of
3454         'Image with object-references as prefixes.
3455         * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
3456         Create predicate to identify cases where an 'Image attribute's
3457         prefix applies to an object reference.
3459 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3461         * freeze.adb (Freeze_Entity): Do not generate a freeze
3462         node for a generic unit, even if it includes delayed aspect
3463         specifications. Freeze nodes for generic entities must never
3464         appear in the tree that reaches the back-end of the compiler.
3466 2017-09-06  Yannick Moy  <moy@adacore.com>
3468         * treepr.adb (Print_Entity_Info): Do not print empty Elist.
3470 2017-09-06  Yannick Moy  <moy@adacore.com>
3472         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
3473         to subprograms in other units as possibly inlined.
3475 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3477         * freeze.adb (Freeze_Entity): For a derived type that has no
3478         explicit delayed aspects but may inherit delayed aspects from its
3479         parent type, analyze aspect at freeze point for proper capture
3480         of an inherited aspect.
3482 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
3484         * lib-xref.adb (Get_Through_Renamings): Get through subprogram
3485         renamings; also, avoid repeated calls to Renamed_Object when getting
3486         through object renamings.
3488 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3490         * sem_ch3.adb (Array_Type_Declaration): Handle properly an
3491         array type declaration in a private part, when an index is a
3492         subtype indication of a discrete type with a private partial view.
3494 2017-09-06  Javier Miranda  <miranda@adacore.com>
3496         * exp_ch4.adb (Expand_Modular_Op): Force generating
3497         temporary to improve the generated code.
3499 2017-09-06  Tristan Gingold  <gingold@adacore.com>
3501         * s-fatgen.adb: Minor typo fix in comment.
3503 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3505         * exp_ch5.adb (Make_Field_Assign): If the type
3506         of the right-hand side has stored constraint, use its values
3507         (except for those that are renamings of parent discriminants)
3508         to produce additional assignments for the discriminants of the
3509         left-hand side, which are invisible in the righ-hand side and
3510         not retrievable as selected components.
3512 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3514         * sem_util.adb (Needs_One_Formal): The first formal of such a
3515         function must be a controlling formal, so that Obj.F (X, Y)
3516         can have the interpretation F(Obj)(X, Y).
3517         * sem_util.ads: Clarify documentation.
3519 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
3521         * table.ads, table.adb: Restore original implementation.
3522         * namet.h (Names_Ptr): Adjust back.
3523         (Name_Chars_Ptr): Likewise.
3524         * uintp.h (Uints_Ptr): Likewise.
3525         (Udigits_Ptr): Likewise.
3526         * g-table.ads: Remove pragma Compiler_Unit_Warning.
3527         * par_sco.adb: Do not with GNAT.Table and use Table consistently.
3528         * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
3529         * spark_xrefs.ads: Likewise.
3530         * scos.h: Undo latest changes.
3532 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3534         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
3535         No_Return flag to instance if pragma applies to generic unit. This
3536         must be done explicitly because the pragma does not appear
3537         directly in the generic declaration (unlike the corresponding
3538         aspect specification).
3540 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
3542         * sem_ch7.adb (Has_Referencer): Move up and expand comment
3543         explaining the test used to detect inlining.  Use same test
3544         in second occurrence.
3545         (Analyze_Package_Body_Helper): Minor formatting fixes.
3547 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3549         * exp_ch4.adb (Handle_Changed_Representation): For an untagged
3550         derived type with a mixture of renamed and constrained parent
3551         discriminants, the constraint for the target must obtain the
3552         discriminant values from both the operand and from the stored
3553         constraint for it, given that the constrained discriminants are
3554         not visible in the object.
3555         * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
3556         side may be derived from that of the left-hand side (as in the
3557         case of an assignment with a change of representation) so the
3558         discriminant to be used in the retrieval of the value of the
3559         component must be the entity in the type of the right-hand side.
3561 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3563         * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
3564         sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3565         * exp_util.adb (Is_Source_Object): Account for
3566         the cases where the source object may appear as a dereference
3567         or within a type conversion.
3568         * exp_ch6.adb: Fix missing space in error message.
3570 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3572         * sem_prag.adb: Update description of Eliminate.
3574 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3576         * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
3577         properly an attribute reference 'Loop_Entry that appears in the
3578         list of indices of an indexed expression, to prevent an infinite
3579         loop in the compiler.
3581 2017-09-06  Bob Duff  <duff@adacore.com>
3583         * s-fileio.adb (Name): Do not raise Use_Error for temp files.
3585 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3587         * sem_ch4.adb (Analyze_Set_Membership):  If an alternative
3588         in a set membership is an overloaded enumeration literal, and
3589         the type of the alternative is resolved from a previous one,
3590         replace the entity of the alternative as well as the type,
3591         to prevent inconsistencies between the entity and the type.
3593 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
3595         * ali.ads (ALIs_Record): Add No_Component_Reordering component.
3596         (No_Component_Reordering_Specified): New switch.
3597         * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
3598         (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
3599         * bcheck.adb (Check_Consistent_No_Component_Reordering):
3600         New check.
3601         (Check_Configuration_Consistency): Invoke it.
3602         * debug.adb (d.r): Toggle the effect of the switch.
3603         (d.v): Change to no-op.
3604         * einfo.ads (Has_Complex_Representation):
3605         Restrict to record types.
3606         (No_Reordering): New alias for Flag239.
3607         (OK_To_Reorder_Components): Delete.
3608         (No_Reordering): Declare.
3609         (Set_No_Reordering): Likewise.
3610         (OK_To_Reorder_Components): Delete.
3611         (Set_OK_To_Reorder_Components): Likewise.
3612         * einfo.adb (Has_Complex_Representation): Expect record types.
3613         (No_Reordering): New function.
3614         (OK_To_Reorder_Components): Delete.
3615         (Set_Has_Complex_Representation): Expect base record types.
3616         (Set_No_Reordering): New procedure.
3617         (Set_OK_To_Reorder_Components): Delete.
3618         (Write_Entity_Flags): Adjust to above change.
3619         * fe.h (Debug_Flag_Dot_R): New macro and declaration.
3620         * freeze.adb (Freeze_Record_Type): Remove conditional code setting
3621         OK_To_Reorder_Components on record types with convention Ada.
3622         * lib-writ.adb (Write_ALI): Deal with NC marker.
3623         * opt.ads (No_Component_Reordering): New flag.
3624         (No_Component_Reordering_Config): Likewise.
3625         (Config_Switches_Type): Add No_Component_Reordering component.
3626         * opt.adb (Register_Opt_Config_Switches): Copy
3627         No_Component_Reordering onto No_Component_Reordering_Config.
3628         (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
3629         (Save_Opt_Config_Switches): Save No_Component_Reordering.
3630         (Set_Opt_Config_Switches): Set No_Component_Reordering.
3631         * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
3632         * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
3633         No_Reordering flag from the default.
3634         (Build_Derived_Private_Type): Likewise.
3635         (Build_Derived_Record_Type): Likewise.  Then inherit it
3636         for untagged types and clean up handling of similar flags.
3637         (Record_Type_Declaration): Likewise.
3638         * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
3639         remove redundant test on Is_Tagged_Type.
3640         * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
3641         (Sig_Flags): Likewise.
3642         * snames.ads-tmpl (Name_No_Component_Reordering): New name.
3643         (Pragma_Id): Add Pragma_No_Component_Reordering value.
3644         * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
3645         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
3646         Copy the layout of the parent type only if the No_Reordering
3647         settings match.
3648         (components_to_record): Reorder record types with
3649         convention Ada by default unless No_Reordering is set or -gnatd.r
3650         is specified and do not warn if No_Reordering is set in GNAT mode.
3652 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3654         * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
3655         new predicate to reject declarations that can be completions,
3656         when there is a visible prior homograph that is a null procedure.
3657         * sem_ch6.adb (Analyze_Null_Procedure): use it.
3658         * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
3660 2017-09-06  Thomas Quinot  <quinot@adacore.com>
3662         * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
3663         run of 253 characters or more.
3665 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3667         * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
3668         properly incomplete subtypes that may be created by explicit or
3669         implicit declarations.
3670         (Is_Base_Type): Take E_Incomplete_Subtype into account.
3671         (Subtype_Kind): Ditto.
3672         * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
3673         Ekind of a subtype of a discriminated incomplete type.
3674         (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
3675         incomplete types, to preserve error reporting.
3676         (Process_Incomplete_Dependents): Do not create a subtype
3677         declaration for an incomplete subtype that is created internally.
3678         * sem_ch7.adb (Analyze_Package_Specification): Handle properly
3679         incomplete subtypes that do not require a completion, either
3680         because they are limited views, of they are generic actuals.
3682 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3684         * checks.adb (Insert_Valid_Check): Remove the
3685         suspicious manipulation of the Do_Range_Check flag as ths is
3686         no linger needed. Suppress validity check when analysing the
3687         validation variable.
3689 2017-09-06  Philippe Gil  <gil@adacore.com>
3691         * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
3692         GNATCOLL.Memory
3694 2017-09-06  Bob Duff  <duff@adacore.com>
3696         * sem_elim.adb: Minor comment fix.
3698 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3700         * sem_util.adb (Is_Object_Reference): A function call is an
3701         object reference, and thus attribute references for attributes
3702         that are functions (such as Pred and Succ) as well as predefined
3703         operators are legal in contexts that require an object, such as
3704         the prefix of attribute Img and the Ada2020 version of 'Image.
3706 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3708         * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
3709         exp_ch3.adb, xoscons.adb: Minor reformatting.
3711 2017-09-06  Raphael Amiard  <amiard@adacore.com>
3713         * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
3714         Position parameter. If supplied, use it to provide efficient iteration.
3715         * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
3716         a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
3717         iteration.
3719 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3721         * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
3722         designated type is class-wide and the expression is an unchecked
3723         conversion, preserve the conversion when checking the tag of the
3724         designated object, to prevent spurious semantic errors when the
3725         expression in the conversion has an untagged type (for example
3726         an address attribute).
3728 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3730         * sem_res.adb (Resolve_Entry_Call): Check whether a protected
3731         operation is subject to a pragma Eliminate.
3733 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
3735         * sem_elim.ads, exp_ch4.adb: Minor reformatting.
3737 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
3739         * fe.h (Eliminate_Error_Msg): Remove.
3741 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
3743         * gcc-interface/utils.c (make_packable_type): Update call to
3744         mode_for_size_tree.
3746 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
3748         * gcc-interface/utils2.c (build_load_modify_store):
3749         Use int_mode_for_size.
3751 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
3753         PR ada/62235
3754         * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
3755         for Itypes that are E_Record_Subtype with a cloned subtype.
3756         <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
3758 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
3760         * gcc-interface/trans.c (convert_with_check): Use a custom base type
3761         if the base type of the expression has a different machine mode.
3762         Rename a couple of parameters and local variable.
3764 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
3766         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
3767         conversions around prefixes that are not references.
3769 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
3771         * gcc-interface/utils.c (unchecked_convert): When the result type is a
3772         non-biased integral type with size 0, set the result to 0 directly.
3774 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
3776         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
3777         (renaming_from_instantiation_p): ...this.
3778         * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
3779         instead of explicit tests on kind of entities.  Adjust for renaming.
3780         (gnat_to_gnu_profile_type): Likewise.
3781         (gnat_to_gnu_subprog_type): Likewise.
3782         * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
3783         (Case_Statement_to_gnu): Likewise.
3784         (gnat_to_gnu): Likewise.
3785         (process_freeze_entity): Likewise.
3786         (process_type): Likewise.
3787         (add_stmt_with_node): Adjust for renaming.
3788         * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
3789         (renaming_from_generic_instantiation_p): Rename to...
3790         (renaming_from_instantiation_p): ...this.  Use inline predicate.
3791         (pad_type_hasher::keep_cache_entry): Fold.
3793 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
3795         * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
3796         (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
3797         (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
3798         (N_Slice): Likewise.
3799         (N_Selected_Component): Likewise.  Do not try again to translate it.
3800         (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
3802 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
3804         * repinfo.ads: Document new treatment of dynamic values.
3805         (TCode): Bump upper bound to 29.
3806         (Dynamic_Val): New constant set to 29.
3807         * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
3808         (Rep_Value)  <Dynamic_Val>: Likewise.
3809         * repinfo.h (Dynamic_Val): New macro.
3810         * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
3811         DECL_P nodes too.
3812         <INTEGER_CST>: Set TCODE instead of recursing.
3813         <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
3814         <VAR_DECL>: New case.
3815         <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
3816         <BIT_AND_EXPR>: Adjust.
3817         <CALL_EXPR>: Do not fall through.
3819 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
3821         * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
3822         there is no target, do not create a temporary for the return value for
3823         an allocator either.
3825 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
3827         * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
3828         unconstrained array type.
3830 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
3831             Alan Hayward  <alan.hayward@arm.com>
3832             David Sherwood  <david.sherwood@arm.com>
3834         * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
3835         instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
3837 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
3838             Alan Hayward  <alan.hayward@arm.com>
3839             David Sherwood  <david.sherwood@arm.com>
3841         * gcc-interface/decl.c (check_ok_for_atomic_type): Use
3842         is_a <scalar_int_mode>.
3843         * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
3844         * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
3846 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
3847             Alan Hayward  <alan.hayward@arm.com>
3848             David Sherwood  <david.sherwood@arm.com>
3850         * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
3851         instead of mode_for_size.
3852         (gnat_to_gnu_subprog_type): Likewise.
3853         * gcc-interface/utils.c (make_type_from_size): Likewise.
3855 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
3856             Alan Hayward  <alan.hayward@arm.com>
3857             David Sherwood  <david.sherwood@arm.com>
3859         * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
3860         (fp_size_to_prec): Likewise.
3862 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
3863             Alan Hayward  <alan.hayward@arm.com>
3864             David Sherwood  <david.sherwood@arm.com>
3866         * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
3867         <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
3869 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
3870             Alan Hayward  <alan.hayward@arm.com>
3871             David Sherwood  <david.sherwood@arm.com>
3873         * gcc-interface/decl.c (validate_size): Update use of
3874         GET_MODE_WIDER_MODE, forcing a wider mode to exist.
3876 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
3877             Alan Hayward  <alan.hayward@arm.com>
3878             David Sherwood  <david.sherwood@arm.com>
3880         * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
3881         (fp_size_to_prec): Likewise.
3883 2017-08-29  Martin Liska  <mliska@suse.cz>
3885         PR other/39851
3886         * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
3888 2017-08-08  Martin Liska  <mliska@suse.cz>
3890         * gcc-interface/trans.c: Include header files.
3892 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
3894         * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
3895         as new argument to the imported_module_or_decl debug hook.
3897 2017-07-25  Javier Miranda  <miranda@adacore.com>
3899         * checks.adb (Apply_Divide_Checks): Ensure that operands are not
3900         evaluated twice. 
3902 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
3904         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
3905         TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
3906         (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
3908 2017-07-18  Mike Frysinger  <vapier@chromium.org>
3910         * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
3911         (../../gnatlink$(exeext)): Likewise.
3913 2017-07-15  John Paul Adrian Glaubitz  <glaubitz@physik.fu-berlin.de>
3915         PR ada/81446
3916         * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
3917         (Backend_Overflow_Checks): Set to True.
3919 2017-06-23  Jakub Jelinek  <jakub@redhat.com>
3921         * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
3923 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
3925         * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
3926         notice.  New macro.
3927         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
3928         as a definition.
3929         (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
3930         definition.
3931         * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
3932         imported subprograms for the current compilation unit as
3933         definitions.  Disable debug info for references to variables.
3934         * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
3935         * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
3936         not built-in functions to their binding scope.
3937         (create_subprog_decl): Add a DEFINITION parameter.  If it is true, tag
3938         the function as a definition.  Update all callers.
3939         (gnat_write_global_declarations): Emit debug info for imported
3940         functions.  Filter out external variables for which debug info
3941         is disabled.
3943 2017-06-15  Nicolas Boulenguez  <nicolas.boulenguez@free.fr>
3945         PR ada/81105
3946         * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
3947         (i[3456]86-pc-gnu): Likewise.
3948         (x86_64 kfreebsd): Likewise.
3950 2017-06-12  Eric Botcazou  <ebotcazou@adacore.com>
3952         PR bootstrap/80897
3953         * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
3955 2017-06-12  Eric Botcazou  <ebotcazou@adacore.com>
3957         PR ada/81070
3958         * s-interr-hwint.adb: Reinstate.
3959         * gcc-interface/Makefile.in (RTEMS): Use it again.
3961 2017-06-08  Olivier Hainque  <hainque@adacore.com>
3963         * vx_crtbegin_auto.c: Update year in copyright notice.
3964         * vx_crtbegin.c: Likewise.
3965         * vx_crtbegin.inc: Likewise. 
3966         * vx_crtend.c:  Likewise.
3968 2017-06-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3970         * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
3971         * s-tpopsp-rtems.adb: Delete.
3973 2017-06-02  Olivier Hainque  <hainque@adacore.com>
3975         * vx_crtbegin_auto.c: New file.
3976         * vx_crtbegin.c: New file.
3977         * vx_crtbegin.inc: New file.
3978         * vx_crtend.c: New file.
3980 2017-05-25  Jonathan Wakely  <jwakely@redhat.com>
3982         * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
3983         const qualifiers that cause -Wignored-qualifiers warnings.
3985 2017-05-22  Eric Botcazou  <ebotcazou@adacore.com>
3987         * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
3988         for Itypes that are E_Access_Subtype.
3989         <E_Access_Subtype>: Use the DECL of the base type directly.
3991 2017-05-22  Ed Schonberg  <schonberg@adacore.com>
3992             Eric Botcazou  <ebotcazou@adacore.com>
3994         * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
3995         limited view may appear in the profile of a function, and a call to
3996         that function in another unit in which the full view is available must
3997         use this full view to spurious type errors at the point of call.
3998         * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
3999         of parent body with a with clause for the main unit.
4000         * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
4001         (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
4002         types declared in external units like types from limited with clauses.
4003         Adjust final processing of defer_limited_with_list accordingly.
4004         * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
4005         again to translate the prefix after the field if it is incomplete.
4007 2017-05-22  Eric Botcazou  <ebotcazou@adacore.com>
4009         * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
4010         alignment for simple volatile fields and remove associated errors.
4012 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
4014         * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
4015         * gcc-interface/trans.c (get_elaboration_procedure): Make static.
4017 2017-05-15  Pierre-Marie de Rodat  <derodat@adacore.com>
4019         * gcc-interface/utils.c (can_materialize_object_renaming_p):
4020         Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
4021         process Original_Node instead of expanded names.
4023 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
4025         * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
4026         addressability check in the constrained case.
4028 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
4030         * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
4031         types not coming from a limited context.
4033 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
4035         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
4036         the inlined list that are not public.
4037         * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
4038         there is a pragma Inline_Always on the subprogram.
4040 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
4042         * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
4043         <N_Allocator>: Use properly typed constants.
4044         (extract_values): Move around.
4045         (pos_to_constructor): Minor tweaks.
4046         (Sloc_to_locus): Fix formatting.
4047         * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
4048         * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
4049         (Gigi_Equivalent_Type): Adjust head comment.
4050         * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
4052 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
4054         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
4055         is a representation clause on an extension, propagate the alignment of
4056         the parent type only if the platform requires strict alignment.
4058 2017-05-12  Eric Botcazou  <ebotcazou@adacore.com>
4060         * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
4061         instead of Word_Size.
4063         Revert
4064         2017-03-28  Andreas Schwab  <schwab@suse.de>
4066         PR ada/80117
4067         * system-linux-aarch64-ilp32.ads: New file.
4068         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
4069         from LIBGNAT_TARGET_PAIRS.
4070         (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
4071         (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
4072         LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
4073         or -mabi=ilp32, resp.
4075 2017-05-10  H.J. Lu  <hongjiu.lu@intel.com>
4077         PR ada/80626
4078         * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
4079         instead of Word_Size.
4081 2017-05-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4083         * raise-gcc.c (exception_class_eq): Make ec parameter const.
4085 2017-05-02  Richard Biener  <rguenther@suse.de>
4087         * gcc-interface/misc.c (gnat_post_options): Do not set
4088         -fstrict-overflow.
4090 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
4092         * gcc-interface/trans.c (assoc_to_constructor): Make sure
4093         Corresponding_Discriminant is only called on discriminants.
4094         Skip the saving of the result only for them.
4095         (gnat_to_gnu) <N_Selected_Component>: Likewise.
4096         <N_Unchecked_Type_Conversion>: Translate the result type first.
4097         (gigi): Set TREE_NOTHROW on Begin_Handler.
4098         (stmt_list_cannot_raise_p): New predicate.
4099         (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
4100         a cleanup if the statements of the handler cannot raise.
4101         (process_freeze_entity): Use Is_Record_Type.
4102         (process_type): Likewise.
4104 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
4106         * einfo.ads (Corresponding_Record_Component): New alias
4107         for Node21 used for E_Component and E_Discriminant.
4108         * einfo.adb (Corresponding_Record_Component): New function.
4109         (Set_Corresponding_Record_Component): New procedure.
4110         (Write_Field21_Name): Handle Corresponding_Record_Component.
4111         * sem_ch3.adb (Inherit_Component): Set
4112         Corresponding_Record_Component for every component in
4113         the untagged case.  Clear it afterwards for non-girder
4114         discriminants.
4115         * gcc-interface/decl.c (gnat_to_gnu_entity)
4116         <E_Record_Type>: For a derived untagged type with discriminants
4117         and constraints, apply the constraints to the layout of the
4118         parent type to deduce the layout.
4119         (field_is_aliased): Delete.
4120         (components_to_record): Test DECL_ALIASED_P directly.
4121         (annotate_rep): Check that fields are present except for
4122         an extension.
4123         (create_field_decl_from): Add DEBUG_INFO_P
4124         parameter and pass it in recursive and other calls.  Add guard
4125         for the manual CSE on the size.
4126         (is_stored_discriminant): New predicate.
4127         (copy_and_substitute_in_layout): Consider only
4128         stored discriminants and check that original fields are present
4129         in the old type.  Deal with derived types.  Adjust call to
4130         create_variant_part_from.
4132 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4134         * exp_ch6.adb (Expand_Call_Helper): When locating the
4135         accessibility entity created for an access parameter, handle
4136         properly a reference to a formal of an enclosing subprogram. if
4137         the reference appears in an inherited class-wide condition, it
4138         is the rewriting of the reference in the ancestor expression,
4139         but the accessibility entity must be that of the current formal.
4141 2017-05-02  Javier Miranda  <miranda@adacore.com>
4143         * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
4144         (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
4145         Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
4146         Call Expand_Non_Binary_Modular_Op.
4148 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
4150         * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
4151         has discriminants, do not override the Stored_Constraint list of
4152         the full view of the derived type with that of the derived type.
4154 2017-05-02  Bob Duff  <duff@adacore.com>
4156         * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
4158 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
4160         * s-os_lib.ads: Minor typo fix.
4162 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
4164         * gnatls.adb: Merge and refactor code from Prj.Env and remove
4165         this deprecated dependency.
4167 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4169         * exp_util.ads: minor comment addition.
4171 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
4173         * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
4174         pastos in part #3 of the head comment.
4176 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4178         * exp_ch3.adb (Freeze_Type): Do not generate an invariant
4179         procedure body for a local (sub)type declaration within a
4180         predicate function. Invariant checks do not apply to these, and
4181         the expansion of the procedure will happen in the wrong scope,
4182         leading to misplaced freeze nodes.
4184 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4186         * exp_util.adb (Insert_Library_Level_Action): Use proper scope
4187         to analyze generated actions.  If the main unit is a body,
4188         the required scope is that of the corresponding unit declaration.
4190 2017-05-02  Arnaud Charlet  <charlet@adacore.com>
4192         * einfo.adb (Declaration_Node): flip branches of
4193         an IF statement to avoid repeated negations in its condition;
4194         no change in semantics, only to improve readability.
4196 2017-05-02  Arnaud Charlet  <charlet@adacore.com>
4198         * sem_case.adb: Remove extra spaces in parameter declarations.
4200 2017-05-02  Justin Squirek  <squirek@adacore.com>
4202         * usage.adb: Replace space with hyphen ("run time" -> "run-time")
4203         in usage line for new -gnatwE switch.
4205 2017-05-02  Claire Dross  <dross@adacore.com>
4207         * a-cofuve.ads (Remove): Remove unnecessary
4208         conditions in precondition.
4210 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
4212         * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
4213         sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
4215 2017-05-02  Justin Squirek  <squirek@adacore.com>
4217         * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
4218         alternative expression.
4219         * sem_res.adb (Resolve_Case_Expression): Ditto.
4221 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4223         * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
4224         Refine predicate for the case where the primitive operation
4225         is a renaming of equality.  An overriding operation that is
4226         a user-defined renaming of predefined equality inherits its
4227         slot from the overridden operation. Otherwise it is treated
4228         as a predefined op and occupies the same predefined slot as
4229         equality. A call to it is transformed into a call to its alias,
4230         which is the predefined equality. A dispatching call thus uses
4231         the proper slot if operation is further inherited and called
4232         with class-wide arguments.
4234 2017-05-02  Justin Squirek  <squirek@adacore.com>
4236         * errout.adb (Set_Msg_Text): Add a case to switch the message
4237         type when the character '[' is detected signifying a warning
4238         about a run-time exception.
4239         * opt.ads Add a new Warning_Mode value for new switch
4240         * switch-b.adb (Scan_Binder_Switches): Add case for the binder
4241         to handle new warning mode
4242         * usage.adb (Usage): Add usage entry for -gnatwE
4243         * warnsw.adb (Set_Warning_Switch): Add case for the new switch
4245 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4247         * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
4248         declaration that operates on some fixed point type.
4250 2017-05-02  Justin Squirek  <squirek@adacore.com>
4252         * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
4254 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
4256         * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
4258 2017-05-02  Justin Squirek  <squirek@adacore.com>
4260         * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
4261         expression (Analyze_If_Expression): Add check for valid condition
4262         * sem_eval.adb (Eval_Case_Expression): Add check for error posted
4263         on case-expression
4264         * sem_res.adb (Resolve_If_Expression): Add check for valid
4265         condition and then-expression.
4267 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4269         * exp_ch3.adb (Build_Initialization_Call): Generate a null
4270         statement if the initialization call is a null procedure, as
4271         can happen with a controlled type with no explicit Initialize
4272         procedure, or an array of such.
4273         * exp_ch7.adb (Process_Object_Declaration): For a type with
4274         controlled components that has a trivial Initialize procedure,
4275         insert declaration for finalization counter after object
4276         declaration itself.
4277         (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
4278         finalization block and attendant declarations if component has
4279         a trivial Initialize procedure.
4280         (Make_Init_Call): Do not generate a call if controlled type has
4281         a trivial Initialize procedure.
4283 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
4285         * g-forstr.ads (Data): Move Format component last.
4286         * g-forstr.adb ("+"): Adjust for above change.
4287         * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
4288         * g-sechas.ads (Context): Move Key last.
4289         * g-socket.ads (Service_Entry_Type): Move Aliases last.
4290         * s-fileio.adb (Temp_File_Record): Move Name last.
4291         * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
4292         * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
4294 2017-05-02  Jerome Lambourg  <lambourg@adacore.com>
4296         * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
4297         switch introduced recently. finally not needed.
4299 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
4301         * sem_ch6.adb (Analyze_Null_Procedure): Set the
4302         Corresponding_Body link for a null procedure declaration.
4304 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
4306         * atree.h (Flag290): Add missing terminating parenthesis.
4307         * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
4308         (Set_Is_Class_Wide_Clone): Likewise.
4309         * einfo.ads (Is_Class_Wide_Clone): Likewise.
4311 2017-05-02  Gary Dismukes  <dismukes@adacore.com>
4313         * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
4314         parameter Array_Comp to indicate the case of an array object
4315         with null-excluding components.
4316         * checks.adb (Null_Exclusion_Static_Checks):
4317         Call Compile_Time_Constraint_Error instead of
4318         Apply_Compile_Time_Constraint_Error in the component case. Also
4319         call that when Array_Comp is True, with an appropriate warning for
4320         the array component case. Only create an explicit initialization
4321         by null in the case of an object of a null-excluding access type
4322         (and no longer do that in the component case).
4323         * sem_ch3.adb (Check_Component): Add a Boolean parameter
4324         Array_Comp defaulted to False.  Pass Empty for the Comp
4325         actual when calling Null_Exclusion_Static_Checks in the case
4326         where Comp_Decl matches Object_Decl, because we don't have a
4327         component in that case. In the case of an object or component
4328         of an array type, pass True for Array_Comp on the recursive call
4329         to Check_Component.
4331 2017-05-02  Bob Duff  <duff@adacore.com>
4333         * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
4334         compute the linux priority from the Ada priority. Call this everywhere
4335         required. In particular, the previous version was not doing this
4336         computation when setting the ceiling priority in various places. It
4337         was just converting to C.int, which results in a ceiling that is off
4338         by 1.
4340 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4342         * sem_ch3.adb: Comment predicate inheritance.
4344 2017-05-02  Tristan Gingold  <gingold@adacore.com>
4346         * s-trasym.ads: Add comment.
4348 2017-05-02  Bob Duff  <duff@adacore.com>
4350         * sem_elab.adb, sem_elab.ads: Minor comment fixes.
4351         * sem_ch4.adb: Minor reformatting.
4352         * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
4353         * s-taspri-posix-noaltstack.ads: Minor refactoring.
4354         * sinput.ads: Minor typo fix.
4356 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4358         * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
4359         * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
4360         here from exp_ch9, to recognize objects whose creation requires
4361         dynamic allocation, so that the proper warning can be emitted
4362         when restriction No_Implicit_Heap_Allocation is in effect.
4363         * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
4364         to emit proper warning when an object that requires dynamic
4365         allocation is declared.
4367 2017-05-02  Tristan Gingold  <gingold@adacore.com>
4369         * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
4371 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4373         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
4374         visibility rules for equality operators that apply within an
4375         instantiation apply within an inlined body.
4376         * sem_type.adb (Add_One_Interp): ditto.
4378 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
4380         * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
4381         procedures.
4383 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
4385         * snames.ads-tmpl
4386         (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
4387         Name_No_Tagged_Streams): Move to regular pragmas.  Add
4388         placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
4389         and Secondary_Stack_Size.
4390         (Pragma_Id): Move Pragma_Assume,
4391         Pragma_Attribute_Definition, Pragma_Loop_Optimize and
4392         Pragma_No_Tagged_Streams to second part.
4394 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
4396         * exp_attr.adb: Minor reformatting.
4398 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4400         * sem_ch4.adb (Analyze_Selected_Component): Improve error
4401         detection for illegal references to private components or
4402         operations of a protected type in the body of the type.
4404 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
4406         * opt.ads: Add missing GNAT markers in comments.
4407         * opt.adb (Set_Opt_Config_Switches): Do not override earlier
4408         settings of Optimize_Alignment at the end.
4410 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
4412         * checks.adb (Apply_Constraint_Check): Do not apply
4413         a discriminant check when the associated type is a constrained
4414         subtype created for an unconstrained nominal type.
4415         * exp_attr.adb: Minor reformatting.
4417 2017-05-02  Bob Duff  <duff@adacore.com>
4419         * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
4420         the N_Raise_Expression case.
4421         * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
4422         and add assertions.
4424 2017-05-02  Yannick Moy  <moy@adacore.com>
4426         * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
4427         optimize length comparison in GNATprove mode.
4428         * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
4429         operator /= into negation of operator = when needed.
4430         (Expand_SPARK): Call new
4431         function to expand operator /=.
4433 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4435         * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
4436         Simplify the expression for a fixed-fixed division to remove
4437         divisions by constants whenever possible, as an optimization
4438         for restricted targets.
4440 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
4442         * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
4444 2017-05-02  Bob Duff  <duff@adacore.com>
4446         * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
4447         to find primitive ops, instead of using an Identifier that will
4448         later be looked up. This is necessary because these ops are not
4449         necessarily visible at all places where we need to call them.
4450         * exp_util.ads: Minor comment fix.
4452 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4454         * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
4455         references are fully conformant if they are both expansions
4456         of the discriminant of a protected type, within one of the
4457         protected operations. One occurrence may be expanded into a
4458         constant declaration while the other is an input parameter to
4459         the corresponding generated subprogram.
4461 2017-05-02  Justin Squirek  <squirek@adacore.com>
4463         * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
4464         recursivly searching composite-types for null-excluding access
4465         types and verifying them.
4466         (Analyze_Object_Declaration): Add a
4467         call to Check_Null_Excluding_Components for static verification
4468         of non-initialized objects.
4469         * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
4470         a parameter for a composite-type's component and an extra case
4471         for printing component information.
4473 2017-05-02  Yannick Moy  <moy@adacore.com>
4475         * sem_ch10.adb (Analyze_Subunit): Take
4476         configuration pragma into account when restoring appropriate
4477         pragma for analysis of subunit.
4479 2017-05-02  Justin Squirek  <squirek@adacore.com>
4481         * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
4482         s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
4483         g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
4484         clauses from the runtime.
4486 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
4488         * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
4489         array components specially.
4491 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
4493         * sem_ch8.adb (Premature_Usage): If the premature usage of
4494         an entity is as the expression in its own object decaration,
4495         rewrite the reference as Any_Id to prevent cascaded errors or
4496         compiler loops when such an entity is used in an address clause.
4498 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
4500         * gcc-interface/decl.c (components_to_record): Add missing guard.
4502 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
4504         * gcc-interface/decl.c (components_to_record): Add more comments.
4505         Put back pending fields onto the regular list if the misalignment
4506         happens to cancel itself.
4508 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
4510         * sem_ch4.adb (Complete_Object_Operation): When rewriting the
4511         controlling actual in a prefixed call, preserve the original node
4512         information if the prefix itself has been rewritten, for ASIS use.
4514 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
4516         * exp_ch6.adb (Insert_Post_Call_Actions):
4517         Code clean up. Insert the post-call actions after an enclosing
4518         procedure call when N denotes a function call and appears as an
4519         actual parameter in the procedure call.
4521 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
4523         * freeze.adb (Check_Component_Storage_Order): If there is a clause
4524         for the component, also reject the attribute if the component
4525         doesn't end on a byte boundary and its scalar storage order is
4526         different from that of the enclosing record type.
4528 2017-04-28  Javier Miranda  <miranda@adacore.com>
4530         * atree.ads (Info_Messages): Removed.
4531         (Warning_Info_Messages): New counter.
4532         (Report_Info_Messages): New counter.
4533         * err_vars.ads Update documentation.
4534         * errout.adb (Delete_Warning_And_Continuations): Update
4535         Info_Message occurrences.
4536         (Error_Msg_Internal): Update Info_Message occurrences.
4537         (Delete_Warning): Update Info_Message occurrences.
4538         (Write_Error_Summary): Update Info_Message occurrences.
4539         (Output_Messages): Update Info_Message occurrences.
4540         (To_Be_Removed): Update Info_Message occurrences.
4541         (Reset_Warnings): Update Info_Message occurrences.
4542         * errutil.adb (Error_Msg): Update Info_Message occurrences.
4543         (Finalize): Update Info_Message occurrences.
4544         (Initialize): Update Info_Message occurrences.
4545         * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
4546         (Compilation_Errors): Update Info_Message_Occurences.
4548 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
4550         * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
4551         * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
4552         * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
4553         * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
4554         * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
4555         * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
4556         Y_Size.
4557         * sem_eval.adb (Why_Not_Static): Initialize Typ.
4558         * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
4560 2017-04-28  Bob Duff  <duff@adacore.com>
4562         * sem_util.ads, sem_util.adb (Might_Raise): New function
4563         that replaces Is_Exception_Safe, but has the opposite
4564         sense. Is_Exception_Safe was missing various cases -- calls inside
4565         a pragma Debug, calls inside an 'if' or assignment statement,
4566         etc. Might_Raise now walks the entire subtree looking for things
4567         that can raise.
4568         * exp_ch9.adb (Is_Exception_Safe): Remove.
4569         (Build_Protected_Subprogram_Body): Replace call to
4570         Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
4571         constants where possible).
4572         * exp_ch7.adb: Rename Is_Protected_Body -->
4573         Is_Protected_Subp_Body. A protected_body is something different
4574         in the grammar.
4576 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
4578         * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
4579         * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
4580         (P_Discrete_Choice_List): Initialize Expr_Node variable.
4581         * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
4582         (P_Protected): Likewise.
4583         * sem_case.adb (Check_Duplicates):
4584         Add pragma Warnings on variable.
4585         * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
4586         * sem_ch4.adb (List_Operand_Interps):  Add pragma Warnings on variable.
4587         * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
4588         (Analyze_Exit_Statement): Initialize Scope_Id variable.
4589         (Analyze_Iterator_Specification): Initialize Bas variable.
4590         * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
4591         Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
4592         (Analyze_Accept_Statement): Initialize Task_Nam.
4594 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
4596         * checks.adb (Install_Primitive_Elaboration_Check):
4597         Do not generate an elaboration check if all checks have been
4598         suppressed.
4600 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
4602         * sem_ch13.adb (Analyze_Aspect_Specifications, case
4603         Interrupt_Handler and Attach_Handler): Generate reference
4604         to protected operation to prevent spurious warnings about
4605         unreferenced entities. Previous scheme failed with style checks
4606         enabled.
4608 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
4610         * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
4611         that follows an expression function must not be relocated to
4612         the generated body, because it applies to the code that follows.
4614 2017-04-28  Gary Dismukes  <dismukes@adacore.com>
4616         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
4617         Relaxed_RM_Semantics to avoid having CodePeer issue errors on
4618         code that might violate the more stringent checking for 'Access
4619         introduced in Ada 2005.
4621 2017-04-28  Arnaud Charlet  <charlet@adacore.com>
4623         * a-cforse.adb: minor style fix in comment.
4625 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
4627         * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
4628         initialize Block_Decls variable.
4629         (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
4630         (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
4631         * exp_disp.adb (Expand_Interface_Actuals): Initialize
4632         Formal_DDT and Actual_DDT variables.
4633         (Expand_Interface_Thunk): Initialize Iface_Formal.
4634         (Make_DT): Initialize Size_Comp.
4635         (Make_Select_Specific_Data_Table): Initialize Decls.
4636         * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
4637         Also initialize more RPC_Receiver_* variables.
4638         (Build_To_Any_Function): Initialize Cstr_Formal.
4639         * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
4641 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
4643         * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
4644         node between access types, freeze the designated type as well,
4645         so that dispatch table pointers are created in the proper scope,
4646         and not in the constructed body of the expression function.
4648 2017-04-28  Bob Duff  <duff@adacore.com>
4650         * alloc.ads (Nodes_Initial): Go back to previous value. The large
4651         value makes large compilations faster, but small compilations slower.
4653 2017-04-28  Arnaud Charlet  <charlet@adacore.com>
4655         * sem_util.adb: minor typos in Is_Child_Or_Sibling.
4657 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
4659         * erroutc.adb (Compilation_Errors): Do not consider info messages
4660         as suitable warnings when warnings must be treated as errors.
4661         * sem_ch7.adb (Analyze_Package_Specification): Do not consider
4662         internally-generated packages when outputting completion
4663         information.
4664         * errout.adb (Output_Messages): Do not consider info messages as
4665         suitable warnings when warnings must be treated as errors.
4666         * errutil.adb (Finalize): Do not consider info messages as
4667         suitable warnings when warnings must be treated as errors.
4669 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
4671         * warnsw.ads: Minor fix for incorrect wording in comment.
4673 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
4675         * sem_res.adb (In_Instance_Code): New predicate in
4676         Valid_Conversion, to determine whether a type conversion appears
4677         as (or within) an actual for a formal object.  Type conversions
4678         in instances are not rechecked in Valid_Conversion because
4679         visibility changes between generic location andi instance may
4680         lead to spurious errors, but conversions within an actual must be
4681         fully checked, and they are not fully resolved when pre-analyzing
4682         the actuals.
4684 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
4686         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
4687         New_Copy_Tree instead of Relocate_Node as any subsequent copies
4688         of the relocated node will have mangled Parent pointers.
4689         * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
4690         tables used in conjunction with entity and itype replication.
4691         (Visit_Entity): Rewrite the restriction on which entities
4692         require duplication.  The restriction now includes all types.
4694 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
4696         * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
4697         a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
4698         a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
4699         cleanups.
4701 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
4703         * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
4704         gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
4706 2017-04-28  Gary Dismukes  <dismukes@adacore.com>
4708         * exp_util.adb: Minor reformatting.
4710 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
4712         * sem_ch4.adb: Fix copy/pasto.
4714 2017-04-27  Tristan Gingold  <gingold@adacore.com>
4716         * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
4717         raise-gcc.c. Fix include search path for raise-gcc.c
4719 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
4721         * fe.h (Warn_On_Questionable_Layout): Declare.
4722         * warnsw.ads (Warn_On_Record_Holes): Move down.
4723         (Warn_On_Questionable_Layout): New boolean variable.
4724         (Warning_Record): Add Warn_On_Questionable_Layout field.
4725         * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
4726         (Restore_Warnings): Likewise.
4727         (Save_Warnings): Likewise.
4728         (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
4729         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
4730         components_to_record.
4731         (gnu_field_to_gnat): New function.
4732         (warn_on_field_placement): Likewise.
4733         (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
4734         parameters.  Rename local variables and adjust recursive call.
4735         Rework final scan of the field list and implement warnings on the
4736         problematic placement of specific sorts of fields.
4738 2017-04-27  Bob Duff  <duff@adacore.com>
4740         * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
4741         * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
4742         * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
4743         * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
4744         * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
4745         * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
4746         For efficiency, cache results of Is_Internal_File_Name and
4747         Is_Predefined_File_Name in the Units table. This avoids a lot
4748         of repeated text processing.
4750 2017-04-27  Emmanuel Briot  <briot@adacore.com>
4752         * g-comlin.adb (Sort_Sections): remove useless test.
4754 2017-04-27  Claire Dross  <dross@adacore.com>
4756         * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
4757         allow the use of regular equality over elements in contracts.
4758         (Formal_Model): Ghost package containing model functions that are
4759         used in subprogram contracts.
4760         (Current_To_Last): Removed, model functions should be used instead.
4761         (First_To_Previous): Removed, model functions should be used instead.
4762         (Strict_Equal): Removed, model functions should be used instead.
4763         (No_Overlap): Removed, model functions should be used instead.
4764         (Equivalent_Keys): Functions over cursors are removed. They were
4765         awkward with explicit container parameters.
4766         * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
4767         allow the use of regular equality over elements in contracts.
4768         (Formal_Model): Ghost package containing model functions that
4769         are used in subprogram contracts.
4770         (Current_To_Last): Removed, model functions should be used instead.
4771         (First_To_Previous): Removed, model functions should be used instead.
4772         (Strict_Equal): Removed, model functions should be used instead.
4773         (No_Overlap): Removed, model functions should be used instead.
4775 2017-04-27  Yannick Moy  <moy@adacore.com>
4777         * gnat1drv.adb: Code cleanup.
4779 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4781         * exp_util.adb (Replace_Entity): The prefix of a 'Result
4782         attribute reference in a post- condition is the subprogram to
4783         which the condition applies. If the condition is inherited
4784         by a type extension, the prefix becomes a reference to the
4785         inherited operation, but there is no need to create a wrapper
4786         for this operation, because 'Result is expanded independently
4787         when elaborating the postconditions.
4789 2017-04-27  Bob Duff  <duff@adacore.com>
4791         * sinput.adb: Minor code cleanup.
4792         * namet.adb (Append): Create faster versions of
4793         Append(String) and Append(Name_Id) by using slice assignment
4794         instead of loops.
4795         * sem_util.adb (In_Instance): Speed this up by removing
4796         unnecessary tests; Is_Generic_Instance is defined for all
4797         entities.
4798         * sem_util.ads, sem_util.adb (In_Parameter_Specification):
4799         Remove unused function.
4800         * alloc.ads (Nodes_Initial): Use a much larger value, because
4801         the compiler was spending a lot of time copying the nodes table
4802         when it grows. This number was chosen in 1996, so is rather out
4803         of date with current memory sizes. Anyway, it's virtual memory.
4804         Get rid of Orig_Nodes_...; use Node_... instead.
4805         * atree.adb (Lock): Do not release the Nodes tables; it's a
4806         waste of time.
4807         Orig_Nodes_ ==> Nodes_
4808         * nlists.adb: Orig_Nodes_ ==> Nodes_
4809         * g-table.adb: Remove unused "with" clause.
4810         * g-table.ads, table.ads: Remove Big_Table_Type, which should
4811         not be used by clients.
4812         * g-dyntab.adb (Last_Allocated): New function
4813         to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
4815 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4817         * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
4818         check.
4819         (Subtypes_Statically_Match): Remove duplicate check.
4820         * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
4822 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4824         * exp_aggr.adb (Replace_Type): Remove the special processing
4825         for selected components.
4826         * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
4827         processing for attributes Fixed_Value and Integer_Value.
4828         * exp_util.adb (Side_Effect_Free): Merge the processing for
4829         qualified expressions, type conversions, and unchecked type
4830         conversions.
4831         * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
4832         and Optional.
4833         * par-ch3.adb (P_Declarative_Items): Merge the processing for
4834         tokens function, not, overriding, and procedure.
4835         * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
4836         for qualified expressions, type conversions, and unchecked
4837         type conversions.
4838         * sem_util.adb (Compile_Time_Constraint_Error): Merge the
4839         processing for Ada 83 and instances.
4840         (Object_Access_Level): Merge the processing for indexed components
4841         and selected components.
4842         * uname.adb (Add_Node_Name): Merge the processing for stubs.
4844 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4846         * checks.adb (Install_Primitive_Elaboration_Check):
4847         Do not generate the check when restriction No_Elaboration_Code
4848         is in effect.
4850 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4852         * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
4853         of Expand_Dispatching_Call. If the denoted subprogram has a
4854         class-wide precondition, this is the only precondition that
4855         applies to the call, rather that the class-wide preconditions
4856         that may apply to the body that is executed. (This is specified
4857         in AI12-0195).
4859 2017-04-27  Yannick Moy  <moy@adacore.com>
4861         * gnat1drv.adb (Adjust_Global_Switches): Issue
4862         a warning in GNATprove mode if the runtime library does not
4863         support IEEE-754 floats.
4865 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4867         * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
4868         is itself inherited it does not carry any contract information,
4869         so examine its parent operation which is its Alias.
4871 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4873         * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
4874         prefix can be an object reference in which case Obj'Image (X)
4875         can only be interpreted as an indexing of the parameterless
4876         version of the attribute.
4877         * par-ch4.adb (P_Name): An attribute reference can be the prefix of
4878         an indexing or a slice operation if the attribute does not require
4879         parameters. In Ada2012 'Image also belongs in this category,
4880         and A'Image (lo .. hi) is legal and must be parsed as a slice.
4882 2017-04-27  Yannick Moy  <moy@adacore.com>
4884         * exp_ch4.adb: Minor reformatting.
4885         * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
4886         disable the CodePeer and C generation modes. Similar to the
4887         opposite actions done in CodePeer mode.
4889 2017-04-27  Yannick Moy  <moy@adacore.com>
4891         * sem_res.adb: Remove duplicate code.
4892         * sem_attr.adb: Delete duplicate code.
4894 2017-04-27  Bob Duff  <duff@adacore.com>
4896         * g-dyntab.adb: Reduce the amount of copying in
4897         Release. No need to copy items past Last.
4899 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4901         * checks.adb Add with and use clauses for Sem_Disp.
4902         (Install_Primitive_Elaboration_Check): New routine.
4903         * checks.ads (Install_Primitive_Elaboration_Check): New routine.
4904         * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
4905         processing of 'Elaborated.
4906         * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
4907         elaboration check.
4909 2017-04-27  Bob Duff  <duff@adacore.com>
4911         * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
4912         If the table grows and then shrinks back to empty, we won't necessarily
4913         point back to the empty array. Code cleanups.
4914         * sinput.ads: Add 'Base to Size clause to match the declared
4915         component subtypes.
4917 2017-04-27  Claire Dross  <dross@adacore.com>
4919         * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
4920         allow the use of regular equality over elements in contracts.
4921         (Formal_Model): Ghost package containing model functions that
4922         are used in subprogram contracts.
4923         (Current_To_Last): Removed, model functions should be used instead.
4924         (First_To_Previous): Removed, model functions should be used instead.
4925         (Strict_Equal): Removed, model functions should be used instead.
4926         (No_Overlap): Removed, model functions should be used instead.
4927         * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
4928         Boolean generic parameter to disable contracts for equivalence
4929         between keys.
4930         (Witness): Create a witness of a key that is used for handling of
4931         equivalence between keys.
4932         (Has_Witness): Check whether a witness is contained in a map.
4933         (W_Get): Get the element associated to a witness.
4934         (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
4935         directly.
4936         * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
4937         Boolean generic parameter to disable contracts for equivalence
4938         between keys.
4939         * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
4940         of equivalence on functional maps.
4941         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
4942         of equivalence on functional maps.
4944 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4946         * exp_ch9.adb (Expand_Entry_Barrier): Code
4947         cleanup. Do not perform the optimization which removes the
4948         declarations of the discriminant and component renamings when
4949         validity checks on operands and attributes are in effect.
4951 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4953         * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
4954         freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
4955         a-cfhama.ads, a-cofove.ads: Minor reformatting.
4957 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4959         * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
4960         pointer dereference.
4961         * g-spipat.adb (Dump): Code clean up. Protect against a possible
4962         null pointer dereference.
4964 2017-04-27  Bob Duff  <duff@adacore.com>
4966         * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
4967         Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
4968         Free renames Init, since they do the same thing.
4969         * g-table.ads: Default for Table_Low_Bound.
4970         * table.ads: Default for Table_Low_Bound, Table_Initial, and
4971         Table_Increment.
4973 2017-04-27  Bob Duff  <duff@adacore.com>
4975         * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
4976         can reallocate.
4977         * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
4978         * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
4979         Reorder code so that above assertions do not fail.
4980         * table.ads: Remove obsolete comment on Locked.
4982 2017-04-27  Claire Dross  <dross@adacore.com>
4984         * a-cfdlli.ads: Code cleanup.
4986 2017-04-27  Yannick Moy  <moy@adacore.com>
4988         * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
4989         when needed for proof.  (Expand_SPARK): Call the new procedure.
4990         * exp_util.ads Fix typo.
4992 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
4994         * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
4995         fixes.
4997 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4999         * sem_elab.adb Add new type Visited_Element
5000         and update the contents of table Elab_Visited.  Various code clean up.
5001         (Check_Elab_Call): Determine whether a prior call to
5002         the same subprogram was already examined within the same context.
5003         (Check_Internal_Call_Continue): Register the subprogram being
5004         called as examined within a particular context. Do not suppress
5005         elaboration warnings.
5007 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
5009         * xoscons.adb, osint.ads: Minor reformatting.
5011 2017-04-27  Bob Duff  <duff@adacore.com>
5013         * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
5014         Table_Count_Type --> Table_Last_Type, because the name
5015         was confusing (a "count" usually starts at zero).  Add
5016         functionality supported or needed by other tables packages
5017         (Move, Release_Threshold).
5018         * g-table.ads, g-table.adb: This is now just a thin wrapper
5019         around g-dyntab.ads/g-dyntab.adb.  Add functionality supported
5020         or needed by other tables packages (Save, Restore).
5021         * table.ads, table.adb: This is now just a thin wrapper around
5022         * g-table.ads/g-table.adb.
5023         * namet.h, scos.h, uintp.h: These files are reaching into the
5024         private data of some instances of g-table, whose names changed,
5025         so the above change requires some adjustment here. It now uses
5026         public interfaces.
5028 2017-04-27  Bob Duff  <duff@adacore.com>
5030         * namet.adb, namet.ads: Minor: remove unused procedures.
5032 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
5034         * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
5035         (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
5036         Add pragma Warnings on Rtype variable in nested block.  *
5037         * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
5038         * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
5039         (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
5040         * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
5041         (Process_Component_List_For_Finalize): Initialize Counter_Id.
5042         (Build_Finalize_Statements): Initialize Bod_Stmts.
5043         * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
5045 2017-04-27  Claire Dross  <dross@adacore.com>
5047         * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
5048         allow the use of regular equality over elements in contracts.
5049         (Formal_Model): Ghost package containing model functions that are
5050         used in subprogram contracts.
5051         (Current_To_Last): Removed, model
5052         functions should be used instead.
5053         (First_To_Previous): Removed, model functions should be used instead.
5054         (Strict_Equal): Removed, model functions should be used instead.
5055         (No_Overlap): Removed, model functions should be used instead.
5056         (Equivalent_Keys): Functions over cursors are removed. They were
5057         awkward with explicit container parameters.
5058         * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
5059         (proof only) procedure to help GNATprove when equivalence over
5060         keys is not equality.
5062 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5064         * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
5065         sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
5066         Minor reformatting and code cleanups.
5068 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5070         * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
5071         subsidiary of Check_Inherited_Conditions, to build pragmas for an
5072         operation whose ancestor has classwide pre/postconditions. This
5073         is used both to check the legality of the inheritance in Ada
5074         and in SPARK, and to determine whether a wrapper is needed for
5075         an inherited operation.
5076         * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
5077         Improve placement of error message for inherited classwide
5078         conditions that become illegal on type derivation.
5080 2017-04-27  Yannick Moy  <moy@adacore.com>
5082         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
5083         SPARK_Mode from context on generic package.
5084         * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
5085         useless test.
5087 2017-04-27  Claire Dross  <dross@adacore.com>
5089         * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
5090         overflows in computations.
5091         * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
5092         overflows in computations.
5093         (Insert): Rewrite precondition to avoid overflows in computations.
5094         * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
5095         overflows in computations.
5096         (Insert): Rewrite precondition to avoid overflows in computations.
5098 2017-04-27  Steve Baird  <baird@adacore.com>
5100         * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
5101         flag when it is declared in order to avoid confusing CodePeer about
5102         the possibility of an uninitialized variable read.
5104 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5106         * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
5107         no dimensionality error if the subtype of the expression is
5108         identical to the nominal subtype in the declaration, even though
5109         the expression itself may have been constant-folded and lack a
5110         dimension vector.
5111         * sem_dim.ads: Add comments on setting of dimension vectors and
5112         its interaction with node rewritings and side-effect removal.
5114 2017-04-27  Bob Duff  <duff@adacore.com>
5116         * debug.adb: Minor comment correction.
5117         * sem_dim.ads: Minor reformatting and typo fixes.
5119 2017-04-27  Bob Duff  <duff@adacore.com>
5121         * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
5122         Last of the tables via function calls, rather than relying on layout
5123         of data structures.
5125 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5127         * exp_util.adb: No wrapper in GNATprove mode.
5129 2017-04-27  Yannick Moy  <moy@adacore.com>
5131         * sem_res.adb (Resolve_Comparison_Op): Always
5132         evaluate comparisons between values of universal types.
5134 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5136         * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
5137         an elaboration counter nor a check when in GNATprove mode.
5138         * sem_util.adb (Build_Elaboration_Entity): Do not create an
5139         elaboration counter when in GNATprove mode.
5141 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5143         * freeze.adb: copy-paste typo.
5145 2017-04-27  Yannick Moy  <moy@adacore.com>
5147         * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
5148         Use correct test to detect call in GNATprove mode instead of
5149         compilation.
5151 2017-04-27  Claire Dross  <dross@adacore.com>
5153         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
5154         New property function expressing that the element of a
5155         sequence are contained in the union of two sequences.
5156         (Formal_Model.M_Elements_Included): New property function
5157         expressing that the element of a sequence are another sequence.
5158         (Generic_Sorting): Use new property functions to state that
5159         elements are preserved by Sort and Merge.
5160         * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
5161         allow the use of regular equality over elements in contracts.
5162         (Formal_Model): Ghost package containing model functions
5163         that are used in subprogram contracts.  (Capacity):
5164         On unbounded containers, return the maximal capacity.
5165         (Current_To_Last): Removed, model functions should be used instead.
5166         (First_To_Previous): Removed, model functions should be used instead.
5167         (Append): Default parameter value replaced
5168         by new wrapper to allow more precise contracts.
5169         (Insert): Subprogram restored, it seems it was useful to users even if
5170         it is inefficient.
5171         (Delete): Subprogram restored, it seems it was useful to users even if
5172         it is inefficient.
5173         (Prepend): Subprogram restored, it seems it was useful to users even
5174         if it is inefficient.
5175         (Delete_First): Subprogram restored, it seems it
5176         was useful to users even if it is inefficient.  (Delete_Last):
5177         Default parameter value replaced by new wrapper to allow more
5178         precise contracts.
5179         (Generic_Sorting.Merge): Subprogram restored.
5180         * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
5181         allow the use of regular equality over elements in contracts.
5182         (Formal_Model): Ghost package containing model functions
5183         that are used in subprogram contracts.  (Capacity):
5184         On unbounded containers, return the maximal capacity.
5185         (Current_To_Last): Removed, model functions should be used
5186         instead.
5187         (First_To_Previous): Removed, model functions should be used instead.
5188         (Append): Default parameter value replaced
5189         by new wrapper to allow more precise contracts.
5190         (Insert): Subprogram restored, it seems it was useful to users even if
5191         it is inefficient.
5192         (Delete): Subprogram restored, it seems it was useful to users even if
5193         it is inefficient.
5194         (Prepend): Subprogram restored, it seems it was useful to users even
5195         if it is inefficient.
5196         (Delete_First): Subprogram restored, it seems it
5197         was useful to users even if it is inefficient.  (Delete_Last):
5198         Default parameter value replaced by new wrapper to allow more
5199         precise contracts.
5200         (Generic_Sorting.Merge): Subprogram restored.
5201         (Vector): Do not reuse formal vectors, as it is no longer possible
5202         to supply them with an equality function over elements.
5204 2017-04-27  Bob Duff  <duff@adacore.com>
5206         * g-dyntab.adb (Release): When allocating the new
5207         table, use the correct slice of the old table to initialize it.
5209 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
5211         * einfo.ads: Minor fixes in comments.
5213 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5215         * sem_prag.adb: disable clones in SPARK_Mode.
5217 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
5219         * sem_util.ads, contracts.adb: Minor reformatting.
5221 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5223         * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
5224         Build body of subprogram that has a class-wide condition that
5225         contains calls to other primitives.
5226         (Build_Class_Wide_Clone_Call); Build a call to the common
5227         class-wide clone of a subprogram with classwide conditions. The
5228         body of the subprogram becomes a wrapper for a call to the
5229         clone. The inherited operation becomes a similar wrapper to which
5230         modified conditions apply, and the call to the clone includes
5231         the proper conversion in a call the parent operation.
5232         (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
5233         subprogram that has a classwide condition that contains calls to
5234         other primitives, build an internal subprogram that is invoked
5235         through a type-specific wrapper for all inherited subprograms
5236         that may have a modified condition.
5237         * sem_prag.adb (Check_References): If subprogram has a classwide
5238         condition, create entity for corresponding clone, to be invoked
5239         through wrapper subprograns.
5240         (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
5241         message about placement if pragma isi internally generated.
5242         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
5243         a classwide clone, build body of clone as copy of original body,
5244         and rewrite original body as a wrapper as a wrapper for a call to
5245         the clone, so that it incorporates the original pre/postconditions
5246         of the subprogram.
5247         * freeze.adb (Check_Inherited_Conditions): For an inherited
5248         subprogram that inherits a classwide condition, build spec and
5249         body of corresponding wrapper so that call to inherited operation
5250         gets the modified conditions.
5251         * contracts.adb (Analyze_Contracts): If analysis of classwide
5252         condition has created a clone for a primitive operation, analyze
5253         declaration of clone.
5255 2017-04-27  Steve Baird  <baird@adacore.com>
5257         * exp_util.adb (Build_Allocate_Deallocate_Proc):
5258         Add "Suppress => All_Checks" to avoid generating unnecessary
5259         checks.
5261 2017-04-27  Yannick Moy  <moy@adacore.com>
5263         * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
5264         * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
5265         inlining body in GNATprove mode when switch -gnatdm used.
5266         * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
5267         in GNATprove mode when switch -gnatdm used.
5269 2017-04-27  Arnaud Charlet  <charlet@adacore.com>
5271         * sem_ch13.adb (Analyze_Attribute_Definition_Clause
5272         [Attribute_Address]): Call Set_Address_Taken when ignoring rep
5273         clauses, so that we keep an indication of the address clause
5274         before removing it from the tree.
5276 2017-04-27  Yannick Moy  <moy@adacore.com>
5278         * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
5279         of expression being qualified, when not an object name, or else
5280         evaluate the underlying name.
5282 2017-04-27  Jerome Lambourg  <lambourg@adacore.com>
5284         * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
5286 2017-04-27  Justin Squirek  <squirek@adacore.com>
5288         * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
5289         Process_Component_List_For_Finalization as a local variable.
5290         (Process_Component_For_Finalize): Add an extra parameter to avoid
5291         global references.
5292         (Process_Component_List_For_Finalization): Correct calls to
5293         Process_Component_For_Finalize to take Num_Comps as a parameter.
5295 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5297         * sem_ch8.adb (Find_Direct_Name): Account for the case where
5298         a use-visible entity is defined within a nested scope of an
5299         instance when giving priority to entities which were visible in
5300         the original generic.
5301         * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
5303 2017-04-27  Tristan Gingold  <gingold@adacore.com>
5305         * raise-gcc.c: Don't use unwind.h while compiling
5306         for the frontend, but mimic host behavior.
5308 2017-04-27  Javier Miranda  <miranda@adacore.com>
5310         * sem_ch3.adb (Build_Discriminated_Subtype):
5311         Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
5313 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5315         * sem_prag.adb (Analyze_Global_Item):
5316         Do not consider discriminants because they are not "entire
5317         objects". Remove the discriminant-related checks because they are
5318         obsolete.
5319         (Analyze_Input_Output): Do not consider discriminants
5320         because they are not "entire objects".
5322 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5324         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
5325         perform check if the current scope does not come from source,
5326         as is the case for a rewritten task body, because check has
5327         been performed already, and may not be doable because of changed
5328         visibility.
5330 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5332         * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
5333         a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
5334         Minor reformatting.
5336 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5338         * sem_ch4.adb (Analyze_Call): If the return type of a function
5339         is incomplete in an context in which the full view is available,
5340         replace the type of the call by the full view, to prevent spurious
5341         type errors.
5342         * exp_disp.adb (Check_Premature_Freezing): Disable check on an
5343         abstract subprogram so that compiler does not reject a parameter
5344         of a primitive operation of a tagged type being frozen, when
5345         the untagged type of that parameter cannot be frozen.
5347 2017-04-27  Bob Duff  <duff@adacore.com>
5349         * sem_attr.adb (Compute_Type_Key): Don't walk
5350         representation items for irrelevant types, which could be in a
5351         different source file.
5353 2017-04-27  Steve Baird  <baird@adacore.com>
5355         * exp_attr.adb (Expand_N_Attribute_Reference):
5356         Don't expand Image, Wide_Image, Wide_Wide_Image attributes
5357         for CodePeer.
5359 2017-04-27  Yannick Moy  <moy@adacore.com>
5361         * exp_unst.ads: Fix typos in comments.
5363 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5365         * sem_eval.adb (Choice_Matches): Handle properly a real literal
5366         whose type has a defined static predicate.
5368 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5370         * exp_ch4.adb (Insert_Dereference_Action):
5371         Do not adjust the address of a controlled object when the
5372         associated access type is subject to pragma No_Heap_Finalization.
5373         Code reformatting.
5375 2017-04-27  Pierre-Marie de Rodat  <derodat@adacore.com>
5377         * gcc-interface/utils.c (gnat_type_for_size): Set
5378         TYPE_ARTIFICIAL on created types.
5380 2017-04-27  Claire Dross  <dross@adacore.com>
5382         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
5383         modifications in functional containers.
5384         * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
5385         to improve readablity. Subprograms are separated between basic
5386         operations, constructors and properties. Universally quantified
5387         formulas in contracts are factorized in independant functions
5388         with a name and a comment.  Names of parameters are improved.
5390 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
5392         * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
5394 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5396         * sem_res.adb (Resolve_Type_Conversion): Do not
5397         install a predicate check here since this is already done during
5398         the expansion phase. Verify whether the operand satisfies the
5399         static predicate (if any) of the target type.
5400         * sem_ch3.adb (Analyze_Object_Declaration): Do
5401         not install a predicate check if the object is initialized by
5402         means of a type conversion because the conversion is subjected
5403         to the same check.
5405 2017-04-27  Tristan Gingold  <gingold@adacore.com>
5407         * raise.c (__gnat_builtin_longjmp): Remove.
5408         (__gnat_bracktrace):
5409         Add a dummy definition for the compiler (__gnat_eh_personality,
5410         __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
5411         __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
5412         __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
5413         * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
5414         * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
5415         and a-except-2005.adb.
5416         * raise-gcc.c: Allow build in compiler, compiled as a C++
5417         file.
5418         (__gnat_Unwind_ForcedUnwind): Adjust prototype.
5419         (db): Constify msg_format.
5420         (get_call_site_action_for): Don't use void arithmetic.
5421         * system.ads (Frontend_Exceptions): Set to False.
5422         (ZCX_By_Default): Set to True.
5423         (GCC_ZC_Support): Set to True.
5424         * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
5425         a-except.ad[sb].
5426         * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
5427         in gnat1 and gnatbind.
5428         * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
5429         s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
5430         * s-excmac.ads, s-excmac.adb: Copy of variants.
5431         * a-except.o: Adjust preequisites.
5432         Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
5434 2017-04-27  Claire Dross  <dross@adacore.com>
5436         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
5437         modifications in functional containers.
5438         * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
5439         to improve readablity. Subprograms are separated between basic
5440         operations, constructors and properties. Universally quantified
5441         formulas in contracts are factorized in independant functions
5442         with a name and a comment.  Names of parameters are improved.
5444 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
5446         * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
5448 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5450         * sem_res.adb (Resolve_Type_Conversion): Do not
5451         install a predicate check here since this is already done during
5452         the expansion phase. Verify whether the operand satisfies the
5453         static predicate (if any) of the target type.
5454         * sem_ch3.adb (Analyze_Object_Declaration): Do
5455         not install a predicate check if the object is initialized by
5456         means of a type conversion because the conversion is subjected
5457         to the same check.
5459 2017-04-27  Tristan Gingold  <gingold@adacore.com>
5461         * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
5462         replaced by their variants).
5464 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5466         * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
5467         cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
5468         a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
5470 2017-04-27  Tristan Gingold  <gingold@adacore.com>
5472         * s-excmac-gcc.ads, s-excmac-gcc.adb,
5473         s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
5474         Ada95.
5476 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5478         * exp_ch7.adb (Establish_Transient_Scope): Rewrite
5479         the loop which detects potential enclosing transient scopes. The
5480         loop now terminates much earlier as transient scopes are bounded
5481         by packages and subprograms.
5483 2017-04-27  Claire Dross  <dross@adacore.com>
5485         * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
5486         allow the use of regular equality over elements in contracts.
5487         (Cursor): Type is now public so that it can be used in
5488         model functions.
5489         (Formal_Model): Ghost package containing
5490         model functions that are used in subprogram contracts.
5491         (Current_To_Last): Removed, model functions should be used
5492         instead.
5493         (First_To_Previous): Removed, model functions should
5494         be used instead.
5495         (Strict_Equal): Removed, model functions
5496         should be used instead.
5497         (Append): Default parameter value
5498         replaced by new wrapper to allow more precise contracts.
5499         (Insert): Default parameter value replaced by new wrapper to
5500         allow more precise contracts.
5501         (Delete): Default parameter
5502         value replaced by new wrapper to allow more precise contracts.
5503         (Prepend): Default parameter value replaced by new wrapper to
5504         allow more precise contracts.
5505         (Delete_First): Default parameter
5506         value replaced by new wrapper to allow more precise contracts.
5507         (Delete_Last): Default parameter value replaced by new wrapper
5508         to allow more precise contracts.
5510 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5512         * exp_spark.adb (Expand_SPARK): Perform specialized expansion
5513         for object declarations.
5514         (Expand_SPARK_N_Object_Declaration): New routine.
5515         * sem_elab.adb (Check_A_Call): Include calls to the
5516         Default_Initial_Condition procedure of a type under the SPARK
5517         elaboration checks umbrella.
5519 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5521         * sem.adb (Analyze): Diagnose an illegal iterated component
5522         association.
5523         * sem_util.ads, sem_util.adb
5524         (Diagnose_Iterated_Component_Association): New routine.
5526 2017-04-27  Bob Duff  <duff@adacore.com>
5528         * adaint.c (__gnat_get_current_dir): Return 0 in length if
5529         getcwd fails.
5530         * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
5531         exception if getcwd failed.
5533 2017-04-27  Yannick Moy  <moy@adacore.com>
5535         * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
5536         entities with special prefix.
5538 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5540         * debug.adb Change the documentation of switch -gnatd.s.
5541         * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
5542         to manage the secondary stack when an enclosing scope already
5543         performs this functionality (aka relaxed management). Switch
5544         -gnatd.s may be used to force strict management in which case
5545         the block will manage the secondary stack unconditionally. Add
5546         a guard to stop the traversal when encountering a package or a
5547         subprogram scope.
5549 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5551         * sem_res.adb (Resolve_Call): Refine further the handling of
5552         limited views of return types in function calls. If the function
5553         that returns a limited view appears in the current unit,
5554         we do not replace its type by the non-limited view because
5555         this transformation is performed int the back-end. However,
5556         the type of the call itself must be the non-limited view, to
5557         prevent spurious resolution errors.
5559 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5561         * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
5562         Removed, proposed implementation using generics for class-wide
5563         preconditions proved impractical.
5564         (Class_Wide_Clone): New attribute of subprogram. Designates
5565         subprogram created for primitive operations with class-wide
5566         pre/postconditions that contain calls to other primitives. The
5567         clone holds the body of the original primitive, but the
5568         pre/postonditions do not apply to it. The original body is
5569         rewritten as a wrapper for a call to the clone.
5570         (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
5571         the flag is set, no code for the corresponding pre/postconditions
5572         is inserted into its body.
5574 2017-04-27  Bob Duff  <duff@adacore.com>
5576         * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
5577         Scalar_Storage_Order if -gnatI is given.
5578         * sem_prag.adb (Analyze_Pragma): Ignore
5579         Default_Scalar_Storage_Order if -gnatI is given.
5581 2017-04-27  Claire Dross  <dross@adacore.com>
5583         * a-cofuba.ads (Add): Take as an additional input parameter
5584         the position where the element should be inserted.
5585         (Remove): New function that removes an element from the container.
5586         * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
5587         * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
5588         (Remove): New function that removes an element from a set.
5589         * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
5590         (Remove): New function that removes an element from a sequence.
5591         (Insert): New function that adds anywhere in a sequence.
5593 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5595         * checks.adb (Generate_Range_Check): Revert previous change.
5597 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
5599         * sem_util.adb: Minor reformatting/rewording.
5601 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5603         * lib-xref.adb (Generate_Reference): The use
5604         of attribute 'Result is not considered a violation of pragma
5605         Unreferenced.
5607 2017-04-27  Justin Squirek  <squirek@adacore.com>
5609         * cstand.adb (Create_Standard): Correctly set
5610         Directly_Designated_Type for Any_Access.
5611         * sem_type.adb (Covers): Minor grammar fixes.
5613 2017-04-27  Bob Duff  <duff@adacore.com>
5615         * sem_attr.adb: Minor cleanup.
5617 2017-04-27  Claire Dross  <dross@adacore.com>
5619         * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
5620         private child of Ada.Containers used to implement all functional
5621         containers.
5622         * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
5623         child of Ada.Containers. It provides functional indefinite unbounded
5624         maps which can be used as high level models for specification
5625         of data structures.
5626         * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
5627         child of Ada.Containers. It provides functional indefinite unbounded
5628         sets which can be used as high level models for specification
5629         of data structures.
5630         * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
5631         child of Ada.Containers.  It provides functional indefinite unbounded
5632         vectors which can be used as high level models for specification
5633         of data structures.
5634         * Makefile.rtl: Add new packages.
5635         * impunit.adb: Add new packages.
5637 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
5639         * sem_ch4.adb: Minor reformatting.
5641 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5643         * sem_ch12.adb (Analyze_Associations): minor reformatting.
5644         (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
5645         point type actual that has user-defined arithmetic primitives,
5646         when there is a previous actual for a formal package that defines
5647         a fixed-point type with the parent user-defined operator.
5649 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5651         * checks.adb (Generate_Range_Check): Reinstate part of previous change.
5652         * sem_attr.adb (Resolve_Attribute): Generate a range check when
5653         the component type allows range checks.
5655 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5657         * sem_aux.adb (Is_Generic_Formal): Use original node to locate
5658         corresponding declaration, because formal derived types are
5659         rewritten as private extensions.
5661 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
5663         * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
5664         dimensions of operands if node has been analyzed already, because
5665         previous analysis and dimension checking will have removed the
5666         dimension information from the operands.
5668 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5670         * debug.adb: Document the use of switch -gnatd.s.
5671         * einfo.ads Update the documentation on attribute
5672         Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
5673         the uses of these attributes from certain entities.
5674         * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
5675         which determines whether the block should continue to manage
5676         the secondary stack.
5677         (Manages_Sec_Stack): New routine.
5679 2017-04-27  Bob Duff  <duff@adacore.com>
5681         * atree.ads: Minor edit.
5683 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
5685         * sinfo.ads: Update the section on Ghost mode. Add
5686         a section on SPARK mode. Update the placement of section on
5687         expression functions.
5689 2017-04-27  Bob Duff  <duff@adacore.com>
5691         * sinput.adb (Get_Source_File_Index): Don't
5692         assert that S is in the right range in the case where this is
5693         a .dg file under construction.
5695 2017-04-27  Yannick Moy  <moy@adacore.com>
5697         * sem_util.adb (Check_Result_And_Post_State):
5698         Handle more precisely each conjunct in expressions formed by
5699         and'ing sub-expressions.
5701 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
5703         * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
5705 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
5707         * gnat_rm.texi, gnat_ugn.texi,
5708         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
5709         doc/gnat_ugn/platform_specific_information.rst,
5710         doc/gnat_ugn/gnat_and_program_execution.rst,
5711         doc/gnat_ugn/gnat_utility_programs.rst,
5712         doc/gnat_ugn/the_gnat_compilation_model.rst,
5713         doc/gnat_rm/implementation_defined_attributes.rst,
5714         doc/gnat_rm/the_gnat_library.rst,
5715         doc/gnat_rm/implementation_defined_pragmas.rst,
5716         doc/gnat_rm/representation_clauses_and_pragmas.rst,
5717         doc/gnat_rm/implementation_of_specific_ada_features.rst,
5718         doc/gnat_rm/implementation_defined_aspects.rst,
5719         doc/gnat_rm/implementation_defined_characteristics.rst: Update
5720         documentation.
5722 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
5724         * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
5725         generating C code on complex case expressions.
5727 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
5729         * sem_prag.adb (Analyze_Pragma): Generate a warning instead
5730         of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
5731         * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
5732         Ada_2012 instead of Ada_2005 to be compatible with the above
5733         change.
5734         * bindgen.adb: Silence new warning on pragma Ada_95.
5736 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5738         * checks.adb (Generate_Range_Check): Revert part of previous change.
5740 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5742         * sem_ch4.adb (Try_Container_Indexing): Handle properly a
5743         container indexing operation that appears as a an actual in a
5744         parameter association in a procedure call.
5746 2017-04-25  Olivier Ramonat  <ramonat@adacore.com>
5748         * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
5749         Fix spelling mistakes.
5751 2017-04-25  Bob Duff  <duff@adacore.com>
5753         * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
5754         * sinput-p.adb: Use regular fat pointers, with bounds checking,
5755         for source buffers.  Fix misc obscure bugs.
5756         * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
5757         checking, for source buffers.  Modify representation clause for
5758         Source_File_Record as appropriate.  Move Source_File_Index_Table
5759         from spec to body, because it is not used outside the body.
5760         Move Set_Source_File_Index_Table into the private part, because
5761         it is used only in the body and in children.  Use trickery to
5762         modify the dope in the generic instantiation case.  It's ugly,
5763         but not as ugly as the previous method.  Fix documentation.
5764         Remove obsolete code.
5765         * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
5766         indexing in source buffers.
5767         * fmap.adb: Avoid conversions from one string type to another.
5768         Remove a use of global name buffer.
5769         * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
5770         fixes.
5772 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
5774         * exp_util.adb, exp_ch4.adb: Minor reformatting.
5776 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5778         * checks.adb: Code clean up in various routines.
5779         (Generate_Range_Check): Do not generate a range check when the
5780         expander is not active or when index/range checks are suppressed
5781         on the target type.
5782         (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
5783         Remove variants that include a Supress parameter. These routines
5784         are never used, and were introduced before the current scope-based
5785         check suppression method.
5787 2017-04-25  Vasiliy Fofanov  <fofanov@adacore.com>
5789         * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
5790         code and some subprogram calls that are now noop.
5792 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
5794         * exp_ch4.adb (Expand_N_Case_Expression): Take
5795         Minimize_Expression_With_Actions into account when possible.
5797 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5799         * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
5800         (Known_Null): Moved to Sem_Util.
5801         * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
5802         (Known_Null): Moved to Sem_Util.
5803         * sem_util.adb Add new enumeration type Null_Status_Kind.
5804         (Known_Non_Null): Moved from Exp_Util. Most of the logic in
5805         this routine is now carried out by Null_Status.
5806         (Known_Null): Moved from Exp_Util. Most of the logic in this routine
5807         is now carried out by Null_Status.
5808         (Null_Status): New routine.
5809         * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
5810         (Known_Null): Moved from Exp_Util.
5812 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5814         * sem_ch6.adb (Analyze_Expression_Function): Do not report an
5815         error on the return type of an expression function that is a
5816         completion, if the type is derived from a generic formal type.
5818 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5820         * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
5821         conversion are those of the target type.
5823 2017-04-25  Bob Duff  <duff@adacore.com>
5825         * a-clrefi.adb: Minor cleanup.
5827 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
5829         * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
5831 2017-04-25  Bob Duff  <duff@adacore.com>
5833         * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
5834         types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
5835         errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
5836         scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
5837         the Internal_Source buffer. This removes the incorrect call to "="
5838         the customer noticed.
5839         Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
5840         eventually need to eliminate them altogether. Or else get rid
5841         of zero-origin addressing.
5843 2017-04-25  Claire Dross  <dross@adacore.com>
5845         * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
5846         function used in GNATprove to know if an expression contains
5847         non-dispatching calls on primitives of a tagged type.
5849 2017-04-25  Bob Duff  <duff@adacore.com>
5851         * rtsfind.adb (Initialize): Initialize
5852         First_Implicit_With. Building the compiler with Normalize_Scalars
5853         and validity checking finds this being used as an uninitialized
5854         variable.
5856 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5858         * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
5859         Add a warning about SPARK mode management. The routine now
5860         saves and restores both the mode and associated pragma.
5861         (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
5862         SPARK mode management. The routine now saves and restores both
5863         the mode and associated pragma.
5864         (Analyze_Object_Contract):
5865         Add a warning about SPARK mode management. The routine
5866         now saves and restores both the mode and associated pragma.
5867         (Analyze_Package_Body_Contract): Add a warning about SPARK mode
5868         management.  The routine now saves and restores both the mode
5869         and associated pragma.  (Analyze_Package_Contract): Add a warning
5870         about SPARK mode management. The routine now saves and restores
5871         both the mode and associated pragma.
5872         (Analyze_Task_Contract):
5873         Add a warning about SPARK mode management. The routine now saves
5874         and restores both the mode and associated pragma.
5875         * expander.adb (Expand): Change the way the Ghost mode is saved
5876         and restored.
5877         * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
5878         saved and restored.
5879         * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
5880         and restored.
5881         * exp_util.adb (Build_DIC_Procedure_Body):
5882         Change the way the Ghost mode is saved and restored.
5883         (Build_DIC_Procedure_Declaration): Change the way the Ghost
5884         mode is saved and restored.
5885         (Build_Invariant_Procedure_Body):
5886         Change the way the Ghost mode is saved and restored.
5887         (Build_Invariant_Procedure_Declaration): Change the way the Ghost
5888         mode is saved and restored.
5889         (Make_Predicate_Call): Change the
5890         way the Ghost mode is saved and restored.
5891         * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
5892         saved and restored.
5893         * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
5894         and its assignment.
5895         (Mark_And_Set_Ghost_Body): Remove parameter
5896         Mode and its assignment.
5897         (Mark_And_Set_Ghost_Completion):
5898         Remove parameter Mode and its assignment.
5899         (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
5900         assignment.
5901         (Mark_And_Set_Ghost_Instantiation): Remove parameter
5902         Mode and its assignment.
5903         (Mark_And_Set_Ghost_Procedure_Call):
5904         Remove parameter Mode and its assignment.
5905         (Set_Ghost_Mode):
5906         Remove parameter Mode and its assignment.
5907         * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
5908         and update the comment on usage.
5909         (Mark_And_Set_Ghost_Body):
5910         Remove parameter Mode and update the comment on usage.
5911         (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
5912         update the comment on usage.
5913         (Mark_And_Set_Ghost_Declaration):
5914         Remove parameter Mode and update the comment on usage.
5915         (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
5916         update the comment on usage.
5917         (Mark_And_Set_Ghost_Procedure_Call):
5918         Remove parameter Mode and update the comment on usage.
5919         (Set_Ghost_Mode): Remove parameter Mode and update the comment
5920         on usage.
5921         * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
5922         types.
5923         * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
5924         of obsolete field SPARK_Mode_Pragma.
5925         (Load_Main_Source): Remove
5926         the assignment of obsolete field SPARK_Mode_Pragma.
5927         (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
5928         * lib-writ.adb (Add_Preprocessing_Dependency): Remove
5929         the assignment of obsolete field SPARK_Mode_Pragma.
5930         (Ensure_System_Dependency): Remove the assignment of obsolete
5931         field SPARK_Mode_Pragma.
5932         * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
5933         mode management. Change the way Ghost and SPARK modes are saved
5934         and restored.
5935         * sem.adb (Analyze): Change the way the Ghost mode is saved
5936         and restored.
5937         * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
5938         Ghost mode is saved and restored.
5939         (Process_Full_View): Change
5940         the way the Ghost mode is saved and restored.
5941         * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
5942         mode is saved and restored.
5943         * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
5944         mode is saved and restored.
5945         (Analyze_Subprogram_Body_Helper):
5946         Change the way the Ghost mode is saved and restored.
5947         * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
5948         Ghost mode is saved and restored.
5949         * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
5950         management. Save the SPARK mode-related data prior to any changes
5951         to the scope stack and contexts. The mode is then reinstalled
5952         before the subunit is analyzed in order to restore the original
5953         view of the subunit.
5954         * sem_ch12.adb (Analyze_Package_Instantiation): Update the
5955         warning on region management.  Change the way the Ghost and
5956         SPARK modes are saved and restored.
5957         (Inline_Instance_Body):
5958         Add a warning about SPARK mode management. Code clean up.
5959         (Analyze_Subprogram_Instantiation): Update the warning on region
5960         management.  Change the way the Ghost and SPARK modes are saved
5961         and restored.
5962         (Instantiate_Package_Body): Update the warning
5963         on region management. Change the way the Ghost and SPARK modes
5964         are saved and restored.
5965         (Instantiate_Subprogram_Body): Update
5966         the warning on region management. Change the way the Ghost and
5967         SPARK modes are saved and restored.
5968         (Set_Instance_Env): Add a
5969         warning about SPARK mode management. Change the way SPARK mode
5970         is saved and restored.
5971         * sem_ch13.adb (Build_Predicate_Functions):
5972         Change the way the Ghost mode is saved and restored.
5973         (Build_Predicate_Function_Declaration): Change the way the Ghost
5974         mode is saved and restored.
5975         * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
5976         mode management. Change the way SPARK mode is saved and restored.
5977         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
5978         Change the way the Ghost mode is saved and restored.
5979         (Analyze_Initial_Condition_In_Decl_Part): Change the way
5980         the Ghost mode is saved and restored.
5981         (Analyze_Pragma):
5982         Change the way the Ghost mode is saved and restored.
5983         (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
5984         Ghost mode is saved and restored.
5985         * sem_util.adb (Install_SPARK_Mode): New routine.
5986         (Restore_SPARK_Mode): New routine.
5987         (Save_SPARK_Mode_And_Set): Removed.
5988         (Set_SPARK_Mode): New routine.
5989         * sem_util.ads (Install_SPARK_Mode): New routine.
5990         (Restore_SPARK_Mode): New routine.
5991         (Save_SPARK_Mode_And_Set): Removed.
5992         (Set_SPARK_Mode): New routine.
5994 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5996         * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
5997         to determine whether a type is declared in a local package that
5998         has not yet been frozen.
5999         * freeze.adb (Freeze_Before): Use new predicate to determine
6000         whether a local package must be installed on the scope stack
6001         in order to evaluate in the proper scope actions generated by
6002         aspect specifications, such as Predicate
6003         * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
6004         using new predicate.
6006 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6008         * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
6009         comparisons between non- scalar expressions expressions because
6010         their values cannot be invalidated.
6011         * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
6012         comment on usage.
6014 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6016         * par_sco.adb: Minor reformatting.
6018 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6020         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
6021         is a type from an unfrozen local package, install package to
6022         complete the analysis of delayed aspects of the type.
6024 2017-04-25  Tristan Gingold  <gingold@adacore.com>
6026         * bingen.adb (System_Version_Control_Used): New variable.
6027         (Resolve_Binder_Options): Set the above variable.
6028         (Gen_Output_File_Ada): Conditionally call Gen_Versions.
6029         (Gen_Elab_Order): Emit blank line before.
6031 2017-04-25  Justin Squirek  <squirek@adacore.com>
6033         * sem_cat.adb (Validate_RT_RAT_Component): Added
6034         an extra check to ignore incomplete types.
6036 2017-04-25  Thomas Quinot  <quinot@adacore.com>
6038         * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
6039         bogus circuitry for the case where Name is Predicate.
6041 2017-04-25  Thomas Quinot  <quinot@adacore.com>
6043         * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
6044         Create SCOs for Predicate aspects in disabled
6045         state initially, to be enabled later on by...
6046         * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
6047         SCO for predicate as enabled.
6049 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6051         * comperr.adb (Compiler_Abort): Remove now obsolete pair of
6052         pragmas Warnings Off / On.
6053         * namet.adb (Finalize): Remove now obsolete pair of pragmas
6054         Warnings Off / On.
6055         * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
6056         * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
6057         consider comparisons between static expressions because their
6058         values cannot be invalidated.
6059         * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
6060         Warnings Off / On.
6061         (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
6062         * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
6064 2017-04-25  Bob Duff  <duff@adacore.com>
6066         * sem_elab.adb (In_Task_Activation): Trace internal calls in
6067         task bodies.
6069 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
6071         * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
6072         typo fixes.
6074 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6076         * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
6077         On/Off to defend against a spurious warning in conditional
6078         compilation.
6079         * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
6080         * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
6081         defend against a spurious warning in conditional compilation.
6082         * output.adb Add a pair of pragma Warnings On/Off to defend
6083         against a spurious warning in conditional compilation.
6084         * sem_eval.adb (Eval_Relational_Op): Major code clean up.
6085         (Fold_General_Op): New routine.
6086         (Fold_Static_Real_Op): New routine.
6087         (Test_Comparison): New routine.
6088         * sem_eval.ads (Test_Comparison): New routine.
6089         * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
6090         (Warn_On_Constant_Valid_Condition): New routine.
6091         (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
6092         to detect a specific case.
6093         * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
6094         * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
6095         to defend against a spurious warning in conditional compilation.
6096         (Tree_Write): Add a pair of pragma Warnings On/Off to defend
6097         against a spurious warning in conditional compilation.
6098         * usage.adb Add a pair of pragma Warnings On/Off to defend
6099         against a spurious warning in conditional compilation.
6101 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
6103         * sinfo.ads, sem_ch13.adb: Update comment.
6105 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6107         * sem_util.adb (Is_Post_State): A reference to a
6108         generic in out parameter is considered a change in the post-state
6109         of a subprogram.
6111 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6113         * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
6114         declaration of a subprogram instance within its wrapper package,
6115         skip over null statements that may result from the rewriting of
6116         ignored pragmas.
6118 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6120         * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
6121         If the type is an unchecked_union, replace the attribute with
6122         a Raise_Program_Error (rather than inserting such before the
6123         attribute reference) to handle properly the case where we are
6124         processing a component of a larger record, and we need to prevent
6125         further expansion for the unchecked union.
6126         (Expand_Attribute_Reference, case 'Write): If the type is
6127         an unchecked_union, check whether enclosing scope is a Write
6128         subprogram. Replace attribute with a Raise_Program_Error if the
6129         discriminants of the unchecked_union type have not default values
6130         because such a use is erroneous..
6132 2017-04-25  Tristan Gingold  <gingold@adacore.com>
6134         * exp_ch9.adb (Expand_N_Task_Type_Declaration):
6135         Add relative_deadline to task record on edf profile.
6136         (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
6137         (Make_Task_Create_Call): Pass relative_deadline value.
6138         * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
6139         * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
6140         (Profile_Info): Add info for GNAT_Ravenscar_EDF.
6141         * sem_prag.adb (Set_Ravenscar_Profile): Handle
6142         GNAT_Ravenscar_EDF (set scheduling policy).
6143         (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
6144         pragma.
6145         (Sig_Flags): Add choice for Pragma_Deadline_Floor.
6146         * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
6147         New names.
6148         (Pragma_Deadline_Floor): New pragma.
6149         * targparm.adb (Get_Target_Parameters): Recognize
6150         GNAT_Ravenscar_EDF profile.
6152 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
6154         * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
6156 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6158         * sem_aux.adb (Nearest_Ancestor): Use original node of type
6159         declaration to locate nearest ancestor, because derived
6160         type declarations for record types are rewritten as record
6161         declarations.
6162         * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
6163         properly derivations that are completions of private types.
6164         (Add_Predicates): If type is private, examine rep. items of full
6165         view, which may include inherited predicates.
6166         (Build_Predicate_Functions): Ditto.
6168 2017-04-25  Javier Miranda  <miranda@adacore.com>
6170         * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
6171         to generate new entities for subtype declarations located in
6172         Expression_With_Action nodes.
6174 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6176         * sem_elab.adb (Check_A_Call): Remove
6177         local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
6178         need for Elaborate_All when SPARK elaboration checks are
6179         required. Update the checks for instances, variables, and calls
6180         to Default_Initial_Condition procedures.
6182 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6184         * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
6185         into a boolean aspect, in analogy with the Ada aspect No_Return.
6187 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6189         * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
6191 2017-04-25  Bob Duff  <duff@adacore.com>
6193         * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
6194         Is_True_Constant for an array variable that is passed to a
6195         foreign function as an 'in' parameter.
6196         * debug.adb: Document -gnatd.q.
6198 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6200         * sem_ch6.adb (Analyze_Expression_Function): If expression function
6201         is completion and return type is an access type do not freeze
6202         designated type: this will be done in the process of freezing
6203         the expression if needed.
6204         (Freeze_Expr_Types): Check whether type is complete before
6205         creating freeze node, to provide a better error message if
6206         reference is premature.
6207         * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
6208         functions created by type derivations.
6210 2017-04-25  Pascal Obry  <obry@adacore.com>
6212         * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
6214 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6216         * sem_res.adb (Resolve_Type_Conversion):
6217         When resolving against any fixed type, set the type of the
6218         operand as universal real when the operand is a multiplication
6219         or a division where both operands are of any fixed type.
6220         (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
6221         placement of an error message by pointing to the operand of a
6222         type conversion rather than the conversion itself.
6224 2017-04-25  Thomas Quinot  <quinot@adacore.com>
6226         * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
6227         Needs_Debug_Info when producing SCOs.
6229 2017-04-25  Thomas Quinot  <quinot@adacore.com>
6231         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
6232         Always pass a null finalization master for a library level named access
6233         type to which a pragme No_Heap_Finalization applies.
6235 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
6237         PR ada/78845
6239         * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
6240         set to A'First(2) and vice versa.
6242 2017-04-25  Yannick Moy  <moy@adacore.com>
6244         * freeze.adb (Freeze_Record_Type): Remove obsolete
6245         rule on volatile tagged record restriction on SPARK code.
6247 2017-04-25  Yannick Moy  <moy@adacore.com>
6249         * sem_prag.adb (minor) Fix SPARK RM reference.
6251 2017-04-25  Yannick Moy  <moy@adacore.com>
6253         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
6254         comment to reflect which entity is chosen as unique entity.
6255         (Unique_Entity): Return full view instead of private spec for
6256         protected type or task type. Fix possible incorrect access when
6257         called on entry.
6259 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
6261         * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
6262         array types only instead of all packed array types.
6264 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6266         * sem_ch6.adb (Conforming_Types): If type of formal as a specified
6267         dimension system, verify that dimensions of both match.
6268         (Check_Conformance): Add error message in case of dimension
6269         mismatch.
6270         * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
6271         predicate.
6273 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
6275         * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
6276         confusing.
6278 2017-04-25  Yannick Moy  <moy@adacore.com>
6280         * sem_util.adb: Minor refactoring.
6281         * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
6283 2017-04-25  Claire Dross  <dross@adacore.com>
6285         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
6286         ultimate alias when accessing overridden operation. Indeed, if the
6287         overridden operation is itself inherited, it won't have any explicit
6288         contract.
6290 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6292         * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
6293         overlap if the two formals have different types, because formally
6294         the corresponding actuals cannot designate the same objects.
6296 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6298         * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
6299         dimensions are present from context, use them.  b) If operand is
6300         a static constant rewritten as a literal, obtain the dimensions
6301         from the original declaration, otherwise use dimensions of type
6302         established from context.
6304 2017-04-25  Yannick Moy  <moy@adacore.com>
6306         * sem_util.adb (Is_Effectively_Volatile): Protect against base type
6307         of array that is private.
6309 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
6311         * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
6312         reformatting.
6314 2017-04-25  Yannick Moy  <moy@adacore.com>
6316         * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
6317         on body.
6319 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6321         * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
6322         the check that recognizes a call to a private overridding and
6323         replaces the called subprogram with its alias.
6325 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6327         * exp_util.adb: Minor reformatting.
6329 2017-04-25  Justin Squirek  <squirek@adacore.com>
6331         * exp_ch3.adb (Freeze_Type): Add condition to always treat
6332         interface types as a partial view of a private type for the
6333         generation of invariant procedure bodies.
6334         * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
6335         Add a condition to get the Corresponding_Record_Type for
6336         concurrent types, add condition to return in the absence of a
6337         class in the pragma, remove call to Replace_Type_References,
6338         and add call to Replace_References.
6339         (Add_Interface_Invariatns),
6340         (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
6341         to including the working type T.
6342         (Add_Own_Invariants): Remove
6343         legacy condition for separate units, remove dispatching for ASIS
6344         and save a copy of the expression in the pragma expression.
6345         (Build_Invariant_Procedure_Body): Default initalize vars,
6346         remove return condition on interfaces, always use the
6347         private type for interfaces, and move the processing of types
6348         until after the processing of invariants for the full view.
6349         (Build_Invariant_Procedure_Declaration): Remove condition
6350         to return if an interface type is encountered and add
6351         condition to convert the formal parameter to its class-wide
6352         counterpart if Work_Typ is abstract.
6353         (Replace_Type): Add call to Remove_Controlling_Arguments.
6354         (Replace_Type_Ref): Remove class-wide dispatching for the current
6355         instance of the type.
6356         (Replace_Type_References): Remove parameter "Derived"
6357         (Remove_Controlling_Arguments): Created in order to removing
6358         the controlliong argument from calls to primitives in the case
6359         of the formal parameter being an class-wide abstract type.
6360         * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
6361         to the change made to Freeze_Type in exp_ch3. Add a condition
6362         to treat interface types as a partial view.
6363         * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
6364         to Build_Invariant_Procedure_Declaration to properly generate a
6365         "partial" invariant procedure when Typ is an interface.
6367 2017-04-25  Bob Duff  <duff@adacore.com>
6369         * a-numeri.ads: Go back to using brackets encoding for the Greek
6370         letter pi.
6372 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6374         * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
6375         (10-15): if derived type T with progenitors is abstract,
6376         and primitive P of this type inherits non-trivial classwide
6377         preconditions from both a parent operation and from an interface
6378         operation, then the inherited operation is abstract if the parent
6379         operation is not null.
6380         * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
6381         with Covered_Interface_Op to yield the actual interface operation
6382         that is implemented by a given inherited operation.
6384 2017-04-25  Javier Miranda  <miranda@adacore.com>
6386         * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
6387         and right operands after performing the validity checks. Required
6388         because validity checks may remove side effects from the operands.
6390 2017-04-25  Javier Miranda  <miranda@adacore.com>
6392         * exp_attr.adb (Attribute_Unrestricted_Access):
6393         Do not disable implicit type conversion.  Required to generate
6394         code that displaces the pointer to reference the secondary
6395         dispatch table.
6397 2017-04-25  Pascal Obry  <obry@adacore.com>
6399         * prj-attr.adb, snames.ads-tmpl: Add package Install's
6400         Required_Artifacts attribute.
6402 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6404         * sem_util.adb (Same_Value): String literals are compile-time
6405         values, and comparing them must use Expr_Value_S.
6407 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6409         * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
6410         dereference is introduced for the object, and the object is
6411         overloaded, do not check whether it is aliased, because it may
6412         include an implicit dereference.
6413         * sem_type.adb (Disambiguate): If two interpretations are access
6414         attribute types with the same designated type keep either of
6415         them and do not report an ambiguity.  A true ambiguity will be
6416         reported elsewhere.
6418 2017-04-25  Bob Duff  <duff@adacore.com>
6420         * a-numeri.ads: Change the encoding of Greek letter Pi from
6421         brackets encoding to UTF-8.  Use pragma Wide_Character_Encoding
6422         to indicate the encoding. We considered using a byte order mark
6423         (BOM), but that causes various trouble (misc software eats the
6424         BOM, if you have a patch with a BOM, then it's not at the start
6425         of the patch, so it's not a BOM, the BOM affects with-ing files,
6426         etc.).
6427         * scng.adb, s-wchcnv.adb: Minor.
6429 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6431         * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
6432 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6434         * sem_ch3.adb (Add_Internal_Interface_Entities): Move
6435         Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
6436         Improve error message on operations that inherit non-conforming
6437         classwide preconditions from ancestor and progenitor.
6438         * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
6439         moved here from sem_ch3.
6440         * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
6441         check given in RM 6.1.1 (17) concerning renamings of overriding
6442         operations that inherits class-wide preconditions from ancestor
6443         or progenitor.
6445 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6447         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
6448         (Build_Adjust_Statements): Code cleanup.
6449         (Build_Finalizer): Update the initialization of
6450         Exceptions_OK.
6451         (Build_Finalize_Statements): Code cleanup.
6452         (Build_Initialize_Statements): Code cleanup.
6453         (Make_Deep_Array_Body): Update the initialization of
6454         Exceptions_OK.
6455         (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
6456         (Process_Object_Declaration): Generate a null exception handler only
6457         when exceptions are allowed.
6458         (Process_Transients_In_Scope): Update the initialization of
6459         Exceptions_OK.
6460         * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
6461         routine.
6462         * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
6463         restrictions when the handler is internally generated and the
6464         mode is warnings.
6466 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6468         * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
6469         enforce legality rule on classwide preconditions inherited from
6470         both an ancestor and a progenitor (RM 6.1.1 (10-13).
6471         * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
6472         subprogram need not be dispatching if it appears in a precondition
6473         for an abstract or null subprogram.
6475 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
6477         * sem_ch10.adb: Minor typo fix.
6479 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
6481         * gcc-interface/Makefile.in: Cleanup VxWorks targets.
6483 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
6485         * fname.adb (Is_Internal_File_Name): Arrange for the slices to
6486         have a length which is a power of 2.
6487         (Is_Predefined_File_Name): Likewise. Adjust comment.
6489 2017-04-25  Bob Duff  <duff@adacore.com>
6491         * exp_aggr.adb (Component_Count): Protect the
6492         arithmetic from attempting to convert a value >= 2**31 to Int,
6493         which would otherwise raise Constraint_Error.
6495 2017-04-25  Bob Duff  <duff@adacore.com>
6497         * opt.ads (Locking_Policy): Fix incorrect documentation. The
6498         first character of the policy name is not unique.
6500 2017-04-25  Bob Duff  <duff@adacore.com>
6502         * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
6503         * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
6504         about this flag not being used. It was already used, and it is
6505         now used more.
6507 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6509         * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
6510         (Ignore_SPARK_Mode_Pragmas): New routine.
6511         (Set_Ignore_SPARK_Mode_Pragmas): New routine.
6512         (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
6513         * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
6514         related entities.
6515         (Ignore_SPARK_Mode_Pragmas): New routine
6516         along with pragma Inline.
6517         (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
6518         * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
6519         Ignore_SPARK_Mode_Pragmas_In_Instance.
6520         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
6521         Save and restore the value of global flag
6522         Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
6523         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
6524         the corresponding spec or the body must ignore all SPARK_Mode
6525         pragmas found within.
6526         (Analyze_Subprogram_Declaration): Mark
6527         the spec when it needs to ignore all SPARK_Mode pragmas found
6528         within to allow the body to infer this property in case it is
6529         instantiated or inlined later.
6530         * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
6531         value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
6532         the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
6533         when the corresponding spec also ignored all SPARK_Mode pragmas
6534         found within.
6535         (Analyze_Package_Declaration): Mark the spec when
6536         it needs to ignore all SPARK_Mode pragmas found within to allow
6537         the body to infer this property in case it is instantiated or
6538         inlined later.
6539         * sem_ch12.adb (Analyze_Formal_Package_Declaration):
6540         Save and restore the value of flag
6541         Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
6542         formal spec when it needs to ignore all SPARK_Mode
6543         pragmas found within to allow the body to infer this
6544         property in case it is instantiated or inlined later.
6545         (Analyze_Package_Instantiation): Save and restore the value
6546         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
6547         the instance spec when it needs to ignore all SPARK_Mode
6548         pragmas found within to allow the body to infer this
6549         property in case it is instantiated or inlined later.
6550         (Analyze_Subprogram_Instantiation): Save and restore the value
6551         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
6552         instance spec and anonymous package when they need to ignore
6553         all SPARK_Mode pragmas found within to allow the body to infer
6554         this property in case it is instantiated or inlined later.
6555         (Instantiate_Package_Body): Save and restore the value of global
6556         flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
6557         global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
6558         corresponding instance spec also ignored all SPARK_Mode pragmas
6559         found within.
6560         (Instantiate_Subprogram_Body): Save and restore the
6561         value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
6562         the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
6563         when the corresponding instance spec also ignored all SPARK_Mode
6564         pragmas found within.
6565         * sem_prag.adb (Analyze_Pragma): Update the reference to
6566         Ignore_Pragma_SPARK_Mode.
6567         * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
6568         all SPARK_Mode pragmas defined within yields mode "off".
6570 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6572         * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
6574 2017-04-25  Bob Duff  <duff@adacore.com>
6576         * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
6577         All_Checks" to avoid generating unnecessary checks.
6578         * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
6579         All_Checks".
6580         * sem.ads: Fix comment.
6581         * expander.ads: Fix comment.
6582         * exp_atag.ads: Fix comment: "Index = 0" should be
6583         "Index >= 0".
6585 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
6587         * s-taprop-linux.adb: Minor editorial fixes.
6589 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
6591         * sem_util.adb (New_Copy_Tree): Put back the declarations of the
6592         hash tables at library level.  Reinstate the NCT_Hash_Tables_Used
6593         variable and set it to True whenever the main hash table is
6594         populated.  Short- circuit the Assoc function if it is false
6595         and add associated guards.
6597 2017-04-25  Olivier Hainque  <hainque@adacore.com>
6599         * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
6600         specs without elaboration code that have an elaboration counter
6601         nevertheless, e.g.  when compiled with -fpreserve-control-flow.
6602         * sem_ch10.adb (Analyze_Compilation_Unit):
6603         Set_Elaboration_Entity_Required when requested to preserve
6604         control flow, to ensure the unit elaboration is materialized at
6605         bind time, resulting in the inclusion of the unit object file
6606         in the executable closure at link time.
6608 2017-04-25  Pierre-Marie de Rodat  <derodat@adacore.com>
6610         * exp_dbug.adb: In Debug_Renaming_Declaration,
6611         when dealing with indexed component, accept to produce a renaming
6612         symbol when the index is an IN parameter or when it is a name
6613         defined in an outer scope.
6615 2017-04-25  Yannick Moy  <moy@adacore.com>
6617         * errout.adb (Error_Msg): Adapt continuation
6618         message in instantiations and inlined bodies for info messages.
6620 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
6622         * fname.adb (Has_Internal_Extension): Add pragma Inline.
6623         Use direct 4-character slice comparisons.
6624         (Has_Prefix): Add
6625         pragma Inline.  (Has_Suffix): Delete.
6626         (Is_Internal_File_Name):
6627         Test Is_Predefined_File_Name first.
6628         (Is_Predefined_File_Name):
6629         Use direct slice comparisons as much as possible and limit all
6630         comparisons to at most 8 characters.
6632 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6634         * checks.adb (Insert_Valid_Check): Code cleanup.
6635         * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
6636         (Expand_Actuals): Generate proper copy-back for a validation
6637         variable when it acts as the argument of a type conversion.
6638         * sem_util.adb (Is_Validation_Variable_Reference): Augment the
6639         predicate to operate on type qualifications.
6641 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6643         * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
6644         Minor reformatting.
6646 2017-04-25  Bob Duff  <duff@adacore.com>
6648         * sem_prag.adb (No_Return): Give an error if the pragma applies
6649         to a body. Specialize the error for the specless body case,
6650         as is done for (e.g.) pragma Convention.
6651         * debug.adb: Add switch -gnatd.J to disable the above legality
6652         checks. This is mainly for use in our test suite, to avoid
6653         rewriting a lot of illegal (but working) code.  It might also
6654         be useful to customers. Under this switch, if a pragma No_Return
6655         applies to a body, and the procedure raises an exception (as it
6656         should), the pragma has no effect. If the procedure does return,
6657         execution is erroneous.
6659 2017-04-25  Bob Duff  <duff@adacore.com>
6661         * exp_ch6.adb (Expand_Actuals): This is the
6662         root of the problem. It took N as an 'in out' parameter, and in
6663         some cases, rewrote N, but then set N to Original_Node(N). So
6664         the node returned in N had no Parent. The caller continued
6665         processing of this orphaned node. In some cases that caused a
6666         crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
6667         and trips over the Empty Parent). The solution is to make N an
6668         'in' parameter.  Instead of rewriting it, return the list of
6669         post-call actions, so the caller can do the rewriting later,
6670         after N has been fully processed.
6671         (Expand_Call_Helper): Move most of Expand_Call here. It has
6672         too many premature 'return' statements, and we want to do the
6673         rewriting on return.
6674         (Insert_Post_Call_Actions): New procedure to insert the post-call
6675         actions in the appropriate place. In the problematic case,
6676         that involves rewriting N as an Expression_With_Actions.
6677         (Expand_Call): Call the new procedures Expand_Call_Helper and
6678         Insert_Post_Call_Actions.
6680 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6682         * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
6683         properly type derived from generic formal types, to handle
6684         properly modified version of ACATS 4.1B B611017.
6686 2017-04-25  Javier Miranda  <miranda@adacore.com>
6688         * exp_unst.adb (Subp_Index): Adding missing
6689         support for renamings and functions that return a constrained
6690         array type (i.e. functions for which the frontend built a
6691         procedure with an extra out parameter).
6693 2017-04-25  Pascal Obry  <obry@adacore.com>
6695         * s-string.adb: Minor code clean-up.
6697 2017-04-25  Bob Duff  <duff@adacore.com>
6699         * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
6700         procedure.
6701         * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
6702         function for Non_Blocking_Wait_Process.
6704 2017-04-25  Bob Duff  <duff@adacore.com>
6706         * prep.adb (Preprocess): Remove incorrect
6707         Assert. Current character can be ASCII.CR.
6709 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6711         * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
6712         convention Stdcall, which has a number of exceptions. Convention
6713         is legal on a component declaration whose type is an anonymous
6714         access to subprogram.
6716 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6718         * sem_ch4.adb: sem_ch4.adb Various reformattings.
6719         (Try_One_Prefix_Interpretation): Use the base type when dealing
6720         with a subtype created for purposes of constraining a private
6721         type with discriminants.
6723 2017-04-25  Javier Miranda  <miranda@adacore.com>
6725         * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
6726         * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
6727         dispatching primitives (Restore_Warnings): Restore warning on
6728         late dispatching primitives (Save_Warnings): Save warning on late
6729         dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
6730         to enable/disable this warning.
6731         (WA_Warnings): Set warning on late dispatching primitives.
6732         * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
6733         that its parent type has a private extension.
6734         * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
6735         New subprogram.
6736         * usage.adb: Document -gnatw.j and -gnatw.J.
6738 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6740         * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
6741         reformatting.
6743 2017-04-25  Bob Duff  <duff@adacore.com>
6745         * binde.adb (Validate): Do not pass dynamic strings
6746         to pragma Assert, because older compilers do not support that.
6748 2017-04-25  Bob Duff  <duff@adacore.com>
6750         * s-fileio.adb (Close): When a temp file is
6751         closed, delete it and clean up its Temp_File_Record immediately,
6752         rather than waiting until later.
6753         (Temp_File_Record): Add File
6754         component, so Close can know which Temp_File_Record corresponds
6755         to the file being closed.
6756         (Delete): Don't delete temp files,
6757         because they are deleted by Close.
6758         (Open): Set the File component
6759         of Temp_File_Record. This requires moving the creation of the
6760         Temp_File_Record to the end, after the AFCB has been created.
6762 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6764         * checks.adb (Insert_Valid_Check): Do not generate
6765         a validity check when inside a generic.
6767 2017-04-25  Yannick Moy  <moy@adacore.com>
6769         * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
6771 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
6773         * snames.ads-tmpl (Snames): More names for detecting predefined
6774         potentially blocking subprograms.
6776 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6778         * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
6779         concerning inheritance of class-wide preconditions do not apply
6780         to postconditions.
6782 2017-04-25  Bob Duff  <duff@adacore.com>
6784         * s-ficobl.ads: Minor comment fix.
6786 2017-04-25  Yannick Moy  <moy@adacore.com>
6788         * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
6789         conversions from float to integer in GNATprove mode.
6790         (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
6791         to call Apply_Type_Conversion_Checks, so that range checks
6792         are properly positioned when needed on conversions, including
6793         when converting from float to integer.  (Determine_Range): In
6794         GNATprove mode, take into account the possibility of conversion
6795         from float to integer.
6796         * sem_res.adb (Resolve_Type_Conversion): Only enforce range
6797         check on conversions from fixed-point to integer, not anymore
6798         on conversions from floating-point to integer, when in GNATprove
6799         mode.
6801 2017-04-25  Yannick Moy  <moy@adacore.com>
6803         * checks.adb (Determine_Range_R): Special case type conversions
6804         from integer to float in order to get bounds in that case too.
6805         * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
6806         mode, for computations involved in interval checking.
6808 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6810         * checks.adb (Insert_Valid_Check): Partially reimplement validity
6811         checks.
6812         * einfo.adb Node36 is now used as Validated_Object.
6813         (Validated_Object): New routine.
6814         (Set_Validated_Object): New routine.
6815         (Write_Field36_Name): Add an entry for Validated_Object.
6816         * einfo.ads Add new attribute Validated_Object along with
6817         usage in entities.
6818         (Validated_Object): New routine along with pragma Inline.
6819         (Set_Validated_Object): New routine along with pragma Inline.
6820         * exp_attr.adb (Make_Range_Test): Add processing for validation
6821         variables to avoid extra reads and copies of the prefix.
6822         * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
6823         variables in order to reflect any changes done in the variable
6824         back into the original object.
6825         * sem_util.adb (Is_Validation_Variable_Reference): New routine.
6826         * sem_util.ads (Is_Validation_Variable_Reference): New routine.
6828 2017-04-25  Steve Baird  <baird@adacore.com>
6830         * exp_ch7.adb (Build_Array_Deep_Procs,
6831         Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
6832         generate Finalize_Address routines for CodePeer.
6834 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6836         * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
6837         Analyze_Pre_Post_Condition, to implement the legality checks
6838         mandated by AI12-0131: Pre'Class shall not be specified for an
6839         overriding primitive subprogram of a tagged type T unless the
6840         Pre'Class aspect is specified for the corresponding primitive
6841         subprogram of some ancestor of T.
6843 2017-04-25  Bob Duff  <duff@adacore.com>
6845         * sem_ch8.adb (Use_One_Type): If a use_type_clause
6846         is redundant, set its Used_Operations to empty. This is only
6847         necessary for use clauses that appear in the parent of a generic
6848         child unit, because those use clauses get reanalyzed when we
6849         instantiate the generic, and we don't want the Used_Operations
6850         carried over from the original context (where it was probably
6851         not redundant).
6853 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6855         * exp_ch6.adb: Minor reformatting.
6857 2017-04-25  Bob Duff  <duff@adacore.com>
6859         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
6860         Use Source_Index (Current_Sem_Unit) to find the correct casing.
6861         * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
6862         (Current_Sem_Unit) to find the correct casing.
6863         * par.adb (Par): Null out Current_Source_File, to ensure that
6864         the above bugs won't rear their ugly heads again.
6866 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6868         * sem_ch8.adb (Find_Type): For an attribute reference
6869         'Class, if prefix type is synchronized and previous errors
6870         have suppressed the creation of the corresponding record type,
6871         create a spurious class-wide for the synchonized type itself,
6872         to catch other misuses of the attribute
6874 2017-04-25  Steve Baird  <baird@adacore.com>
6876         * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
6877         is True, then don't generate the accessibility check for the
6878         tag of a tagged result.
6879         * exp_intr.adb (Expand_Dispatching_Constructor_Call):
6880         if CodePeer_Mode is True, then don't generate the
6881         tag checks for the result of call to an instance of
6882         Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
6883         descendant of" check and the accessibility check).
6885 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6887         * sem_ch13.adb: Code cleanups.
6888         * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
6889         * sem_ch8.ads: Minor comment fix.
6891 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
6893         * exp_ch4.adb (Library_Level_Target): New function.
6894         (Expand_Concatenate): When optimization is enabled, also expand
6895         the operation out-of-line if the concatenation is present within
6896         the expression of the declaration of a library-level object and
6897         not only if it is the expression of the declaration.
6899 2017-04-25  Bob Duff  <duff@adacore.com>
6901         * freeze.adb (Freeze_Object_Declaration): Do
6902         not Remove_Side_Effects if there is a pragma Linker_Section,
6903         because in that case we want static initialization in the
6904         appropriate section.
6906 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
6908         * exp_dbug.adb: Minor rewording and reformatting.
6910 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6912         * sem_attr.adb (Statically_Denotes_Object): New predicate, to
6913         handle the proposed changes to rules concerning potentially
6914         unevaluated expressions, to include selected components that
6915         do not depend on discriminants, and indexed components with
6916         static indices.
6917         * sem_util.adb (Is_Potentially_Unevaluated): Add check for
6918         predicate in quantified expression, and fix bugs in the handling
6919         of case expressions and membership test.
6920         (Analyze_Attribute_Old_Result): use new predicate.
6921         (Analyze_Attribute, case Loop_Entry): ditto.
6923 2017-04-25  Bob Duff  <duff@adacore.com>
6925         * s-secsta.adb (SS_Info): Add a comment
6926         explaining why we don't need to walk all the chunks in order to
6927         compute the total size.
6929 2017-04-25  Bob Duff  <duff@adacore.com>
6931         * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
6932         of the global name buffer to 4*Max_Line_Length.
6934 2017-04-25  Javier Miranda  <miranda@adacore.com>
6936         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
6937         renaming entity for debug information, mark the entity as needing debug
6938         info if it comes from sources.
6940 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6942         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
6943         restriction converning the use of 'Address where the prefix is
6944         of a controlled type.
6946 2017-04-25  Pierre-Marie de Rodat  <derodat@adacore.com>
6948         * exp_dbug.adb: In Debug_Renaming_Declaration,
6949         skip slices that are made redundant by an indexed component
6950         access.
6951         * atree.h: New definition for Original_Node.
6953 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6955         * sem_prag.adb, sem_prag.ads: Minor reformatting.
6957 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6959         * sem_ch3.adb (Check_Entry_Contract): Call
6960         Preanalyze_Spec_Expression so that resolution takes place as well.
6961         * sem_util.adb (Check_Internal_Protected_Use): Reject properly
6962         internal calls that appear in preconditions of protected
6963         operations, in default values for same, and in contract guards
6964         for contract cases in SPARK.
6966 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
6968         * a-numaux.ads: Fix description of a-numaux-darwin
6969         and a-numaux-x86.
6970         (Double): Define to Long_Float.
6971         * a-numaux-vxworks.ads (Double): Likewise.
6972         * a-numaux-darwin.ads
6973         (Double): Likewise.
6974         * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
6975         * a-numaux-x86.ads: Fix package description.
6976         * a-numaux-x86.adb (Is_Nan): Minor tweak.
6977         (Reduce): Adjust and complete description. Call Is_Nan instead of
6978         testing manually. Use an integer temporary to hold rounded value.
6979         * a-numaux-darwin.adb (Reduce): Likewise.
6980         (Is_Nan): New function.
6982 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6984         * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
6985         on analysis of prefix whose type is a current instance of a
6986         synchronized type, but where the prefix itself is an entity that
6987         is an object.
6989 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6991         * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
6992         the identity of callable entities therein, because they have been
6993         properly resolved, and prefixed calls may have been rewritten
6994         as normal calls.
6996 2017-04-25  Patrick Bernardi  <bernardi@adacore.com>
6998         * exp_ch3.adb (Build_Init_Statements): Convert
6999         the expression of the pragma/aspect Secondary_Stack_Size to
7000         internal type System.Parameters.Size_Type before assigning
7001         it to the Secondary_Stack_Size component of the task type's
7002         corresponding record.
7004 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
7006         * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
7007         (etc) optimizations when the type is modular and the offsets
7008         are equal.
7010 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
7012         * s-osinte-freebsd.ads: Minor comment tweaks
7014 2017-04-25  Javier Miranda  <miranda@adacore.com>
7016         * urealp.adb (UR_Write): Reverse previous patch
7017         adding documentation on why we generate multiplications instead
7018         of divisions (needed to avoid expressions whose computation with
7019         large numbers may cause division by 0).
7021 2017-04-25  Bob Duff  <duff@adacore.com>
7023         * erroutc.adb (Set_Specific_Warning_Off,
7024         Set_Warnings_Mode_Off): Use the correct source file for
7025         Stop. Was using Current_Source_File, which is only valid during
7026         parsing. Current_Source_File will have a leftover value from
7027         whatever file happened to be parsed last, because of a with_clause
7028         or something.
7030 2017-04-25  Bob Duff  <duff@adacore.com>
7032         * lib.ads, lib.adb (In_Internal_Unit): New functions similar
7033         to In_Predefined_Unit, but including GNAT units.
7034         * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
7035         with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
7036         because Should_Ignore_Pragma was not working reliably outside
7037         the parser, because Current_Source_File is not valid.
7038         * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
7039         * par-prag.adb: Call Should_Ignore_Pragma_Par.
7041 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
7043         * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
7044         codepeer mode.
7046 2017-04-25  Javier Miranda  <miranda@adacore.com>
7048         * urealp.adb (UR_Write): Fix output of constants with a base other
7049         that 10.
7051 2017-04-25  Justin Squirek  <squirek@adacore.com>
7053         * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
7054         * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
7055         Add extra parameter for Process_Interface_Name.
7056         (Process_Interface_Name): Add parameter for pragma to analyze
7057         corresponding aspect.
7058         * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
7059         from sem_ch13.adb
7061 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
7063         * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
7064         correction.
7066 2017-04-25  Yannick Moy  <moy@adacore.com>
7068         * sem_res.adb (Resolve_Comparison_Op): Do not
7069         attempt evaluation of relational operations inside assertions.
7071 2017-04-25  Justin Squirek  <squirek@adacore.com>
7073         * exp_util.adb (Add_Interface_Invariants):
7074         Restored, code moved back from Build_Invariant_Procedure_Body.
7075         (Add_Parent_Invariants): Restored, code moved back from
7076         Build_Invariant_Procedure_Body.
7077         (Build_Invariant_Procedure_Body):
7078         Remove refactored calls and integrated code from
7079         Add_Parent_Invariants and Add_Interface_Invariants.
7081 2017-04-25  Johannes Kanig  <kanig@adacore.com>
7083         * errout.adb (Output_Messages): Adjust computation of total
7084         errors
7085         * erroutc.adb (Error_Msg): In statistics counts, deal
7086         correctly with informational messages that are not warnings.
7087         * errutil.adb (Finalize): adjust computation of total errors.
7089 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
7091         * terminals.c (__gnat_terminate_pid): New.
7092         * g-exptty.ads (Terminate_Process): New. Update comments.
7094 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7096         * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
7098 2017-04-25  Justin Squirek  <squirek@adacore.com>
7100         * sem_ch3.adb (Analyze_Declarations): Minor
7101         correction to comments, move out large conditional and scope
7102         traversal into a predicate.
7103         (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
7104         logic.
7106 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7108         * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
7109         of prefix whose type is a current instance of a synchronized
7110         type. If the prefix is an object this is an external call (or
7111         requeue) that can only access public operations of the object. The
7112         previous predicate was too restrictive, and did not allow public
7113         protected operations, only task entries.
7115 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7117         * sem_ch5.adb, fname.adb: Minor reformatting.
7119 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7121         * einfo.adb (Is_Anonymous_Access_Type): New routine.
7122         * einfo.ads Update the placement of
7123         E_Anonymous_Access_Subprogram_Type along with all subtypes that
7124         mention the ekind.
7125         (Is_Anonymous_Access_Type): New routine.
7126         * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
7127         master for an access type subject to pragma No_Heap_Finalization.
7128         * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
7129         allocated or deallocated does not finalization actions if the
7130         associated access type is subject to pragma No_Heap_Finalization.
7131         * opt.ads Add new global variable No_Heap_Finalization_Pragma.
7132         * par-prag.adb Pragma No_Heap_Finalization does not need special
7133         processing from the parser.
7134         * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
7135         ??? comments. Use the new predicate Is_Anonymous_Access_Type.
7136         * sem_prag.adb Add an entry in table Sig_Flags for pragma
7137         No_Heap_Finalization.
7138         (Analyze_Pragma): Add processing for
7139         pragma No_Heap_Finalization. Update various error messages to
7140         use Duplication_Error.
7141         * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
7142         * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
7143         and corresponding pragma id.
7145 2017-04-25  Bob Duff  <duff@adacore.com>
7147         * freeze.adb (Freeze_Record_Type): Use the
7148         underlying type of the component type to determine whether it's
7149         elementary. For representation clause purposes, a private type
7150         should behave the same as its full type.
7151         * fname.ads, fname.adb (Is_Predefined_File_Name):
7152         Make sure things like "system.ali" are recognized as predefined.
7154 2017-04-25  Javier Miranda  <miranda@adacore.com>
7156         * debug.adb: Update documentation of -gnatd.6.
7158 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7160         * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
7161         element iterator when the name is an overloaded function call,
7162         one of whose interpretations yields an array.
7164 2017-04-25  Bob Duff  <duff@adacore.com>
7166         * uname.ads, uname.adb (Is_Predefined_Unit_Name,
7167         Is_Internal_Unit_Name): New functions for operating on unit
7168         names, as opposed to file names. There's some duplicated code
7169         with fname.adb, which is unfortunate, but it seems like we don't
7170         want to add dependencies here.
7171         * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
7172         to Is_Predefined_Unit_Name; the former was wrong, because Uname
7173         is not a file name at all.
7174         * fname.ads, fname.adb: Document the fact that
7175         Is_Predefined_File_Name and Is_Internal_File_Name can be called
7176         for ALI files, and fix the code so it works properly for ALI
7177         files. E.g. these should return True for "system.ali".
7179 2017-04-25  Justin Squirek  <squirek@adacore.com>
7181         * exp_util.adb (Add_Invariant): Removed,
7182         code moved to Add_Invariant_Check, Add_Inherited_Invariant,
7183         and Add_Own_Invariant.  (Add_Invariant_Check): Used
7184         for adding runtime checks from any kind of invariant.
7185         (Add_Inherited_Invariant): Generates invariant checks for
7186         class-wide invariants (Add_Interface_Invariants): Removed, code
7187         moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
7188         Create a types own invariant procedure (Add_Parent_Invariants):
7189         Removed, code moved to Build_Invariant_Procedure_Body
7190         (Build_Invariant_Procedure_Body): Add refactored calls
7191         and integrated code from Add_Parent_Invariants and
7192         Add_Interface_Invariants.
7193         (Process_Type): Removed, the
7194         relavant code was inlined into both Add_Own_Invariant and
7195         Add_Inherited_Invariant.
7197 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7199         * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
7200         scn.adb, osint.adb, fname.adb: Minor reformatting.
7202 2017-04-25  Pascal Obry  <obry@adacore.com>
7204         * s-taprop-mingw.adb: Do not check for CloseHandle in
7205         Finalize_TCB.
7207 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7209         * sem_util.adb (Check_Part_Of_Reference):
7210         Continue to examine the context if the reference appears within
7211         an expression function.
7213 2017-04-25  Justin Squirek  <squirek@adacore.com>
7215         * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
7216         and Build_Invariant_Procedure_Declaration.
7217         * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
7218         and Build_Invariant_Procedure_Declaration from exp_ch7
7219         and break-out Is_Untagged_Private_Derivation from
7220         Build_Invariant_Procedure_Body.
7221         (Replace_Type_References):
7222         Append an extra parameter to allow for dispatching replacements
7223         and add the corrasponding logic.
7224         (Type_Invariant): Remove
7225         Replace_Typ_Refs and replace its references with calls to
7226         Replace_Type_References.
7227         * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
7229 2017-04-25  Bob Duff  <duff@adacore.com>
7231         * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
7232         that returns True when appropriate.
7233         * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
7234         when compiling predefined files.
7235         * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
7236         "gnat.adc" should not be considered a predefined file name.
7237         That required (or at least encouraged) a lot of cleanup of global
7238         variable usage. We shouldn't be communicating information via
7239         the global name buffer.
7240         * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
7241         * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
7242         required by the above-mentioned cleanup.
7244 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7246         * osint.adb (Find_File): Handle properly a request for a
7247         configuration file whose name is a directory.
7249 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7251         * sem_attr.adb, sem_ch5.adb: Minor reformatting.
7253 2017-04-25  Bob Duff  <duff@adacore.com>
7255         * types.ads: Minor: Fix '???' comment.
7256         * sem_ch8.adb: Minor comment fix.
7258 2017-04-25  Bob Duff  <duff@adacore.com>
7260         * sem_prag.adb: Remove suspicious uses of Name_Buf.
7261         * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
7262         Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
7263         Add String_To_Name with no side effects.
7265 2017-04-25  Justin Squirek  <squirek@adacore.com>
7267         * sem_ch3.adb (Analyze_Declarations): Add
7268         additional condition for edge case.
7270 2017-04-25  Bob Duff  <duff@adacore.com>
7272         * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
7273         reserved words inside pragmas. This is necessary to allow the
7274         pragma name Interface to be used in pragma Ignore_Pragma.
7275         * par.adb: Minor comment fix.
7277 2017-04-25  Javier Miranda  <miranda@adacore.com>
7279         * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
7280         * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
7281         * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
7282         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
7283         occurrences of RE_Type_Is_Abstract
7285 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7287         * exp_util.adb (Build_Chain): Account for ancestor
7288         subtypes while traversing the derivation chain.
7290 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7292         * sem_attr.adb: minor reformatting.
7294 2017-04-25  Doug Rupp  <rupp@adacore.com>
7296         * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
7298 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7300         * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
7301         the first pass over an assignment statement with target names,
7302         to prevent the generation of subtypes (such as discriminated
7303         record components)that may carry the target name outside of the
7304         tree for the assignment. The subtypes will be generated when
7305         the assignment is reanalyzed in full.
7306         (Analyze_Target_Name): Handle properly class-wide types.
7308 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7310         * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
7311         * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
7312         the purposes of freezing.
7313         * exp_util.adb Update the documentation and structure of the
7314         type map used in class-wide semantics of assertion expressions.
7315         (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
7316         and resolve the triaged expression because all substitutions
7317         refer to the proper entities.  Update the replacement of
7318         references.
7319         (Build_DIC_Procedure_Body): Add formal parameter
7320         For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
7321         are now only processed when freezing occurs.  Build a body only
7322         when one is needed.
7323         (Entity_Hash): Removed.
7324         (Map_Types): New routine.
7325         (Replace_Object_And_Primitive_References): Removed.
7326         (Replace_References): New routine.
7327         (Replace_Type_References): Moved to the library level of Exp_Util.
7328         (Type_Map_Hash): New routine.
7329         (Update_Primitives_Mapping): Update the mapping call.
7330         (Update_Primitives_Mapping_Of_Types): Removed.
7331         * exp_util.ads (Build_DIC_Procedure_Body): Add formal
7332         parameter For_Freeze and update the comment on usage.
7333         (Map_Types): New routine.
7334         (Replace_References): New routine.
7335         (Replace_Type_References): Moved to the library level of Exp_Util.
7336         (Update_Primitives_Mapping_Of_Types): Removed.
7337         * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
7338         properties of the private type to the full view in case the full
7339         view derives from a parent type and inherits a DIC pragma.
7340         * sem_prag.adb (Analyze_Pragma): Guard against a case where a
7341         DIC pragma is placed at the top of a declarative region.
7343 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
7345         * a-tasatt.adb: Complete previous change and use an unsigned
7346         int to avoid overflow checks.
7348 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7350         * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
7351         the error message when the attribute reference is an actual in
7352         a call to a subprogram inherited from a generic formal type with
7353         unknown discriminants, which makes the subprogram and its formal
7354         parameters intrinsic (see RM 6.3.1 (8) and (13)).
7356 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7358         * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
7359         sem_prag.adb: Minor reformatting.
7361 2017-04-25  Bob Duff  <duff@adacore.com>
7363         * sem_attr.adb (Type_Key): Add code in the
7364         recursive Compute_Type_Key to protect against fetching the source
7365         code for Standard, in case a component of the type is declared
7366         in Standard. There was already code to do this for the original
7367         type, but not for its components.
7369 2017-04-25  Javier Miranda  <miranda@adacore.com>
7371         * exp_ch3.adb (Build_Initialization_Call): Handle
7372         subtypes of private types when searching for the underlying full
7373         view of a private type.
7375 2017-04-25  Javier Miranda  <miranda@adacore.com>
7377         * sem_res.adb (Set_Mixed_Mode_Operand): A universal
7378         real conditional expression can appear in a fixed-type context
7379         and must be resolved with that context to facilitate the code
7380         generation to the backend.
7382 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7384         * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
7385         to indicate whether during inline processing, when some unit U1
7386         appears in the context of a unit U2 compiled for instantiation
7387         or inlining purposes, the body of U1 needs to be compiled as well.
7388         * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
7389         context is a package declaration.
7390         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
7391         Analyze_Generic_Package_Declaration): ditto.
7392         * inline.adb (Analyze_Inlined_Bodies): Check
7393         Body_Needed_For_Inlining.
7395 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7397         * par.adb (Current_Assign_Node): Global variable use to record
7398         the presence of a target_name in the right hand side of the
7399         assignment being parsed.
7400         * par-ch4.adb (P_Name): If the name is a target_name, mark the
7401         enclosing assignment node accordingly.
7402         * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
7403         appropriately.
7404         * sem_ch5.adb (Analyze_Assignment): Disable expansion before
7405         analyzing RHS if the statement has target_names.
7406         * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
7407         properly choices that are subtype marks.
7408         * exp_ch5.adb: Code cleanup.
7410 2017-04-25  Bob Duff  <duff@adacore.com>
7412         * s-memory.adb: Add a comment regarding efficiency.
7413         * atree.adb: Fix the assertion, and combine 2 assertions into one,
7414         "the source has an extension if and only if the destination does."
7415         * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
7417 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
7419         * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
7420         conversion.
7422 2017-04-25  Doug Rupp  <rupp@adacore.com>
7424         * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
7425         handling for ppc64-vx7.
7426         * sigtramp-vxworks-target.inc
7427         [SIGTRAMP_BODY]: Add section for ppc64-vx7.
7429 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7431         * ada_get_targ.adb: New file.
7433 2017-04-25  Bob Duff  <duff@adacore.com>
7435         * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
7436         Direct_Val (Right), instead of the incorrect Direct_Val (Left).
7437         (UI_GCD): Remove ??? comment involving possible efficiency
7438         improvements. This just isn't important after all these years.
7439         Also minor cleanup.
7440         * uintp.ads: Minor cleanup.
7442 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7444         * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
7445         Revert previous changes.
7446         * scng.adb: Minor reformatting.
7447         * s-stratt.ads: Fix unbalanced parens in comment.
7449 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7451         * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
7452         Minor reformatting.
7454 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7456         * scng.adb (Scan): Handle '@' appropriately.
7457         * sem_ch5.adb: Code cleanup.
7459 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7461         * freeze.adb (Check_Expression_Function): Do not check for the
7462         use of deferred constants if the freezing of the expression
7463         function is triggered by its generated body, rather than a
7464         premature use.
7466 2017-04-25  Javier Miranda  <miranda@adacore.com>
7468         * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
7469         subtypes of private types when performing the view conversion.
7471 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7473         * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
7474         the purposes of freezing.
7475         * exp_util.adb Update the documentation and structure of the
7476         type map used in class-wide semantics of assertion expressions.
7477         (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
7478         and resolve the triaged expression because all substitutions
7479         refer to the proper entities.  Update the replacement of
7480         references.
7481         (Build_DIC_Procedure_Body): Add formal parameter
7482         For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
7483         are now only processed when freezing occurs.  Build a body only
7484         when one is needed.
7485         (Entity_Hash): Removed.
7486         (Map_Types): New routine.
7487         (Replace_Object_And_Primitive_References): Removed.
7488         (Replace_References): New routine.
7489         (Replace_Type_References): Moved to the library level of Exp_Util.
7490         (Type_Map_Hash): New routine.
7491         (Update_Primitives_Mapping): Update the mapping call.
7492         (Update_Primitives_Mapping_Of_Types): Removed.
7493         * exp_util.ads (Build_DIC_Procedure_Body): Add formal
7494         parameter For_Freeze and update the comment on usage.
7495         (Map_Types): New routine.
7496         (Replace_References): New routine.
7497         (Replace_Type_References): Moved to the library level of Exp_Util.
7498         (Update_Primitives_Mapping_Of_Types): Removed.
7499         * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
7500         properties of the private type to the full view in case the full
7501         view derives from a parent type and inherits a DIC pragma.
7502         * sem_prag.adb (Analyze_Pragma): Guard against a case where a
7503         DIC pragma is placed at the top of a declarative region.
7505 2017-04-25  Tristan Gingold  <gingold@adacore.com>
7507         * s-mmap.ads (Data): Add pragma Inline.
7509 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7511         * checks.adb (Insert_Valid_Check): Do not use
7512         a renaming to alias a volatile name because this will lead to
7513         multiple evaluations of the volatile name. Use a constant to
7514         capture the value instead.
7516 2017-04-25  Doug Rupp  <rupp@adacore.com>
7518         * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
7520 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7522         * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
7523         Add out parameter to indicate to caller that a wrapper must
7524         be constructed for an inherited primitive whose inherited
7525         pre/postcondition has called to overridden primitives.
7526         * freeze.adb (Check_Inherited_Conditions): Build wrapper body
7527         for inherited primitive that requires it.
7528         * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
7529         legal primitive operations and belong to the list of bodies
7530         generated after the freeze point of a type.
7531         * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
7532         of Build_Class_Wide_Expression.
7533         * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
7534         to construct the specification of the wrapper subprogram created
7535         for an inherited operation.
7537 2017-04-25  Bob Duff  <duff@adacore.com>
7539         * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
7540         pthread_mutexattr_setprioceiling): Add new interfaces for these
7541         pthread operations.
7542         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
7543         protocols as appropriate for Locking_Policy 'C' and 'I'.
7544         * s-taprop-posix.adb: Minor reformatting to make it more similar
7545         to s-taprop-linux.adb.
7547 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7549         * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
7550         Handle properly a multi- level derivation involving both renamed
7551         and constrained parent discriminants, when the type to be
7552         constrained has fewer discriminants that the ultimate ancestor.
7554 2017-04-25  Bob Duff  <duff@adacore.com>
7556         * sem_util.adb (Is_Object_Reference): In the
7557         case of N_Explicit_Dereference, return False if it came from a
7558         conditional expression.
7560 2017-04-25  Bob Duff  <duff@adacore.com>
7562         * par-ch4.adb (P_Case_Expression): If a semicolon
7563         is followed by "when", assume that ";" was meant to be ",".
7565 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
7567         * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
7568         fixes.
7570 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7572         * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
7573         loading of an entity.
7574         * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
7575         previously repeated in the analysis.
7576         * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
7577         procedure SPARK_Implicit_Load.  (Analyze_Task_Type_Declaration):
7578         use new procedure SPARK_Implicit_Load.
7579         * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
7580         SPARK_Implicit_Load.
7582 2017-04-25  Javier Miranda  <miranda@adacore.com>
7584         * sem_util.adb (New_Copy_Tree): By default
7585         copying of defining identifiers is prohibited because
7586         this would introduce an entirely new entity into the
7587         tree. This patch introduces an exception to this general
7588         rule: the declaration of constants and variables located in
7589         Expression_With_Action nodes.
7590         (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
7591         (In_Map): New subprogram.
7592         (Visit_Entity): New subprogram.
7593         (Visit_Node): Handle EWA_Level,
7594         EWA_Inner_Scope_Level, and take care of defining entities defined
7595         in Expression_With_Action nodes.
7597 2017-04-25  Thomas Quinot  <quinot@adacore.com>
7599         * exp_ch6.adb: minor comment edit.
7600         * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
7601         procedure specifications that come from source.
7602         * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
7603         Null_Statement attribute.
7604         * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
7605         procedure, generate statement SCO for the generated NULL statement.
7606         * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
7607         parser, if available.
7609 2017-04-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7611         * system-linux-s390.ads: Use Long_Integer'Size to define
7612         Memory_Size.
7614 2017-04-04  Eric Botcazou  <ebotcazou@adacore.com>
7616         * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
7618 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
7620         * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
7621         * g-socket.adb (To_Host_Entry): Fix typo in comment.
7622         * gnat_ugn.texi: Fix typo.
7623         * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
7624         * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
7625         * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
7626         * sem_util.adb (Mark_Coextensions): Likewise.
7627         * sem_util.ads (Available_Full_View_Of_Component): Likewise.
7629 2017-03-28  Andreas Schwab  <schwab@suse.de>
7631         PR ada/80117
7632         * system-linux-aarch64-ilp32.ads: New file.
7633         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
7634         from LIBGNAT_TARGET_PAIRS.
7635         (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
7636         (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
7637         LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
7638         or -mabi=ilp32, resp.
7640 2017-03-14  James Cowgill  <James.Cowgill@imgtec.com>
7642         * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
7644 2017-03-08  Thanassis Tsiodras  <ttsiodras@gmail.com>
7646         PR ada/79903
7647         * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
7649 2017-03-08  Eric Botcazou  <ebotcazou@adacore.com>
7651         PR ada/79945
7652         * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
7654         * system-linux-arm.ads (Default_Bit_Order): Likewise.
7655         * system-linux-mips.ads (Default_Bit_Order): Likewise.
7656         * system-linux-armeb.ads: Delete.
7657         * system-linux-mipsel.ads: Likewise.
7658         * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
7659         (ARM/Linux): Likewise.
7661 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
7663         PR c/79677
7664         * gcc-interface/misc.c (gnat_handle_option): Pass true to
7665         handle_generated_option GENERATED_P.
7667 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
7669         * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
7670         around a justified modular type if it doesn't have the same scalar
7671         storage order as the enclosing record type.
7673 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
7675         * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
7676         of boolean rvalues to function calls.
7678 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
7680         * gcc-interface/utils.c (fold_bit_position): New function.
7681         (rest_of_record_type_compilation): Call it instead of bit_position to
7682         compute the field position and remove the call to remove_conversions.
7683         (compute_related_constant): Factor out the multiplication in both
7684         operands, if any, and streamline the final test.
7686 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
7688         * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
7690 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
7692         * gcc-interface/decl.c: Include demangle.h.
7693         (is_cplusplus_method): Return again true for a primitive operation
7694         only if it is dispatching.  For a subprogram with an interface name,
7695         call the demangler to get the number of C++ parameters and compare it
7696         with the number of Ada parameters.
7698 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
7700         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
7701         there is no end label, put the location of the At_End procedure on
7702         the call to the procedure.
7704 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
7706         * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
7707         value for array types with TYPE_INDEX_TYPE set on their domain type.
7708         * gcc-interface/utils.c (max_size): For operations and expressions, do
7709         not build a new node if the operands have not changed or are missing.
7711 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
7713         * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
7714         argument when recursing on TRUTH_NOT_EXPR.
7716 2017-02-12  John Marino  <gnugcc@marino.st>
7718         * system-freebsd-x86.ads: Rename into...
7719         * system-freebsd.ads: ...this.
7720         (Default_Bit_Order): Define using Standard'Default_Bit_Order.
7721         * gcc-interface/Makefile.in: Support aarch64-freebsd.
7722         (x86-64/FreeBSD): Adjust to above renaming.
7723         (i386/FreeBSD): Likewise.
7725 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
7727         * comperr.adb: Update FSF bug reporting URL.
7729 2017-02-01  Eric Botcazou  <ebotcazou@adacore.com>
7730             Jakub Jelinek  <jakub@redhat.com>
7732         PR ada/79309
7733         * adaint.c (__gnat_killprocesstree): Fix broken string handling.
7735 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
7737         PR lto/79061
7738         * gcc-interface/utils.c (get_global_context): Pass main_input_filename
7739         to build_translation_unit_decl.
7741 2017-01-23  Javier Miranda  <miranda@adacore.com>
7743         * sem_util.adb (New_Copy_Tree): Code cleanup:
7744         removal of the internal map (ie. variable Actual_Map, its
7745         associated local variables, and all the code handling it).
7746         * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
7747         force loading of the System package when processing a task type.
7748         (Analyze_Protected_Type_Declaration): in GNATprove mode force
7749         loading of the System package when processing a protected type.
7750         * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
7751         force loading of the System package when processing compilation
7752         unit with a main-like subprogram.
7753         * frontend.adb (Frontend): remove forced loading of the System
7754         package.
7756 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
7758         * sem_prag.adb (Default_Initial_Condition): If the desired type
7759         declaration is a derived type declaration with discriminants,
7760         it is rewritten as a private type declaration.
7761         * sem_ch13.adb (Replace_Type_References_Generic,
7762         Visible_Component): A discriminated private type with descriminnts
7763         has components that must be rewritten as selected components
7764         if they appear as identifiers in an aspect expression such as
7765         a Default_Initial_Condition.
7766         * sem_util.adb (Defining_Entity): support N_Iterator_Specification
7767         nodes.
7769 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7771         * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
7772         * gnat1drv.adb Generate an empty object file for an ignored
7773         Ghost compilation unit.
7774         * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
7776 2017-01-23  Yannick Moy  <moy@adacore.com>
7778         * sem_ch4.adb (Analyze_Indexed_Component_Form):
7779         Adapt to inlined prefix with string literal subtype.
7780         * inline.adb (Expand_Inlined_Call): Keep unchecked
7781         conversion inside inlined call when formal type is constrained.
7783 2017-01-23  Javier Miranda  <miranda@adacore.com>
7785         * sem_util.adb (New_Copy_Tree): Code cleanup:
7786         removal of global variables. All the global variables, global
7787         functions and tables of this subprogram are now declared locally.
7789 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
7791         * exp_strm.ads: Minor reformatting and typo fixes.
7793 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7795         * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
7796         exp_aggr.adb: Minor reformatting.
7797         * g-diopit.adb: minor grammar/punctuation fix in comment.
7798         * g-byorma.ads: minor fix of unbalanced parens in comment.
7800 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7802         * par.adb: Update the documentation of component Labl.
7803         * par-ch6.adb (P_Return_Statement): Set the expected label of
7804         an extended return statement to Error.
7806 2017-01-23  Tristan Gingold  <gingold@adacore.com>
7808         * s-boustr.ads, s-boustr.adb (Is_Full): New function.
7810 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
7812         * expander.adb: Handle N_Delta_Aggregate.
7814 2017-01-23  Javier Miranda  <miranda@adacore.com>
7816         * exp_ch6.adb (Expand_Call): Improve the code that
7817         checks if some formal of the called subprogram is a class-wide
7818         interface, to handle subtypes of class-wide interfaces.
7820 2017-01-23  Javier Miranda  <miranda@adacore.com>
7822         * checks.adb (Apply_Parameter_Aliasing_Checks):
7823         Remove side effects of the actuals before generating the overlap
7824         check.
7826 2017-01-23  Justin Squirek  <squirek@adacore.com>
7828         * exp_strm.ads, exp_strm.ads
7829         (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
7830         as to avoid getting the underlying type by default.
7831         * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
7832         underlying type in the Iiput and output attribute cases when
7833         building their respective functions.
7835 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
7837         * scng.adb: Minor reformatting of error message.
7839 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
7841         * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
7842         to freeze the return type of an expression funxtion that is a
7843         completion, if the type is a limited view and the non-limited
7844         view is available.
7846 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
7848         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
7849         aggregate construct.
7850         (P_Record_Or_Array_Component_Association): An array aggregate
7851         can start with an Iterated_Component_Association.
7852         * scng.adb: Modify error message on improper use of @ in earlier
7853         versions of the language.
7854         * sinfo.ads: New node kind N_Delta_Aggregate.
7855         * sinfo.adb: An N_Delta_Aggregate has component associations and
7856         an expression.
7857         * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
7858         * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
7859         Create a new index for each one of the choices in the association,
7860         to prevent spurious homonyms in the scope.
7861         (Resolve_Delta_Aggregate): New.
7862         * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
7863         * exp_util.adb (Insert_Actions): Take into account
7864         N_Delta_Aggregate.
7865         * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
7866         * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
7867         and local procedures Expand_Delta_Array_Aggregate and
7868         expand_Delta_Record_Aggregate.
7869         * sprint.adb: Handle N_Delta_Aggregate.
7871 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7873         * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
7874         empty name when the exception declaration is subject to pragma
7875         Discard_Names.
7876         (Null_String): New routine.
7878 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7880         * par-ch9.adb (P_Protected_Definition): Parse
7881         any optional and potentially illegal pragmas which appear in
7882         a protected operation declaration list.
7883         (P_Task_Items): Parse
7884         any optional and potentially illegal pragmas which appear in a
7885         task item list.
7887 2017-01-23  Pascal Obry  <obry@adacore.com>
7889         * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
7890         is needed when a foreign thread call a Win32 API using a thread handle
7891         like GetThreadTimes() for example.
7893 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7895         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
7896         allow an 'Address clause to be specified on a prefix of a
7897         class-wide type.
7899 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7901         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
7902         attribute 'Valid is a renaming of the original expression when
7903         the expression denotes a name. For all other kinds of expression,
7904         use a constant to capture the value.
7905         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
7906         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
7908 2017-01-23  Justin Squirek  <squirek@adacore.com>
7910         * sem_eval.adb (Eval_Integer_Literal): Add special
7911         case to avoid optimizing out check if the literal appears in
7912         an if-expression.
7914 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7916         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
7917         allow an 'Address clause to be specified on a prefix of a
7918         class-wide type.
7920 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7922         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
7923         attribute 'Valid is a renaming of the original expression when
7924         the expression denotes a name. For all other kinds of expression,
7925         use a constant to capture the value.
7926         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
7927         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
7929 2017-01-23  Justin Squirek  <squirek@adacore.com>
7931         * sem_eval.adb (Eval_Integer_Literal): Add special
7932         case to avoid optimizing out check if the literal appears in
7933         an if-expression.
7935 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
7937         * sem_ch4.adb (Try_Primitive_Operations,
7938         Is_Valid_First_Argument_Of): argument is valid if it is a derived
7939         type with unknown discriminants that matches its underlying
7940         record view.
7941         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
7942         expression if its type is derived from a limited type with
7943         unknown discriminants, because the expansion (which is a call)
7944         must be expanded in the enclosing context to add the proper build-
7945         in-place parameters to the call.
7946         * lib.ads, exp_ch9.adb: Minor fixes in comments.
7948 2017-01-23  Yannick Moy  <moy@adacore.com>
7950         * frontend.adb (Frontend): Do not load runtime
7951         unit for GNATprove when parsing failed.
7952         * exp_ch9.adb: minor removal of extra whitespace
7953         * exp_ch6.adb: minor typo in comment
7954         * sem_util.adb: Code cleanup.
7955         * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
7956         * a-ngcefu.adb: minor style fix in whitespace
7958 2017-01-23  Thomas Quinot  <quinot@adacore.com>
7960         * scos.ads: Document usage of 'd' as default SCO kind for
7961         declarations.
7962         * par_sco.adb (Traverse_Declarations_Or_Statements.
7963         Traverse_Degenerate_Subprogram): New supporting routine for expression
7964         functions and null procedures.
7965         (Traverse_Declarations_Or_Statements.Traverse_One): Add
7966         N_Expression_Function to the subprogram case; add required
7967         support for null procedures and expression functions.
7969 2017-01-23  Bob Duff  <duff@adacore.com>
7971         * namet.ads (Bounded_String): Decrease the size of type
7972         Bounded_String to avoid running out of stack space.
7973         * namet.ads (Append): Don't ignore buffer overflow; raise
7974         Program_Error instead.
7976 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7978         * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
7979         sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
7980         reformatting.
7981         * exp_ch9.adb: minor style fix in comment.
7983 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
7985         * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
7986         for a limited record extension with unknown discriminants whose
7987         full view has no discriminants.
7989 2017-01-23  Yannick Moy  <moy@adacore.com>
7991         * exp_spark.adb: Alphabetize with clauses.
7993 2017-01-23  Yannick Moy  <moy@adacore.com>
7995         * sem_util.adb (Has_Enabled_Property): Treat
7996         protected objects and variables differently from other variables.
7998 2017-01-23  Thomas Quinot  <quinot@adacore.com>
8000         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
8001         Split original Ada 95 part off into new subprogram
8002         below. Call that subprogram (instead of proceeding with
8003         AI95-0133 behaviour) if debug switch -gnatd.p is in use.
8004         (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
8005         * debug.adb Document new switch -gnatd.p
8006         * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
8007         record for reverse bit order if an error has already been posted
8008         on the record type.  This avoids generating extraneous "info:"
8009         messages for illegal code.
8011 2017-01-23  Justin Squirek  <squirek@adacore.com>
8013         * sem_ch3.adb (Analyze_Declarations): Correct comments
8014         * freeze.adb (Find_Constant): Add detection of deferred constants
8015         so they are not incorrectly flagged as premature.
8017 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
8019         * scans.ads: New token At_Sign. Remove '@' from list of illegal
8020         characters for future version of the language. '@' is legal name.
8021         * scng.ads, scng.adb (Scan):  Handle '@' appropriately.
8022         * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
8023         denotes a Target_Name.
8024         * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
8025         * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
8026         (Has_Target_Names): New flag on N_Assignment_Statement, to
8027         indicate that RHS has occurrences of N_Target_Name.
8028         * sem.adb: Call Analyze_Target_Name.
8029         * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
8030         (urrent_LHS): Global variable that denotes LHS of assignment,
8031         used in the analysis of Target_Name nodes.
8032         * sem_res.adb (Resolve_Target_Name): New procedure.
8033         * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
8034         N is an assignment statement whose RHS contains occurences of @
8035         that designate the value of the LHS of the assignment. If the
8036         LHS is side-effect free the target names can be replaced with
8037         a copy of the LHS; otherwise the semantics of the assignment
8038         is described in terms of a procedure with an in-out parameter,
8039         and expanded as such.
8040         (Expand_N_Assignment_Statement): Call
8041         Expand_Assign_With_Target_Names when needed.
8042         * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
8043         * sprint.adb: Handle N_Target_Name.
8045 2017-01-23  Eric Botcazou  <ebotcazou@adacore.com>
8047         * checks.adb: Minor fix in comment.
8049 2017-01-23  Philippe Gil  <gil@adacore.com>
8051         * g-debpoo.adb (Do_Report) remove freed chunks from chunks
8052         count in Sort = Memory_Usage or Allocations_Count
8054 2017-01-23  Justin Squirek  <squirek@adacore.com>
8056         * sem_ch3.adb: Code cleanup.
8058 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
8060         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
8061         variables to the local variable section. Update the profile
8062         of various nested routine that previously had visibility
8063         of those globals. One the matching phase has completed,
8064         remove certain classes of clauses which are considered noise.
8065         (Check_Dependency_Clause): Properly detect a match between two
8066         'Result attributes. Update the various post-match cases to use
8067         Is_Already_Matched as this routine now automatically recognizes
8068         a previously matched 'Result attribute.
8069         (Is_Already_Matched): New routine.
8070         (Remove_Extra_Clauses): New routine.
8071         (Report_Extra_Clauses): Remove the detection of ... => null
8072         clauses as this is now done in Remove_Extra_Clauses.
8074 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
8076         * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
8077         report on spurious overlaps between values involving a subtype
8078         with a static predicate, because the expansion of such a subtype
8079         into individual ranges in inhibited in ASIS mode.
8081 2017-01-23  Justin Squirek  <squirek@adacore.com>
8083         * sem_ch3.adb (Analyze_Declarations): Add detection
8084         of an edge case and delay freezing if it is present.
8086 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
8088         * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
8089         sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
8091 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
8093         * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
8094         access-to-subprogram types inherit the convention of the
8095         associated subprogram.  (Set_Profile_Convention): New routine.
8096         * sem_ch6.adb (Check_Conformance): Do not compare the conventions
8097         of the two entities directly, use Conventions_Match to account
8098         for anonymous access-to-subprogram and subprogram types.
8099         (Conventions_Match): New routine.
8101 2017-01-23  Claire Dross  <dross@adacore.com>
8103         * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
8104         which return Universal_Integer, force the overflow check flag for
8105         Length and Range_Length for types as big as Long_Long_Integer.
8107 2017-01-23  Claire Dross  <dross@adacore.com>
8109         * exp_spark.adb (Expand_SPARK_Attribute_Reference):  For
8110         attributes which return Universal_Integer, introduce a conversion
8111         to the expected type with the appropriate check flags set.
8112         * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
8113         base type if the range is null. It may still be invalid if it
8114         is higher than the lower bound. This is checked later in the
8115         context in which the range appears.
8117 2017-01-23  Pierre-Marie de Rodat  <derodat@adacore.com>
8119         * scos.ads: Introduce a constant to represent ignored
8120         dependencies in SCO_Unit_Table_Entry.
8122 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
8124         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
8125         spaces from error messages.
8127 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
8129         * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
8130         subsidiary to Expand_N_Object_ Declaration, to compute a guard on
8131         an object declaration for an array type with a modular index type
8132         with the size of Long_Long_Integer. Special processing is needed
8133         in this case to compute reliably the size of the object, and
8134         eventually  to raise Storage_Error, when wrap-around arithmetic
8135         might compute a meangingless size for the object.
8137 2017-01-23  Justin Squirek  <squirek@adacore.com>
8139         * a-wtenau.adb, par-endh.adb, sem_prag.adb,
8140         sem_type.adb: Code cleanups.
8142 2017-01-23  Bob Duff  <duff@adacore.com>
8144         * sem_res.adb (Resolve_Call): In the part of the code where
8145         it is deciding whether to turn the call into an indexed
8146         component, avoid doing so if the call is to an instance of
8147         Unchecked_Conversion. Otherwise, the compiler turns it into an
8148         indexed component, and resolution of that turns it back into a
8149         function call, and so on, resulting in infinite recursion.
8150         * sem_util.adb (Needs_One_Actual): If the first formal has a
8151         default, then return False.
8153 2017-01-21  Eric Botcazou  <ebotcazou@adacore.com>
8155         * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
8156         optimizations when the type is modular and the offsets are equal.
8158 2017-01-20  Thomas Quinot  <quinot@adacore.com>
8160         * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
8161         message.
8163 2017-01-20  Nicolas Roche  <roche@adacore.com>
8165         * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
8167 2017-01-20  Bob Duff  <duff@adacore.com>
8169         * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
8170         (etc) optimizations when the type is modular.
8172 2017-01-20  Yannick Moy  <moy@adacore.com>
8174         * sem_ch6.adb (Move_Pragmas): move some pragmas,
8175         but copy the SPARK_Mode pragma instead of moving it.
8176         (Build_Subprogram_Declaration): Ensure that the generated spec
8177         and original body share the same SPARK_Pragma aspect/pragma.
8178         * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
8179         procedure to copy SPARK_Mode aspect.
8181 2017-01-20  Bob Duff  <duff@adacore.com>
8183         * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
8184         even in ASIS mode.
8185         * sem_ch13.adb (Resolve_Name): Enable setting the entity to
8186         Empty even in ASIS mode.
8188 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
8190         * exp_ch9.adb: minor style fixes in comments.
8191         * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
8192         relative statement introduces an implicit dependency on
8193         Ada.Real_Time.Clock_Time.
8194         * sem_util.adb: Minor reformatting.
8196 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
8198         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
8199         must be treated as delayed aspect even if the expression is
8200         a literal, because the aspect affects the freezing and the
8201         elaboration of the object to which it applies.
8203 2017-01-20  Tristan Gingold  <gingold@adacore.com>
8205         * s-osinte-vxworks.ads (Interrup_Range): New subtype.
8207 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
8209         * lib-xref.adb (Generate_Reference): Do not warn about the
8210         presence of a pragma Unreferenced if the entity appears as the
8211         actual in a procedure call that does not come from source.
8213 2017-01-20  Pascal Obry  <obry@adacore.com>
8215         * expect.c, terminals.c: Fix some warnings about unused variables.
8216         * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
8217         of the runtime.
8219 2017-01-20  Bob Duff  <duff@adacore.com>
8221         * exp_attr.adb (Constrained): Apply an access check (check that
8222         the prefix is not null) when the prefix denotes an object of an
8223         access type; that is, when there is an implicit dereference.
8225 2017-01-20  Gary Dismukes  <dismukes@adacore.com>
8227         * s-rident.ads (constant Profile_Info): Remove
8228         No_Calendar from GNAT_Extended_Ravenscar restrictions.
8230 2017-01-20  Tristan Gingold  <gingold@adacore.com>
8232         *  s-maccod.ads: Add pragma No_Elaboration_Code_All
8234 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
8236         * ghost.adb (Mark_Ghost_Clause): New routine.
8237         (Prune_Node): Do not prune compilation unit nodes.
8238         (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
8239         This does not touch the node itself, but does prune all its fields.
8240         * ghost.ads (Mark_Ghost_Clause): New routine.
8241         * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
8242         package clause mentions Ghost and non-Ghost packages. Mark a
8243         use package clause as Ghost when it mentions a Ghost package.
8244         (Analyze_Use_Type): Emit an error when a use type clause mentions
8245         Ghost and non-Ghost types. Mark a use type clause as Ghost when
8246         it mentions a Ghost type.
8247         * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
8248         Ghost when it withs a Ghost unit.
8250 2017-01-20  Javier Miranda  <miranda@adacore.com>
8252         * sem_res.adb (Resolve_Call): If a function call
8253         returns a limited view of a type and at the point of the call the
8254         function is not declared in the extended main unit then replace
8255         it with the non-limited view, which must be available. If the
8256         called function is in the extended main unit then no action is
8257         needed since the back-end handles this case.
8259 2017-01-20  Eric Botcazou  <ebotcazou@adacore.com>
8261         * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
8262         (Contains_Subprograms_Refs): ...this.  Adjust comment
8263         for constants.  (Is_Subp_Or_Const_Ref): Rename into...
8264         (Is_Subprogram_Ref): ...this.
8265         (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
8266         Has_Non_Subprograms_Referencer and adjust comment.  Remove
8267         incorrect shortcut for package declarations and bodies.
8269 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
8271         * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
8272         base type differs from that of the completion and the private
8273         subtype is an itype (created for a constraint on an access
8274         type e.g.), set Delayed_Freeze on both to prevent out-of-scope
8275         anomalies in gigi.
8277 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
8279         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8280         When inheriting the SPARK_Mode of a prior expression function,
8281         look at the properly resolved entity rather than the initial
8282         candidate which may denote a homonym.
8284 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
8286         * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
8287         Precondition or Postcondition, and the context is pragma
8288         Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
8289         and suggest the standard names Assertion_Policy /Pre /Post
8290         instead.
8292 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
8294         * sem_ch10.adb, sem_cat.adb: Minor reformatting.
8296 2017-01-20  Javier Miranda  <miranda@adacore.com>
8298         * sem_ch3.adb (Access_Type_Declaration): Protect access to the
8299         Entity attribute.
8300         * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
8301         * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
8302         malformed trees.
8304 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
8306         * sem_ch13.adb (Analyze_Aspect_Specification, case
8307         Dynamic_Predicate): If the entity E is a subtype that inherits
8308         a static predicate for its parent P,, the inherited and the
8309         new predicate combine in the generated predicate function,
8310         and E only has a dynamic predicate.
8312 2017-01-20  Tristan Gingold  <gingold@adacore.com>
8314         * s-boustr.ads, s-boustr.adb: New package.
8315         * Makefile.rtl: Add s-boustr.
8317 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
8319         * inline.adb (Process_Formals): Qualify the
8320         expression of a return statement when it yields a universal type.
8322 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
8324         * freeze.adb (Freeze_All): Freeze the default
8325         expressions of all eligible formal parameters that appear in
8326         entries, entry families, and protected subprograms.
8328 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
8330         * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
8331         for illegal inherited Implicit_Dereference aspects with renamed
8332         discriminants.
8334 2017-01-20  Javier Miranda  <miranda@adacore.com>
8336         * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
8337         * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
8338         * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
8339         (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
8340         Set_Prev, Tree_Read): Adding assertion.
8341         * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
8342         * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
8343         (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
8344         Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
8345         Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
8346         Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
8347         Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
8348         Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
8349         Set_ListN_With_Parent): Adding assertion.
8351 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
8353         * sem_prag.adb (Process_Convention): Diagnose properly a pragma
8354         import that applies to several homograph subprograms. when one
8355         of them is declared by a subprogram body.
8357 2017-01-20  Justin Squirek  <squirek@adacore.com>
8359         * exp_ch6.adb (Expand_Call): Remove optimization
8360         that nulls out calls to null procedures.
8362 2017-01-20  Yannick Moy  <moy@adacore.com>
8364         * inline.adb (Expand_Inlined_Call): Keep more
8365         precise type of actual for inlining whenever possible. In
8366         particular, do not switch to the formal type in GNATprove mode in
8367         some case where the GNAT backend might require it for visibility.
8369 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
8371         * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
8372         aspect Implicit_Dereference can be inherited by a full view if
8373         the partial view has no discriminants, because there is no way
8374         to apply the aspect to the partial view.
8375         (Build_Derived_Record_Type): If derived type renames discriminants
8376         of the parent, the new discriminant inherits the aspect from
8377         the old one.
8378         * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
8379         call through an access discriminant designating a subprogram.
8380         * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
8381         properly a parameterless call through an access discriminant on
8382         the left-hand side of an assignment.
8383         * sem_res.adb (resolve): If an interpreation involves a
8384         discriminant with an implicit dereference and the expression is an
8385         entity, resolution takes place later in the appropriate routine.
8386         * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
8387         access discriminants that designate a subprogram type.
8389 2017-01-20  Pascal Obry  <obry@adacore.com>
8391         * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
8393 2017-01-20  Yannick Moy  <moy@adacore.com>
8395         * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
8396         on implicitly with'ed units in GNATprove mode.
8397         * sinfo.ads (Implicit_With): Document use of flag for implicitly
8398         with'ed units in GNATprove mode.
8400 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
8402         * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
8403         unit Do not report an error on a non-static entity that appears
8404         in the context of a spec expression, such as an aspect expression.
8406 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
8408         * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
8409         (Is_Underlying_Full_View): New routine.
8410         (Set_Is_Underlying_Full_View): New routine.
8411         (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
8412         * einfo.ads Add new attribute Is_Underlying_Full_View.
8413         (Is_Underlying_Full_View): New routine along with pragma Inline.
8414         (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
8415         * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
8416         class-wide types and underlying full views. The first subtype
8417         is used as the working type for all Itypes, not just array base types.
8418         (Build_DIC_Procedure_Declaration): Do not consider
8419         class-wide types and underlying full views. The first subtype
8420         is used as the working type for all Itypes, not just array
8421         base types.
8422         * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
8423         view or an underlying full view without clobbering the attributes
8424         of a previous freeze node.
8425         (Inherit_Freeze_Node): New routine.
8426         * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
8427         full view as such.
8428         (Build_Underlying_Full_View): Mark an underlying full view as such.
8429         * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
8430         full view as such.
8432 2017-01-20  Yannick Moy  <moy@adacore.com>
8434         * sinfo.ads: Document lack of Do_Division_Check flag
8435         on float exponentiation.
8437 2017-01-19  Javier Miranda  <miranda@adacore.com>
8439         * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
8440         identifier attribute of a block-statement node. Required to avoid
8441         assertion failure when building the new containers library.
8443 2017-01-19  Bob Duff  <duff@adacore.com>
8445         * exp_ch3.adb: Update comment.
8447 2017-01-19  Vincent Celier  <celier@adacore.com>
8449         * gprep.adb (Gnatprep): Parse the definition file without
8450         "replace in comments" even when switch -C is used.
8452 2017-01-19  Justin Squirek  <squirek@adacore.com>
8454         * exp_ch9.adb (Is_Pure_Barrier): Create function
8455         Is_Count_Attribute to identify an expansion of the 'Count
8456         attribute.
8458 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
8460         * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
8461         statements within an element iterator loop are only analyzed
8462         agter the loop is rewritten. Within a generic the analysis must
8463         be performed in any case to complete name capture.
8465 2017-01-19  Bob Duff  <duff@adacore.com>
8467         * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
8468         before checking for unrecognized pragmas.
8469         Initialize Pname on its declarations; that's always good style.
8471 2017-01-19  Claire Dross  <dross@adacore.com>
8473         * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
8474         body into the tree for GNATprove by setting its Parent field. The
8475         components invariants of composite types are not checked by
8476         the composite type's invariant procedure in GNATprove mode.
8477         (Build_Invariant_Procedure_Declaration): Semi-insert the
8478         declaration into the tree for GNATprove by setting its Parent
8479         field.
8480         * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
8481         the component invariants to the array type  invariant procedure
8482         so that the procedure can be used to  check the array type
8483         invariants if any.
8484         (Freeze_Record_Type): In GNATprove mode, do
8485         not add the component invariants to the record type  invariant
8486         procedure so that the procedure can be used to  check the record
8487         type invariants if any.
8489 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
8491         * lib-xref-spark_specific.adb: Minor reformatting.
8492         * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
8494 2017-01-19  Javier Miranda  <miranda@adacore.com>
8496         * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
8497         Build_Back_End_Aggregate.
8498         (Generate_Aggregate_For_Derived_Type): Code cleanup.
8499         (Prepend_Stored_Values): Code cleanup.
8501 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
8503         * sem_ch6.adb (Analyze_Expression_Function): Check for an
8504         incomplete return type after attempting to freeze it, so that
8505         other freeze actiona are generated in the proper order.
8507 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
8509         * sem_aggr.adb (Resolve_Aggregate): If the type is a string
8510         type, ie. a type whose component is a character type, and the
8511         aggregate is positional, do not convert into a string literal
8512         if the index type is not an integer type, because the original
8513         type may be required in an enclosing operation.
8515 2017-01-19  Bob Duff  <duff@adacore.com>
8517         * binde.adb, debug.adb: Enable new elaboration order algorithm
8518         by default. -dp switch reverts to the old algorithm.
8520 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
8522         * sem_ch3.adb Add with and use clauses for Exp_Ch7.
8523         (Analyze_Declarations): Create the DIC and Invariant
8524         procedure bodies s after all freezing has taken place.
8525         (Build_Assertion_Bodies): New routine.
8526         * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
8527         and Exp_Util.
8528         (Analyze_Package_Specification): Remove the
8529         generation of the DIC and Invariant procedure bodies. This is
8530         now done by Analyze_Declarations.
8531         * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
8532         procedures are never treated as primitives.
8534 2017-01-19  Yannick Moy  <moy@adacore.com>
8536         * frontend.adb: Analyze inlined bodies and check elaboration
8537         rules in GNATprove mode too.
8538         * sem_elab.adb (Delay_Element): Add Boolean component to save
8539         indication that call is in SPARK code.  (Check_Elab_Calls):
8540         Check elaboration rules in GNATprove mode, and correctly set
8541         the current value of SPARK_Mode.
8542         * lib-xref-spark_specific.adb
8543         (Add_SPARK_Xrefs): Simplify iteration over dereferences.
8545 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
8547         * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
8548         checks on the expression for the high bound of concatenation
8549         when checks are disabled, to suppress warnings about potential
8550         constraint errors in restricted runtimes.
8552 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
8554         * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
8555         representation-to-position function as inlined.
8556         * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
8557         the purity of an internally generated entity if it has been
8558         explicitly marked as pure for optimization purposes.
8559         * exp_aggr.adb: Minor reformatting.
8561 2017-01-19  Javier Miranda  <miranda@adacore.com>
8563         * exp_ch6.adb (Expand_Call): Remove side effects on
8564         actuals that are allocators with qualified expression since the
8565         initialization of the object is performed by means of individual
8566         statements (and hence it must be done before the call).
8568 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
8570         * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
8571         (Build_Derived_Enumeration_Type): If the derived type inherits a
8572         dynamic predicate from its parent, the bounds of the type must
8573         freeze because an explicit constraint is constructed for the
8574         type and the corresponding range is elaborated now.
8576 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
8578         * sem_attr.ads: minor fix of inconsistent casing in comment
8579         * lib-writ.ads: minor align comments in columns
8580         * sem_ch3.adb: Minor reformatting.
8581         * spark_xrefs.ads: minor fix typo in SPARK-related comment
8582         * table.ads: minor style fix in comment
8583         * lib-xref-spark_specific.adb
8584         (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
8585         * sem_ch12.adb: minor whitespace fix
8586         * freeze.adb: Add comment.
8587         * sem_util.adb (Unique_Name): for instances of
8588         generic subprograms ignore the name of the wrapper package.
8590 2017-01-19  Javier Miranda  <miranda@adacore.com>
8592         * exp_aggr.adb (Resolve_Record_Aggregate):
8593         Factorize code needed for aggregates of limited and unlimited
8594         types in a new routine.
8595         (Pass_Aggregate_To_Back_End): New subprogram.
8597 2017-01-19  Yannick Moy  <moy@adacore.com>
8599         * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
8601 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
8603         * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
8604         public, for use elsewhere.
8605         * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
8606         an Inlined_body, recognize a call that uses object notation
8607         and has not been rewritten as a regular call because regular
8608         expansion has not taken place.
8610 2017-01-19  Bob Duff  <duff@adacore.com>
8612         * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
8613         in case of generic formal discrete types, because it causes crashes in
8614         the compiler when built with assertions on.
8616 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
8618         * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
8619         sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
8621 2017-01-19  Bob Duff  <duff@adacore.com>
8623         * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
8624         Increment Warnings_Detected.  It was decrementing, which is
8625         wrong since we just issued a warning message.
8626         * binderr.ads (Errors_Detected, Warnings_Detected): Declare
8627         these variables to be of subtype Nat instead of Int, because
8628         they should never be negative.
8630 2017-01-19  Javier Miranda  <miranda@adacore.com>
8632         * contracts.adb (Build_Postconditions_Procedure): Replace
8633         Generate_C_Code by Modify_Tree_For_C.
8634         * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
8635         Replace Generate_C_Code by Modify_Tree_For_C.
8636         * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
8637         Modify_Tree_For_C.
8638         * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
8639         Generate_C_Code by Modify_Tree_For_C.
8640         * exp_ch4.adb (Expand_Allocator_Expression): Replace
8641         Generate_C_Code by Modify_Tree_For_C.
8642         * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
8643         by Modify_Tree_For_C.
8644         * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
8645         Generate_C_Code by Modify_Tree_For_C.
8646         * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
8647         by Modify_Tree_For_C.
8648         * sinfo.ads (Modify_Tree_For_C): Adding documentation.
8650 2017-01-19  Javier Miranda  <miranda@adacore.com>
8652         * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
8653         subprogram.
8654         (Is_Inlinable_Expression_Function): New subprogram.
8655         * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
8656         to Sem_Util.
8657         (Is_Inlinable_Expression_Function): Moved to Sem_Util.
8659 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
8661         * sem_ch4.adb (Diagnose_Call): Improve error message when a
8662         selected component has a prefix that might be interpreted
8663         as a parameterless function call, but none of the candidate
8664         interpretations is parameterless, and there is a hidden homonym
8665         of the prefix that is a package.
8666         * sem_ch8.adb (Find_Selected_Component): If the prefix might be
8667         interpreted as a parameterless function call and its analysis
8668         fails, do not call Analyze_Selected_Component.
8670 2017-01-19  Steve Baird  <baird@adacore.com>
8672         * sem_util.ads: Add new Use_Full_View Boolean parameter to
8673         Get_Index_Bounds.
8674         * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
8675         calls to a newly-defined Scalar_Range_Of_Right_View function.
8677 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
8679         * gnat1drv.adb: minor fix of unbalanced parens in comment
8680         * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
8681         to visible part of the package to allow re-use in GNATprove.
8682         * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
8683         from repeated code of Traverse_Compilation_Unit.
8684         (Traverse_Declaration_Or_Statement): fixed detection of
8685         generic subprograms and packages; also, iteration over case
8686         statement alternatives rewritten to avoid testing if the first
8687         alternative is present (since it must be present due to Ada
8688         syntax restrictions).
8690 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
8692         * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
8693         returning by reference not just for subprogram body stubs,
8694         but for all subprogram cases.
8695         * sem_util.adb: Code reformatting.
8696         (Requires_Transient_Scope): Update the call to Results_Differ.
8697         (Results_Differ): Update the parameter profile and the associated
8698         comment on usage.
8700 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
8702         * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
8703         identifier nodes that do not come from source, to handle properly
8704         dimensionality check within an inlined body which inclddes both
8705         original operands and rewritten operands. This removes spurious
8706         dimensionality errors in the presence of front-end inlining,
8707         as well as in SPARK mode.
8709 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
8711         PR driver/49726
8712         * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
8714 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8716         * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
8718 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
8720         * doc/gnat_ugn/getting_started_with_gnat.rst,
8721         doc/gnat_ugn/inline_assembler.rst,
8722         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
8723         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
8724         doc/gnat_ugn/about_this_guide.rst,
8725         doc/gnat_ugn/platform_specific_information.rst,
8726         doc/gnat_ugn/example_of_binder_output.rst,
8727         doc/gnat_ugn/gnat_and_program_execution.rst,
8728         doc/gnat_ugn/gnat_utility_programs.rst,
8729         doc/gnat_ugn/the_gnat_compilation_model.rst,
8730         doc/gnat_rm/implementation_defined_attributes.rst,
8731         doc/gnat_rm/compatibility_and_porting_guide.rst,
8732         doc/gnat_rm/standard_library_routines.rst,
8733         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
8734         doc/gnat_rm/implementation_defined_pragmas.rst,
8735         doc/gnat_rm/the_gnat_library.rst,
8736         doc/gnat_rm/obsolescent_features.rst,
8737         doc/gnat_rm/about_this_guide.rst,
8738         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
8739         doc/gnat_rm/implementation_of_ada_2012_features.rst,
8740         doc/gnat_rm/interfacing_to_other_languages.rst,
8741         doc/gnat_rm/implementation_defined_aspects.rst,
8742         doc/gnat_rm.rst: Update documentation.
8743         * gnat_rm.texi, gnat_ugn.texi: Regenerated.
8745 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8747         * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
8748         * scil_ll.adb: Minor style fix in comment.
8749         * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
8750         even if entity is already set, because the node may be renalyzed
8751         after inlining transformations.
8753 2017-01-13  Javier Miranda  <miranda@adacore.com>
8755         * sem_res.adb (Resolve_Call): Do not establish a transient scope
8756         for a call to inlinable expression function (since the call will
8757         be replaced by its returned object).
8758         * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
8759         * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
8760         (Expand_Call): For inlinable expression function call replace the
8761         call by its returned object.
8762         (Is_Inlinable_Expression_Function): New subprogram.
8764 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
8766         * checks.adb: Minor typo fix and reformatting.
8768 2017-01-13  Javier Miranda  <miranda@adacore.com>
8770         * contracts.adb (Contract_Only_Subprograms): Remove formal.
8771         (Copy_Original_Specification): Removed.
8772         (Skip_Contract_Only_Subprogram): Move here checks previously
8773         located in the caller of this routine (to leave the code more clean).
8774         (Build_Contract_Only_Subprogram): Code cleanup.
8775         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
8776         (Get_Contract_Only_Missing_Body_Name): Removed.
8778 2017-01-13  Javier Miranda  <miranda@adacore.com>
8780         * sem_ch6.adb (Cloned_Expression): New subprogram.
8781         (Freeze_Expr_Types): Complete previous patch since the expression
8782         of an expression-function may have iterators and loops with
8783         defining identifiers which, as part of the preanalysis of the
8784         expression, may be left decorated with itypes that will not be
8785         available in the tree passed to the backend.
8787 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8789         * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
8790         conversion to Integer of an expression that is an attribute
8791         reference 'Pos on an enumeration type.
8793 2017-01-13  Bob Duff  <duff@adacore.com>
8795         * atree.ads: Minor comment fix.
8797 2017-01-13  Justin Squirek  <squirek@adacore.com>
8799         * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
8800         calls in accessibility check on return statement.
8802 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
8804         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8805         Ensure that the input body is a subprogram body before trying to
8806         determine whether it denoted an expression function.  Note that
8807         subprogram body stubs cannot denote expression functions.
8809 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
8811         * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
8812         and typo fixes.
8814 2017-01-13  Javier Miranda  <miranda@adacore.com>
8816         * einfo.ads (Component_Bit_Offset): Fix documentation.
8817         * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
8818         on record holes for components with unknown compile-time offsets.
8820 2017-01-13  Bob Duff  <duff@adacore.com>
8822         * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
8823         * g-locfil.ads: Minor comment fix.
8825 2017-01-13  Bob Duff  <duff@adacore.com>
8827         * binde.adb (Elab_New): New elaboration order algorithm
8828         that is expected to cause fewer ABE issues. This is a work in
8829         progress. The new algorithm is currently disabled, and can be
8830         enable by the -dp switch, or by modifying the Do_Old and Do_New
8831         etc. flags and rebuilding. Experimental code is included to
8832         compare the results of the old and new algorithms.
8833         * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
8834         can have multiple of these tables, so the old and new algorithms
8835         can coexist.
8836         * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
8837         parameter of type array. This avoids the global variable, and
8838         allows bounds checking (which is normally defeated by the tables
8839         packages). It also ensures that the Elab_Order is read-only
8840         to Bindgen.
8841         * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
8842         subprograms that need it, as above.
8843         * debug.adb: Document new -dp switch. Modify doc of old -do
8844         switch.
8845         * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
8846         and Bindgen.  Move writing of closure (-R and -Ra switches)
8847         to Binde; that's more convenient.
8849 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8851         * sem_ch6.adb (Analyze_Expression_Function): If the expression
8852         function is a completion, all entities referenced in the
8853         expression are frozen. As a consequence, a reference to an
8854         uncompleted private type from an enclosing scope is illegal.
8856 2017-01-13  Javier Miranda  <miranda@adacore.com>
8858         * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
8859         (Analyze_Subprogram_Body_Helper): At the occurrence of an
8860         expression function declaration that is a completion, its
8861         expression causes freezing (AI12-0103).
8863 2017-01-13  Vadim Godunko  <godunko@adacore.com>
8865         * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
8866         Reference functions of Ada.Containers.Indefinite_Holders.
8868 2017-01-13  Bob Duff  <duff@adacore.com>
8870         * s-os_lib.ads: Minor comment fixes.
8872 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
8874         * exp_ch3.adb (Default_Initialize_Object): Do not default
8875         initialize an object when it is of a task type and restriction
8876         No_Tasking is in effect because the initialization is obsolete.
8877         * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
8878         restriction No_Tasking is in effect.
8879         (Build_Master_Renaming): Do not rename a master when restriction
8880         No_Tasking is in effect.
8882 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8884         * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
8885         the legality of An others clause applies as well to a choice in
8886         an Iterated_component_ association.
8887         (Resolve_Iterated_Component_Association): An others choice
8888         is legal.
8889         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
8890         Iterated_Component_Association is not static.
8892 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
8894         * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
8895         control is passed to the expresion handler before the new mode
8896         is set.
8897         * sem_ch12.adb (Analyze_Package_Instantiation,
8898         Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
8899         in case control is passed to the expresion handler before the
8900         new mode is set.
8902 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
8904         * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
8905         exp_aggr.adb: Minor reformatting.
8907 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
8909         * inline.adb: Minor reformatting and typo fix.
8911 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8913         * sem_util.ads, sem_util.adb (Choice_List): Move function here
8914         from sem_aggr.adb, for use elsewhere.
8915         * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
8916         * sem_aggr.adb (Resolve_Array_Aggregate): Remove
8917         Iterated_Component_Present.
8918         * exp_aggr.adb: Use Choice_List throughout, to handle
8919         Iterated_Component_Associations.
8920         (Gen_Loop): Generate proper loop for an
8921         Iterated_Component_Association: loop variable has the identifier
8922         of the original association. Generate a loop even for a single
8923         component choice, in order to make loop parameter visible in
8924         expression.
8925         (Flatten): An Iterated_Component_Association is not static.
8927 2017-01-13  Yannick Moy  <moy@adacore.com>
8929         * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
8930         float exponentiation for statically known small negative values
8931         is the reciprocal of the exponentiation for the opposite value
8932         of the exponent.
8933         * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
8934         Ensure that the value of float exponentiation for negative values
8935         is the reciprocal of the exponentiation for the opposite value
8936         of the exponent.
8937         * inline.adb (Expand_Inlined_Call): Fix the count
8938         for the number of generated gotos.
8940 2017-01-13  Yannick Moy  <moy@adacore.com>
8942         * inline.adb: Code cleanup.
8943         * sem_util.adb (Is_OK_Volatile_Context): Add
8944         expression in delay statement as OK for volatile context.
8946 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8948         * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
8949         mode a choice that is a subtype with a static predicate is
8950         replaced by the values it covers. This transformation must not
8951         be performed in ASIS mode, to preserve the source for analysis.
8953 2017-01-13  Justin Squirek  <squirek@adacore.com>
8955         * nlists.ads: Correct minor typo.
8957 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
8959         * sem_ch13.adb: Minor reformatting and typo fix.
8961 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8963         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
8964         Iterated_Component_Association is a named association in an
8965         array aggregate.
8966         * sem_aggr.adb (Resolve_Iterated_Component_Association): New
8967         procedure, subsidiary of Resolve_Array_Aggregate, to analyze
8968         and resolve the discrete choices and the expression of the
8969         new construct.
8970         * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
8971         Loop_Actions and Box_Present are attributes of
8972         N_Iterated_Component_Association nodes. Box_Present is always
8973         False in this case.
8974         * sprint.adb (Sprint_Node): An Iterated_Component_Association
8975         has a Discrete_Choices list, as specified in the RM. A
8976         Component_Association for aggregate uses instead a Choices list.
8977         We have to live with this small inconsistency because the new
8978         construct also has a defining identifier, and there is no way
8979         to merge the two node structures.
8981 2017-01-13  Yannick Moy  <moy@adacore.com>
8983         * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
8984         list of pragmas to remove.  Remove pragmas from the list of
8985         statements in the body to inline.
8986         * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
8988 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8990         * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
8991         Analyze_Declarations, to analyze and resolve the expressions of
8992         aspect specifications in the current declarative list, so that
8993         the expressions have proper entity and type info.  This is needed
8994         for ASIS when there is no subsequent expansion to generate this
8995         semantic information.
8996         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
8997         original expression, to suppress cascaded errors when expression
8998         has been constant-folded.
8999         (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
9000         ASIS mode, because there is no subsequent expansion to decorate
9001         the tree.
9003 2017-01-13  Yannick Moy  <moy@adacore.com>
9005         * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
9006         New function to detect when a call may be inlined or not in
9007         GNATprove mode.
9008         (Expand_Inlined_Call): Ensure that a temporary
9009         is always created in the cases where a type conversion may be
9010         needed on an input parameter in GNATprove mode, so that GNATprove
9011         sees the check to perform.
9012         * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
9013         when not applicable due to actual requiring type conversion
9014         with possible check but no temporary value can be copied for
9015         GNATprove to see the check.
9017 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
9019         * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
9020         exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
9021         layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
9022         exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
9023         exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
9024         g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
9025         sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
9026         prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
9027         a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
9028         get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
9029         g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
9030         sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
9031         s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
9032         contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
9033         g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
9034         g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
9035         a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
9036         ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
9037         get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
9038         prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
9039         exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
9040         s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
9041         a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
9042         a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
9043         g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
9044         par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
9045         uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
9046         a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
9047         statements to reflect the new style for case alternatives. Various
9048         code clean up and reformatting.
9050 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
9052         * exp_util.adb: Minor reformatting.
9054 2017-01-13  Yannick Moy  <moy@adacore.com>
9056         * exp_spark.adb: Code cleanup.
9057         * sem_ch9.adb (Analyze_Delay_Until): Resolve
9058         expression so that calls are identified as such inside delay
9059         until.
9061 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
9063         * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
9064         * par-ch3.adb (P_Discrete_Choice_List): An
9065         Iterated_Component_Association is an array aggregate component.
9066         * par-ch4.adb (P_Iterated_Component_Association): New procedure.
9067         (Is_Quantified_Expression): New function that performs a lookahead
9068         to distinguish quantified expressions from iterated component
9069         associations.
9070         (P_Aggregate_Or_Paren_Expr): Recognize iterated component
9071         associations.
9072         (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
9073         * sem.adb (Analyze): Handle Iterated_Component_Association.
9074         * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
9075         component associations.
9076         * sinfo.ads, sinfo.adb: Entries for for
9077         N_Iterated_Component_Association and its fields.
9078         * sprint.adb (Sprint_Node_Actual): Handle
9079         N_Iterated_Component_Association.
9081 2017-01-13  Justin Squirek  <squirek@adacore.com>
9083         * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
9084         of the style check until after preanalysis of acutals.
9086 2017-01-13  Yannick Moy  <moy@adacore.com>
9088         * sem_ch13.adb: Minor reformatting.
9089         * par-ch11.adb: minor style fix in whitespace
9090         * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
9091         reduced to Add_Artificial_ALI_File; style fix in declaration of
9092         Text; grammar fix in comment.
9093         * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
9094         * freeze.adb: Cleanup to pass pragma instead of
9095         expression to call.
9096         * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
9097         replace System'To_Address by equivalent call.
9099 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
9101         * bindusg.adb: Improve usage output for -f switch.
9103 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
9105         * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
9106         Minor reformatting.
9108 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
9110         * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
9111         treat comparisons on strings as legal in a Static_Predicate.
9112         (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
9113         a function call that is the expansion of a string comparison.The
9114         function call is built when compiling the corresponding predicate
9115         function, but the expression has been found legal as a static
9116         predicate during earlier analysis.
9117         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
9118         properly a function call that is the expansion of a string
9119         comparison operation, in order to recover the Static_Predicate
9120         expression and apply it to a static argument when needed.
9122 2017-01-13  Tristan Gingold  <gingold@adacore.com>
9124         * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
9125         (Open_Read): Re-implement using Open_Read_No_Exception.
9126         (Open_Write): Raise exception in case of error.
9127         * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
9128         * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
9129         reaise exception.
9130         * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
9132 2017-01-13  Yannick Moy  <moy@adacore.com>
9134         * checks.adb: Code cleanup.
9136 2017-01-13  Yannick Moy  <moy@adacore.com>
9138         * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
9139         expression instead of unanalyzed aspect expression for checking
9140         the validity of inheriting an operation. Also copy the expression
9141         being passing it to Build_Class_Wide_Expression, as this call
9142         modifies its argument.
9143         * sem_util.ads Fix comment to reference correct function name
9144         New_Copy_Tree.
9146 2017-01-13  Javier Miranda  <miranda@adacore.com>
9148         * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
9149         when we propagate information about the indexes back to the original
9150         indexing mode and the prefix of the index is a function call, do not
9151         remove any parameter from such call.
9153 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
9155         * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
9156         * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
9157         a build-in-place function whose result type is tagged.
9159 2017-01-13  Yannick Moy  <moy@adacore.com>
9161         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
9162         Do not generate a wrapper when the only candidate is a class-wide
9163         subprogram.
9164         (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
9165         inside a generic context.
9167 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
9169         * exp_util.adb (Add_Inherited_Tagged_DIC):
9170         Pass the object parameters of both the parent and the derived
9171         type DIC procedure to the reference replacement circuitry.
9172         (Find_DIC_Type): Modify the circuitry to present the partial
9173         view of a private type in case the private type defines its own
9174         DIC pragma.
9175         (Replace_Object_And_Primitive_References): Add two
9176         optional formal parameters.  Update the comment on usage. Update
9177         the replacement of references to object parameters.
9179 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
9181         * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
9183 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
9185         * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
9186         an out parameter that is a type conversion, independently of th
9187         range check that may apply to the expression of the conversion,
9188         for use in GNATProve.
9190 2017-01-13  Yannick Moy  <moy@adacore.com>
9192         * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
9193         GNATprove_Mode here to Frontend.
9194         * frontend.adb (Frontend): Move the implicit with for System
9195         in GNATprove_Mode here as it ismore correct this way; the old
9196         place only worked by chance, since there were no overloaded names.
9197         * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
9198         * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
9199         four attributes identified in SRM 9(18), add an implicit with
9200         to Ada.Task_Identification.
9201         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
9202         Deal specially with the wrapper introduced for AI05-0071 in GNATprove
9203         mode.
9204         * checks.adb (Apply_Discriminant_Check,
9205         Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
9206         In GNATprove mode, we do not apply the checks, but we still
9207         analyze the expression to possibly issue errors on SPARK
9208         code when a run-time error can be detected at compile time.
9209         (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
9210         in GNATprove mode.
9212 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
9214         * expander.adb (Expand): Add a warning about using return
9215         statements in Ghost management code.
9216         * exp_ch3.adb (Freeze_Type): Add a warning about using return
9217         statements in Ghost management code.
9218         * exp_ch7.adb (Build_Invariant_Procedure_Body,
9219         Build_Invariant_Procedure_Declaration): Add a warning about
9220         using return statements in Ghost management code.
9221         * exp_disp.adb (Make_DT): Add a warning about using return
9222         statements in Ghost management code.
9223         * exp_util.adb (Build_DIC_Procedure_Body,
9224         Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
9225         warning about using return statements in Ghost management code.
9226         * freeze.adb (Freeze_Entity): Add a warning about using return
9227         statements in Ghost management code.
9228         * sem.adb (Analyze, Do_Analyze): Add a warning about using return
9229         statements in Ghost management code.
9230         * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
9231         a warning about using return statements in Ghost management code.
9232         * sem_ch5.adb (Analyze_Assignment): Add a warning about using
9233         return statements in Ghost management code.
9234         * sem_ch6.adb (Analyze_Procedure_Call,
9235         Analyze_Subprogram_Body_Helper): Add a warning about using return
9236         statements in Ghost management code.
9237         * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
9238         using return statements in Ghost management code.
9239         * sem_ch12.adb (Analyze_Package_Instantiation,
9240         Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
9241         Instantiate_Subprogram_Body): Add a warning about using return
9242         statements in Ghost management code.
9243         * sem_ch13.adb (Build_Predicate_Functions,
9244         Build_Predicate_Function_Declarations): Add a warning about
9245         using return statements in Ghost management code.
9246         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
9247         Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
9248         Analyze_Pre_Post_Condition_In_Decl_Part):  Add a warning about
9249         using return statements in Ghost management code.
9251 2017-01-13  Tristan Gingold  <gingold@adacore.com>
9253         * s-mmosin-mingw.adb: Fix pragma import.
9255 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
9257         * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
9258         codepeer mode.
9260 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
9262         * atree.adb (Allocate_Initialize_Node): A newly created node is
9263         no longer marked as Ghost at this level.
9264         (Mark_New_Ghost_Node): New routine.
9265         (New_Copy): Mark the copy as Ghost.
9266         (New_Entity): Mark the entity as Ghost.
9267         (New_Node): Mark the node as Ghost.
9268         * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
9269         apply to unanalyzed entities.
9270         (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
9271         entities.
9272         (Set_Is_Checked_Ghost_Entity): This attribute now
9273         applies to all entities as well as unanalyzed entities.
9274         (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
9275         all entities as well as unanalyzed entities.
9276         * expander.adb Add with and use clauses for Ghost.
9277         (Expand): Install and revert the Ghost region associated with the node
9278         being expanded.
9279         * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
9280         (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
9281         (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
9282         (Expand_Freeze_Record_Type): Remove all Ghost-related code.
9283         (Freeze_Type): Install and revert the Ghost region associated
9284         with the type being frozen.
9285         * exp_ch5.adb Remove with and use clauses for Ghost.
9286         (Expand_N_Assignment_Statement): Remove all Ghost-related code.
9287         * exp_ch6.adb Remove with and use clauses for Ghost.
9288         (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
9289         (Expand_N_Subprogram_Body): Remove all Ghost-related code.
9290         * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
9291         Ghost region of the working type.
9292         (Build_Invariant_Procedure_Declaration): Install and revert
9293         the Ghost region of the working type.
9294         (Expand_N_Package_Body): Remove all Ghost-related code.
9295         * exp_ch8.adb Remove with and use clauses for Ghost.
9296         (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
9297         code.
9298         (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
9299         (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
9300         (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
9301         code.
9302         * exp_ch13.adb Remove with and use clauses for Ghost.
9303         (Expand_N_Freeze_Entity): Remove all Ghost-related code.
9304         * exp_disp.adb (Make_DT): Install and revert the Ghost region of
9305         the tagged type. Move the generation of various entities within
9306         the Ghost region of the type.
9307         * exp_prag.adb Remove with and use clauses for Ghost.
9308         (Expand_Pragma_Check): Remove all Ghost-related code.
9309         (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
9310         (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
9311         (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
9312         * exp_util.adb (Build_DIC_Procedure_Body): Install
9313         and revert the Ghost region of the working types.
9314         (Build_DIC_Procedure_Declaration): Install and revert the
9315         Ghost region of the working type.
9316         (Make_Invariant_Call): Install and revert the Ghost region of the
9317         associated type.
9318         (Make_Predicate_Call): Reimplemented. Install and revert the
9319         Ghost region of the associated type.
9320         * freeze.adb (Freeze_Entity): Install and revert the Ghost region
9321         of the entity being frozen.
9322         (New_Freeze_Node): Removed.
9323         * ghost.adb Remove with and use clauses for Opt.
9324         (Check_Ghost_Completion): Update the parameter profile
9325         and all references to formal parameters.
9326         (Ghost_Entity): Update the comment on usage.
9327         (Install_Ghost_Mode): New routines.
9328         (Is_Ghost_Assignment): New routine.
9329         (Is_Ghost_Declaration): New routine.
9330         (Is_Ghost_Pragma): New routine.
9331         (Is_Ghost_Procedure_Call): New routine.
9332         (Is_Ghost_Renaming): Removed.
9333         (Is_OK_Declaration): Reimplemented.
9334         (Is_OK_Pragma): Reimplemented.
9335         (Is_OK_Statement): Reimplemented.
9336         (Is_Subject_To_Ghost): Update the comment on usage.
9337         (Mark_And_Set_Ghost_Assignment): New routine.
9338         (Mark_And_Set_Ghost_Body): New routine.
9339         (Mark_And_Set_Ghost_Completion): New routine.
9340         (Mark_And_Set_Ghost_Declaration): New routine.
9341         (Mark_And_Set_Ghost_Instantiation): New routine.
9342         (Mark_And_Set_Ghost_Procedure_Call): New routine.
9343         (Mark_Full_View_As_Ghost): Removed.
9344         (Mark_Ghost_Declaration_Or_Body): New routine.
9345         (Mark_Ghost_Pragma): New routine.
9346         (Mark_Ghost_Renaming): New routine.
9347         (Mark_Pragma_As_Ghost): Removed.
9348         (Mark_Renaming_As_Ghost): Removed.
9349         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
9350         (Prune_Node): Freeze nodes no longer need special pruning, they
9351         are processed by the general ignored Ghost code mechanism.
9352         (Restore_Ghost_Mode): New routine.
9353         (Set_Ghost_Mode): Reimplemented.
9354         (Set_Ghost_Mode_From_Entity): Removed.
9355         * ghost.ads Add with and use clauses for Ghost.
9356         (Check_Ghost_Completion): Update the parameter profile
9357         along with the comment on usage.
9358         (Install_Ghost_Mode): New routine.
9359         (Is_Ghost_Assignment): New routine.
9360         (Is_Ghost_Declaration): New routine.
9361         (Is_Ghost_Pragma): New routine.
9362         (Is_Ghost_Procedure_Call): New routine.
9363         (Mark_And_Set_Ghost_Assignment): New routine.
9364         (Mark_And_Set_Ghost_Body): New routine.
9365         (Mark_And_Set_Ghost_Completion): New routine.
9366         (Mark_And_Set_Ghost_Declaration): New routine.
9367         (Mark_And_Set_Ghost_Instantiation): New routine.
9368         (Mark_And_Set_Ghost_Procedure_Call): New routine.
9369         (Mark_Full_View_As_Ghost): Removed.
9370         (Mark_Ghost_Pragma): New routine.
9371         (Mark_Ghost_Renaming): New routine.
9372         (Mark_Pragma_As_Ghost): Removed.
9373         (Mark_Renaming_As_Ghost): Removed.
9374         (Restore_Ghost_Mode): New routine.
9375         (Set_Ghost_Mode): Redefined.
9376         (Set_Ghost_Mode_From_Entity): Removed.
9377         * sem.adb (Analyze): Install and revert the Ghost region of the
9378         node being analyzed.
9379         (Do_Analyze): Change the way a clean Ghost
9380         region is installed and reverted.
9381         * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
9382         all Ghost-related code.
9383         (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
9384         (Analyze_Number_Declaration): Remove all Ghost-related code.
9385         (Analyze_Object_Declaration): Install and revert the Ghost region of
9386         a deferred object declaration's completion.
9387         (Array_Type_Declaration): Remove all Ghost-related code.
9388         (Build_Derived_Type): Update the comment on
9389         the propagation of Ghost attributes from a parent to a derived type.
9390         (Derive_Subprogram): Remove all Ghost-related code.
9391         (Make_Class_Wide_Type): Remove all Ghost-related code.
9392         (Make_Implicit_Base): Remove all Ghost-related code.
9393         (Process_Full_View): Install and revert the Ghost region of
9394         the partial view.  There is no longer need to check the Ghost
9395         completion here.
9396         * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
9397         region of the left hand side.
9398         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
9399         all Ghost-related code.
9400         (Analyze_Expression_Function): Remove all Ghost-related code.
9401         (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
9402         (Analyze_Procedure_Call): Install and revert the Ghost region of
9403         the procedure being called.
9404         (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
9405         region of the spec or body.
9406         (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
9407         (Build_Subprogram_Declaration): Remove all Ghost-related code.
9408         (Find_Corresponding_Spec): Remove all Ghost-related code.
9409         (Process_Formals): Remove all Ghost-related code.
9410         * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
9411         the Ghost region of the spec.
9412         (Analyze_Package_Declaration): Remove all Ghost-related code.
9413         * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
9414         Ghost when it aliases a Ghost entity.
9415         (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
9416         a Ghost entity.
9417         (Analyze_Object_Renaming): Mark a renaming as Ghost when
9418         it aliases a Ghost entity.
9419         (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
9420         a Ghost entity.
9421         (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
9422         aliases a Ghost entity.
9423         * sem_ch11.adb Remove with and use clauses for Ghost.
9424         (Analyze_Exception_Declaration): Remove all Ghost-related code.
9425         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
9426         Ghost-related code.
9427         (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
9428         code.
9429         (Analyze_Package_Instantiation): Install and revert the Ghost region
9430         of the package instantiation.
9431         (Analyze_Subprogram_Instantiation): Install
9432         and revert the Ghost region of the subprogram instantiation.
9433         (Instantiate_Package_Body): Code clean up. Install and revert the
9434         Ghost region of the package body.
9435         (Instantiate_Subprogram_Body): Code clean up. Install and revert the
9436         Ghost region of the subprogram body.
9437         * sem_ch13.adb (Build_Predicate_Functions): Install
9438         and revert the Ghost region of the related type.
9439         (Build_Predicate_Function_Declaration): Code clean up. Install
9440         and rever the Ghost region of the related type.
9441         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
9442         Install and revert the Ghost region of the pragma.
9443         (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
9444         Ghost region of the pragma.
9445         (Analyze_Pragma): Install and revert the Ghost region of various
9446         pragmas.  Mark a pragma as Ghost when it is related to a Ghost entity
9447         or encloses a Ghost entity.
9448         (Analyze_Pre_Post_Condition): Install and revert the Ghost
9449         region of the pragma.
9450         (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
9451         Ghost region of the pragma.
9452         * sem_res.adb (Resolve): Remove all Ghost-related code.
9453         * sem_util.adb (Is_Declaration): Reimplemented.
9454         (Is_Declaration_Other_Than_Renaming): New routine.
9455         * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
9456         * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
9457         (Is_Ghost_Pragma): Removed.
9458         (Is_Ignored_Ghost_Pragma): New routine.
9459         (Set_Is_Checked_Ghost_Pragma): New routine.
9460         (Set_Is_Ghost_Pragma): Removed.
9461         (Set_Is_Ignored_Ghost_Pragma): New routine.
9462         * sinfo.ads: Update the documentation on Ghost mode and
9463         Ghost regions.  New attributes Is_Checked_Ghost_Pragma
9464         and Is_Ignored_Ghost_Pragma along with usages in nodes.
9465         Remove attribute Is_Ghost_Pragma along with usages in nodes.
9466         (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
9467         (Is_Ghost_Pragma): Removed along with pragma Inline.
9468         (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
9469         (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
9470         (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
9471         (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
9473 2017-01-12  Tristan Gingold  <gingold@adacore.com>
9475         * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
9476         s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
9478 2017-01-12  Yannick Moy  <moy@adacore.com>
9480         * errout.adb, errout.ads (Initialize): Factor common treatment
9481         in Reset_Warnings.
9482         (Reset_Warnings): New procedure to reset counts related to warnings.
9483         (Record_Compilation_Errors): New variable to store the presence of an
9484         error, used in gnat2why to allow changing the Warning_Mode.
9485         (Compilation_Errors): Use new variable Record_Compilation_Errors to
9486         store the presence of an error.
9488 2017-01-12  Javier Miranda  <miranda@adacore.com>
9490         * sem_ch13.adb (Analyze_Aspect_Specifications):
9491         For Interrupt_Handler and Attach_ Handler aspects, decorate the
9492         internally built reference to the protected procedure as coming
9493         from sources and force its analysis.
9495 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
9497         * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
9498         inherit predicates if any from the first_subtype of the parent,
9499         not from the anonymous parent type.
9500         * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
9501         predicate is not a static subtype.
9503 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
9505         * freeze.adb (Check_Suspicious_Convention): New procedure
9506         performing a warning check on discriminated record types with
9507         convention C or C++. Factored out of procedure Freeze_Record_Type,
9508         and changed to only apply to base types (to avoid spurious
9509         warnings on subtypes). Minor improvement of warning messages
9510         to refer to discriminated rather than variant record types.
9511         (Freeze_Record_Type): Remove code for performing a suspicious
9512         convention check.
9513         (Freeze_Entity): Only call Freeze_Record_Type
9514         on types that aren't declared within any enclosing generic units
9515         (rather than just excluding the type when the innermost scope
9516         is generic). Call Check_Suspicious_Convention whether or not
9517         the type is declared within a generic unit.
9518         * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
9519         * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
9520         from Sem_Ch8).
9522 2017-01-12  Tristan Gingold  <gingold@adacore.com>
9524         * sysdep.c, adaint.c, rtinit.c, ming32.h:
9525         (__gnat_current_codepage): Renamed from CurrentCodePage
9526         (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
9528 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
9530         * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
9531         quantified expressions, following AI12-050: the loop parameters
9532         of two quantified expressions are conformant if they have the
9533         same identifier.
9535 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
9537         * gcc-interface/Makefile.in: Clean up VxWorks targets.
9539 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
9541         * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
9542         Hnadle properly the attribute reference when it appears as part
9543         of an expression in another loop aspect.
9545 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
9547         * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
9548         subsidiary of Build_Initialization_Call, to complete generation
9549         of predicate checks on discriminants whose (sub)types have
9550         predicates, and to add checks on variants that do not have an
9551         others clause.
9552         * sem_util.adb (Gather_Components): A missing Others alternative is
9553         not an error when the type of the discriminant is a static predicate
9554         (and coverage has been checked when analyzing the case statement). A
9555         runtime check is generated to verify that a given discriminant
9556         satisfies the predicate (RM 3.8.1. (21.1/2)).
9558 2017-01-12  Yannick Moy  <moy@adacore.com>
9560         * gnat1drv.adb (Adjust_Global_Switches): Only
9561         perform checking of exception mechanism when generating code.
9563 2017-01-12  Justin Squirek  <squirek@adacore.com>
9565         * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
9566         Remove handling of access component with invariant.
9567         (Build_Invariant_Procedure_Declaration): Remove return on class
9568         wide type.
9569         * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
9570         conditional exception for component or array so Has_Own_Invariants
9571         flag is not falsly set.
9572         * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
9573         wide type to have no invariant flags.
9575 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
9577         * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
9578         sem_ch13.adb: Minor reformatting.
9580 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
9582         * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
9583         adjustment primitive when the ancestor type was not properly frozen.
9584         (Gen_Assign): Guard against a missing initialization
9585         primitive when the component type was not properly frozen.
9586         (Initialize_Array_Component): Guard against a missing adjustment
9587         primitive when the component type was not properly frozen.
9588         (Initialize_Record_Component): Guard against a missing adjustment
9589         primitive when the component type was not properly frozen.
9590         (Process_Transient_Component_Completion): The transient object may
9591         not be finalized when its associated type was not properly frozen.
9592         * exp_ch3.adb (Build_Assignment): Guard against a missing
9593         adjustment primitive when the component type was not properly frozen.
9594         (Build_Initialization_Call): Guard against a missing
9595         initialization primitive when the associated type was not properly
9596         frozen.
9597         (Expand_N_Object_Declaration): Guard against a missing
9598         adjustment primitive when the base type was not properly frozen.
9599         (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
9600         body when there is no adjustment primitive available. Create an
9601         empty Deep_Finalize body when there is no finalization primitive
9602         available.
9603         * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
9604         missing finalization primitive when the designated type was
9605         not properly frozen.
9606         (Expand_N_Allocator): Guard against a missing initialization primitive
9607         when the designated type was not properly frozen.
9608         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
9609         only when the corresponding adjustment primitive is available.
9610         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
9611         adjustment/finalization statements only when there is an available
9612         primitive to carry out the action.
9613         (Build_Initialize_Statements): Generate the initialization/finalization
9614         statements only when there is an available primitive to carry out the
9615         action.
9616         (Make_Adjust_Call): Do not generate a call when the underlying
9617         type is not present due to a possible missing full view.
9618         (Make_Final_Call): Do not generate a call when the underlying
9619         type is not present due to a possible missing full view.
9620         (Make_Finalize_Address_Stmts): Generate an empty body when the
9621         designated type lacks a finalization primitive.
9622         (Make_Init_Call): Do not generate a call when the underlying type is
9623         not present due to a possible missing full view.
9624         (Process_Component_For_Adjust): Add the adjustment call only when the
9625         corresponding adjustment primitive is available.
9626         (Process_Component_For_Finalize): Add the finalization call only when
9627         the corresponding finalization primitive is available.
9628         (Process_Object_Declaration): Use a null statement to emulate a
9629         missing call to the finalization primitive of the object type.
9630         * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
9631         (Make_Final_Call): Update the comment on usage.
9632         (Make_Init_Call): Update the comment on usage.
9633         * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
9635 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
9637         * einfo.ads: Update documentation of Address_Taken.
9638         * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
9639         [Access_Attribute]): Only consider 'Access/'Unchecked_Access
9640         for subprograms when setting Address_Taken flag.
9642 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
9644         * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
9645         Configurable_Run_Time_Mode off when analysing with'ed predefined
9646         libraries.
9648 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
9650         * sem_prag.adb: Minor reformatting.
9651         * sem_util.adb (Unique_Entity): fix result for
9652         bodies of entry families.
9654 2017-01-12  Justin Squirek  <squirek@adacore.com>
9656         * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
9657         Resolve_Suppressible in the pragma Assertion_Policy case.
9658         (Resolve_Suppressible): Created this function to factor out
9659         common code used to resolve Suppress to either Ignore or Check
9660         * snames.ads-tmpl: Add name for Suppressible.
9662 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
9664         * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
9665         reformatting.
9666         * debug.adb: Minor comment fixes.
9668 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
9670         * sem_util.adb (Unique_Entity): For concurrent
9671         bodies that are defined with stubs and complete a declaration
9672         of a single concurrent object return the entity of an implicit
9673         concurrent type, not the entity of the anonymous concurrent
9674         object.
9675         * debug.adb: -gnatd.J is no longer used.
9676         * make.adb (Globalize): Removed, no longer used.
9677         * sem_ch9.adb: minor typo in comment for entry index
9679 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
9681         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
9682         * exp_ch3.adb (Build_Init_Statements): As part of initialising
9683         the value record of a task, set its _Secondary_Stack_Size field
9684         if present.
9685         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
9686         a _Secondary_Stack_Size field in the value record of
9687         the task if a Secondary_Stack_Size rep item is present.
9688         (Make_Task_Create_Call): Include secondary stack size
9689         parameter. If No_Secondary_Stack restriction is in place, passes
9690         stack size of 0.
9691         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
9692         Secondary_Stack_Size.
9693         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
9694         function to define the overhead of the secondary stack.
9695         * s-tarest.adb (Create_Restricted_Task,
9696         Create_Restricted_Task_Sequential): Functions now include
9697         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
9698         * s-tarest.adb (Create_Restricted_Task,
9699         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
9700         include Secondary_Stack_Size parameter.
9701         (Task_Wrapper): Secondary stack now allocated to the size specified by
9702         the Secondary_Stack_Size parameter in the task's ATCB.
9703         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
9704         Secondary_Stack_Size component.
9705         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
9706         Create_Restricted_Task_Sequential): Function now include
9707         Secondary_Stack_Size parameter.
9708         (Task_Wrapper): Secondary stack now allocated to the size
9709         specified by the Secondary_Stack_Size parameter in the task's
9710         ATCB.
9711         * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
9712         to include Secondary_Stack_Size parameter.
9713         * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
9714         Secondary_Stack_Size aspect, turning the aspect into its corresponding
9715         internal attribute.
9716         (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
9717         * snames.adb-tmpl, snames.ads-tmpl: Added names
9718         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
9719         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
9721 2017-01-12  Yannick Moy  <moy@adacore.com>
9723         * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
9724         subtree.
9726 2017-01-12  Justin Squirek  <squirek@adacore.com>
9728         * exp_attr.adb (Expand_N_Attribute_Reference):
9729         Fix Finalization_Size case by properly resolving the type after
9730         rewritting the node.
9732 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
9734         * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
9735         the tree.
9736         (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
9737         * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
9738         exp_sel.ads: Minor reformatting.
9740 2017-01-12  Justin Squirek  <squirek@adacore.com>
9742         * exp_ch6.adb (Expand_Call): Add guard to prevent
9743         invariant checks from being created for internally generated
9744         subprograms.
9746 2017-01-12  Bob Duff  <duff@adacore.com>
9748         * lib-writ.ads: Remove incorrect comment.
9750 2017-01-12  Javier Miranda  <miranda@adacore.com>
9752         * debug.adb (-gnatd.K): Enable generation of contract-only
9753         procedures in CodePeer mode.
9754         * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
9755         New subprogram.
9756         (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
9757         set.
9758         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
9759         subprogram.
9760         (Get_Contract_Only_Missing_Body_Name): New subprogram.
9761         (Get_Contract_Only_Body): New subprogram.
9762         (Set_Contract_Only_Body): New subprogram.
9763         (Is_Contract_Only_Body): New subprogram.
9764         (Set_Is_Contract_Only_Body): New subprogram.
9765         (SCIL_Nodes): Replace table by hash-table.
9767 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
9769         * exp_ch6.adb: Minor reformatting.
9770         * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
9772 2017-01-12  Bob Duff  <duff@adacore.com>
9774         * binde.adb (Forced): New reason for a dependence.
9775         (Force_Elab_Order): Implementation of the new switch.
9776         * binde.ads: Minor comment fixes.
9777         * bindusg.adb: Add -f switch. Apparently, there was an -f switch
9778         long ago that is no longer supported; removed comment about that.
9779         * opt.ads (Force_Elab_Order_File): Name of file specified for
9780         -f switch.
9781         * switch-b.adb: Parse -f switch.
9783 2017-01-12  Justin Squirek  <squirek@adacore.com>
9785         * exp_ch6.adb (Check_View_Conversion): Created this function
9786         to properly chain calls to check type invariants that may be
9787         present in a subprogram call after the subprogram.
9788         (Expand_Call): Add a conditional to identify when a view conversion
9789         needs to be checked.
9790         * nlists.adb, nlists.ads (Prepend_New): New routine.
9791         (Prepend_New_To): New routine.
9793 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
9795         * sinfo.ads: Minor reformatting.
9797 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
9799         * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
9800         reformatting.
9802 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
9804         * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
9805         variable Definite. Create a local object and pass its 'Access to the
9806         BIP function when the result type is either definite or it does not
9807         require any finalization or secondary stack management.
9809 2017-01-12  Bob Duff  <duff@adacore.com>
9811         * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
9812         exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
9813         frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
9814         par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
9815         sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
9816         sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
9817         sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
9818         sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
9819         Change name to Pragma_Name_Unmapped.
9820         (Pragma_Name_Mapped): Change name to Pragma_Name.
9821         This is because the "mapped" version should be the usual case.
9823 2017-01-09  Hristian Kirtchev  <kirtchev@adacore.com>
9825         * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
9826         Is_Default_Init_Cond_Procedure, and
9827         Has_Inherited_Default_Init_Cond.  Add uses of flags
9828         Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
9829         (Default_Init_Cond_Procedure): Removed.
9830         (DIC_Procedure): New routine.
9831         (Has_Default_Init_Cond): Removed.
9832         (Has_DIC): New routine.
9833         (Has_Inheritable_Invariants): The attribute applies to the base type.
9834         (Has_Inherited_Default_Init_Cond): Removed.
9835         (Has_Inherited_DIC): New routine.
9836         (Has_Inherited_Invariants): The attribute applies to the base type.
9837         (Has_Own_DIC): New routine.
9838         (Has_Own_Invariants): The attribute applies to the base type.
9839         (Is_Default_Init_Cond_Procedure): Removed.
9840         (Is_DIC_Procedure): New routine.
9841         (Set_Default_Init_Cond_Procedure): Removed.
9842         (Set_DIC_Procedure): New routine.
9843         (Set_Has_Default_Init_Cond): Removed.
9844         (Set_Has_Inheritable_Invariants): The attribute applies
9845         to the base type.
9846         (Set_Has_Inherited_Default_Init_Cond): Removed.
9847         (Set_Has_Inherited_DIC): New routine.
9848         (Set_Has_Inherited_Invariants): The attribute applies to the base type.
9849         (Set_Has_Own_DIC): New routine.
9850         (Set_Has_Own_Invariants): The attribute applies to the base type.
9851         (Set_Is_Default_Init_Cond_Procedure): Removed.
9852         (Set_Is_DIC_Procedure): New routine.
9853         (Write_Entity_Flags): Update the output of all flags related to
9854         default initial condition.
9855         * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
9856         of the call to the DIC procedure.
9857         (Freeze_Type): Generate the body of the DIC procedure.
9858         * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
9859         all occurrences of Create_Append with Append_New_To. Do
9860         not generate an invariant procedure for a class-wide type.
9861         The generated body acts as a freeze action of the working type.
9862         (Build_Invariant_Procedure_Declaration): Do not generate an
9863         invariant procedure for a class-wide type.
9864         (Create_Append): Removed.
9865         * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
9866         sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
9867         class-wide pre/postcondition description and data structures from
9868         Sem_Prag.
9869         (Build_Class_Wide_Expression): Moved from Sem_Prag.
9870         (Build_DIC_Call): New routine.
9871         (Build_DIC_Procedure_Body): New routine.
9872         (Build_DIC_Procedure_Declaration): New routine.
9873         (Entity_Hash): Moved from Sem_Prag.
9874         (Find_DIC_Type): New routine.
9875         (Update_Primitives_Mapping): Reimplemented.
9876         (Update_Primitives_Mapping_Of_Types): New routine.
9877         * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
9878         (Build_DIC_Call): New routine.
9879         (Build_DIC_Procedure_Body): New routine.
9880         (Build_DIC_Procedure_Declaration): New routine.
9881         (Update_Primitives_Mapping): Moved from Sem_Prag.
9882         (Update_Primitives_Mapping_Of_Types): New routine.
9883         * nlists.adb (Append_New): New routine.
9884         (Append_New_To): New routine.
9885         * nlists.ads (Append_New): New routine.
9886         (Append_New_To): New routine.
9887         * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
9888         of DIC procedures here. This is now done at the end of the
9889         visible declarations, private declarations, and at the freeze
9890         point of a type.
9891         (Analyze_Private_Extension_Declaration):
9892         A private extension inherits the DIC pragma of a parent type.
9893         (Analyze_Subtype_Declaration): No need to propagate invariant
9894         attributes to a subtype as those apply to the base type.
9895         (Build_Derived_Record_Type): No need to inherit invariants here
9896         as this is now done in Build_Derived_Type.
9897         (Build_Derived_Type): Inherit both the DIC pragma and invariants from
9898         a parent type.
9899         (Process_Full_View): Update the propagation of DIC attributes.
9900         (Propagate_Default_Init_Cond_Attributes): Removed.
9901         * sem_ch7.adb Add with and use clauses for Exp_Util.
9902         (Analyze_Package_Specification): Create the body of the DIC
9903         procedure at the end of the visible and private declarations.
9904         (Preserve_Full_Attributes): Propagate DIC attributes.
9905         * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
9906         DIC attributes.
9907         (Analyze_Task_Type_Declaration): Propagate DIC attributes.
9908         * sem_elab.adb (Check_A_Call): Update the call to
9909         Is_Nontrivial_Default_Init_Cond_Procedure.
9910         * sem_prag.adb Remove the with and use clauses for
9911         GNAT.HTable. Move the handling of class- wide pre/postcondition
9912         description and data structures to Exp_Util.
9913         (Analyze_Pragma): Create the declaration of the DIC procedure. There
9914         is no need to propagate invariant-related attributes at this point
9915         as this is done in Build_Invariant_Procedure_Declaration.
9916         (Build_Class_Wide_Expression): Moved to Exp_Util.
9917         (Entity_Hash): Moved to Exp_Util.
9918         (Update_Primitives_Mapping): Moved to Exp_Util.
9919         * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
9920         (Update_Primitives_Mapping): Moved to Exp_Util.
9921         * sem_util.adb: Remove with and use clauses for Ghost
9922         and Sem_Ch13.
9923         (Build_Default_Init_Cond_Call): Removed.
9924         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
9925         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
9926         (Get_Views): Reimplemented.
9927         (Has_Full_Default_Initialization): Reimplement the section on DIC.
9928         (Inherit_Default_Init_Cond_Procedure): Removed.
9929         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
9930         (Is_Nontrivial_DIC_Procedure): New routine.
9931         (Is_Verifiable_DIC_Pragma): New routine.
9932         (Propagate_DIC_Attributes): New routine.
9933         * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
9934         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
9935         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
9936         (Inherit_Default_Init_Cond_Procedure): Removed.
9937         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
9938         (Is_Nontrivial_DIC_Procedure): New routine.
9939         (Is_Verifiable_DIC_Pragma): New routine.
9940         (Propagate_DIC_Attributes): New routine.
9941         * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
9942         on DIC.
9943         * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
9944         usage in nodes.
9945         (Expression_Copy): New routine along with pragma Inline.
9946         (Set_Expression_Copy): New routine along with pragma Inline.
9948 2017-01-06  Bob Duff  <duff@adacore.com>
9950         * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
9951         "Bind_Main_Program" to "not Bind_For_Library", because otherwise
9952         we won't generate the call to s_stalib_adafinal when the main
9953         is not written in Ada.
9955 2017-01-06  Bob Duff  <duff@adacore.com>
9957         * sem_prag.adb: Minor: remove pragma Warnings.
9959 2017-01-06  Tristan Gingold  <gingold@adacore.com>
9961         * Makefile.rtl: Do not compile s-stchop by default.
9963 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
9965         * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
9966         sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
9967         snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
9968         s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
9969         Reverted previous change for now.
9971 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
9973         * exp_ch3.adb (Build_Initialization_Call): Apply predicate
9974         check to default discriminant value if checks are enabled.
9975         (Build_Assignment): If type of component has static predicate,
9976         apply check to its default value, if any.
9978 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
9980         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
9981         * exp_ch3.adb (Build_Init_Statements): As part of initialising
9982         the value record of a task, set its _Secondary_Stack_Size field
9983         if present.
9984         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
9985         a _Secondary_Stack_Size field in the value record of
9986         the task if a Secondary_Stack_Size rep item is present.
9987         (Make_Task_Create_Call): Include secondary stack size
9988         parameter. If No_Secondary_Stack restriction is in place, passes
9989         stack size of 0.
9990         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
9991         Secondary_Stack_Size.
9992         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
9993         function to define the overhead of the secondary stack.
9994         * s-tarest.adb (Create_Restricted_Task,
9995         Create_Restricted_Task_Sequential): Functions now include
9996         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
9997         * s-tarest.adb (Create_Restricted_Task,
9998         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
9999         now include Secondary_Stack_Size parameter.
10000         (Task_Wrapper):
10001         Secondary stack now allocated to the size specified by the
10002         Secondary_Stack_Size parameter in the task's ATCB.
10003         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
10004         Secondary_Stack_Size component.
10005         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
10006         Create_Restricted_Task_Sequential): Function now include
10007         Secondary_Stack_Size parameter.
10008         (Task_Wrapper): Secondary stack
10009         now allocated to the size specified by the Secondary_Stack_Size
10010         parameter in the task's ATCB.
10011         * sem_ch13.adb (Analyze_Aspect_Specification): Add support
10012         for Secondary_Stack_Size aspect, turning the aspect into its
10013         corresponding internal attribute.
10014         (Analyze_Attribute_Definition):
10015         Process Secondary_Stack_Size attribute.
10016         * snames.adb-tmpl, snames.ads-tmpl: Added names
10017         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
10018         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
10020 2017-01-06  Pascal Obry  <obry@adacore.com>
10022         * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
10023         Sequential_IO and Direct_IO.
10025 2017-01-06  Bob Duff  <duff@adacore.com>
10027         * snames.ads-tmpl (Renamed): New name for the pragma argument.
10028         * par-ch2.adb: Allow the new pragma (with analysis deferred
10029         to Sem_Prag).
10030         * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
10031         Keep a mapping from new pragma names to old names.
10032         * sem_prag.adb: Check legality of pragma Rename_Pragma, and
10033         implement it by calling Map_Pragma_Name.
10034         * checks.adb, contracts.adb, einfo.adb, errout.adb,
10035         * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
10036         * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
10037         * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
10038         * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
10039         * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
10040         * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
10041         as appropriate.
10043 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
10045         * exp_ch9.adb: Minor reformatting.
10047 2017-01-06  Tristan Gingold  <gingold@adacore.com>
10049         * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
10050         * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
10051         (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
10052         (unused).
10053         * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
10054         Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
10055         * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
10056         Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
10058 2017-01-06  Bob Duff  <duff@adacore.com>
10060         * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
10061         dummy implementation of Map_Pragma_Name.
10063 2017-01-06  Tristan Gingold  <gingold@adacore.com>
10065         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
10066         entry_body variable constant.
10067         * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
10068         * s-tpoben.ads (Protected_Entry_Body_Access): Now access
10069         to constant.
10070         * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
10071         now access to constant.
10073 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
10075         * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
10076         reformatting and typo fixes.
10078 2017-01-06  Bob Duff  <duff@adacore.com>
10080         * snames.ads-tmpl: New names for pragma renaming.
10081         * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
10082         * par-prag.adb: Add new pragma name to case statement.
10083         * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
10084         of the pragma.
10085         * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
10086         Dummy implementation of Pragma_Name_Mapped.
10088 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
10090         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
10091         better detect call within an entry_wrapper.
10092         * sem_res.adb (Resolve_Call): A protected call within an
10093         entity_wrapper is analyzed in the context of the protected
10094         object but corresponds to a pre-analysis and is not an access
10095         before elaboration.
10096         * sem_attr.adb: Minor reformatting.
10098 2017-01-06  Justin Squirek  <squirek@adacore.com>
10100         * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
10101         Finalization_Size to allow a prefix of any non-class-wide type.
10102         * sem_attr.ads Modify comment for Finalization_Size to include
10103         definite type use case.
10105 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
10107         * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
10108         on procedures that are wrappers created for entries that have
10109         preconditions.
10110         * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
10111         body is an entry_wrapper, compile it in the context of the
10112         synchronized type, because a precondition may refer to funtions
10113         of the type.
10114         * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
10115         body entity.
10116         * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
10117         within an Entry_Wrapper this is an external call whose target
10118         is the synchronized object that is the actual in the call to
10119         the wrapper.
10121 2017-01-06  Yannick Moy  <moy@adacore.com>
10123         * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
10124         in tree, which means not analyzing the previous prefix if the node has
10125         been rewritten into its prefix.
10127 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
10129         * s-tpobop.adb: Minor reformatting.
10131 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
10133         * checks.adb (Ensure_Valid): Do not generate a validity check
10134         within a generated predicate function, validity checks will have
10135         been applied earlier when required.
10137 2017-01-06  Tristan Gingold  <gingold@adacore.com>
10139         * s-tpoben.ads (Protection_Entries): Add comment and reorder
10140         components for performances.
10141         * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
10142         semantic.
10144 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
10146         * sem_eval.adb (Check_Expression_Against_Static_Predicate):
10147         If expression is compile-time known and obeys a static predicate
10148         it must be labelled as static, to prevent spurious warnings and
10149         run-time errors, e.g. in case statements. This is relevant when
10150         the expression is the result of constant-folding a type conversion
10151         whose expression is a variable with a known static value.
10153 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
10155         * exp_attr.adb, sem_attr.ads: Minor reformatting.
10157 2017-01-06  Justin Squirek  <squirek@adacore.com>
10159         * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
10160         expansion of Finalization_Size attribute.
10161         * sem_attr.adb (Analyze_Attribute): Add entry to check the
10162         semantics of Finalization_Size.
10163         (Eval_Attribute): Add null entry for Finalization_Size.
10164         * sem_attr.ads: Add Finalization_Size to the implementation
10165         dependent attribute list.
10166         * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
10168 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
10170         * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
10171         iterator specification with a serious syntactic error, transform
10172         construct into an infinite loop in order to continue analysis
10173         and prevent a compiler abort.
10175 2017-01-06  Tristan Gingold  <gingold@adacore.com>
10177         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
10178         max_queue_lengths_array if unused.
10180 2017-01-06  Bob Duff  <duff@adacore.com>
10182         * errout.adb (Set_Msg_Text): Protect against out-of-bounds
10183         array access, in case "\" is at the end of Text.
10184         * stylesw.adb (Set_Style_Check_Options): Don't include input
10185         characters in the error message template, because they could
10186         be control characters such as "\", which Errout will try to
10187         interpret.
10189 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
10191         * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
10192         For a private type examine the visible declarations that follow
10193         the partial view, not just the private declarations that follow
10194         the full view.
10196 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
10198         * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
10199         code cleanup.
10201 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
10203         * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
10204         alias of the inherited op is the parent iterator, no need to
10205         examine dispatch table positions which might not be established
10206         yet if type is not frozen.
10207         * sem_disp.adb (Check_Controlling_Formals): The formal of a
10208         predicate function may be a subtype of a tagged type.
10209         * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
10210         of representation items for the completion of a type extension
10211         where a predicate applies to the partial view.
10212         * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
10213         parameter that designates function whose actual receives a
10214         predicate check, to improve warning message when the check will
10215         lead to infinite recursion.
10216         * sem_res.adb (Resolve_Actuals): Pass additional parameter to
10217         Apply_Predicate_Check.
10219 2017-01-06  Tristan Gingold  <gingold@adacore.com>
10221         * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
10222         Gnat_Extended_Ravenscar.
10223         * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
10225 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
10227         * sem_util.ads: Minor typo fix and reformatting.
10229 2017-01-06  Yannick Moy  <moy@adacore.com>
10231         * ghost.adb Minor fixing of references to SPARK RM.
10232         (Check_Ghost_Context): Check whether reference is to a lvalue
10233         before issuing an error about violation of SPARK RM 6.9(13)
10234         when declaration has Ghost policy Check and reference has Ghost
10235         policy Ignore.
10236         * sem_util.adb Minor indentation.
10237         * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
10238         Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
10239         * sem_util.ads (Unique_Defining_Entity): Document the result
10240         for package body stubs.
10242 2017-01-06  Tristan Gingold  <gingold@adacore.com>
10244         * raise-gcc.c (abort): Macro to call Abort_Propagation.
10245         * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
10246         constant.
10247         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
10248         Do not generate the Entry_Max_Queue_Lengths_Array if all default
10249         values.
10250         * exp_util.adb (Corresponding_Runtime_Package): Consider
10251         Max_Queue_Length pragma.
10253 2017-01-06  Justin Squirek  <squirek@adacore.com>
10255         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
10256         Remove declaration generation in the case of
10257         System_Tasking_Protected_Objects_Single_Entry being used,
10258         and add a warning message when this is detected to occur.
10259         (Make_Initialize_Protection): Remove reference pass in the case
10260         of System_Tasking_Protected_Objects_Single_Entry.
10261         * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
10262         * s-tposen.adb (Initialize_Protection_Entry): Remove
10263         Entry_Queue_Max parameter.
10264         * s-tposen.ads: Remove the types use to store the entry queue
10265         maximum.
10266         * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
10268 2017-01-06  Yannick Moy  <moy@adacore.com>
10270         * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
10271         behavior of function, to also accept out of range positions
10272         and raise Constraint_Error in such case, and to copy sloc from
10273         literal if No_Location passed as location.
10274         * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
10275         of functions to raise Constraint_Error in case of value not in
10276         appropriate range.
10278 2017-01-06  Tristan Gingold  <gingold@adacore.com>
10280         * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
10281         Invalidate_Stack_Cache.
10283 2017-01-06  Eric Botcazou  <ebotcazou@adacore.com>
10285         * s-os_lib.adb: Minor fix to the signature of Readlink.
10287 2017-01-06  Javier Miranda  <miranda@adacore.com>
10289         * sem_ch6.adb (Conforming_Types): Handle another
10290         confusion between views in a nested instance with an actual
10291         private type whose full view is not in scope.
10293 2017-01-06  Arnaud Charlet  <charlet@adacore.com>
10295         * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
10296         mark a rewritten if statement as explicit (Comes_From_Source).
10298 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
10300         * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
10302 2017-01-06  Tristan Gingold  <gingold@adacore.com>
10304         * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
10306 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
10308         * sem_case.adb: Minor reformatting.
10310 2017-01-06  Thomas Quinot  <quinot@adacore.com>
10312         * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
10314 2017-01-06  Justin Squirek  <squirek@adacore.com>
10316         * aspects.adb: Register aspect in Canonical_Aspect.
10317         * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
10318         into respective tables.
10319         * einfo.ads, einfo.adb: Add a new attribute for
10320         handling the parameters for Pragma_Max_Entry_Queue
10321         (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
10322         for accessing and setting were added as well.
10323         * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
10324         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
10325         declaration for pramga arguments and store them in the protected
10326         type node.
10327         (Make_Initialize_Protection): Pass a reference to
10328         the Entry_Max_Queue_Lengths_Array in the protected type node to
10329         the runtime.
10330         * rtsfind.adb: Minor grammar fix.
10331         * rtsfind.ads: Register new types taken from the
10332         runtime libraries RE_Protected_Entry_Queue_Max and
10333         RE_Protected_Entry_Queue_Max_Array
10334         * s-tposen.adb, s-tpoben.adb
10335         (Initialize_Protection_Entry/Initialize_Protection_Entries):
10336         Add extra parameter and add assignment to local object.
10337         * s-tposen.ads, s-tpoben.ads: Add new types to
10338         store entry queue maximums and a field to the entry object record.
10339         * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
10340         for Aspect_Max_Queue_Length.
10341         (Check_Aspect_At_Freeze_Point):
10342         Add aspect to list of aspects that don't require delayed analysis.
10343         * sem_prag.adb (Analyze_Pragma): Add case statement for
10344         Pragma_Max_Queue_Length, check semantics, and register arugments
10345         in the respective entry nodes.
10346         * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
10347         and Has_Max_Queue_Length
10348         * snames.ads-tmpl: Add constant for the new aspect-name
10349         Name_Max_Queue_Length and corrasponding pragma.
10351 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
10353         * exp_util.adb (Is_Controlled_Function_Call):
10354         Reimplemented. Consider any node which has an entity as the
10355         function call may appear in various ways.
10357 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
10359         * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
10360         an unchecked type conversion when performing a view conversion
10361         to/from a private type. In all other cases use a regular type
10362         conversion to ensure that any relevant checks are properly
10363         installed.
10365 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
10367         * sem_prag.adb, sem_ch8.adb: Minor reformatting.
10369 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
10371         * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
10372         error on case expression that is an entity, when coverage is
10373         incomplete and entity has a static value obtained by local
10374         propagation.
10375         (Handle_Static_Predicate): New procedure, subsidiary of
10376         Check_Choices, to handle case alternatives that are either
10377         subtype names or subtype indications involving subtypes that
10378         have static predicates.
10380 2017-01-06  Thomas Quinot  <quinot@adacore.com>
10382         * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
10383         (GNAT.Socket): Add support for Busy_Polling and Generic_Option
10385 2017-01-06  Bob Duff  <duff@adacore.com>
10387         * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
10388         Elaborate_All(P) to P itself. That could happen in obscure cases,
10389         and always introduced a cycle (P body must be elaborated before
10390         P body).
10391         * lib-writ.ads: Comment clarification.
10392         * ali-util.ads: Minor comment fix.
10393         * ali.adb: Minor reformatting.
10395 2017-01-06  Tristan Gingold  <gingold@adacore.com>
10397         * a-exexpr-gcc.adb: Improve comment.
10399 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
10401         * s-linux-mips.ads: Use correct signal and errno constants.
10402         (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
10404 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
10406         * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
10407         * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
10408         sections.
10410 2017-01-01  Eric Botcazou  <ebotcazou@adacore.com>
10412         * gnatvsn.ads: Bump copyright year.
10414 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
10416         * gnat_ugn.texi: Bump @copying's copyright year.
10417         * gnat_rm.texi: Likewise.
10419 Copyright (C) 2017 Free Software Foundation, Inc.
10421 Copying and distribution of this file, with or without modification,
10422 are permitted in any medium without royalty provided the copyright
10423 notice and this notice are preserved.