opt.ads: Elaboration warnings are now on by default.
[official-gcc.git] / gcc / ada / ChangeLog
blob26457f12c176f37fe316c789fe206d915351fda5
1 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
3         * opt.ads: Elaboration warnings are now on by default. Add a comment
4         explaining why this is needed.
5         * sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration
6         warnings.
7         * sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of
8         elaboration warnings.
9         (Analyze_Subprogram_Instantiation): Preserve the status of elaboration
10         warnings.
11         * sem_elab.adb: Update the structure of Call_Attributes and
12         Instantiation_Attributes.
13         (Build_Call_Marker): Propagate the status of elaboration warnings from
14         the call to the marker.
15         (Extract_Call_Attributes): Extract the status of elaboration warnings.
16         (Extract_Instantiation_Attributes): Extract the status of elaboration
17         warnings.
18         (Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are
19         now dependent on the status of elaboration warnings.
20         (Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now
21         dependent on the status of elaboration warnings.
22         (Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics
23         are now dependent on the status of elaboration warnings.
24         (Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced
25         for formal Call_Attrs. Elaboration diagnostics are now dependent on the
26         status of elaboration warnings.
27         (Process_Guaranteed_ABE_Call): Elaboration diagnostics are now
28         dependent on the status of elaboration warnings.
29         (Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now
30         dependent on the status of elaboration warnings.
31         * sem_prag.adb (Analyze_Pragma): Remove the unjustified warning
32         concerning pragma Elaborate.
33         * sem_res.adb (Resolve_Call): Preserve the status of elaboration
34         warnings.
35         (Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node
36         from the procedure call to the entry call.
37         * sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter
38         Warnings.
39         (Mark_Elaboration_Attributes_Node): Preserve the status of elaboration
40         warnings
41         * sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter
42         Warnings. Update the comment on usage.
43         * sinfo.adb (Is_Dispatching_Call): Update to use Flag6.
44         (Is_Elaboration_Warnings_OK_Node): New routine.
45         (Set_Is_Dispatching_Call): Update to use Flag6.
46         (Set_Is_Elaboration_Warnings_OK_Node): New routine.
47         * sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new
48         attribute Is_Elaboration_Warnings_OK_Node along with occurrences
49         in nodes.
50         (Is_Elaboration_Warnings_OK_Node): New routine along with pragma
51         Inline.
52         (Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma
53         Inline.
54         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various
55         sections to indicate how to suppress elaboration warnings.  Document
56         switches -gnatwl and -gnatwL.
57         * gnat_ugn.texi: Regenerate.
59 2017-11-16  Sylvain Dailler  <dailler@adacore.com>
61         * sem_util.adb (Get_Enum_Lit_From_Pos): Add a condition for Pos
62         lower than 0.
64 2017-11-16  Bob Duff  <duff@adacore.com>
66         * sem_ch13.adb (Check_Expr_Constants): Avoid error message in case of
67         System'To_Address.
69 2017-11-16  Yannick Moy  <moy@adacore.com>
71         * sem_elab.adb (Include): Fix mode of parameter Curr to out.
73 2017-11-16  Piotr Trojanek  <trojanek@adacore.com>
75         * sem_util.ads, sem_util.adb (Is_CCT_Instance): Allow calls where
76         Context_Id denotes a record type.
78 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
80         * sem_ch8.adb (Check_SPARK_Primitive_Operation): Enable the check in
81         instantiations.
83 2017-11-16  Doug Rupp  <rupp@adacore.com>
85         Initial gnat port to aarch64-wrs-vxworks7
86         * libgnarl/s-vxwork__aarch64.ads,
87         libgnat/system-vxworks7-aarch64-rtp-smp.ads,
88         libgnat/system-vxworks7-aarch64.ads: New files
89         * sigtramp-vxworks-target.inc (aarch64): New section.
90         * tracebak.c (USE_ARM_UNWINDING): Disable for ARMARCH8A.
92 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
94         * sem_elab.adb (Include): Including a node which is also a compilation
95         unit terminates the search because there are no more lists to examine.
97 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
99         * sem_ch8.adb (Analyze_Subprogram_Renaming): Ensure that a renaming
100         declaration does not define a primitive operation of a tagged type for
101         SPARK.
102         (Check_SPARK_Primitive_Operation): New routine.
104 2017-11-16  Arnaud Charlet  <charlet@adacore.com>
106         * libgnat/a-elchha.adb (Last_Chance_Handler): Display Argv (0) in
107         message when using -E binder switch.
109 2017-11-16  Piotr Trojanek  <trojanek@adacore.com>
111         * errout.ads: Fix minor typo in comment.
113 2017-11-16  Ed Schonberg  <schonberg@adacore.com>
115         * sem_ch3.adb (Process_Subtype): If the subtype indication does not
116         syntactically denote a type, return Any_Type to prevent subsequent
117         compiler crashes or infinite loops.
119 2017-11-16  Steve Baird  <baird@adacore.com>
121         * lib-writ.adb: Fix bug which causes Program_Error to be raised in some
122         cases when writing out a .ali file when a Rename_Pragma pragma is in
123         effect.
124         * lib-writ.adb (Write_Unit_Information): Replace call to
125         Pragma_Name_Unmapped with call to Pragma_Name.
127 2017-11-16  Gary Dismukes  <dismukes@adacore.com>
129         * sem_elab.adb: Minor typo fixes.
131 2017-11-16  Justin Squirek  <squirek@adacore.com>
133         * sem_res.adb (Resolve_Allocator): Correct warning messages and make
134         them more explicit.
136 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
138         * atree.ads (Nkind_In): Add 10 and 11 parameter versions.
139         * checks.adb (Install_Primitive_Elaboration_Check): Mark the setting of
140         the elaboration flag as elaboration code.
141         * einfo.adb (Contract): Update the comments.
142         (Ignore_SPARK_Mode_Pragmas): Update the comments.
143         (SPARK_Aux_Pragma): Update the comments.
144         (SPARK_Aux_Pragma_Inherited): Update the comments.
145         (SPARK_Pragma): Update the comments. The attribute now applies
146         to all types and abstract states.
147         (SPARK_Pragma_Inherited): Update the comments. The attribute now
148         applies to all types and abstract states.
149         (Set_Contract): Update the comments.
150         (Set_Ignore_SPARK_Mode_Pragmas): Update the comments.
151         (Set_SPARK_Aux_Pragma): Update the comments.
152         (Set_SPARK_Aux_Pragma_Inherited): Update the comments.
153         (Set_SPARK_Pragma): Update the comments. The attribute now applies to
154         all types and abstract states.
155         (Set_SPARK_Pragma_Inherited): Update the comments. The attribute now
156         applies to all types and abstract states.
157         (Write_Field40_Name): Add output for SPARK_Pragma when it appears on a
158         type and abstract states.
159         * einfo.ads: Update the documentation of attributes SPARK_Pragma and
160         SPARK_Pragma_Inherited.  Both of them now apply to all types and
161         abstract states.
162         * exp_util.adb (Set_Elaboration_Flag): Mark the setting of the
163         elaboration flag as elaboration code.
164         * sem_ch3.adb: Add with and use clauses for Sem_Elab.
165         (Analyze_Full_Type_Declaration): Set the SPARK_Mode of the type. Record
166         a derived type for later processing by the ABE mechanism.
167         (Analyze_Incomplete_Type_Decl): Set the SPARK_Mode of the type.
168         (Analyze_Private_Extension_Declaration): Set the SPARK_Mode of the
169         type.
170         * sem_ch7.adb (Analyze_Private_Type_Declaration): Set the SPARK_Mode of
171         the type.
172         * sem_elab.adb: Define the term "early call region".  Update the
173         terminology for "scenario" and "target".  Update the architecture of
174         the ABE mechanism.  Update the steps which must be taken when adding a
175         new scenario.  Update the section on debugging ABE issues.  Add new
176         hash tables Early_Call_Regions and Recorded_SPARK_Scenarios.  Add new
177         table SPARK_Scenarios.  Hash table Elaboration_Context is now
178         Elaboration_Statuses.  The majority of Process_xxx routines have been
179         updated to better reflect their role.
180         (Add_Unit): Reimplemented.
181         (Check_Elaboration_Constituent): New routine.
182         (Check_Elaboration_Scenarios): Verify previously recorded scenarios for
183         conditional ABE issues. Verify previously recorded SPARK scenarios.
184         (Check_SPARK_Derived_Type): New routine.
185         (Check_SPARK_Instantiation): New routine.
186         (Check_SPARK_Scenario): New routine.
187         (Check_SPARK_Refined_State_Pragma): New routine.
188         (Early_Call_Region): New routine.
189         (Elaboration_Status): New routine.
190         (Ensure_Prior_Elaboration): Add new formal parameter Prag_Nam. The
191         implicit Elabotate[_All] pragma is now specified via Prag_Nam.
192         (Find_Early_Call_Region): New routine.
193         (Info_Scenario): Add output for refinement constituents.
194         (Is_Recorded_SPARK_Scenario): New routine.
195         (Is_Suitable_SPARK_Derived_Type): New routine.
196         (Is_Suitable_SPARK_Instantiation): New routine.
197         (Is_Suitable_SPARK_Refined_State_Pragma): New routine.
198         (Is_Visited_Body): New routine.
199         (Kill_Elaboration_Scenario): Reimplemented.
200         (Output_Active_Scenarios): Add output for pragma Refined_State.
201         (Output_SPARK_Refined_State_Pragma): New routine.
202         (Process_Conditional_ABE_Call): Remove the use of -gnatd.v. The effect
203         is now achieved by different means.
204         (Process_Conditional_ABE_Call_SPARK): Verify that a call which precedes
205         the subprogram body appears within the early call region of the body.
206         Either ensure the prior elaboration of external subprograms or verify
207         that the context meets the suitable elaboration requirement.
208         (Process_Conditional_ABE_Instantiation_SPARK): New routine.
209         (Record_Elaboration_Scenario): Reimplement the portion which enforces
210         the level restrictions of the static model. Add support for SPARK
211         scenarios.
212         (Record_SPARK_Elaboration_Scenario): New routine.
213         (Reset_Visited_Bodies): New routine.
214         (Set_Early_Call_Region): New routine.
215         (Set_Elaboration_Status): New routine.
216         (Set_Is_Recorded_SPARK_Scenario): New routine.
217         (Update_Elaboration_Scenario): Reimplemented.
218         * sem_elab.ads: Add new subtype Library_Or_Instantiation_Level.
219         * sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Save the pragma
220         for examination by the ABE Processing phase.
221         (Create_Abstract_State): Save the SPARK_Mode from the context.
222         * sem_util.adb (Is_Non_Preelaborable_Construct): New routine.
223         * sem_util.ads (Is_Non_Preelaborable_Construct): New routine.
224         * sinfo.adb (Is_Elaboration_Code): New routine.
225         (Set_Is_Elaboration_Code): New routine.
226         (Nkind_In): Add 10 and 11 parameter versions.
227         * sinfo.ads: Add new attribute Is_Elaboration_Code along with
228         occurrences in nodes.
229         (Is_Elaboration_Code): New routine along with pragma Inline.
230         (Set_Is_Elaboration_Code): New routine along with pragma Inline.
231         (Nkind_In): Add 10 and 11 parameter versions.
233 2017-11-16  Justin Squirek  <squirek@adacore.com>
235         * sem.adb (Analyze): Remove requirement that the original node of N be
236         an operator in the case that analysis on the node yields the relevant
237         operator - so prefer it instead.
239 2017-11-16  Bob Duff  <duff@adacore.com>
241         * sem_ch6.adb (Create_Extra_Formals): The type of the BIP_Object_Access
242         formal must not have a designated type that is the full view coming
243         from a limited-with'ed package.
244         * sem_util.adb,sem_util.ads (Incomplete_View_From_Limited_With): New
245         function called from sem_ch6.
246         * sem_ch5.adb (Analyze_Assignment): Treat user-defined concatenation
247         specially for b-i-p cases.
249 2017-11-10  Martin Sebor  <msebor@redhat.com>
251         PR c/81117
252         * adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
253         * argv.c (__gnat_fill_arg, __gnat_fill_env): Likewise.
255 2017-11-10  Eric Botcazou  <ebotcazou@adacore.com>
257         * gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
258         not fall through to the next case.
259         <ARRAY_TYPE>: Deal specially with a dereference from another array
260         type with the same element type.
262 2017-11-09  Gary Dismukes  <dismukes@adacore.com>
264         * exp_util.adb, freeze.adb: Minor reformatting.
266 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
268         * gcc-interface/Makefile.in: Add rules to build aarch64-qnx runtimes.
270 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
272         * gcc-interface/trans.c (gnat_to_gnu): Add processing for
273         N_Variable_Reference_Marker nodes.
275 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
277         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
278         the pragma Compile_Time_Error when it appears in a generic package
279         declaration and uses an expanded name to denote the current unit.
281 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
283         * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
284         * tracebak.c: Add support for tracebacks in QNX.
286 2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
288         * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
290 2017-11-09  Yannick Moy  <moy@adacore.com>
292         * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
293         justification.
295 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
297         * doc/gnat_ugn/platform_specific_information.rst: Document packages
298         needed on GNU/Linux by GNAT.
299         * gnat_ugn.texi: Regenerate.
301 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
303         * contracts.adb (Analyze_Contracts): Remove the three parameter
304         version. This routine now only analyzes contracts and does not perform
305         any freezing actions.
306         (Analyze_Previous_Contracts): Removed.
307         (Freeze_Previous_Contracts): New routine.
308         * contracts.ads (Analyze_Previous_Contracts): Removed.
309         (Freeze_Previous_Contracts): New routine.
310         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
311         enclosing package spec regardless of whether the list denotes the
312         visible or private declarations.  Fix the removal of partial state
313         refinements when the context is a package spec.
314         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
315         contracts.
316         * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
317         * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
318         (Analyze_Protected_Body): Freeze previous contracts.
319         (Analyze_Task_Body): Freeze previous contracts.
320         * sem_prag.adb: Comment reformatting.
322 2017-11-09  Bob Duff  <duff@adacore.com>
324         * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
325         Export this so users can use it without importing
326         System.Tasking.Utilities.
327         * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
328         that fails when Make_Independent is called on a user task.
329         * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
330         capitalization style ((style) bad casing of "Master_of_Task").
332 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
334         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
335         uninitialized variable uncovered by Codepeer.
337 2017-11-09  Arnaud Charlet  <charlet@adacore.com>
339         * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
341 2017-11-09  Javier Miranda  <miranda@adacore.com>
343         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
344         (Static_Dispatch_Tables): Minor rewording.
345         * gnat_rm.texi: Regenerate.
347 2017-11-09  Justin Squirek  <squirek@adacore.com>
349         * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
350         use_clauses within instances.
351         (Use_One_Package): Add condition to check for "hidden" open scopes to
352         avoid skipping over packages that have not been properly installed even
353         though they are visible.
355 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
357         * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
358         private operation of a protected type, when the type has no visible
359         operations.
361 2017-11-09  Javier Miranda  <miranda@adacore.com>
363         * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
364         * exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
365         if available.
367 2017-11-09  Bob Duff  <duff@adacore.com>
369         * exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
370         sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
371         sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
372         variables.
374 2017-11-09  Yannick Moy  <moy@adacore.com>
376         * exp_disp.adb (Make_DT): Default initialize Ifaces_List and
377         Ifaces_Comp_List.
379 2017-11-09  Pascal Obry  <obry@adacore.com>
381         * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
382         only for foreign threads.  We initialize the thread handle only if not
383         yet initialized. This happens in Enter_Task for foreign threads only.
384         But for native threads (Ada tasking) we do want to keep the real
385         handle (from Create_Task) to be able to free the corresponding
386         resources in Finalize_TCB (CloseHandle).
388 2017-11-09  Yannick Moy  <moy@adacore.com>
390         * sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
391         P_Base_Type.
392         (Error_Attr_P): Fix name in pragma No_Return.
393         (Unexpected_Argument): Add pragma No_Return.
394         (Placement_Error): Add pragma No_Return.
396 2017-11-09  Javier Miranda  <miranda@adacore.com>
398         * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
399         dispatch table is statically built.
400         (Make_DT): Declare constant the Interface_Table object associated with
401         an statically built dispatch table. For this purpose the Offset_To_Top
402         value of each interface is computed using the dummy object.
403         * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
404         the Offset_To_Top field of secondary dispatch tables when the dispatch
405         table is statically built.
406         (Initialize_Tag): Do not generate calls to Register_Interface_Offset
407         when the dispatch table is statically built.
408         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
409         Document the new GNAT restriction Static_Dispatch_Tables.
410         * gnat_rm.texi: Regenerate.
412 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
414         * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
415         to avoid a dormant bug.
417 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
419         * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
420         as such capability is not available on the OS.
421         * link.c: Make sure linker options for QNX are correct.
422         * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
423         * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
424         in particular a workaround with locks priority ceiling where a higher
425         priority task is allowed to lock a lower ceiling priority lock. This
426         also fixes the scheduling of FIFO tasks when the priority of a task is
427         lowered.
428         * libgnat/system-qnx-aarch64.ads: Fix priority ranges.
430 2017-11-09  Yannick Moy  <moy@adacore.com>
432         * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
433         message.
434         * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
435         condition.
436         * namet.adb (Copy_One_Character): Add assumption for static analysis,
437         as knowledge that Hex(2) is in the range 0..255 is too complex for
438         CodePeer.
439         (Finalize): Add assumption for static analysis, as the fact that there
440         are symbols in the table depends on a global invariant at this point in
441         the program.
442         * set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
443         * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
444         true.
446 2017-11-09  Javier Miranda  <miranda@adacore.com>
448         * libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
449         * exp_disp.adb (Building_Static_DT): Check restriction.
450         (Building_Static_Secondary_DT): Check restriction.
451         (Make_DT): Initialize the HT_Link to No_Tag.
452         * opt.ads (Static_Dispatch_Tables): Rename flag...
453         (Building_Static_Dispatch_Tables): ... into this.  This will avoid
454         conflict with the restriction name.
455         * gnat1drv.adb: Update.
456         * exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
457         * exp_ch3.adb (Expand_N_Object_Declaration): Update.
459 2017-11-09  Pascal Obry  <obry@adacore.com>
461         * libgnarl/s-taprop__mingw.adb: Minor code clean-up.  Better using a
462         named number.
464 2017-11-09  Yannick Moy  <moy@adacore.com>
466         * binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
467         * checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
468         use.  Default initialize Hi, Lo.
469         (Selected_Range_Checks): Retype Num_Checks more precisely.
470         (Determine_Range, Determine_Range_R): Default initialize Hi_Right,
471         Lo_Right.
472         * contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
473         Unmodified.
474         (Process_Postconditions): Mark parameter Stmts as Unmodified.
475         * exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
476         * exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
477         (Expand_Concatenate): Default initialize High_Bound.
478         (Optimize_Length_Comparison): Default initialize Ent, Index.
479         * exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
480         L_Lo.
481         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
482         Return_Stmt.
483         * exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
484         remove pragma Warnings(Off).
485         * exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
486         * exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
487         * freeze.adb (Check_Component_Storage_Order): Default initialize
488         Comp_Byte_Aligned rather than silencing messages with pragma
489         Warnings(Off), which does not work for CodePeer initialization
490         messages, and given that here the possible read of an unitialized value
491         depends on a proper use of parameters by the caller.
492         * inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
493         * sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
494         * sem_ch3.adb (Build_Derived_Array_Type): Default initialize
495         Implicit_Base.
496         * sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
497         pragma Warnings(Off).
498         (Analyze_Case_Expression): Rescope checking block within branch where
499         Others_Present is set by the call to Check_Choices.
500         * sem_ch5.adb (Analyze_Assignment): Default initialize
501         Save_Full_Analysis.
502         * sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
503         and restructure code to defend against previous errors, so that, in
504         that case, control does not flow to the elsif condition which read an
505         uninitialized Obj_Decl.
506         * sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
507         (Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
508         which seem to be left uninitialized and possibly read in some cases.
509         * sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
510         precisely.  This requires to exchange the test for exiting in case of
511         too many positions and the increment to Position, inside the loop.
512         * sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
513         which cannot be read uninitialized, but the reasons for that are quite
514         subtle.
515         * sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
516         * sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
517         Spec_Id.
518         * sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
519         and test for presence of non-null Opnd_Type before testing its scope,
520         in a test which would read its value uninitialized, and is very rarely
521         exercized (it depends on the presence of an extension of System).
522         * sem_spark.ads: Update comment to fix name of main analysis procedure.
523         * sem_warn.adb (Warn_On_Known_Condition): Default initialize
524         Test_Result.
525         * set_targ.adb (FailN): Mark procedure with No_Return.
526         * stylesw.adb (Save_Style_Check_Options): Delete useless code to
527         initialize all array Options to white space, as there is already code
528         doing the same for the remaining positions in Options at the end of the
529         procedure.
531 2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
533         * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
534         generic instantiations either.
536 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
538         * sem_prag.adb (Analyze_Part_Of): Reword error message.
539         (Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
540         SPARK_Mode appears with an illegal mode, treat this as a non-existent
541         mode.
543 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
545         * sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
546         a limited view of a type T declared in unit U1, when the function is
547         declared in another unit U2 and the call appears in a procedure within
548         another unit.
550 2017-11-09  Justin Squirek  <squirek@adacore.com>
552         * sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
553         when processing generic instances.
555 2017-11-09  Bob Duff  <duff@adacore.com>
557         * namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
558         Error_Name and No_Name.  Use this (versus Name_Id) to indicate which
559         objects can have those special values. Valid_Name_Id could usefully be
560         used all over the compiler front end, but that's too much trouble for
561         now. If we did that, we might want to rename:
562         Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
563         For parameters of type Valid_Name_Id, remove some redundant tests,
564         including the ones found by CodePeer.  Use Is_Valid_Name instead of
565         membership test when appropriate.
566         (Error_Name_Or_No_Name): Delete this; it's no longer needed.
567         * sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
568         "in Error_Name_Or_No_Name".
569         (Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
570         Error_Name_Or_No_Name".
572 2017-11-09  Arnaud Charlet  <charlet@adacore.com>
574         * gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
575         mode here unless -gnateC is specified.
576         * switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
577         -gnatC here.
579 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
581         * lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
582         part of the ALI writing; they are now processed directly from memory
583         when requested by the backend.
584         * lib-xref.ads (Collect_SPARK_Xrefs): Remove.
585         (Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
586         * lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
587         (Add_SPARK_File): Remove.
588         (Add_SPARK_Xref): Refactored from removed code; filters xref entries
589         that are trivially uninteresting to the SPARK backend.
590         * spark_xrefs.ads: Remove code that is no longer needed.
591         * spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
593 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
595         * sem_elab.adb: Update the documentation on adding a new elaboration
596         schenario. Add new hash table Recorded_Top_Level_Scenarios.
597         (Is_Check_Emitting_Scenario): Removed.
598         (Is_Recorded_Top_Level_Scenario): New routine.
599         (Kill_Elaboration_Scenario): Reimplemented.
600         (Record_Elaboration_Scenario): Mark the scenario as recorded.
601         (Set_Is_Recorded_Top_Level_Scenario): New routine.
602         (Update_Elaboration_Scenario): Reimplemented.
603         * sinfo.adb (Is_Recorded_Scenario): Removed.
604         (Set_Is_Recorded_Scenario): Removed.
605         * sinfo.ads: Remove attribute Is_Recorded_Scenario along with
606         occurrences in nodes.
607         (Is_Recorded_Scenario): Removed along with pragma Inline.
608         (Set_Is_Recorded_Scenario): Removed along with pragma Inline.
610 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
612         * sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
613         error message.
615 2017-11-09  Justin Squirek  <squirek@adacore.com>
617         * sem_res.adb (Resolve_Allocator): Add warning messages corresponding
618         to the allocation of an anonymous access-to-controlled object.
620 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
622         * sigtramp-qnx.c: Fix obvious typo.
624 2017-11-09  Doug Rupp  <rupp@adacore.com>
626         * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
628 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
630         * sem_res.adb (Resolve): If expression is an entity whose type has
631         implicit dereference, generate reference to it, because no reference is
632         generated for an overloaded entity during analysis, given that its
633         identity may not be known.
635 2017-11-09  Javier Miranda  <miranda@adacore.com>
637         * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
638         offset-to-top field by addition.
639         (Make_Secondary_DT): Initialize the offset-to-top field with a negative
640         offset.
641         * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
642         return a negative offset-to-top value.
643         (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
644         Set_Static_Offset_To_Top passing a negative offet-to-top value;
645         initialize also the offset-to-top field with a negative offset.
646         * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
647         an addition since the offset-to-top field is now a negative value.
648         (Displace): Displace the pointer to the object means of a substraction
649         since it is now a negative value.
650         (Set_Dynamic_Offset_to_top): Displace the pointer to the object by
651         means of a substraction since it is now a negative value.
653 2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
655         * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
656         before Errout.Output_Messages also in the case of compilation errors.
658 2017-11-09  Javier Miranda  <miranda@adacore.com>
660         * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
661         the Class Level): Fix error interfacing with C strings.
662         * gnat_ugn.texi: Regenerate.
664 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
666         * system-qnx-aarch64.ads: Fix the priority constants.
667         * s-osinte__qnx.ads: Fix constants for handling the locking protocols
668         and scheduling.
669         * s-osinte__qnx.adb: New file , prevents the use of priority 0 that
670         corresponds to an idle priority on QNX.
672 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
674         * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
675         comments.
677 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
679         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
680         in expression funtions that are expanded into variables.
682 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
684         * sem_util.adb: Minor whitespace cleanup.
686 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
688         * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
689         s-taprop version rather than a custom one.
690         * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
692 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
694         * lib-xref.ads, lib-xref-spark_specific.adb
695         (Traverse_Compilation_Unit): Move declaration to package body.
697 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
699         * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
700         the type of the renaming from its defining entity, rather then the
701         subtype mark as there may not be a subtype mark.
703 2017-11-08  Jerome Lambourg  <lambourg@adacore.com>
705         * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
706         libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
707         libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
708         libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
709         terminals.c: Initial port of GNAT for aarch64-qnx
711 2017-11-08  Elisa Barboni  <barboni@adacore.com>
713         * exp_util.adb (Find_DIC_Type): Move...
714         * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
716 2017-11-08  Justin Squirek  <squirek@adacore.com>
718         * sem_res.adb (Resolve_Allocator): Add info messages corresponding to
719         the owner and corresponding coextension.
721 2017-11-08  Ed Schonberg  <schonberg@adacore.com>
723         * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
724         following separate procedures.
725         (Resolve_Delta_Array_Aggregate): Previous code form
726         Resolve_Delta_Aggregate.
727         (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
728         ARG decisions on the legality rules for delta aggregates for records:
729         in the case of a variant record, components from different variants
730         cannot be specified in the delta aggregate, and this must be checked
731         statically.
733 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
735         * spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
736         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
737         removed component.
739 2017-11-08  Gary Dismukes  <dismukes@adacore.com>
741         * sem_ch4.adb: Minor typo fix.
743 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
745         * spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
746         Spec_Scope_Num components.
747         * spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
748         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
749         removed components.
750         (Collect_SPARK_Xrefs): Skip setting proper values of removed
751         components.
753 2017-11-08  Gary Dismukes  <dismukes@adacore.com>
755         * exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
756         name is a discriminant in check for unconditional accessibility
757         violation within instances.
759 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
761         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
762         for constants (with variable input).
763         (Is_Constant_Object_Without_Variable_Input): Remove.
765 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
767         * exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
769 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
771         * spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
772         cross-references.
773         (dspark): Remove hardcoded table bound.
775 2017-11-08  Ed Schonberg  <schonberg@adacore.com>
777         * sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
778         the type of the base of the construct to determine the type (or
779         candidate interpretations) of the delta aggregate. This allows the
780         construct to appear in a context that expects a private extension.
781         * sem_res.adb (Resolve): Handle properly a delta aggregate with an
782         overloaded base.
784 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
786         * spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
787         with Entity_Id of the reference.
788         * spark_xrefs.adb (dspark): Adapt pretty-printing routine.
789         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
790         reference, not the file and scope indices.
792 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
794         * errout.ads (Current_Node): New.
795         * errout.adb (Error_Msg): Use Current_Node.
796         * par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
797         when relevant.
798         * style.adb: Call Error_Msg_N when possible.
800 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
802         * spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
803         Entity.
804         * lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
805         the Scope_Id record component.
807 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
809         * spark_xrefs.ads (SPARK_File_Record): Remove string components.
810         * spark_xrefs.adb (dspark): Remove pretty-printing of removed
811         SPARK_File_Record components.
812         * lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
813         representation of files/units.
815 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
817         * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
818         Remove Inside_Stubs parameter.
820 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
822         * spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
823         represented by Entity_Id.
824         (SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
825         represented by Entity_Id; this information is not repeated as
826         Scope_Entity.
827         (Heap): Moved from lib-xref-spark_specific.adb, to reside next to
828         Name_Of_Heap_Variable.
829         * spark_xrefs.adb (dspark): Adapt debug routine to above changes in
830         data types.
831         * lib-xref-spark_specific.adb: Adapt routines for populating SPARK
832         scope and xrefs tables to above changes in data types.
834 2017-11-08  Justin Squirek  <squirek@adacore.com>
836         * sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
837         primitives of generic actuals.
838         (Mark_Use_Type): Add recursive call to properly mark class-wide type's
839         base type clauses as per ARM 8.4 (8.2/3).
841 2017-11-08  Ed Schonberg  <schonberg@adacore.com>
843         * sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
844         categorization dependency of the body, as is done for non-generic
845         units.
846         (New_Overloaded_Entity, Visible_Part_Type): Remove linear search
847         through declarations (Simple optimization, no behavior change).
849 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
851         * spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
852         (SPARK_Scope_Record): Remove inessential components.
853         * spark_xrefs.adb (dspark): Remove pretty-printing of removed record
854         components.
855         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
856         removed record components.
857         (Add_SPARK_Xrefs): Remove setting of removed record components.
859 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
861         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
862         empty entities.
864 2017-11-08  Javier Miranda  <miranda@adacore.com>
866         * sem_disp.adb (Is_Inherited_Public_Operation): Extend the
867         functionality of this routine to handle multiple levels of derivations.
869 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
871         * einfo.adb: Elist36 is now used as Nested_Scenarios.
872         (Nested_Scenarios): New routine.
873         (Set_Nested_Scenarios): New routine.
874         (Write_Field36_Name): New routine.
875         * einfo.ads: Add new attribute Nested_Scenarios along with occurrences
876         in entities.
877         (Nested_Scenarios): New routine along with pragma Inline.
878         (Set_Nested_Scenarios): New routine along with pragma Inline.
879         * sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
880         (Process_Nested_Scenarios): New routine.
881         (Traverse_Body): When a subprogram body is traversed for the first
882         time, find, save, and process all suitable scenarios found within.
883         Subsequent traversals of the same subprogram body utilize the saved
884         scenarios.
886 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
888         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
889         protected operations.
890         (Add_SPARK_Xrefs): Simplify detection of empty entities.
891         * get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
892         put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
893         reading and testing SPARK cross-references stored in the ALI files.
894         * lib-xref.ads (Output_SPARK_Xrefs): Remove.
895         * lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
896         ALI file.
897         * spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
898         with description of the SPARK xrefs ALI format.
899         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
900         and put_spark_refs.o.
902 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
904         * exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
905         when the associated access type is subject to pragma
906         No_Heap_Finalization.
907         * exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
908         designated type in case it comes from a limited withed unit.
910 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
912         * exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
913         SPARK-related flags.  Add ??? comment.
914         * exp_util.adb (Insert_Actions): Add an entry for node
915         N_Variable_Reference_Marker.
916         * sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
917         * sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
918         and record a variable reference marker for the current name.
919         (Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
920         a variable reference marker for the current name.
921         * sem_elab.adb (Build_Variable_Reference_Marker): New routine.
922         (Extract_Variable_Reference_Attributes): Reimplemented.
923         (Info_Scenario): Add output for variable references and remove output
924         for variable reads.
925         (Info_Variable_Read): Removed.
926         (Info_Variable_Reference): New routine.
927         (Is_Suitable_Scenario): Variable references are now suitable scenarios
928         while variable reads are not.
929         (Output_Active_Scenarios): Add output for variable references and
930         remove output for variable reads.
931         (Output_Variable_Read): Removed.
932         (Output_Variable_Reference): New routine.
933         (Process_Variable_Read): Removed.
934         (Process_Variable_Reference): New routine.
935         (Process_Variable_Reference_Read): New routine.
936         * sem_elab.ads (Build_Variable_Reference_Marker): New routine.
937         * sem_res.adb (Resolve_Actuals): Build and record a variable reference
938         marker for the current actual.
939         * sem_spark.adb (Check_Node): Add an entry for node
940         N_Variable_Reference_Marker.
941         * sem_util.adb (Within_Subprogram_Call): Moved to the library level.
942         * sem_util.ads (Within_Subprogram_Call): Moved to the library level.
943         * sinfo.adb (Is_Read): New routine.
944         (Is_Write): New routine.
945         (Target): Updated to handle variable reference markers.
946         (Set_Is_Read): New routine.
947         (Set_Is_Write): New routine.
948         (Set_Target): Updated to handle variable reference markers.
949         * sinfo.ads: Add new attributes Is_Read and Is_Write along with
950         occurrences in nodes. Update attribute Target. Add new node
951         kind N_Variable_Reference_Marker.
952         (Is_Read): New routine along with pragma Inline.
953         (Is_Write): New routine along with pragma Inline.
954         (Set_Is_Read): New routine along with pragma Inline.
955         (Set_Is_Write): New routine along with pragma Inline.
956         * sprint.adb (Sprint_Node_Actual): Add an entry for node
957         N_Variable_Reference_Marker.
959 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
961         * sem_util.adb (Subprogram_Name): Append suffix for overloaded
962         subprograms.
964 2017-11-08  Yannick Moy  <moy@adacore.com>
966         * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
967         about unused use-type or use-package clauses inside inlined bodies.
969 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
971         * sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
972         In_Partial_Fin along with a comment on its usage. Do not guarantee the
973         prior elaboration of a unit when the need came from a partial
974         finalization context.
975         (In_Initialization_Context): Relocated to Process_Call.
976         (Is_Partial_Finalization_Proc): New routine.
977         (Process_Access): Add new parameter In_Partial_Fin along with a comment
978         on its usage.
979         (Process_Activation_Call): Add new parameter In_Partial_Fin along with
980         a comment on its usage.
981         (Process_Activation_Conditional_ABE_Impl): Add new parameter
982         In_Partial_Fin along with a comment on its usage. Do not emit any ABE
983         diagnostics when the activation occurs in a partial finalization
984         context.
985         (Process_Activation_Guaranteed_ABE_Impl): Add new parameter
986         In_Partial_Fin along with a comment on its usage.
987         (Process_Call): Add new parameter In_Partial_Fin along with a comment
988         on its usage. A call is within a partial finalization context when it
989         targets a finalizer or primitive [Deep_]Finalize, and the call appears
990         in initialization actions. Pass this information down to the recursive
991         steps of the Processing phase.
992         (Process_Call_Ada): Add new parameter In_Partial_Fin along with a
993         comment on its usage. Remove the guard which suppresses the generation
994         of implicit Elaborate[_All] pragmas. This is now done in
995         Ensure_Prior_Elaboration.
996         (Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
997         with a comment on its usage. Do not emit any ABE diagnostics when the
998         call occurs in a partial finalization context.
999         (Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
1000         comment on its usage.
1001         (Process_Instantiation): Add new parameter In_Partial_Fin along with a
1002         comment on its usage.
1003         (Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
1004         with a comment on its usage.
1005         (Process_Instantiation_Conditional_ABE): Add new parameter
1006         In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1007         diagnostics when the instantiation occurs in a partial finalization
1008         context.
1009         (Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
1010         with a comment on its usage.
1011         (Process_Scenario): Add new parameter In_Partial_Fin along  with a
1012         comment on its usage.
1013         (Process_Single_Activation): Add new parameter In_Partial_Fin along
1014         with a comment on its usage.
1015         (Traverse_Body): Add new parameter In_Partial_Fin along with a comment
1016         on its usage.
1018 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1020         * sem_ch13.adb: Add optional parameter to Error_Msg.
1022 2017-11-08  Jerome Lambourg  <lambourg@adacore.com>
1024         * fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
1025         for the Interfaces.* hierarchy as longer unit names are now allowed.
1027 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1029         * sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
1030         subprogram as well.  Support more cases of entities.
1031         (Append_Entity_Name): Add some defensive code.
1033 2017-11-06  Eric Botcazou  <ebotcazou@adacore.com>
1035         * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
1037 2017-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1039         PR ada/82785
1040         * gcc-interface/Makefile.in (m68k/Linux): Fix typo.
1042 2017-10-21  Eric Botcazou  <ebotcazou@adacore.com>
1044         * gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
1046 2017-10-21  Eric Botcazou  <ebotcazou@adacore.com>
1048         * gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
1049         (convert): Do not use an unchecked conversion for converting from a
1050         type to another type padding it.
1052 2017-10-20  Doug Rupp  <rupp@adacore.com>
1054         * libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
1055         needed for using monotonic clock.
1056         * libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
1057         changes.
1058         * libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
1059         out monotonic clock related functions body.
1060         (Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
1061         Compute_Deadline): Move to...
1062         * libgnarl/s-tpopmo.adb: ... here. New separate package body.
1064 2017-10-20  Ed Schonberg  <schonberg@adacore.com>
1066         * sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
1067         case where the controlling formal is an anonymous access to interface
1068         type.
1069         * exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
1070         access type, handle properly the the constructed dereference that
1071         designates the object used in the rewritten synchronized call.
1072         (Parameter_Block_Pack): If the type of the actual is by-copy, its
1073         generated declaration in the parameter block does not need an
1074         initialization even if the type is a null-excluding access type,
1075         because it will be initialized with the value of the actual later on.
1076         (Parameter_Block_Pack): Do not add controlling actual to parameter
1077         block when its type is by-copy.
1079 2017-10-20  Justin Squirek  <squirek@adacore.com>
1081         * sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
1082         scope stack traversal into the context clause.
1084 2017-10-20  Bob Duff  <duff@adacore.com>
1086         * sinfo.ads: Fix a comment typo.
1088 2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1090         * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
1091         warning against usage in conjunction with -gnatn.
1092         (-fdump-xref): Delete entry.
1093         * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
1094         -fdump-xref switch.
1095         * gnat_ugn.texi: Regenerate.
1097 2017-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
1099         * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
1100         Minor reformatting.
1102 2017-10-20  Yannick Moy  <moy@adacore.com>
1104         * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
1105         compare a dimensioned expression with a literal.
1106         (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
1107         special value zero.
1108         * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
1109         dimensionality system in GNAT.
1110         * gnat_ugn.texi: Regenerate.
1112 2017-10-20  Yannick Moy  <moy@adacore.com>
1114         * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
1115         inadequate silencing of errors.
1116         * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
1117         checking the subprogram body generated from an expression function,
1118         when this is done as part of the preanalysis done on expression
1119         functions, as the subprogram body may not yet be attached in the AST.
1120         The error if any will be issued later during the analysis of the body.
1121         (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
1123 2017-10-20  Arnaud Charlet  <charlet@adacore.com>
1125         * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
1126         warning on ineffective use clause.
1128 2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1130         * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
1131         * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
1132         to issue the warning on the absence of local raise.
1133         (Possible_Local_Raise): Do not issue the warning for Call_Markers.
1134         (Warn_If_No_Local_Raise): New procedure to issue the warning on the
1135         absence of local raise.
1136         * sem_elab.adb: Add with and use clauses for Exp_Ch11.
1137         (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
1138         where a scenario could give rise to raising Program_Error.
1139         * sem_elab.adb: Typo fixes.
1140         * fe.h (Warn_If_No_Local_Raise): Declare.
1141         * gcc-interface/gigi.h (get_exception_label): Change return type.
1142         * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
1143         simple vector of Entity_Id.
1144         (gnu_storage_error_label_stack): Likewise.
1145         (gnu_program_error_label_stack): Likewise.
1146         (gigi): Adjust to above changes.
1147         (Raise_Error_to_gnu): Likewise.
1148         (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
1149         (N_Push_Constraint_Error_Label): Push the label onto the stack.
1150         (N_Push_Storage_Error_Label): Likewise.
1151         (N_Push_Program_Error_Label): Likewise.
1152         (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
1153         a warning on the absence of local raise.
1154         (N_Pop_Storage_Error_Label): Likewise.
1155         (N_Pop_Program_Error_Label): Likewise.
1156         (push_exception_label_stack): Delete.
1157         (get_exception_label): Change return type to Entity_Id and adjust.
1158         * gcc-interface/utils2.c (build_goto_raise): Change type of first
1159         parameter to Entity_Id and adjust.  Set TREE_USED on the label.
1160         (build_call_raise): Adjust calls to get_exception_label and also
1161         build_goto_raise.
1162         (build_call_raise_column): Likewise.
1163         (build_call_raise_range): Likewise.
1164         * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
1165         Document actual default behavior.
1167 2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
1169         * einfo.ads: Minor consistent punctuation in comment.  All numbered
1170         items in the comment of Is_Internal are now terminated with a period.
1172 2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
1174         * exp_util.adb (Build_Temporary): Mark created temporary entity as
1175         internal.
1177 2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
1179         * sem_type.adb (In_Generic_Actual): Simplified.
1181 2017-10-20  Justin Squirek  <squirek@adacore.com>
1183         * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
1184         verify a renaming exists for a generic formal before comparing it to
1185         the actual as defaulted formals will not have a renamed_object.
1187 2017-10-20  Javier Miranda  <miranda@adacore.com>
1189         * exp_ch6.adb (Replace_Returns): Fix wrong management of
1190         N_Block_Statement nodes.
1192 2017-10-20  Bob Duff  <duff@adacore.com>
1194         * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
1195         component of an array aggregate if it is initialized by a
1196         build-in-place function call.
1197         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
1198         bip for nonlimited types.
1199         * debug.adb: Document -gnatd.9.
1201 2017-10-20  Bob Duff  <duff@adacore.com>
1203         * sem_ch12.adb: Remove redundant setting of Parent.
1205 2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1207         * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
1208         of the operands is a string literal.
1210 2017-10-20  Bob Duff  <duff@adacore.com>
1212         * einfo.ads: Comment fix.
1214 2017-10-20  Clement Fumex  <fumex@adacore.com>
1216         * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
1218 2017-10-20  Ed Schonberg  <schonberg@adacore.com>
1220         * sem_dim.adb (Extract_Power): Accept dimension values that are not
1221         non-negative integers when the dimensioned base type is an Integer
1222         type.
1224 2017-10-20  Bob Duff  <duff@adacore.com>
1226         * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
1227         that an allocator came from a b-i-p return statement.
1228         * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
1229         object of a nonlimited build-in-place function call.
1230         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
1231         Alloc_For_BIP_Return flag on generated allocators.
1232         * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
1233         If the N_Assignment_Statement has been transformed into something else,
1234         then Should_Transform_BIP_Assignment won't work.
1235         * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
1236         "Remove Adjust if we're building the return object of an extended
1237         return statement in place." Back out that part of the change, because
1238         the Alloc_For_BIP_Return flag is now used for that.
1240 2017-10-19  Bob Duff  <duff@adacore.com>
1242         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
1243         should be "T".  Handle case of a subtype of a class-wide type.
1245 2017-10-19  Bob Duff  <duff@adacore.com>
1247         * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
1248         which node kinds can legitimately be ignored, and raise Program_Error
1249         for others.
1251 2017-10-19  Hristian Kirtchev  <kirtchev@adacore.com>
1253         * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
1254         instantiation that acts as a compilation unit.
1255         (Find_Code_Unit): Reimplemented.
1256         (Find_Top_Unit): Reimplemented.
1257         (Find_Unit_Entity): New routine.
1258         (Process_Instantiation_SPARK): Correct the elaboration requirement a
1259         package instantiation imposes on a unit.
1261 2017-10-19  Bob Duff  <duff@adacore.com>
1263         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
1264         for a narrow set of controlled types.
1266 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
1268         * sinput.ads (Line_Start): Add pragma Inline.
1269         * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
1271 2017-10-19  Bob Duff  <duff@adacore.com>
1273         * exp_attr.adb (Expand_N_Attribute_Reference): Disable
1274         Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
1275         build-in-place function call so that the temp is declared in the right
1276         place.
1278 2017-10-18  Eric Botcazou  <ebotcazou@adacore.com>
1280         * gcc-interface/misc.c (gnat_tree_size): Move around.
1282         * gcc-interface/utils.c (max_size): Deal with SSA names.
1284 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
1286         * gcc-interface/misc.c (gnat_tree_size): New function.
1287         (LANG_HOOKS_TREE_SIZE): Redefine.
1289 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1291         * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
1292         Remote_Call_Interface is not a suitable preelaboratd context when the
1293         call appears in the package body.
1295 2017-10-14  Eric Botcazou  <ebotcazou@adacore.com>
1297         * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
1298         * layout.adb (Set_Elem_Alignment): Likewise.  Use M name as maximum
1299         alignment for consistency.  If Align is non-zero, use the minimum of
1300         Align and M for the alignment.
1301         * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
1302         setting the alignment directly.
1304 2017-10-14  Ed Schonberg  <schonberg@adacore.com>
1306         * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
1307         optional string in an Assert pragma until the expansion of the pragma
1308         has rewritten it as a conditional statement, so that the string
1309         argument is only evaluaed if the assertion fails. This is mandated by
1310         RM 11.4.2.
1312 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1314         * debug.adb: Switch -gnatd.v and associated flag are now used to
1315         enforce the SPARK rules for elaboration in SPARK code.
1316         * sem_elab.adb: Describe switch -gnatd.v.
1317         (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
1318         (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
1319         in effect.
1320         (Process_Variable_Assignment): Clarify why variable assignments are
1321         processed reglardless of whether -gnatd.v is in effect.
1322         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
1323         sections on elaboration code and compilation switches.
1324         * gnat_ugn.texi: Regenerate.
1326 2017-10-14  Gary Dismukes  <dismukes@adacore.com>
1328         * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
1329         sem_warn.adb: Minor reformattings.
1331 2017-10-14  Ed Schonberg  <schonberg@adacore.com>
1333         * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
1334         for reverse iteration over formal containers.
1335         * gnat_rm.texi: Regenerate.
1337 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1339         * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
1340         Ensure_Prior_Elaboration_Dynamic for consistency reasons.
1341         (Ensure_Static_Prior_Elaboration): Renamed to
1342         Ensure_Prior_Elaboration_Static for consistency reasons.
1343         (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
1344         reflect its new purpose.
1345         (Is_Initialized): New routine.
1346         (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
1347         in order to reflect its new purpose.
1348         (Is_Variable_Read): New routine.
1349         (Output_Variable_Reference): Renamed to Output_Variable_Read in order
1350         to reflect its new purpose.
1351         (Process_Variable_Assignment): This routine now acts as a top level
1352         dispatcher for variable assignments.
1353         (Process_Variable_Assignment_Ada): New routine.
1354         (Process_Variable_Assignment_SPARK): New routine.
1355         (Process_Variable_Reference): Renamed to Process_Variable_Read in order
1356         to reflects its new purpose. A reference to a variable is now suitable
1357         for ABE processing only when it is a read. The logic in the routine now
1358         reflects the latest SPARK elaboration rules.
1360 2017-10-14  Justin Squirek  <squirek@adacore.com>
1362         * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
1363         triggers marking on formal subprograms.
1365 2017-10-14  Javier Miranda  <miranda@adacore.com>
1367         * checks.adb (Ensure_Valid): Do not skip adding the validity check on
1368         renamings of objects that come from the sources.
1370 2017-10-14  Eric Botcazou  <ebotcazou@adacore.com>
1372         * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
1373         parameter and set the alignment of the type to Align.
1374         (Copy_Float_Type): Adjust call to Build_Float_Type.
1375         (Register_Float_Type): Add pragma Unreferenced for Precision.  Adjust
1376         call to Build_Float_Type and do not set RM_Size and Alignment.
1378 2017-10-14  Patrick Bernardi  <bernardi@adacore.com>
1380         * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
1381         GNATRTL_NONTASKING_OBJ.
1383 2017-10-14  Bob Duff  <duff@adacore.com>
1385         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
1386         enabling b-i-p for nonlimited controlled types (but disabled).
1388 2017-10-14  Justin Squirek  <squirek@adacore.com>
1390         * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
1391         Has_Warnings_Off with Warnings_Off.
1393 2017-10-14  Piotr Trojanek  <trojanek@adacore.com>
1395         * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
1397 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1399         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
1400         enclosing package at the end of the visible declarations.
1401         * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
1402         an initialization item which is undefined due to some illegality.
1404 2017-10-14  Patrick Bernardi  <bernardi@adacore.com>
1406         * ali.adb: Add new ALI line 'T' to read the number of tasks contain
1407         within each unit that require a default-sized primary and secondary
1408         stack to be generated by the binder.
1409         (Scan_ALI): Scan new 'T' lines.
1410         * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
1411         * bindgen.adb (Gen_Output_File): Count the number of default-sized
1412         stacks within the closure that are to be created by the binder.
1413         (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
1414         stacks and record these in System.Secodnary_Stack.
1415         (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
1416         closure of the program being bound.
1417         * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
1418         * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
1419         (Expand_N_Object_Declaration): Count the number of default-sized stacks
1420         used by task objects contained within the object whose declaration is
1421         being expanded.  Only performed when either the restrictions
1422         No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
1423         effect.
1424         * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
1425         (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
1426         the expansion of a task type if the size of the stack is known at
1427         run-time and the restrictions No_Implicit_Heap_Allocations or
1428         No_Implicit_Task_Allocations are in effect.
1429         (Make_Task_Create_Call): If using a restricted profile provide
1430         secondary stack parameter: either the statically created stack or null.
1431         * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
1432         Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
1433         Unit_Record initialization expressions.
1434         * lib-writ.adb (Add_Preprocessing_Dependency,
1435         Ensure_System_Dependency): Include Primary_Stack_Count and
1436         Sec_Stack_Count in Unit_Record initialization expression.
1437         (Write_ALI): Write T lines.
1438         (Write_Unit_Information): Do not output 'T' lines if there are no
1439         stacks for the binder to generate.
1440         * lib-writ.ads: Updated library information documentation to include
1441         new T line entry.
1442         * lib.adb (Increment_Primary_Stack_Count): New routine.
1443         (Increment_Sec_Stack_Count): New routine.
1444         (Primary_Stack_Count): New routine.
1445         (Sec_Stack_Count): New routine.
1446         * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
1447         Unit_Record and updated documentation.
1448         (Increment_Primary_Stack_Count): New routine along with pragma Inline.
1449         (Increment_Sec_Stack_Count): New routine along with pragma Inline.
1450         (Primary_Stack_Count): New routine along with pragma Inline.
1451         (Sec_Stack_Count): New routine along with pragma Inline.
1452         * opt.ads: New constant No_Stack_Size.  Flag Default_Stack_Size
1453         redefined.  New flag Default_Sec_Stack_Size and
1454         Quantity_Of_Default_Size_Sec_Stacks.
1455         * rtfinal.c Fixed erroneous comment.
1456         * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
1457         System.Secondary_Stack to System.Parameters.  Add RE_SS_Stack.
1458         * sem_util.adb (Number_Of_Elements_In_Array): New routine.
1459         * sem_util.ads (Number_Of_Elements_In_Array): New routine.
1460         * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
1461         * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
1462         (Set_Sec_Stack_Addr): Removed routine.
1463         (Get_Sec_Stack): New routine.
1464         (Set_Sec_Stack): New routine.
1465         (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
1466         reflect new procedure and global names.
1467         * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
1468         libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
1469         libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
1470         parameter profile to allow the secondary stack size to be specified.
1471         * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
1472         profile to include Sec_Stack_Address.  Update Tasking.Initialize_ATCB
1473         call to remove Secondary_Stack_Size reference.  Add secondary stack
1474         address and size to SSL.Create_TSD call.
1475         (Task_Wrapper): Remove secondary stack creation.
1476         * libgnarl/s-tarest.ads (Create_Restricted_Task,
1477         Create_Restricted_Task_Sequential): Update parameter profile to include
1478         Sec_Stack_Address and clarify the Size parameter.
1479         * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
1480         from profile and body.
1481         (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
1482         * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
1483         Common_ATCB.
1484         (Initialize_ATCB): Update the parameter profile to remove
1485         Secondary_Stack_Size.
1486         * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
1487         call to Initialize_ATCB.  Add secondary stack address and size to
1488         SSL.Create_TSD call, and catch any storage exception from the call.
1489         (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
1490         new subprogram and component names.
1491         (Task_Wrapper): Remove secondary stack creation.
1492         (Vulnerable_Complete_Master): Update to reflect TSD changes.
1493         * libgnarl/s-tassta.ads: Reformat comments.
1494         (Create_Task): Update parameter profile.
1495         * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
1496         profile to include secondary stack size. Remove secondary size
1497         parameter from Initialize_ATCB call and add it to Create_TSD call.
1498         * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
1499         libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
1500         * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
1501         libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
1502         Percentage.  Remove constants Dynamic, Sec_Stack_Percentage and
1503         Sec_Stack_Dynamic.  Add constant Runtime_Default_Sec_Stack_Size and
1504         Sec_Stack_Dynamic.
1505         (Default_Sec_Stack_Size): New routine.
1506         * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
1507         now Preelaborate.
1508         * libgnat/s-soflin.adb: Removed unused with-clauses.  With
1509         System.Soft_Links.Initialize to initialize non-tasking TSD.
1510         (Create_TSD): Update parameter profile. Initialize the TSD and
1511         unconditionally call SS_Init.
1512         (Destroy_TSD): Update SST.SS_Free call.
1513         (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
1514         Set_Sec_Stack_Addr_Soft): Remove routines.
1515         (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
1516         Set_Sec_Stack_Soft): Add routines.
1517         (NT_TSD): Move to private part of package specification.
1518         * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
1519         with suppressed access checks.  Renamed *_Sec_Stack_Addr_* routines and
1520         objects to *_Sec_Stack_*.  TSD: removed warning suppression and
1521         component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
1522         (Create_TSD): Update parameter profile.
1523         (NT_TSD): Move to private section from body.
1524         * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
1525         * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
1526         * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
1527         Remove routine.
1528         (Get_Sec_Stack, Set_Sec_Stack): Add routine.
1529         (Thread_Body_Enter): Update parameter profile and body to adapt to new
1530         System.Secondary_Stack.
1531         (Init_RTS): Update body for new System.Soft_Links names.
1532         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
1533         s-soliin.o.
1535 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
1537         * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
1538         operating on trees as wide_ints.
1540 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
1542         * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
1543         as a scoping construct when it is byproduct of exception handling.
1545 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
1547         * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
1548         semantic field Target of node N_Call_Marker.
1550 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
1552         * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
1553         attempts to copy a limited value, when the allocator is the expression
1554         in an expression function.
1556 2017-10-09  Joel Brobecker  <brobecker@adacore.com>
1558         * doc/share/conf.py: Tell the style checker that this is a Python
1559         fragment, and therefore that pyflakes should not be run to validate
1560         this file.
1562 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
1564         * einfo.ads (Is_Boolean_Type): Add pragma Inline.
1565         (Is_Entity_Name): Likewise.
1566         (Is_String_Type): Likewise.
1567         * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
1568         and remove useless comparisons on the base types.
1569         (Covers): Use simple tests for Standard_Void_Type.  Move up cheap tests
1570         on T2.  Always test Is_Private_Type before Full_View_Covers.
1572 2017-10-09  Bob Duff  <duff@adacore.com>
1574         * exp_ch4.adb: Minor refactoring.
1576 2017-10-09  Javier Miranda  <miranda@adacore.com>
1578         * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
1579         not components.
1581 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
1583         * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
1584         are verified only in the static model.
1586 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
1588         * sem_ch5.adb (Analyze_Iterator_Specification,
1589         Check_Reverse_Iteration): Check that the domain of iteration supports
1590         reverse iteration when it is a formal container.  This requires the
1591         presence of a Previous primitive in the Iterable aspect.
1592         * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
1593         primitives Last and Previous to support reverse iteration over formal
1594         containers.
1595         (Validate_Iterable_Aspect): Add check for reverse iteration operations.
1596         * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
1597         for reverse iteration using primitives Last and Previous in generated
1598         loop.
1600 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
1602         * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
1603         of the Defining_Program_Unit_Name, which is an identifier, in order to
1604         construct the string for the fully qualified name.
1606 2017-10-09  Justin Squirek  <squirek@adacore.com>
1608         * sem_ch3.adb: Rename Uses_Unseen_Priv into
1609         Contains_Lib_Incomplete_Type.
1611 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
1613         * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
1614         sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
1615         exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
1616         prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
1617         sem_ch10.adb, par-ch8.adb: Minor reformatting.
1619 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
1621         * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
1622         in the static model.
1623         (Is_Suitable_Variable_Assignment): This scenario is now only relevant
1624         in the static model.
1625         (Is_Suitable_Variable_Reference): This scenario is now only relevant in
1626         the static model.
1628 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
1630         * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
1631         expressions when the enclosing scope is a subprogram body and the next
1632         declaration is a body that freezes entities previously declared in the
1633         scope.
1635 2017-10-09  Justin Squirek  <squirek@adacore.com>
1637         * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
1638         ghost packages and living packages in use clauses.
1639         (Use_One_Type, Note_Redundant_Use): Correct warning messages
1641 2017-10-09  Justin Squirek  <squirek@adacore.com>
1643         * osint.ads: Document new parameter FD for Read_Source_File.
1645 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
1647         * exp_util.adb (Make_Predicate_Call): If the type of the expression to
1648         which the predicate check applies is tagged, convert the expression to
1649         that type. This is in most cases a no-op, but is relevant if the
1650         expression is clas-swide, because the predicate function being invoked
1651         is not a primitive of the type and cannot take a class-wide actual.
1653 2017-10-09  Gary Dismukes  <dismukes@adacore.com>
1655         * exp_disp.adb: Minor reformatting.
1657 2017-10-09  Arnaud Charlet  <charlet@adacore.com>
1659         * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
1661 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
1663         * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
1664         GNATprove.
1665         (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
1667 2017-10-09  Bob Duff  <duff@adacore.com>
1669         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
1670         immediately if the call has already been processed (by a previous call
1671         to Make_Build_In_Place_Call_In_Anonymous_Context).
1672         * sem_elab.adb: Minor typo fixes.
1674 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
1676         * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
1677         predicate, do not replace an identifier that matches the type if the
1678         identifier is a selector in a selected component, because this
1679         indicates a reference to some homograph of the type itself, and  not to
1680         the current occurence in the predicate.
1682 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
1684         * repinfo.adb (List_Record_Layout): Tweak formatting.
1685         (Write_Val): Remove superfluous spaces in back-end layout mode.
1687 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
1689         * sem_res.adb (Property_Error): Remove.
1690         (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
1691         current wording of the rule.
1693 2017-10-09  Justin Squirek  <squirek@adacore.com>
1695         * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
1696         before analyzing a given scope due to an expression function.
1697         (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
1699 2017-10-09  Bob Duff  <duff@adacore.com>
1701         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
1702         Defining_Identifier (Obj_Decl) in two places, because it might have
1703         changed.
1704         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
1705         involving 'Input on (not visibly) derived types.
1707 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
1709         * atree.adb: Add new soft link Rewriting_Proc.
1710         (Rewrite): Invoke the subprogram attached to the rewriting soft link.
1711         (Set_Rewriting_Proc): New routine.
1712         * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
1713         (Set_Rewriting_Proc): New routine.
1714         * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
1715         for *E*laboration flag to maintain consistency with other elaboration
1716         flag generating subprograms.
1717         * debug.adb: Document the new usage of flag -gnatdL.
1718         * einfo.adb: Node19 is now used as Receiving_Entry.  Node39 is now used
1719         as Protected_Subprogram.  Flag148 is now used as
1720         Is_Elaboration_Checks_OK_Id.  Flag302 is now used as
1721         Is_Initial_Condition_Procedure.
1722         (Is_Elaboration_Checks_OK_Id): New routine.
1723         (Is_Initial_Condition_Procedure): New routine.
1724         (Protected_Subprogram): New routine.
1725         (Receiving_Entry): New routine.
1726         (SPARK_Pragma): Update assertion.
1727         (SPARK_Pragma_Inherited): Update assertion.
1728         (Suppress_Elaboration_Warnings): Removed.
1729         (Set_Is_Elaboration_Checks_OK_Id): New routine.
1730         (Set_Is_Initial_Condition_Procedure): New routine.
1731         (Set_Protected_Subprogram): New routine.
1732         (Set_Receiving_Entry): New routine.
1733         (Set_SPARK_Pragma): Update assertion.
1734         (Set_SPARK_Pragma_Inherited): Update assertion.
1735         (Write_Entity_Flags): Update the output for Flag148 and Flag302.
1736         (Write_Field19_Name): Add output for Receiving_Entry.
1737         (Write_Field39_Name): Add output for Protected_Subprogram.
1738         (Write_Field40_Name): Update the output for SPARK_Pragma.
1739         * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
1740         Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
1741         Remove attribute Suppress_Elaboration_Warnings.  Update the stricture
1742         of various entities.
1743         (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
1744         (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
1745         (Protected_Subprogram): New routine along with pragma Inline.
1746         (Receiving_Entry): New routine along with pragma Inline.
1747         (Suppress_Elaboration_Warnings): Removed.
1748         (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
1749         Inline.
1750         (Set_Is_Initial_Condition_Procedure): New routine along with pragma
1751         Inline.
1752         (Set_Protected_Subprogram): New routine along with pragma Inline.
1753         (Set_Receiving_Entry): New routine along with pragma Inline.
1754         (Set_Suppress_Elaboration_Warnings): Removed.
1755         * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
1756         consistency with other finalizer generating subprograms.
1757         (Default_Initialize_Object): Mark the block which wraps the call to
1758         finalize as being part of initialization.
1759         * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
1760         Initial_Condition.
1761         (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
1762         (Next_Suitable_Statement): Update the comment on usage. Skip over call
1763         markers generated by the ABE mechanism.
1764         * exp_ch9.adb (Activation_Call_Loc): New routine.
1765         (Add_Accept): Link the accept procedure to the original entry.
1766         (Build_Protected_Sub_Specification): Link the protected or unprotected
1767         version to the original subprogram.
1768         (Build_Task_Activation_Call): Code cleanup. Use a source location which
1769         is very close to the "begin" or "end" keywords when generating the
1770         activation call.
1771         * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
1772         * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
1773         process loops.
1774         (Expand_SPARK_N_Loop_Statement): New routine.
1775         (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
1776         call to the Default_Initial_Condition procedure.
1777         (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
1778         * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
1779         effect.
1780         (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
1781         (Insert_Actions): Add processing for N_Call_Marker.
1782         (Kill_Dead_Code): Explicitly kill an elaboration scenario.
1783         * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
1784         * frontend.adb: Initialize Sem_Elab. Process all saved top level
1785         elaboration scenarios for ABE issues.
1786         * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
1787         nodes.
1788         * lib.adb (Earlier_In_Extended_Unit): New variant.
1789         * sem.adb (Analyze): Ignore N_Call_Marker nodes.
1790         (Preanalysis_Active): New routine.
1791         * sem.ads (Preanalysis_Active): New routine.
1792         * sem_attr.adb (Analyze_Access_Attribute): Save certain
1793         elaboration-related attributes. Save the scenario for ABE processing.
1794         * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
1795         effect. Save certain elaboration-related attributes.
1796         * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
1797         attributes. Save the scenario for ABE processing.
1798         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
1799         mode in effect. Save certain elaboration-related attributes.
1800         (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
1801         locating the first real statement.
1802         (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
1803         certain elaboration-related attributes.
1804         * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
1805         elaboration warnings.
1806         * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
1807         generated for purposes of wrapping an attribute used as a generic
1808         actual.
1809         (Find_Direct_Name): Save certain elaboration-related attributes. Save
1810         the scenario for ABE processing.
1811         (Find_Expanded_Name): Save certain elaboration-related attributes. Save
1812         the scenario for ABE processing.
1813         * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
1814         elaboration-related attributes.
1815         (Analyze_Requeue): Save certain elaboration-related attributes. Save
1816         the scenario for ABE processing.
1817         (Analyze_Single_Task_Declaration): Save certain elaboration-related
1818         attributes.
1819         (Analyze_Task_Type_Declaration): Save certain elaboration-related
1820         attributes.
1821         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
1822         elaboration-related attributes.
1823         (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
1824         effect. Save certain elaboration-related attributes.
1825         (Analyze_Package_Instantiation): Save certain elaboration-related
1826         attributes.  Save the scenario for ABE processing. Create completing
1827         bodies in case the instantiation results in a guaranteed ABE.
1828         (Analyze_Subprogram_Instantiation): Save certain elaboration-related
1829         attributes Save the scenario for ABE processing. Create a completing
1830         body in case the instantiation results in a guaranteed ABE.
1831         (Provide_Completing_Bodies): New routine.
1832         * sem_elab.ads: Brand new implementation.
1833         * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
1834         Elaborate_Body): Do not suppress elaboration warnings.
1835         * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
1836         operator.
1837         (Resolve_Call): Save certain elaboration-related attributes. Save the
1838         scenario for ABE processing.
1839         (Resolve_Entity_Name): Do not perform any ABE processing here.
1840         (Resolve_Entry_Call): Inherit certain attributes from the original call.
1841         * sem_util.adb (Begin_Keyword_Location): New routine.
1842         (Defining_Entity): Update the parameter profile. Add processing for
1843         concurrent subunits that are rewritten as null statements.
1844         (End_Keyword_Location): New routine.
1845         (Find_Enclosing_Scope): New routine.
1846         (In_Instance_Visible_Part): Code cleanup.
1847         (In_Subtree): Update the parameter profile. Add new version.
1848         (Is_Preelaborable_Aggregate): New routine.
1849         (Is_Preelaborable_Construct): New routine.
1850         (Mark_Elaboration_Attributes): New routine.
1851         (Scope_Within): Update the parameter profile.
1852         (Scope_Within_Or_Same): Update the parameter profile.
1853         * sem_util.ads (Begin_Keyword_Location): New routine.
1854         (Defining_Entity): Update the parameter profile and the comment on
1855         usage.
1856         (End_Keyword_Location): New routine.
1857         (Find_Enclosing_Scope): New routine.
1858         (In_Instance_Visible_Part): Update the parameter profile.
1859         (In_Subtree): Update the parameter profile. Add new version.
1860         (Is_Preelaborable_Aggregate): New routine.
1861         (Is_Preelaborable_Construct): New routine.
1862         (Mark_Elaboration_Attributes): New routine.
1863         (Scope_Within): Update the parameter profile and the comment on usage.
1864         (Scope_Within_Or_Same): Update the parameter profile and the comment on
1865         usage.
1866         * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
1867         to determine whether a loop has meaningful condition actions.
1868         (Has_Condition_Actions): New routine.
1869         * sinfo.adb (ABE_Is_Certain): Removed.
1870         (Is_Declaration_Level_Node): New routine.
1871         (Is_Dispatching_Call): New routine.
1872         (Is_Elaboration_Checks_OK_Node): New routine.
1873         (Is_Initialization_Block): New routine.
1874         (Is_Known_Guaranteed_ABE): New routine.
1875         (Is_Recorded_Scenario): New routine.
1876         (Is_Source_Call): New routine.
1877         (Is_SPARK_Mode_On_Node): New routine.
1878         (No_Elaboration_Check): Removed.
1879         (Target): New routine.
1880         (Was_Attribute_Reference): New routine.
1881         (Set_ABE_Is_Certain): Removed.
1882         (Set_Is_Declaration_Level_Node): New routine.
1883         (Set_Is_Dispatching_Call): New routine.
1884         (Set_Is_Elaboration_Checks_OK_Node): New routine.
1885         (Set_Is_Initialization_Block): New routine.
1886         (Set_Is_Known_Guaranteed_ABE): New routine.
1887         (Set_Is_Recorded_Scenario): New routine.
1888         (Set_Is_Source_Call): New routine.
1889         (Set_Is_SPARK_Mode_On_Node): New routine.
1890         (Set_No_Elaboration_Check): Removed.
1891         (Set_Target): New routine.
1892         (Set_Was_Attribute_Reference): New routine.
1893         * sinfo.ads: Remove attribute ABE_Is_Certain.  Attribute
1894         Do_Discriminant_Check now utilizes Flag3.  Attribute
1895         No_Side_Effect_Removal now utilizes Flag17.  Add new node
1896         N_Call_Marker.  Update the structure of various nodes.
1897         (ABE_Is_Certain): Removed along with pragma Inline.
1898         (Is_Declaration_Level_Node): New routine along with pragma Inline.
1899         (Is_Dispatching_Call): New routine along with pragma Inline.
1900         (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
1901         (Is_Initialization_Block): New routine along with pragma Inline.
1902         (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
1903         (Is_Recorded_Scenario): New routine along with pragma Inline.
1904         (Is_Source_Call): New routine along with pragma Inline.
1905         (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
1906         (No_Elaboration_Check): Removed along with pragma Inline.
1907         (Target): New routine along with pragma Inline.
1908         (Was_Attribute_Reference): New routine along with pragma Inline.
1909         (Set_ABE_Is_Certain): Removed along with pragma Inline.
1910         (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
1911         (Set_Is_Dispatching_Call): New routine along with pragma Inline.
1912         (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
1913         Inline.
1914         (Set_Is_Initialization_Block): New routine along with pragma Inline.
1915         (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
1916         (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
1917         (Set_Is_Source_Call): New routine along with pragma Inline.
1918         (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
1919         (Set_No_Elaboration_Check): Removed along with pragma Inline.
1920         (Set_Target): New routine along with pragma Inline.
1921         (Set_Was_Attribute_Reference): New routine along with pragma Inline.
1922         * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
1924 2017-10-09  Bob Duff  <duff@adacore.com>
1926         * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
1928 2017-10-09  Bob Duff  <duff@adacore.com>
1930         * freeze.ads: Minor comment fixed.
1932 2017-10-09  Bob Duff  <duff@adacore.com>
1934         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
1935         care of unchecked conversions in addition to regular conversions. This
1936         takes care of a case where a type is derived from a private untagged
1937         type that is completed by a tagged controlled type.
1939 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
1941         * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
1942         rewriting a class-wide condition, handle properly the case where the
1943         controlling argument of the operation to which the condition applies is
1944         an access to a tagged type, and the condition includes a dispatching
1945         call with an implicit dereference.
1947 2017-10-09  Bob Duff  <duff@adacore.com>
1949         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
1950         the code at the end of this procedure that was setting the type of a
1951         class-wide object to the specific type returned by a function call.
1952         Treat this case as indefinite instead.
1954 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
1956         * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
1957         Suppress spurious ambiguity error when two traversals of the homonym
1958         chain (first directly, and then through an examination of relevant
1959         interfaces) retrieve the same operation, when other irrelevant homonyms
1960         of the operatioh are also present.
1962 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
1964         * sem_util.adb (Object_Access_Level): If the object is the return
1965         statement of an expression function, return the level of the function.
1966         This is relevant when the object involves an implicit conversion
1967         between access types and the expression function is a completion, which
1968         forces the analysis of the expression before rewriting it as a body, so
1969         that freeze nodes can appear in the proper scope.
1971 2017-10-09  Bob Duff  <duff@adacore.com>
1973         * atree.adb: Make nnd apply to everything "interesting", including
1974         Rewrite.  Remove rrd.
1976 2017-10-09  Javier Miranda  <miranda@adacore.com>
1978         * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
1979         processing the declaration of the dummy object internally created by
1980         Make_DT to compute the offset to the top of components referencing
1981         secondary dispatch tables.
1982         (Initialize_Tag): Do not initialize the offset-to-top field if it has
1983         been initialized initialized.
1984         * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
1985         * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
1986         (Make_DT): Create a dummy constant object if we can statically build
1987         secondary dispatch tables.
1988         (Make_Secondary_DT): For statically allocated secondary dispatch tables
1989         use the dummy object to compute the offset-to-top field value by means
1990         of the attribute 'Position.
1992 2017-10-09  Bob Duff  <duff@adacore.com>
1994         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
1995         code so if BIPAlloc is not passed in, it will likely raise
1996         Program_Error instead of cause miscellaneous chaos.
1997         (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
1998         as for the other Is_B-I-P... functions.
1999         * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
2000         aggregate whose ancestor part is a build-in-place call returning a
2001         nonlimited type, transform the assignment to the ancestor part to use a
2002         temp.
2003         * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
2004         creating an Itype for a library unit entity.
2005         (Check_Initialization): Avoid spurious error message on
2006         internally-generated call.
2007         * sem_ch5.adb (Analyze_Assignment): Handle the case where the
2008         right-hand side is a build-in-place call. This didn't happen when b-i-p
2009         was only for limited types.
2010         * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
2011         implies >= Ada 2005.
2012         * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
2013         repeatedly.
2014         * sem_util.adb (Next_Actual): Handle case of build-in-place call.
2016 2017-10-09  Arnaud Charlet  <charlet@adacore.com>
2018         * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
2020 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
2022         * libgnarl/s-taprob.adb: Minor whitespace fix.
2024 2017-10-09  Bob Duff  <duff@adacore.com>
2026         * namet.ads: Minor comment fix.
2028 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
2030         * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
2031         just like other program units listed in Ada RM 10.1(1).
2033 2017-10-09  Justin Squirek  <squirek@adacore.com>
2035         * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
2037 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2039         * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
2040         actual for a formal package is an instantiation of a child unit, create
2041         a freeze node for the instance of the parent if it appears in the same
2042         scope and is not frozen yet.
2044 2017-10-09  Pierre-Marie de Rodat  <derodat@adacore.com>
2046         * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
2047         in-source documentation for tagged types's Offset_To_Top.
2049 2017-10-09  Bob Duff  <duff@adacore.com>
2051         * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
2052         confusing.  Same for N_Loc.  Remove assumption that b-i-p implies
2053         limited.  This is for the case of a function call that occurs as the
2054         default for a record component.
2055         (Expand_N_Object_Declaration): Deal with the case where expansion has
2056         created an object declaration initialized with something like
2057         F(...)'Reference.
2058         * exp_ch3.adb: Minor reformatting.
2060 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2062         * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
2063         the attribute is an object, but it may appear within a conversion. The
2064         object itself must be retrieved when generating the range test that
2065         implements the validity check on a scalar type.
2067 2017-10-05  Eric Botcazou  <ebotcazou@adacore.com>
2069         PR ada/82393
2070         * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
2071         * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
2073 2017-10-02  Eric Botcazou  <ebotcazou@adacore.com>
2074             Pierre-Marie de Rodat  <derodat@adacore.com>
2076         PR ada/82384
2077         * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
2078         (time_t): Change from derived type to subtype.
2079         (timeval): Use suseconds_t for tv_usec.
2080         * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
2082 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
2084         * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
2085         handling the form (plus/mult (convert @0) @1).
2087 2017-09-29  Bob Duff  <duff@adacore.com>
2089         * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
2090         what we had before.
2091         (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
2092         change. Set the Etype in the class-wide case. This fixes a regression
2093         in the libadalang test suite.
2095 2017-09-29  Joel Brobecker  <brobecker@adacore.com>
2097         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2098         doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
2099         in comment markup.
2100         * gnat_ugn.texi: Regenerate.
2102 2017-09-29  Justin Squirek  <squirek@adacore.com>
2104         * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
2105         fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
2106         gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
2107         sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
2108         for checking source file status and error message and/or call to
2109         Read_Source_File.
2110         * libgnat/s-os_lib.ads: Add new potential value constant for
2111         uninitialized file descriptors.
2112         * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
2113         return result of IO to encompass a read access failure in addition to a
2114         file-not-found error.
2116 2017-09-29  Bob Duff  <duff@adacore.com>
2118         * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
2119         functions returning nonlimited types. Allow for qualified expressions
2120         and type conversions.
2121         (Expand_N_Extended_Return_Statement): Correct the computation of
2122         Func_Bod to allow for child units.
2123         (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
2124         limited (initialization of In_Place_Expansion), and implies >= Ada
2125         2005.
2126         (Is_Build_In_Place_Result_Type): New function to accompany
2127         Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
2128         sometimes we just have the type on our hands, not the function.  For
2129         now, does the same thing as the old version, so build-in-place is
2130         disabled for nonlimited types, except that you can use -gnatd.9 to
2131         enable it.
2132         * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
2133         accompany Is_Build_In_Place_Function and
2134         Is_Build_In_Place_Function_Call, because sometimes we just have the
2135         type on our hands, not the function.
2136         (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
2137         cases.
2138         (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
2139         questionable code at the end that was setting the Etype.
2140         * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
2141         determine whether "return (...agg...);" is returning from a
2142         build-in-place function.
2143         (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
2144         Remove assumption that b-i-p implies limited (initialization of
2145         In_Place_Expansion).
2146         (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
2147         an unchecked conversion.  Add assertions.
2148         (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
2149         secondary stack here, just because the type needs finalization.  That
2150         code is obsolete.
2151         (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
2152         For "return (...agg...);" don't assume b-i-p implies limited.
2153         Needs_Finalization does not imply secondary stack.
2154         (Expand_Array_Aggregate): Named notation.  Reverse the sense of
2155         Component_OK_For_Backend -- more readability with fewer double
2156         negatives.
2157         * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
2158         b-i-p implies >= Ada 2005.
2159         * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
2160         b-i-p implies >= Ada 2005.  Remove Adjust if we're building the return
2161         object of an extended return statement in place.
2162         * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
2163         Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
2164         b-i-p implies >= Ada 2005.
2165         * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
2166         b-i-p implies >= Ada 2005.
2167         * exp_ch7.adb: Comment fix.
2168         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
2169         assumptions that b-i-p implies >= Ada 2005.
2170         * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
2171         b-i-p implies >= Ada 2005.
2172         * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
2173         (Expr), in case Pool_Id is not set.
2174         (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
2175         qualified or converted.
2176         (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
2177         (Param)) = N_Identifier; that's all it could be.
2178         * sinfo.ads: Comment fixes.
2179         * snames.ads-tmpl: Comment fixes.
2180         * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
2182 2017-09-29  Justin Squirek  <squirek@adacore.com>
2184         * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
2185         all cases related to marking entity identifiers.
2187 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
2189         * adaint.c (win32_wait): Properly handle error and take into account
2190         the WIN32 limitation on the number of simultaneous wait objects.
2192 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
2194         * cal.c: Minor proofreading.
2196 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
2198         * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
2199         * gnat_ugn.texi: Regenerate.
2201 2017-09-29  Bob Duff  <duff@adacore.com>
2203         * lib-xref.ads: Comment fix.
2205 2017-09-29  Bob Duff  <duff@adacore.com>
2207         * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
2208         Discriminants can't need finalization.
2210 2017-09-29  Ed Schonberg  <schonberg@adacore.com>
2212         * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
2213         for types in expression if the function is within a generic unit.
2214         * sem_res.adb (Resolve): In a generic context do not freeze an
2215         expression, unless it is an entity. This exception is solely for the
2216         purpose of detecting illegal uses of deferred constants in generic
2217         units.
2218         * sem_res.adb: Minor reformatting.
2220 2017-09-29  Justin Squirek  <squirek@adacore.com>
2222         * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
2223         redundant warnings.
2225 2017-09-29  Yannick Moy  <moy@adacore.com>
2227         * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
2229 2017-09-29  Eric Botcazou  <ebotcazou@adacore.com>
2231         * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
2232         * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
2233         Document the effect of pragma Optimize_Alignment (Space) on non-packed
2234         record types.
2235         * gnat_rm.texi: Regenerate.
2237 2017-09-25  Justin Squirek  <squirek@adacore.com>
2239         * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
2240         exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
2241         gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
2242         gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
2243         libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
2244         libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
2245         libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
2246         libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
2247         libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
2248         libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
2249         put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
2250         sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
2251         Removal of ineffective use-clauses.
2252         * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
2253         constant folded barriers.
2254         * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
2255         Subtype_Marks and Names list in use-clause nodes to their new singular
2256         counterparts (e.g. Subtype_Mark, Name).
2257         * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
2258         Prev_Ids and More_Ids in use-clause nodes.
2259         (P_Use_Clause): Modify to take a list as a parameter.
2260         (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
2261         subtype_marks within an aggregate use-clauses into individual clauses.
2262         * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
2263         P_Use_Clause to match its new behavior.
2264         * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
2265         * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
2266         errors.
2267         * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
2268         Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
2269         the declarative region.
2270         * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
2271         after analysis (Analyze_Package_Specification): Update use clause chain
2272         when there is no body.
2273         * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
2274         parameter to determine weither the installation of scopes should also
2275         propagate on the use-clause "chain".
2276         (Mark_Use_Clauses): Created to traverse use-clause chains and determine
2277         what constitutes a valid "use" of a clause.
2278         (Update_Use_Clause_Chain): Created to aggregate common machinary used
2279         to clean up use-clause chains (and warn on ineffectiveness) at the end
2280         of declaritive regions.
2281         * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
2282         package name from a use-package clause.
2283         (Analyze_Package_Name_List): Created to perform analysis on a list of
2284         package names (similar to Analyze_Package_Name).
2285         (Find_Most_Prev): Created to traverse to the beginning of a given
2286         use-clause chain.
2287         (Most_Decendant_Use_Clause): Create to identify which clause from a
2288         given set is highest in scope (not always the most prev).
2289         (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
2290         handle the new chaining algorithm, also many changes related to
2291         redundant clauses. A new parameter has also been added to force
2292         installation to handle certain cases.
2293         * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
2294         Analyze_Task_Body): Mark use clauses on relevant entities.
2295         * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
2296         Install_Parents): Add parameter to determine weither the installation
2297         of scopes should also propagate on the use-clause "chain".
2298         * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
2299         Install_Context to avoid redundant chaining of use-clauses.
2300         * sem_ch13.adb: Minor reformatting.
2301         * sem_res.adb (Resolve): Mark use clauses on operators.
2302         (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
2303         entities.
2304         * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
2305         Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
2306         represent any given clause's usage/reference/necessity.
2307         (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
2308         nodes to allow loose chaining of redundant clauses.
2309         (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
2310         Set_More_Ids, Set_Name): Modify set procedure calls to reflect
2311         reorganization in node fields.
2312         * types.ads (Source_File_Index): Adjust index bounds.
2313         (No_Access_To_Source_File): New constant.
2315 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2317         * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
2318         the expression to be used in the generated attribute specification
2319         (rather than relocating it) to avoid resolving a potentially malformed
2320         tree when the expression is resolved through an ASIS-specific call to
2321         Resolve_Aspect_Expressions.  This manifests itself as a crash on a
2322         function with parameter associations.
2324 2017-09-25  Yannick Moy  <moy@adacore.com>
2326         * exp_spark.adb (Expand_SPARK_Indexed_Component,
2327         Expand_SPARK_Selected_Component): New procedures to insert explicit
2328         dereference if required.
2329         (Expand_SPARK): Call the new procedures.
2331 2017-09-25  Patrick Bernardi  <bernardi@adacore.com>
2333         * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
2334         libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
2335         libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
2336         libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
2337         libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
2339 2017-09-25  Vasiliy Fofanov  <fofanov@adacore.com>
2341         * adaint.c (win32_wait): Properly handle error and take into account
2342         the WIN32 limitation on the number of simultaneous wait objects.
2344 2017-09-25  Yannick Moy  <moy@adacore.com>
2346         * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
2347         invariant procedure in GNATprove mode.
2348         * sem_ch5.adb (Analyze_Assignment): Likewise.
2350 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
2352         * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
2353         "back-end" in comments.
2355 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2357         * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
2358         call that appears in a classwide precondition and that mentions an
2359         access formal of the subprogram, must use the accessibility level of
2360         the actual in the call. This is one case in which a reference to a
2361         formal parameter appears outside of the body of the subprogram.
2363 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2365         * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
2366         for GNATprove.
2367         (Resolve_Entry): Clean up predicate
2369 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2371         * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
2372         than Program_Error because U_E is more in line with respect to the
2373         intended behavior.
2375 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2377         * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
2378         Storage_Size does not freeze, and thus can include references to
2379         deferred constants.
2381 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2383         * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
2384         reference when it appears within a pragma of no significance to SPARK.
2385         (In_Insignificant_Pragma): New routine.
2386         * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
2388 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2390         * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
2391         actual is a renaming, indicate that it is the renamed package that must
2392         be frozen before the instantiation.
2394 2017-09-25  Yannick Moy  <moy@adacore.com>
2396         * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
2397         of dimensionality system in GNAT UG.
2398         * gnat_ugn.texi: Regenerate.
2400 2017-09-25  Yannick Moy  <moy@adacore.com>
2402         * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
2403         GNATprove_Mode when switch -gnatdF used.
2405 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
2407         * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
2408         the backend.
2410 2017-09-25  Javier Miranda  <miranda@adacore.com>
2412         * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
2413         expansion of user-defined enumeration types when the generation of
2414         names for enumeration literals is suppressed.
2416 2017-09-25  Gary Dismukes  <dismukes@adacore.com>
2418         * libgnarl/s-taprop__linux.adb: Minor reformatting.
2420 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2422         * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
2423         that appear as selector names of parameter associations, as these are
2424         never resolved by visibility.
2426 2017-09-25  Justin Squirek  <squirek@adacore.com>
2428         * sem_res.adb (Resolve_Entry): Generate reference for index entities.
2430 2017-09-25  Doug Rupp  <rupp@adacore.com>
2432         * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
2434 2017-09-25  Javier Miranda  <miranda@adacore.com>
2436         * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
2437         (Expand_User_Defined_Enumeration_Image): New subprogram.
2438         (Expand_Image_Attribute): Enable speed-optimized expansion of
2439         user-defined enumeration types when we are compiling with optimizations
2440         enabled.
2442 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
2444         * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
2445         routine is already provided by Einfo.
2446         * einfo.adb (Has_Null_Abstract_State): Replace with the body from
2447         Sem_Util, which had better comments and avoided double calls to
2448         Abstract_State.
2450 2017-09-25  Bob Duff  <duff@adacore.com>
2452         * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
2454 2017-09-25  Doug Rupp  <rupp@adacore.com>
2456         * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
2457         (Compute_Base_Monotonic_Clock): New function.
2458         (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
2459         (Timed_Delay): Likewise.
2460         (Monotonic_Clock): Likewise.
2461         * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
2463 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2465         * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
2466         previous change.
2468 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2470         * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
2471         Minor reformatting.
2473 2017-09-20  Alexandre Oliva <aoliva@redhat.com>
2475         * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
2477 2017-09-18  Bob Duff  <duff@adacore.com>
2479         * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
2480         reference types in the access-to-access case.
2482 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
2484         * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
2485         of the "aliased" keyword on the prefix from here to...
2486         (Resolve_Attribute) <Attribute_Access>: ...here.  Remove useless call
2487         to Check_No_Implicit_Aliasing.
2488         * sinfo.ads (Non_Aliased_Prefix): Delete.
2489         (Set_Non_Aliased_Prefix): Likewise.
2490         * sinfo.adb (Non_Aliased_Prefix): Delete.
2491         (Set_Non_Aliased_Prefix): Likewise.
2493 2017-09-18  Bob Duff  <duff@adacore.com>
2495         * exp_ch5.adb (Build_Formal_Container_Iteration,
2496         Expand_Formal_Container_Element_Loop): Convert the container to the
2497         root type before passing it to the iteration operations, so it will be
2498         of the right type.
2500 2017-09-18  Bob Duff  <duff@adacore.com>
2502         * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
2504 2017-09-18  Bob Duff  <duff@adacore.com>
2506         * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
2507         and it's a bit-packed array, pass False to the Consider_IS parameter of
2508         Needs_Simple_Initialization.
2510 2017-09-18  Hristian Kirtchev  <kirtchev@adacore.com>
2512         * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
2513         the preexisting body.
2514         * sem_prag.adb (Check_Inline_Always_Placement): New routine.
2515         (Process_Inline): Verify the placement of pragma Inline_Always. The
2516         pragma must now appear on the initial declaration of the related
2517         subprogram.
2519 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
2521         * sem_ch3.adb (Analyze_Declarations): In ASIS mode,  At the end of the
2522         declarative list in a subprogram body, analyze aspext specifications to
2523         provide basic semantic information, because otherwise the aspect
2524         specifications might only be snalyzed during expansion, when related
2525         subprograms are generated.
2527 2017-09-18  Bob Duff  <duff@adacore.com>
2529         * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
2530         validity checks have rewritten the tree.
2532 2017-09-18  Bob Duff  <duff@adacore.com>
2534         * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
2536 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
2538         * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
2539         qualified exxpression for an aggregate in a generic unit, verify that
2540         the scope of the type is itself visible and not hidden, so that the
2541         qualified expression is correctly resolved in any instance.
2543 2017-09-18  Bob Duff  <duff@adacore.com>
2545         * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
2546         mark refers to the current instance. Set the type to Any_Type in that
2547         case, to avoid later crashes.
2549 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
2551         * exp_ch3.adb (Replace_Discriminant_References): New procedure,
2552         subsidiary of Build_Assignment, used to handle the initialization code
2553         for a mutable record component whose default value is an aggregate that
2554         sets the values of the discriminants of the components.
2556 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
2558         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
2559         the entity as being volatile for an overlay that toggles the scalar
2560         storage order.
2562 2017-09-18  Fedor Rybin  <frybin@adacore.com>
2564         * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
2565         options -U main and --harness-only are not compatible.
2567 2017-09-18  Hristian Kirtchev  <kirtchev@adacore.com>
2569         * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
2571 2017-09-18  Piotr Trojanek  <trojanek@adacore.com>
2573         * einfo.ads (Is_Imported): Update comment, as this
2574         routine also applies to constants.
2576 2017-09-18  Yannick Moy  <moy@adacore.com>
2578         * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
2579         holding state.
2581 2017-09-18  Justin Squirek  <squirek@adacore.com>
2583         * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
2584         constant indication for Pragma_Linker_Section.
2586 2017-09-18  Bob Duff  <duff@adacore.com>
2588         Alternate fix for PR ada/71358
2589         * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
2590         Instead, make a local copy of Config, and if it's null, allocate an
2591         empty Command_Line_Configuration_Record, so we won't crash on null
2592         pointer dereference.
2594 2017-09-16  Eric Botcazou  <ebotcazou@adacore.com>
2596         * libgnarl/a-intnam__rtems.ads: Update copyright date.
2597         * libgnarl/s-interr__hwint.adb: Likewise.
2598         * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
2599         * libgnarl/s-osinte__rtems.adb: Likewise.
2600         * libgnarl/s-osinte__rtems.ads: Likewise.
2602 2017-09-13  Nicolas Roche  <roche@adacore.com>
2604         * Make-lang.in: In the fallback mechanim, parse the associated .ali
2605         file and try to guess the locations of dependencies.
2607 2017-09-13  Eric Botcazou  <ebotcazou@adacore.com>
2609         * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
2610         the suppression status of Alignment_Check on the current scope.
2611         (Alignment_Checks_Suppressed): New function to use the saved instead of
2612         the current suppression status of Alignment_Check.
2613         (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
2614         (Analyze_Attribute_Definition_Clause): Instead of manually appending to
2615         the table, call Register_Address_Clause_Check.
2616         (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
2617         recorded address clause instead of its entity.
2619 2017-09-13  Jerome Guitton  <guitton@adacore.com>
2621         * libgnarl/s-tpopsp__vxworks-tls.adb,
2622         libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
2623         (Self): Register thread if task id is null.
2625 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
2627         * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
2629 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
2631         * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
2632         from an entity to only scope index, as a mapping from an entity to the
2633         same entity was useless.
2634         (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
2635         to E.
2636         (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
2637         to E.
2638         (Is_Constant_Object_Without_Variable_Input): remove local "Result"
2639         variable, just use return statements.
2641 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
2643         * libgnarl/s-vxwext__kernel-smp.adb,
2644         libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
2645         New file.
2647 2017-09-13  Hristian Kirtchev  <kirtchev@adacore.com>
2649         * einfo.adb: Flag42 is now Is_Controlled_Active.
2650         (Is_Controlled): This attribute is now synthesized.
2651         (Is_Controlled_Active): This attribute is now an explicit flag rather
2652         than a synthesized attribute.   (Set_Is_Controlled): Removed.
2653         (Set_Is_Controlled_Active): New routine.
2654         (Write_Entity_Flags): Update the output for Flag42.
2655         * einfo.ads: Update the documentation of the following attributes:
2656         Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
2657         and Is_Controlled_Active have swapped their functionality.
2658         (Is_Controlled): Renamed to Is_Controlled_Active.
2659         (Is_Controlled_Active): Renamed to Is_Controlled.
2660         (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
2661         * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
2662         Is_Controlled.
2663         * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
2664         (Needs_Finalization): Code clean up. Remove the tests for
2665         Disable_Controlled because a) they were incorrect as they would reject
2666         a type which is sublect to the aspect, but may contain controlled
2667         components, and b) they are no longer necessary.
2668         * exp_util.ads (Needs_Finalization): Update comment on documentation.
2669         * freeze.adb (Freeze_Array_Type): Restore the original use of
2670         Is_Controlled.
2671         (Freeze_Record_Type): Restore the original use of Is_Controlled.
2672         * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
2673         Is_Controlled.
2674         (Array_Type_Declaration): Restore the original use of Is_Controlled.
2675         (Build_Derived_Private_Type): Restore the original use of
2676         Is_Controlled.
2677         (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
2678         type derived from Ada.Finalization.[Limited_]Controlled.
2679         (Build_Derived_Type): Restore the original use of Is_Controlled.
2680         (Record_Type_Definition): Restore the original use of Is_Controlled.
2681         * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
2682         Is_Controlled.
2683         * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
2684         (Analyze_Aspect_Specifications): Use routine
2685         Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
2687 2017-09-13  Vincent Celier  <celier@adacore.com>
2689         * clean.adb (Gnatclean): Fix error when looking for target
2690         of <target>-gnatclean
2692 2017-09-13  Javier Miranda  <miranda@adacore.com>
2693             Ed Schonberg  <schonberg@adacore.com>
2695         * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
2696         expanded name that designates the current instance of a child unit in
2697         its own body and appears as the prefix of a reference to an entity
2698         local to the child unit.
2700 2017-09-12  Bob Duff  <duff@adacore.com>
2702         * sem_warn.adb: Minor comment.
2704 2017-09-12  Bob Duff  <duff@adacore.com>
2706         * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
2707         libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
2708         be Default_Initialized_Item, and apply pragma Unmodified to it,
2709         to suppress the warning.
2711 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
2713         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
2714         for access types.
2716 2017-09-12  Yannick Moy  <moy@adacore.com>
2718         * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
2719         together with Global when ignoring one in CodePeer mode.
2721 2017-09-12  Javier Miranda  <miranda@adacore.com>
2723         * sem_ch3.adb (Analyze_Declarations): In nested
2724         package declarations that have a private part enable missing check
2725         of the RM rule 13.1.1(11/3): usage names in aspect definitions are
2726         resolved at the end of the immediately enclosing declaration list.
2728 2017-09-12  Bob Duff  <duff@adacore.com>
2730         * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
2731         Empty.
2733 2017-09-12  Georges-Axel Jaloyan  <jaloyan@adacore.com>
2735         * debug.adb: Reserving flag -gnatdF for safe pointer checking.
2736         * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
2737         dF flag.
2738         * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
2739         in preparation for the evolution of the SPARK language that
2740         includes a pointer analysis for checking non-aliasing of access
2741         types. The Check_Safe_Pointers function is the entry point, and
2742         will traverse the AST and raise compile-time errors everytime
2743         it detects non-begign aliasing.  Detailed comments are present
2744         in the sem_spark.ads file.
2745         * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
2746         functions to iterate over the list of globals of a subprogram.
2747         * libgnat/system.ads: Add restriction No_Finalization.
2748         * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
2749         dependency on g-dynhta.adb.
2751 2017-09-12  Bob Duff  <duff@adacore.com>
2753         * sem_ch6.adb (Analyze_Expression_Function): Call
2754         Check_Dynamically_Tagged_Expression.
2755         * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
2756         "and then Is_Tagged_Type (Typ)" because there is an earlier
2757         "Assert (Is_Tagged_Type (Typ))".
2759 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
2761         * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
2763 2017-09-11  Arnaud Charlet  <charlet@adacore.com>
2765         * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
2766         * doc/gnat_ugn/platform_specific_information.rst: Remove doc
2767         for no longer supported platforms.
2768         * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
2769         description of the semantics for dimensionality analysis.
2770         * gnat_ugn.texi: Regenerated.
2772 2017-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2774         * freeze.adb (Has_Incomplete_Compoent): Delete.
2775         (Freeze_Profile):
2776         Do not inhibit the freezing of the profile of an expression
2777         function here.
2778         (Freeze_Subprogram): Do not re-create extra formals.
2779         * sem_ch6.adb (Analyze_Expression_Function): Always
2780         pre-analyze the expression if the function is not a completion.
2781         (Analyze_Subprogram_Body_Helper): For the body generated
2782         from an expression function that is not a completion, do
2783         not freeze the profile and temporary mask the types declared
2784         outside the expression that are not yet frozen.
2785         * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
2786         during the pre-analysis of an expression function.
2788 2017-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2790         * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
2791         (gigi): Likewise.
2793 2017-09-11  Yannick Moy  <moy@adacore.com>
2795         * lib-xref-spark_specific.adb: Minor rewrite.
2797 2017-09-11  Jerome Lambourg  <lambourg@adacore.com>
2799         * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
2800         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
2801         renaming into account.
2803 2017-09-11  Jerome Lambourg  <lambourg@adacore.com>
2805         * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
2806         * gcc-interface/Makefile.in: Take this renaming into account.
2808 2017-09-11  Arnaud Charlet  <charlet@adacore.com>
2810         * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
2811         longer used.
2813 2017-09-11  Yannick Moy  <moy@adacore.com>
2815         * sem_util.adb (Check_Result_And_Post_State):
2816         Do not issue a warning about missing reference to an outcome if
2817         the subprogram is ghost and has no outputs.
2818         * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
2819         reformatting.
2821 2017-09-11  Yannick Moy  <moy@adacore.com>
2823         * gnat1drv.adb (Adjust_Global_Switches): Set
2824         Check_Validity_Of_Parameters to False in GNATprove mode.
2825         * opt.ads (Check_Validity_Of_Parameters): Document switch to
2826         set option.
2828 2017-09-09  Pierre-Marie de Rodat  <derodat@adacore.com>
2830         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
2831         generate debug info for inner record types if -fgnat-encodings=minimal.
2832         (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
2833         type as the debug type.
2835 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
2837         * gcc-interface/decl.c (components_to_record): Do not reorder in non-
2838         packed record types if pragma Optimize_Alignment (Space) is enabled.
2840 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
2842         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
2843         limits for expression functions.
2844         (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
2846 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
2848         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
2849         layout of the record from the parent type only if both are or are not
2850         unchecked unions.
2851         (is_stored_discriminant): Return false for an unchecked union.
2853 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
2855         * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
2856         return NULL_EXPR.
2858 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
2860         * gcc-interface/decl.c (promote_object_alignment): New function taken
2861         from...
2862         (gnat_to_gnu_entity) <E_Variable>: ...here.  Invoke it.
2863         (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
2864         create a padding type on success before doing the atomic check.
2866 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
2868         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
2869         promotion to static memory earlier in the processing.
2871 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
2873         * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
2874         and TYPE_BY_REFERENCE_P flags on types after various promotions.
2875         * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
2876         Consider all kinds of entities.
2878 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
2880         * gcc-interface/utils.c (convert): When converting to a padding type,
2881         reuse an existing CONSTRUCTOR if it has got the right size.
2883 2017-09-08  Nicolas Roche  <roche@adacore.com>
2885         * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
2886         source in libgnat/
2887         * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
2888         a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
2889         i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
2890         a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
2891         a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
2892         s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
2893         a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
2894         s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
2895         a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
2896         a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
2897         a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
2898         a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
2899         a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
2900         s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
2901         a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
2902         s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
2903         s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
2904         a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
2905         a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
2906         system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
2907         a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
2908         a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
2909         s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
2910         g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
2911         g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
2912         g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
2913         a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
2914         calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
2915         a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
2916         a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
2917         a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
2918         a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
2919         directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
2920         system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
2921         system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
2922         a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
2923         system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
2924         g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
2925         a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
2926         s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
2927         s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
2928         g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
2929         a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
2930         a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
2931         g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
2932         a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
2933         a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
2934         a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
2935         g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
2936         a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
2937         a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
2938         s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
2939         a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
2940         s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
2941         s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
2942         s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
2943         a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
2944         system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
2945         s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
2946         g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
2947         g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
2948         s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
2949         s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
2950         g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
2951         g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
2952         g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
2953         system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
2954         g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
2955         g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
2956         s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
2957         i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
2958         g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
2959         s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
2960         g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
2961         s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
2962         a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
2963         a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
2964         g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
2965         s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
2966         g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
2967         g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
2968         a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
2969         a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
2970         s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
2971         s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
2972         a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
2973         a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
2974         a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
2975         s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
2976         s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
2977         s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
2978         a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
2979         a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
2980         s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
2981         a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
2982         a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
2983         s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
2984         a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
2985         g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
2986         a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
2987         a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
2988         s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
2989         a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
2990         g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
2991         a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
2992         s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
2993         system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
2994         a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
2995         a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
2996         s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
2997         s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
2998         g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
2999         s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
3000         g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
3001         system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
3002         g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
3003         g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
3004         a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
3005         a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
3006         g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
3007         a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
3008         system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
3009         s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
3010         g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
3011         a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
3012         a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
3013         a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
3014         s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
3015         s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
3016         g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
3017         a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
3018         a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
3019         a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
3020         a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
3021         g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
3022         g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
3023         a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
3024         g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
3025         a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
3026         s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
3027         a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
3028         s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
3029         s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
3030         a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
3031         s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
3032         a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
3033         s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
3034         g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
3035         g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
3036         a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
3037         s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
3038         a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
3039         a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
3040         a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
3041         s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
3042         s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
3043         a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
3044         a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
3045         system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
3046         s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
3047         a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
3048         a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
3049         s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
3050         s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
3051         a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
3052         a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
3053         i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
3054         s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
3055         a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
3056         s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
3057         g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
3058         s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
3059         a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
3060         a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
3061         a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
3062         a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
3063         s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
3064         a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
3065         a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
3066         a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
3067         g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
3068         s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
3069         g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
3070         a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
3071         system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
3072         a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
3073         s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
3074         a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
3075         g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
3076         i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
3077         s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
3078         a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
3079         g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
3080         s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
3081         s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
3082         a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
3083         a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
3084         a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
3085         a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
3086         a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
3087         g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
3088         s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
3089         a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
3090         a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
3091         a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
3092         s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
3093         s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
3094         s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
3095         s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
3096         g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
3097         a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
3098         s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
3099         a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
3100         a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
3101         a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
3102         s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
3103         a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
3104         s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
3105         a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
3106         g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
3107         i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
3108         s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
3109         s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
3110         a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
3111         s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
3112         s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
3113         s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
3114         s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
3115         a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
3116         s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
3117         a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
3118         s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
3119         s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
3120         s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
3121         s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
3122         s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
3123         a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
3124         g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
3125         a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
3126         s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
3127         system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
3128         g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
3129         a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
3130         a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
3131         a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
3132         s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
3133         a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
3134         g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
3135         a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
3136         s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
3137         a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
3138         a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
3139         a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
3140         a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
3141         s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
3142         g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
3143         g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
3144         system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
3145         s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
3146         s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
3147         a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
3148         g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
3149         a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
3150         s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
3151         s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
3152         s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
3153         unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
3154         s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
3155         g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
3156         a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
3157         s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
3158         a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
3159         a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
3160         to libgnat subdirectory.
3162 2017-09-08  Yannick Moy  <moy@adacore.com>
3164         * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
3165         return the entity associated with the call.
3166         * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
3167         Replace the internal Get_Function_Id with the new
3168         Sem_Aux.Get_Called_Entity.
3169         (Iterate_Call_Parameters): New
3170         procedure to iterate on formals and actuals at the same time.
3171         * sem_ch12.adb (Analyze_Subprogram_Instantiation):
3172         Set SPARK_Mode from spec when set, for analysis
3173         of instance. Restore after analysis of instance.
3174         (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
3175         set, for analysis of body instance. Restored automatically at
3176         the end of the subprogram.
3177         * gnat1drv.adb (Adjust_Global_Switches): Set
3178         Check_Validity_Of_Parameters to False in GNATprove mode.
3179         * opt.ads (Check_Validity_Of_Parameters): Document switch to
3180         set option.
3182 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3184         * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
3185         (New_Copy_Tree): ...there.  Reset the hash tables only if they
3186         were used in the previous invocation.
3187         * s-htable.adb: Fix typo.
3189 2017-09-08  Bob Duff  <duff@adacore.com>
3191         * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
3193 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3195         * sem_aggr.adb: minor style fix.
3197 2017-09-08  Bob Duff  <duff@adacore.com>
3199         * sprint.adb (Write_Corresponding_Source): Ignore if there is
3200         no current source file.
3201         (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
3202         Print something helpful in case N is invalid.
3203         * sprint.ads: Minor comment fix.
3205 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3207         * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
3208         access types.
3210 2017-09-08  Bob Duff  <duff@adacore.com>
3212         * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
3213         Ada_2020, along the same lines as the other Ada version pragmas.
3215 2017-09-08  Gary Dismukes  <dismukes@adacore.com>
3217         * sem_ch12.adb: Minor typo fixes and reformatting.
3219 2017-09-08  Yannick Moy  <moy@adacore.com>
3221         * sem_aggr.adb (Resolve_Record_Aggregate):
3222         Rewrite bounds of aggregate subexpressions which may depend on
3223         discriminants of the enclosing aggregate.
3225 2017-09-08  Yannick Moy  <moy@adacore.com>
3227         * sem_ch5.adb: Prevent assertion failure on illegal code.
3229 2017-09-08  Yannick Moy  <moy@adacore.com>
3231         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
3232         calling Renamed_Entity on an entity which cannot be a renaming.
3234 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3236         * exp_aggr.adb: Add with & use clause for Urealp.
3237         (Aggr_Assignment_OK_For_Backend): Accept (almost all)
3238         elementary types instead of just discrete types.
3239         * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
3240         * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
3241         Be prepared for the FP zero value in the memset case.  Add small
3242         guard.
3244 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3246         * s-htable.adb (Static_HTable.Reset): Use aggregate instead
3247         of loop.
3249 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
3251         * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
3252         of New_Copy because the latter leaves the syntactic structure of
3253         the tree inconsistent (a child is accessible through two parents)
3254         and prevents proper replication of itypes by subsequent calls
3255         to New_Copy_Tree.
3256         * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
3257         New_Copy because the latter leaves the syntactic structure of the
3258         tree inconsistent (a child is accessible through two parents)
3259         and prevents proper replication of itypes by subsequent calls
3260         to New_Copy_Tree.
3261         * sem_util.adb (In_Subtree): New routine.
3262         (New_Copy_Tree): Reimplemented.
3263         * sem_util.ads (In_Subtree): New routine.
3264         (New_Copy_Tree): Reimplemented.
3266 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3268         * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
3269         for aspect Default_Value is a static scalar value, but it does
3270         not freeze the type. Yhis allows for subsequent representation
3271         clauses for the type.
3273 2017-09-08  Javier Miranda  <miranda@adacore.com>
3275         * sem_ch8.adb (Find_Direct_Name.Undefined): Do
3276         not add entries into the undefined reference table when we are
3277         compiling with errors ignored.
3279 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3281         * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
3282         check if the instance is within an enclosing instance body. The
3283         formal package was legal in the enclosing generic, and is
3284         legal in the enclosing instantiation.  This optimisation may be
3285         applicable elsewhere, and it also removes spurious errors that
3286         may arise with on-the-fly processing  of instantiations that
3287         contain Inline_Always subprograms.
3289 2017-09-08  Vincent Celier  <celier@adacore.com>
3291         * gnatcmd.adb: Disregard empty argument of GNAT driver.
3293 2017-09-08  Justin Squirek  <squirek@adacore.com>
3295         * checks.adb (Insert_Valid_Check): Manually decorate
3296         the generated temporary for range valdity checks.
3298 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3300         * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
3302 2017-09-08  Justin Squirek  <squirek@adacore.com>
3304         * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
3305         case to handle underscore flags.
3306         * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
3307         new procedure to handle underscores.
3309 2017-09-08  Javier Miranda  <miranda@adacore.com>
3311         * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
3312         divisions with fixed point results to avoid generating twice
3313         the runtime check on divide by zero.
3314         * checks.adb (Apply_Divide_Checks): Ensure that operands are
3315         not evaluated twice (once for their runtime checks and once for
3316         their regular computation).
3318 2017-09-08  Yannick Moy  <moy@adacore.com>
3320         * sem_prag.adb (Analyze_Part_Of): Add missing
3321         return statements after issuing errors.  Add detection of
3322         out-of-order item and single concurrent type.
3324 2017-09-08  Nicolas Roche  <roche@adacore.com>
3326         * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
3327         s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
3328         s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
3329         s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
3330         a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
3331         a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
3332         s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
3333         s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
3334         a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
3335         s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
3336         s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
3337         s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
3338         s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
3339         s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
3340         s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
3341         s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
3342         s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
3343         s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
3344         a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
3345         s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
3346         s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
3347         s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
3348         s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
3349         s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
3350         s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
3351         s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
3352         s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
3353         a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
3354         s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
3355         s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
3356         s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
3357         a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
3358         s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
3359         s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
3360         s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
3361         a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
3362         s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
3363         s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
3364         s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
3365         s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
3366         s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
3367         a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
3368         g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
3369         a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
3370         g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
3371         s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
3372         s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
3373         g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
3374         s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
3375         s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
3376         s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
3377         s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
3378         a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
3379         a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
3381 2017-09-08  Arnaud Charlet <charlet@adacore.com>
3383         * doc/share/conf.py, doc/share/latex_elements.py,
3384         doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
3385         highlighting.
3387 2017-09-08  Arnaud Charlet <charlet@adacore.com>
3389         * gnat_rm.texi, gnat_ugn.texi,
3390         doc/gnat_ugn/the_gnat_compilation_model.rst,
3391         doc/gnat_ugn/getting_started_with_gnat.rst,
3392         doc/gnat_ugn/inline_assembler.rst,
3393         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3394         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
3395         doc/gnat_ugn/about_this_guide.rst,
3396         doc/gnat_ugn/platform_specific_information.rst,
3397         doc/gnat_ugn/example_of_binder_output.rst,
3398         doc/gnat_ugn/gnat_and_program_execution.rst,
3399         doc/gnat_ugn/gnat_utility_programs.rst,
3400         doc/gnat_rm/implementation_of_specific_ada_features.rst,
3401         doc/gnat_rm/interfacing_to_other_languages.rst,
3402         doc/gnat_rm/implementation_defined_aspects.rst,
3403         doc/gnat_rm/intrinsic_subprograms.rst,
3404         doc/gnat_rm/implementation_defined_characteristics.rst,
3405         doc/gnat_rm/implementation_advice.rst,
3406         doc/gnat_rm/implementation_defined_attributes.rst,
3407         doc/gnat_rm/compatibility_and_porting_guide.rst,
3408         doc/gnat_rm/standard_library_routines.rst,
3409         doc/gnat_rm/the_gnat_library.rst,
3410         doc/gnat_rm/implementation_defined_pragmas.rst,
3411         doc/gnat_rm/representation_clauses_and_pragmas.rst,
3412         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3413         doc/gnat_rm/obsolescent_features.rst,
3414         doc/gnat_rm/about_this_guide.rst,
3415         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
3416         doc/gnat_rm/implementation_of_ada_2012_features.rst,
3417         doc/gnat_ugn.rst,
3418         doc/gnat_rm.rst: Update documentation.
3420 2017-09-08  Arnaud Charlet <charlet@adacore.com>
3422         * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
3423         s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
3424         * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
3426 2017-09-08  Bob Duff  <duff@adacore.com>
3428         * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
3429         New routine to read the Tag robustly.
3430         * exp_attr.adb (Input): Change the expansion of 'Input,
3431         in the class-wide case, to call String_Input_Tag instead of
3432         String_Input_Blk_IO.
3434 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3436         * s-rident.ads (Restriction_Id): reorder enum
3437         literals, so that Pure_Barriers is no longer in range of the
3438         Cunit_Boolean_Restrictions subtype.
3440 2017-09-08  Nicolas Roche  <roche@adacore.com>
3442         * a-taster.ads, a-taster.adb: Move to libgnarl
3443         * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
3444         Add support for files in libgnarl.
3446 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3448         * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
3449         accessibility check to an interface conversion, whose purpose
3450         is to perform a pointer adjustment in a dispatching call.
3451         * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
3452         when the actual is a construct that involves a dereference of an
3453         expression that includes a formal of the enclosing subprogram,
3454         In such cases, the accessibility level of the actual is that of
3455         the corresponding formal, which is passed in as an additional
3456         actual in the outer call.
3458 2017-09-08  Bob Duff  <duff@adacore.com>
3460         * exp_intr.adb (Add_Source_Info): Do not decode
3461         file names; they were not encoded in the first place.
3463 2017-09-08  Bob Duff  <duff@adacore.com>
3465         * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
3466         exceptions instead of crashes. Check for absurdly long strings
3467         and empty strings. Empty strings cause trouble because they can
3468         have super-null ranges (e.g. 100..10), which causes Ext_Copy to
3469         be empty, which causes an array index out of bounds.
3470         * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
3471         instead of crashes.
3473 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3475         * sem_util.adb (Is_CCT_Instance): allow use in
3476         the context of protected types.
3478 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3480         * a-tigeli.adb: minor remove extra whitespace.
3482 2017-09-08  Gary Dismukes  <dismukes@adacore.com>
3484         * par-ch4.adb: Reformatting of an error message.
3486 2017-09-08  Javier Miranda  <miranda@adacore.com>
3488         * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
3489         identifiers to ensure their correct decoration of names on
3490         aspect expressions.
3492 2017-09-08  Yannick Moy  <moy@adacore.com>
3494         * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
3495         not skip a loop coming from source which is rewritten into a loop.
3497 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3499         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
3500         wrapper has convention Ada, to prevent spurious warnings on
3501         unconstrained array parameters.
3503 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3505         * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
3506         (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
3508 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3510         * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
3512 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3514         * exp_intr.adb (Append_Entity_Name): Move to ...
3515         * sem_util.ads, sem_util.adb: ... here to share it.
3516         (Subprogram_Name): New subprogram, to compute the name of the enclosing
3517         subprogram/entity.
3518         * errutil.adb (Error_Msg): Fill new field Node.
3519         * erroutc.ads (Subprogram_Name_Ptr): New.
3520         (Error_Msg_Object): New field Node.
3521         * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
3522         * errout.adb (Error_Msg): New variant with node id parameter.
3523         Fill new parameter Node when emitting messages. Revert previous
3524         changes for Include_Subprogram_In_Messages.
3525         * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
3526         generating warning message.
3528 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3530         * par-ch4.adb (P_Iterated_Component_Association): Place construct
3531         under -gnat2020 flag, given that it is a future feature of
3532         the language.
3533         * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
3534         defining identifier as referenced to prevent spurious warnings:
3535         corresponding loop is expanded into one or more loops whose
3536         variable has the same name, and the expression uses those names
3537         and not the original one.
3539 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
3541         * sem_elab.adb (Check_A_Call): Do not consider
3542         references to internal variables for SPARK semantics.
3544 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3546         * inline.adb (In_Package_Spec): refine type of
3547         the parameter from Node_Id to Entity_Id.
3549 2017-09-08  Justin Squirek  <squirek@adacore.com>
3551         * exp_ch5.adb (Expand_Formal_Container_Loop):
3552         Reset the scope of the loop parameter after it is reanalyzed.
3554 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3556         * sem_util.ads (Set_Rep_Info): New inline procedure.
3557         * sem_util.adb (Set_Rep_Info): Implement it.
3558         * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
3559         always copy the representation aspects onto the subtype.
3561 2017-09-08  Georges-Alex Jaloyan  <jaloyan@adacore.com>
3563         * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
3564         Correction of the return type from access type to option type.
3565         (Simple_HTable): Moving the Instance_Data to ads file.
3567 2017-09-08  Yannick Moy  <moy@adacore.com>
3569         * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
3571 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3573         * opt.ads (Include_Subprogram_In_Messages): New variable.
3574         * errout.ads (Current_Subprogram_Ptr): New variable.
3575         * errout.adb (Error_Msg): Prepend current subprogram info
3576         in messages if Include_Subprogram_In_Messages is set.
3577         * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
3578         Current_Subprogram.
3579         * gnat1drv.adb (Adjust_Global_Switches): Set
3580         Include_Subprogram_In_Messages when -gnatdJ is set.
3581         * debug.adb: Document and reserve -gnatdJ.
3583 2017-09-08  Georges-Axel Jaloyan  <jaloyan@adacore.com>
3585         * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
3586         functions to iterate over simple hastables.
3587         (Load_Factor_HTable): Remove obsolete and inefficient implementation.
3589 2017-09-08  Javier Miranda  <miranda@adacore.com>
3591         * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
3592         missing checks on the presence of Entity() before checking the
3593         entity attributes.
3595 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3597         * sem_ch6.adb (Analyze_Expression_Function): Reorder some
3598         statements, use local variable and remove unnecessary processing.
3600 2017-09-08  Javier Miranda  <miranda@adacore.com>
3602         * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
3603         subprogram.
3604         (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
3605         (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
3606         subprogram.
3607         (Unqual_BIP_Iface_Function_Call): New subprogram.
3608         * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
3609         subprogram containing code that was previously inside
3610         Make_Build_In_Place_Call_In_Object_Declaration since it is also
3611         required for one of the new subprograms.
3612         (Expand_Actuals):
3613         Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
3614         (Expand_N_Extended_Return_Statement): Extend the
3615         cases covered by an assertion on expected BIP object
3616         declarations.
3617         (Make_Build_In_Place_Call_In_Assignment):
3618         Removing unused code; found working on this ticket.
3619         (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
3620         that replaces the internal name of the renaming declaration
3621         into the new subprogram Replace_Renaming_Declaration_Id.
3622         (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
3623         (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
3624         New subprogram.
3625         (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
3626         subprogram.
3627         (Unqual_BIP_Iface_Function_Call): New subprogram.
3628         * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
3629         subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
3630         * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
3631         subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3632         * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
3633         subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
3634         (Expand_N_Indexed_Component): Invoke the new subprogram
3635         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3636         (Expand_N_Selected_Component): Invoke the new subprogram
3637         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3638         (Expand_N_Slice): Invoke the new subprogram
3639         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3640         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
3641         Invoke the new subprogram
3642         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3644 2017-09-08  Javier Miranda  <miranda@adacore.com>
3646         * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
3647         access to interface types.  Remove also the accessibility check.
3649 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3651         * sem_ch6.adb (Freeze_Expr_Types): Really freeze
3652         all the types that are referenced by the expression.
3653         (Analyze_Expression_Function): Call Freeze_Expr_Types for
3654         a completion instead of manually freezing the type of the
3655         expression.
3656         (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
3658 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3660         * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
3661         New procedure, auxiliary to Expand_Pragma_Check, to handle
3662         references to the discriminants of a protected type within a
3663         precondition of a protected operation. This is needed because
3664         the original precondition has been analyzed in the context of
3665         the protected declaration, but in the body of the operation
3666         references to the discriminants have been replaved by references
3667         to the discriminants of the target object, and these references
3668         are only created when expanding the protected body.
3670 2017-09-08  Yannick Moy  <moy@adacore.com>
3672         * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
3673         Loop_Variant.
3675 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3677         * exp_attr.adb (Build_Record_VS_Func): If the record is an
3678         unchecked union, do not emit checks for its (non-existent)
3679         discriminants, or for variant parts that depend on them.
3681 2017-09-08  Justin Squirek  <squirek@adacore.com>
3683         * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
3684         Find_Comparison_Type.Try_One_Interp): Add check for generic
3685         instances.
3687 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3689         * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
3690         exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
3691         repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
3692         exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
3693         remaining references to AAMP_On_Target.
3695 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3697         * style.adb: Fix typo.
3699 2017-09-08  Javier Miranda  <miranda@adacore.com>
3701         * einfo.adb (Underlying_Type): Add missing support for class-wide
3702         types that come from the limited view.
3703         * exp_attr.adb (Attribute_Address): Check class-wide type
3704         interfaces using the underlying type to handle limited-withed
3705         types.
3706         (Attribute_Tag): Check class-wide type interfaces using
3707         the underlying type to handle limited-withed types.
3709 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3711         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
3712         over a subtype of a type with a static predicate, taking into
3713         account the predicate function of the parent type and the bounds
3714         given in the loop specification.
3715         * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
3716         a loop specification that is a subtype indication whose type mark
3717         is a type with a static predicate, inherit predicate function,
3718         used to build case statement for rewritten loop.
3720 2017-09-08  Justin Squirek  <squirek@adacore.com>
3722         * lib-load.adb: Modify printing of error message to exclude file
3723         line number.
3725 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3727         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
3728         don't inline subprograms declared in both visible and private
3729         parts of a package.
3730         (In_Package_Spec): previously In_Package_Visible_Spec; now
3731         detects subprograms declared both in visible and private parts
3732         of a package spec.
3734 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3736         * exp_util.adb (Build_Invariant_Procedure_Declaration): If
3737         the type is an anonymous array in an object declaration, whose
3738         component type has an invariant, use the object declaration
3739         as the insertion point for the invariant procedure, given that
3740         there is no explicit type declaration for an anonymous array type.
3742 2017-09-08  Bob Duff  <duff@adacore.com>
3744         * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
3746 2017-09-08  Bob Duff  <duff@adacore.com>
3748         * a-strfix.adb (Trim): Compute Low and High only if needed.
3750 2017-09-08  Justin Squirek  <squirek@adacore.com>
3752         * lib-load.adb (Load_Main_Source): Add error output in the case a
3753         source file is missing.
3755 2017-09-08  Bob Duff  <duff@adacore.com>
3757 PR ada/80888
3758         * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
3759         Default_WCEM by default (i.e. if the encoding is not specified
3760         by the Form string).
3762 2017-09-08  Bob Duff  <duff@adacore.com>
3764         * s-trasym.ads (Hexa_Traceback): If
3765         Suppress_Hex is True, print "..." instead of a hexadecimal
3766         address.
3767         * s-trasym.adb: Ignore No_Hex in this version.
3768         Misc cleanup.
3770 2017-09-08  Bob Duff  <duff@adacore.com>
3772         * debug.adb: Minor reformatting.
3774 2017-09-08  Bob Duff  <duff@adacore.com>
3776         * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
3777         code so it doesn't trigger an "uninit var" warning.
3779 2017-09-08  Nicolas Roche  <roche@adacore.com>
3781         * s-hibaen.ads: Remove obsolete file.
3783 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3785         * a-locale.ads: Add comment explaining the state of this package.
3787 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3789         * sem_util.adb (Is_CCT_Instance): Allow calls in the context
3790         of packages.
3791         * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
3792         allow calls in the context of package spec (for pragma
3793         Initializes) and bodies (for pragma Refined_State).
3795 2017-09-08  Bob Duff  <duff@adacore.com>
3797         * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
3798         new Exp.
3800 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3802         * debug.adb (dA): Adjust comment.
3803         * gnat1drv.adb (Gnat1drv): Likewise.
3804         * opt.ads (List_Representation_Info_Extended): New variable.
3805         * repinfo.adb (List_Record_Info): Split implementation into...
3806         (Compute_Max_Length): ...this.  Recurse on records if requested.
3807         (List_Record_Layout): Likewise.
3808         * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
3809         statement, accept '0' and set List_Representation_Info_Extended
3810         on 'e'.
3811         * usage.adb (Usage): Document new -gnatRe variant.
3813 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3815         * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
3816         Do not save the given entity in the global variable Default_Pool
3817         if the pragma appears within a generic unit.
3819 2017-09-08  Bob Duff  <duff@adacore.com>
3821         * errout.adb (Delete_Warning): Do not
3822         decrement Warnings_Treated_As_Errors. This is called before
3823         Warnings_Treated_As_Errors has been incremented to account for
3824         this warning. Decrementing it here can lead to negative values
3825         of Warnings_Treated_As_Errors, raising Constraint_Error in
3826         checks-on builds, and causing the compiler to return an error
3827         code in checks-off builds.
3829 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3831         * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
3832         entities of named concurrent types as Ref_Id and not of anonymous
3833         concurrent objects (because callers already know when a conversion
3834         is necessary and can easily do it); also, do not expect protected
3835         types or protected objects as Context_Id (because no flow-related
3836         SPARK pragmas are attached there); reflect these changes in a
3837         more precise comment.
3839 2017-09-08  Olivier Hainque  <hainque@adacore.com>
3841         * g-altive.ads: Add documentation.
3843 2017-09-08  Bob Duff  <duff@adacore.com>
3845         * sem_util.ads, debug.adb: Minor comment fix.
3846         * erroutc.ads: Comment fix.
3848 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3850         * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
3851         for compatibility of component types of formal and actual in an
3852         instantiation of a child unit,  when the component type of the
3853         formal is itself a formal of an enclosing generic.
3855 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3857         * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
3858         sem_prag.adb to make it available for GNATprove; for concurrent
3859         types replace custom scope climbing with Scope_Same_Or_Within; for
3860         single concurrent objects add scope climbing (with Scope_Within),
3861         which was not there (that's the primary semantic change of this
3862         commit); also, when comparing a single concurrent object with
3863         its corresponding concurrent type rely on equality of types,
3864         not of objects (because that's simpler to code).
3865         * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
3866         (Analyze_Global_Item): adjust special-casing of references to the
3867         current instance of a concurrent unit in the Global contracts
3868         of task types and single tasks objects; similar for references
3869         in the protected operations and entries of protected types and
3870         single protected objects (in all these cases the current instance
3871         behaves as an implicit parameter and must not be mentioned in
3872         the Global contract).
3874 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3876         * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
3877         function calls returning a record within a subprogram call,
3878         for C generation.
3880 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3882         * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
3883         name that designates the current instance of a child unit in its
3884         own body and appears as the prefix of a reference to an entity
3885         local to the child unit.
3886         * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
3887         Minor reformatting.
3889 2017-09-08  Yannick Moy  <moy@adacore.com>
3891         * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
3892         may be intentional.
3894 2017-09-08  Tristan Gingold  <gingold@adacore.com>
3896         * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
3897         warnings on internal units in configurable run time mode.
3899 2017-09-08  Bob Duff  <duff@adacore.com>
3901         * sem_ch3.adb (Build_Derived_Private_Type): Inherit
3902         representation items from interfaces that the derived type
3903         implements, not just from the parent type.
3904         * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
3905         this to return an empty list when there are no interfaces.
3906         * einfo.ads, sem_ch13.adb: Minor comment fixes.
3907         * sem_attr.adb: Minor comment fix.
3909 2017-09-08  Doug Rupp  <rupp@adacore.com>
3911         * sigtramp-vxworks.c [i386]: Adjust the kernel context for
3912         x86-vx7.
3914 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
3916         * exp_ch4.adb (Expand_N_Allocator): Generate a
3917         call to Allocate_Any_Controlled when the allocation does not
3918         require any initialization.
3920 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
3922         * sem_util.adb (Copy_Node_With_Replacement):
3923         Update the Renamed_Object field of a replicated object renaming
3924         declaration.
3926 2017-09-08  Patrick Bernardi  <bernardi@adacore.com>
3928         * exp_ch9.adb (Is_Pure_Barrier): Allow type
3929         conversions and components of objects. Simplified the detection
3930         of the Count attribute by identifying the corresponding run-time
3931         calls.
3933 2017-09-08  Yannick Moy  <moy@adacore.com>
3935         * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
3936         sem_type.adb, sinfo.ads: Minor reformatting.
3938 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3940         * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
3941         of Freeze_Profile, used to inhibit the freezing of the profile
3942         of an expression function declared within a nested package, when
3943         some type in the profile depends on a private type declared in
3944         an enclosing package.
3946 2017-09-08  Bob Duff  <duff@adacore.com>
3948         * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
3949         the subunit case. It's still OK to set it in the "missing subunits"
3950         case, because that won't cause the obsolete .ali files that cause
3951         confusion.
3953 2017-09-08  Bob Duff  <duff@adacore.com>
3955         * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
3956         unclear why this didn't cause a warning.
3957         * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
3958         pragmas. It's unclear why this didn't cause an error.
3960 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
3962         * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
3963         Reimplemented.
3964         (Expand_SPARK_Potential_Renaming): Code clean up.
3965         * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
3966         the item does not have a proper entity.
3967         (Analyze_Input_Item): Add a guard in case the item does not have a
3968         proper entity.
3969         (Collect_States_And_Objects): Include object renamings in the
3970         items being collected.
3971         (Resolve_State): Update the documentation of this routine.
3972         * sem_util.adb (Entity_Of): Add circuitry to handle
3973         renamings of function results.
3974         (Remove_Entity): New routine.
3975         (Remove_Overloaded_Entity): Take advantage of factorization.
3976         * sem_util.ads (Entity_Of): Update the documentation
3977         of this routine.
3978         (Remove_Entity): New routine.
3979         (Remove_Overloaded_Entity): Update the documentation of this
3980         routine.
3982 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3984         * repinfo.adb (List_Record_Info): During first loop,
3985         do not override the normalized position and first bit
3986         if they have already been set.  Move fallback code
3987         for the packed case to the case where it belongs.
3988         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
3989         Also adjust the normalized position of components.
3990         (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
3992 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3994         * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
3995         the placement of a primitive operation O that renames an operation
3996         R declared in an inner package, and which is thus not a primitive
3997         of the dispatching type of O. In this case O is a new primitive
3998         and does not inherit its dispatch table position from R (which
3999         has none).
4001 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4003         * sem_dim.adb (Analyze_Dimension_If_Expression,
4004         Analyze_Dimension_Case_Expression): new subprograms to verify
4005         the dimensional correctness of Ada2012 conditional expressions,
4006         and set properly the dimensions of the construct.
4007         * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
4008         call Analyze_Dimension.
4010 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4012         * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
4013         loop on an interface declared as a private extension of another
4014         synchronized interface.
4016 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4018         * sem_ch12.adb (Check_Generic_Parent): New procedure within
4019         Analyze_Associations, to handle actual packages that depend on
4020         previous instances.  If a package IAP that is an instantiation is
4021         used as an actual in a subsequent instantiation SI in the same
4022         scope, and IAP has a body, IAP must be frozen before SI. If
4023         the generic parent of IAP is itself declared in a previous
4024         instantiation in the same scope, that instantiation must also
4025         be frozen before SI.
4026         (Install_Body): Prevent double insertion of freeze node for
4027         instance.
4029 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4031         * sem_prag.adb (Resolve_State): Update the
4032         comment on documentation. Generate a reference to the state once
4033         resolution takes place.
4035 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4037         * sem_ch13.adb (Analyze_Aspect_Specifications, case
4038         Linker_Section): If the aspect applies to an object declaration
4039         with explicit initialization, do not delay the freezing of the
4040         object, to prevent access-before-elaboration in the generated
4041         initialization code.
4043 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4045         * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
4046         (Integer_Value (Item)) when the size of the fixed decimal type
4047         is larger than Integer.
4049 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4051         PR ada/82127
4052         * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
4053         in order of increasing position in more cases.
4055 2017-09-07  Yannick Moy  <moy@adacore.com>
4057         * a-exetim-mingw.ads: Add contract Global=>null
4058         on all operations that are modeled as having no read or write
4059         of global variables in SPARK.
4061 2017-09-07  Raphael Amiard  <amiard@adacore.com>
4063         * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
4064         to Hmaps.Generic_Ops.
4065         * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
4066         cursors.
4067         * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
4068         cursors.
4069         * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
4070         position in cursors.
4072 2017-09-07  Javier Miranda  <miranda@adacore.com>
4074         * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
4075         allow disabling the generation of implicit pragma Elaborate_All
4076         on task bodies.
4078 2017-09-07  Javier Miranda  <miranda@adacore.com>
4080         * exp_disp.adb (Make_Tags): Avoid suffix counter
4081         in the external name of the elaboration flag. Required to fix
4082         the regressions introduced by the initial version of this patch.
4084 2017-09-07  Bob Duff  <duff@adacore.com>
4086         * sem_ch6.adb (Analyze_Function_Return): Do not
4087         insert an explicit conversion to force the displacement of the
4088         "this" pointer to reference the secondary dispatch table in the
4089         case where the return statement is returning a raise expression,
4090         as in "return raise ...".
4092 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4094         * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
4095         * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
4096         procedure from sem_disp.adb.
4097         * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
4098         with Unit.
4099         * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
4100         return the instantiation node for subprograms. Update references
4101         to Get_Unit_Instantiation_Node.
4102         * sem_ch7.adb (Install_Parent_Private_Declarations): update
4103         reference to Get_Unit_Instantiation_Node.
4104         * exp_dist.adb (Build_Package_Stubs): update reference to
4105         Get_Unit_Instantiation_Node.
4106         * sem_ch9.adb: minor typo in comment.
4107         * lib-xref-spark_specific.adb
4108         (Traverse_Declaration_Or_Statement): traverse into task type
4109         definition.
4111 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4113         * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
4114         to handle properly various cases of type conversions where the
4115         target type and/or the expression carry dimension information.
4116         (Dimension_System_Root); If a subtype carries dimension
4117         information, obtain the source parent type that carries the
4118         Dimension aspect.
4120 2017-09-07  Dmitriy Anisimkov  <anisimko@adacore.com>
4122         * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
4124 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4126         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
4127         If the prefix is a reference to an object, rewrite it as an
4128         explicit dereference, as required by 3.7.2 (2) and as is done
4129         with most other attributes whose prefix is an access value.
4131 2017-09-07  Bob Duff  <duff@adacore.com>
4133         * par-ch13.adb: Set the Inside_Depends flag if we are inside a
4134         Refined_Depends aspect.
4135         * par-ch2.adb: Set the Inside_Depends flag if we are inside a
4136         Refined_Depends pragma.
4137         * scans.ads: Fix documentation of Inside_Depends flag.
4138         * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
4140 2017-09-07  Hristian Kirtchev  <kirtchev@adacore.com>
4142         * exp_ch7.adb (Insert_Actions_In_Scope_Around):
4143         Account for the case where the are no lists to insert, but the
4144         secondary stack still requires management.
4145         * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
4146         comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
4147         lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
4148         sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
4149         Minor reformatting.
4151 2017-09-07  Vincent Celier  <celier@adacore.com>
4153         * clean.adb: Do not get the target parameters before calling
4154         gprclean.
4156 2017-09-07  Nicolas Roche  <roche@adacore.com>
4158         * s-osinte-solaris-posix.ads: Removed.
4160 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4162         * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
4163         single concurrent objects.
4165 2017-09-07  Javier Miranda  <miranda@adacore.com>
4167         * s-regexp.ads: Fix documentation of the globbing grammar.
4169 2017-09-07  Gary Dismukes  <dismukes@adacore.com>
4171         * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
4173 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4175         * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
4176         in CodePeer mode, to support more legacy code automatically.
4178 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4180         * exp_disp.adb (Replace_Formals): If thr formal is classwide,
4181         and thus not a controlling argument, preserve its type after
4182         rewriting because it may appear in an nested call with a classwide
4183         parameter.
4185 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4187         * comperr.adb (Delete_SCIL_Files): Handle case of
4188         N_Package_Instantiation.
4190 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4192         * sem_ch10.adb (Remove_Private_With_Clause): If a private with
4193         clause for a unit U appears in a context that includes a regular
4194         with_clause on U, rewrite the redundant private clause into a null
4195         statement, rather than removing it altogether from the context,
4196         so that ASIS tools can reconstruct the original source.
4198 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4200         * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
4201         for aspect Small can be of any real type (not only a universal
4202         real literal) as long as it is a static constant.
4204 2017-09-07  Thomas Quinot  <quinot@adacore.com>
4206         * par_sco.adb: Minor reformatting.
4208 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4210         * s-parame-ae653.ads: Removed.
4212 2017-09-07  Nicolas Roche  <roche@adacore.com>
4214         * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
4215         s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
4216         s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
4217         s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
4218         s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
4219         s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
4221 2017-09-07  Yannick Moy  <moy@adacore.com>
4223         * a-ngelfu.ads Add preconditions to all functions
4224         listed in Ada RM A.5.1(19-33) as having constraints on inputs.
4226 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4228         * lib-xref.adb (Generate_Reference): ignore
4229         references to entities which are Part_Of single concurrent
4230         objects.
4232 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4234         * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
4235         comment.
4237 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4239         * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
4240         Null_Task_Id is passed.
4242 2017-09-07  Javier Miranda  <miranda@adacore.com>
4244         * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
4245         attribute. Defined for record types and subtypes.
4246         * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
4247         (Init_Tags_List) to facilitate generating separate code in the
4248         IP routine to initialize the object components and for completing
4249         the elaboration of dispatch tables.
4250         * exp_ch3.adb (Build_Init_Procedure): Improve the code
4251         generated in the IP routines by means of keeping separate
4252         the initialization of the object components from the
4253         initialization of its dispatch tables.  (Init_Secondary_Tags):
4254         Adding new formal (Init_Tags_List) and adjusting calls to
4255         Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
4256         adjusting also calls to Ada.Tags.Register_Interface_Offset
4257         because the type of one of its formals has been changed.
4258         * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
4259         modified. Instead of receiving a pointer to an object this
4260         routine receives now a primary tag.
4261         (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
4262         additional formal: the tag of the primary dispatch table.
4263         * exp_disp.ads (Elab_Flag_Needed): New subprogram.
4264         * exp_disp.adb (Elab_Flag_Needed): New subprogram.
4265         (Make_Tags): Adding the declaration of the elaboration flag (if needed).
4266         * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
4267         formal in calls to Init_Secondary_Tags.
4269 2017-09-07  Javier Miranda  <miranda@adacore.com>
4271         * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
4272         subprogram.
4273         * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
4274         applied to generic subprograms.
4276 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4278         * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
4279         (because it refers to the anonymous concurrent object, not its type);
4280         fix condition for emitting error message about task/protected type,
4282 2017-09-07  Bob Duff  <duff@adacore.com>
4284         * binde.adb (Debug_Flag_Old): If both -do and -dp
4285         are specified, behave as if just -do was specified, rather than
4286         using a mixture.
4288 2017-09-07  Nicolas Roche  <roche@adacore.com>
4290         * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
4291         system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
4293 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4295         * sem_prag.adb (Find_Role): The Global_Seen flag
4296         is now consulted not only for abstract states and variables,
4297         but for all kinds of items.
4298         (Collect_Subprogram_Inputs_Outputs): Do not process formal
4299         generic parameters, because unlike ordinary formal parameters,
4300         generic formals only act as input/ outputs if they are explicitly
4301         mentioned in a Global contract.
4303 2017-09-07  Yannick Moy  <moy@adacore.com>
4305         * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
4306         predicate procedure. Check predicate pragma/aspect with Ghost entity.
4307         * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
4308         reformatting.
4310 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4312         * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
4313         (code cleanup);
4314         * sem_ch3.adb (Build_Derived_Record_Type):i Call
4315         Copy_Dimensions_Of_Components after creating the copy of the
4316         record declaration.
4317         * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
4318         derived recor type, copy the dikensions if any of each component
4319         of the parent record to the corresponding component declarations
4320         of the derived record. These expressions are used among other
4321         things as default values in aggregates with box associations.
4322         * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
4323         repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
4324         Minor reformatting.
4326 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4328         * sem_util.adb: Remove extra space after THEN.
4330 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4332         * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
4333         also mark the renamed subprogram as referenced.
4335 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4337         * par-ch6.adb (P_Subprogram): Improve error message on null
4338         procedure with misplaced aspect specification, which the parser
4339         first attempts to interpret as a malformed expression function.
4341 2017-09-07  Gary Dismukes  <dismukes@adacore.com>
4343         * sem_attr.adb (Analyze_Attribute_Old_Result):
4344         Allow attributes Result and Old in the case of an expression
4345         function.
4347 2017-09-07  Justin Squirek  <squirek@adacore.com>
4349         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
4350         Volatile to subcomponents.
4352 2017-09-07  Bob Duff  <duff@adacore.com>
4354         * exp_ch7.adb (Find_Last_Init): Check for the
4355         case where a build-in-place function call has been replaced by a
4356         'Reference attribute reference.
4358 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4360         * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
4361         nodes.
4363 2017-09-07  Bob Duff  <duff@adacore.com>
4365         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
4366         Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
4367         secondary stack for all functions that return limited tagged
4368         types -- just do it for dispatching calls.  Misc cleanup.
4369         * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
4370         remove qualifications and type conversions. Fix various bugs
4371         where only a single level of qualification or conversion was
4372         removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
4373         instead of "X".
4374         * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
4375         cleanup.
4377 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4379         * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
4380         do not create actual subtypes that may generate further predicate
4381         functions.
4382         * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
4383         of body is a predicate function as well.
4384         (Resolve_Aspect_Expressions, Resolve_Name): For a component
4385         association, only the expression needs resolution, not the name.
4386         (Resolve_Aspect_Expressions, case Predicates): Construct and
4387         analyze the predicate function declaration in the scope of the
4388         type, before making the type and its discriminants visible.
4390 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4392         * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
4393         only if the record type itself comes from source.
4395 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
4397         * sem_ch5.adb: Minor reformatting and a typo fix
4399 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4401         * sinput-l.ads: minor remove extra period at the end of comment
4403 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4405         * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
4406         E_Discriminant.
4407         (Find_Role): remove support for E_Discriminant.
4409 2017-09-06  Javier Miranda  <miranda@adacore.com>
4411         * exp_ch6.adb (Expand_Simple_Function_Return):
4412         Add missing implicit type conversion to force displacement of the
4413         "this" pointer.
4415 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
4417         * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
4419 2017-09-06  Yannick Moy  <moy@adacore.com>
4421         * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
4422         global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
4424 2017-09-06  Bob Duff  <duff@adacore.com>
4426         * sem_ch8.adb: Change Assert to be consistent with
4427         other similar ones.
4429 2017-09-06  Bob Duff  <duff@adacore.com>
4431         * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
4432         requested. Previously, the -do switch meant "run Elab_New and
4433         Elab_Old and use the order chosen by Elab_Old, possibly with
4434         debugging printouts comparing the two orders."  Now it means
4435         "do not run Elab_New." This is of use if there are bugs that
4436         cause Elab_New to crash.
4437         (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
4438         type conversions.
4439         * ali.ads (Elab_Position): Change type to Nat, to avoid various
4440         type conversions.
4442 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4444         * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
4445         reference to SPARK RM.
4447 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4449         * layout.adb: Use SSU short hand consistently throughout the file.
4451 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4453         * freeze.adb (Freeze_Record_Type)
4454         <Sized_Component_Total_Round_RM_Size>: New local variable to
4455         accumulate the rounded RM_Size of components.  Update it for
4456         every component whose RM_Size is statically known.  Add missing
4457         guard to check that bit packing is really required before issuing
4458         the error about packing.  Swap condition for clarity's sake.
4459         * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
4461 2017-09-06  Fedor Rybin  <frybin@adacore.com>
4463         * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
4464         mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
4465         mlib-tgt-specific.adb, mlib-tgt-specific.ads,
4466         mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
4467         mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
4468         mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
4469         mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
4470         mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
4471         prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
4472         prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
4473         prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
4474         prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
4475         prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
4476         prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
4477         prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
4478         project manager sources.
4480 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4482         * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
4483         entity of a mutable type and the right-hand side is a conditional
4484         expression, resolve the alternatives of the conditional using
4485         the base type of the target entity, because the alternatives
4486         may have distinct subtypes. This is particularly relevant if
4487         the alternatives are aggregates.
4489 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4491         * checks.adb (Apply_Predicate_Check): If the expression is an
4492         aggregate that is the RHS of an assignment, apply the check to
4493         the LHS after the assignment, rather than to the aggregate. This
4494         is more efficient than creating a temporary for the aggregate,
4495         and prevents back-end crashes when the aggregate includes a
4496         dynamic "others' association.
4498 2017-09-06  Yannick Moy  <moy@adacore.com>
4500         * sem_ch12.adb (Analyze_Instance_And_Renamings):
4501         Set variable to ignore SPARK_Mode in instance before the analysis
4502         of the generated package declaration.
4504 2017-09-06  Yannick Moy  <moy@adacore.com>
4506         * sem_res.adb (Resolve_Call): Do not issue a
4507         message for calls inside expression function, unless body was
4508         seen and is candidate for inlining.
4510 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4512         * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
4513         * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
4514         body. do not freeze the formals of the generic unit.
4516 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
4518         * errout.adb (Error_Msg): Separate the
4519         treatment for warning vs. style messages in inlinings and
4520         instantiations. Prevents blowups on calls to Warn_Insertion for
4521         style messages, which should not be called in that case because
4522         Warning_Msg_Char is not set.
4524 2017-09-06  Justin Squirek  <squirek@adacore.com>
4526         * sem_prag.adb (Check_VFA_Conflicts): Created
4527         to group all Volatile_Full_Access checks relating to other
4528         representation pragmas (Mark_Component_Or_Object): Created
4529         to centeralize the flagging of attributes for the record type
4530         component case, a pragma applied individually to a component, and
4531         the object case.
4532         (Process_Atomic_Independent_Shared_Volatile):
4533         Add propagation of certain pragmas to record components and move
4534         evaluation of VFA checks
4536 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4538         * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
4539         Do not warn on conditions that are not obeyed for Inline_Always
4540         subprograms, when assertions are not enabled.
4542 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4544         * sem_util.adb (Unique_Entity): For abstract states return their
4545         non-limited view.
4547 2017-09-06  Bob Duff  <duff@adacore.com>
4549         * sem_ch12.adb (Copy_Generic_Node): When we copy a node
4550         that is a proper body corresponding to a stub, we defer the
4551         adjustment of the sloc until after the correct adjustment has
4552         been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
4553         the adjustment, because it will be outside the range in (the old,
4554         incorrect) S_Adjustment.
4555         * inline.adb: Use named notation for readability and uniformity.
4556         * sinput-l.adb: Minor improvements to debugging output printed
4557         for Debug_Flag_L.
4558         * sinput-l.ads (Create_Instantiation_Source): Minor comment
4559         correction.
4561 2017-09-06  Vincent Celier  <celier@adacore.com>
4563         * make.adb: Do not invoke gprbuild for -bargs -P.
4565 2017-09-06  Sylvain Dailler  <dailler@adacore.com>
4567         * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
4568         case when Op is of kind N_Qualified_Expression. In this case,
4569         the function is called recursively on the subexpression like in
4570         other cases.
4571         * make.adb: Minor reformatting
4573 2017-09-06  Justin Squirek  <squirek@adacore.com>
4575         * einfo.adb (Set_Linker_Section_Pragma): Modify
4576         Set_Linker_Section_Pragma to be consistant with the "getter"
4577         Linker_Section_Pragma.
4578         * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
4579         checking for container loops so that the index cursor is not
4580         directly changable by the user with the use of E_Loop_Parameter.
4581         * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
4582         * sem_warn.adb (Check_References): Revert previous change.
4584 2017-09-06  Bob Duff  <duff@adacore.com>
4586         * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
4587         calls and the like.
4589 2017-09-06  Yannick Moy  <moy@adacore.com>
4591         * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
4592         declarations to only consider valid uses of Global/Depends those on
4593         single concurrent objects.
4595 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4597         * sem_ch13.adb (Check_Record_Representation_Clause): Give an
4598         error as soon as one of the specified components overlaps the
4599         parent field.
4601 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4603         * sem_prag.ads: minor fix typo in comment.
4605 2017-09-06  Justin Squirek  <squirek@adacore.com>
4607         * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
4608         from source before checking source references.
4609         * sem_warn.adb (Check_References): Add check for internal block
4610         before recursing.
4612 2017-09-06  Vincent Celier  <celier@adacore.com>
4614         * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
4615         make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
4616         gnatname.adb: Remove the Project Manager from the GNAT tools.
4617         * gcc-interface/Makefile.in: ditto.
4619 2017-09-06  Bob Duff  <duff@adacore.com>
4621         * sem_util.ads: Minor comment fix.
4623 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4625         * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
4626         Generate a freeze node for the actual of a formal package, if
4627         the actual is declared in the same unit and has a corresponding
4628         body, to prevent the current instance from being frozen before
4629         the actual is.
4631 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4633         * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
4635 2017-09-06  Yannick Moy  <moy@adacore.com>
4637         * sem_warn.adb: Minor refactoring.
4639 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4641         * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
4642         to retrieve the inherited classwide precondition/postcondition
4643         of a subprogram.
4644         * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
4645         freezing a subprogram, to complete the generation of the
4646         corresponding checking code.
4648 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
4650         * exp_util.adb (Is_Controlled_Indexing): New routine.
4651         (Is_Displace_Call): Use routine Strip to remove indirections.
4652         (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
4653         missing case of controlled generalized indexing.
4654         (Is_Source_Object): Use routine Strip to remove indirections.
4655         (Strip): New routine.
4657 2017-09-06  Bob Duff  <duff@adacore.com>
4659         * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
4660         we include the proper header. Otherwise, we just declare the necessary
4661         things from the capabilities library. This is so we can build on
4662         machines without that library, while still enabling that library.
4663         At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
4664         simply return 0 if the library is not present, or not included
4665         in the link.
4667 2017-09-06  Pierre-Marie de Rodat  <derodat@adacore.com>
4669         * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
4670         for renamings that involve function calls in prefix form.
4672 2017-09-06  Bob Duff  <duff@adacore.com>
4674         * sem_ch3.adb (Analyze_Subtype_Declaration):
4675         Set Has_Delayed_Freeze on a subtype of an incomplete type.
4677 2017-09-06  Pierre-Marie de Rodat  <derodat@adacore.com>
4679         * par_sco.adb (Extend_Statement_Sequence): When the accept statement
4680         has no parameter specification and no entry index, use the entry name
4681         as the end of the generated SCO statement.
4683 2017-09-06  Steve Baird  <baird@adacore.com>
4685         * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
4686         uses of 'Image and related attributes as having side effects in
4687         order to avoid replicating such uses.
4688         * pprint.ads (Expression_Image) Add new generic formal flag
4689         Hide_Temp_Derefs.  The flag defaults to False; CodePeer will
4690         (eventually) override the default.
4691         * pprint.adb (Expression_Image) If the new flag is set, then
4692         suppress the ".all" suffix when displaying a dereference whose
4693         prefix is a use of a value-capturing compiler temp of the sort
4694         generated by Expr_Util.Remove_Side_Effects .
4695         * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
4696         sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
4697         Minor reformatting.
4698         * inline.adb: Minor wording change.
4700 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4702         * sem_ch7.adb: Update comment.
4704 2017-09-06  Yannick Moy  <moy@adacore.com>
4706         * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
4707         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
4708         * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
4709         with slight modification from Is_Subp_Or_Entry_Inside_Protected,
4710         so that applies to any entity.
4712 2017-09-06  Yannick Moy  <moy@adacore.com>
4714         * sem_ch3.adb (Derived_Type_Declaration): Use
4715         Incomplete_Or_Partial_View rather than local Find_Partial_View.
4717 2017-09-06  Javier Miranda  <miranda@adacore.com>
4719         * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
4720         following ISO-8861.
4722 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4724         * sem_dim.adb (Analyze_Dimension): In an instance, a type
4725         conversion takes its dimensions from the expression, not from
4726         the context type.
4727         (Dimensions_Of_Operand): Ditto.
4729 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4731         * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
4732         null procedures when GNAT coverage is used, so that their (empty)
4733         bodies are properly covered.
4735 2017-09-06  Bob Duff  <duff@adacore.com>
4737         * sem_ch13.adb (Resolve_Aspect_Expressions): If
4738         the entity is a type with discriminants, make the discriminants
4739         directly visible in aspect clauses.
4741 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4743         * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
4744         Universal_Real and the context is a floating-point type, resolve
4745         both operands to the target type.
4747 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
4749         * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
4750         sem_ch3.adb, sem_util.adb: Minor reformatting.
4752 2017-09-06  Yannick Moy  <moy@adacore.com>
4754         * freeze.adb (Check_Inherited_Conditions): Rewriting
4755         of inherited preconditions and postconditions should only occur
4756         in GNATprove mode, that is, when GNATprove_Mode is True, not to
4757         be confused with SPARK_Mode being On.
4759 2017-09-06  Yannick Moy  <moy@adacore.com>
4761         * sem_warn.adb (Check_References): Take into
4762         account possibility of attribute reference as original node.
4764 2017-09-06  Yannick Moy  <moy@adacore.com>
4766         * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
4767         use of attribute.
4769 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4771         * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
4772         on the procedure created to encapsulate the body.
4773         * sem_ch7.adb: Add with clause for GNAT.HTable.
4774         (Entity_Table_Size): New constant.
4775         (Entity_Hash): New function.
4776         (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
4777         (Is_Subprogram_Ref): Rename into...
4778         (Scan_Subprogram_Ref): ...this. Record references to subprograms in
4779         the table instead of bailing out on them. Scan the value of constants
4780         if it is not known at compile time.
4781         (Contains_Subprograms_Refs): Rename into...
4782         (Scan_Subprogram_Refs): ...this.
4783         (Has_Referencer): Scan the body of all inlined subprograms. Reset the
4784         Is_Public flag on subprograms if they are not actually referenced.
4785         (Hide_Public_Entities): Beef up comment on the algorithm.
4786         Reset the table of subprograms on entry.
4788 2017-09-06  Yannick Moy  <moy@adacore.com>
4790         * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
4792 2017-09-06  Javier Miranda  <miranda@adacore.com>
4794         * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
4795         cannot handle a type conversion of an array as an aggregate
4796         component.
4798 2017-09-06  Bob Duff  <duff@adacore.com>
4800         * g-comlin.adb (Try_Help): Remove ".exe" so we
4801         get the same results on windows and unix.
4803 2017-09-06  Justin Squirek  <squirek@adacore.com>
4805         * exp_imgv.adb (Expand_Image_Attribute),
4806         (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
4807         Added case to handle new-style 'Image expansion
4808         (Rewrite_Object_Image): Moved from exp_attr.adb
4809         * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
4810         attribute cases so that the relevant subprograms in exp_imgv.adb
4811         handle all expansion.
4812         (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
4813         * sem_attr.adb (Analyze_Attribute): Modified Image attribute
4814         cases to call common function Analyze_Image_Attribute.
4815         (Analyze_Image_Attribute): Created as a common path for all
4816         image attributes (Check_Object_Reference_Image): Removed
4817         * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
4818         Removed and refactored into Is_Object_Image (Is_Object_Image):
4819         Created as a replacement for Is_Image_Applied_To_Object
4821 2017-09-06  Yannick Moy  <moy@adacore.com>
4823         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
4824         message for missing input.
4826 2017-09-06  Yannick Moy  <moy@adacore.com>
4828         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
4829         of protected subprograms and entries.
4830         * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
4831         New function to detect when a subprogram of entry is defined
4832         inside a protected object.
4834 2017-09-06  Bob Duff  <duff@adacore.com>
4836         * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
4837         whether the current process has the CAP_SYS_NICE capability.
4838         * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
4839         ceiling priorities if the current process has the CAP_SYS_NICE
4840         capability.
4842 2017-09-06  Bob Duff  <duff@adacore.com>
4844         * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
4845         check back to the body, because SPARK is not yet ready for
4846         "or else raise Constraint_Error".
4848 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4850         * exp_ch6.adb (Expand_Call_Helper): Replace call to null
4851         procedure by a single null statement, after evaluating the
4852         actuals that require it.
4854 2017-09-06  Javier Miranda  <miranda@adacore.com>
4856         * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
4857         Generating C code improve the code that checks the use of nested
4858         aggregates to initialize object declarations.
4860 2017-09-06  Yannick Moy  <moy@adacore.com>
4862         * sem_ch3.adb (Derived_Type_Declaration): Detect
4863         violations of new rule SPARK RM 3.4(1).  Also refactor existing
4864         check to use the new function Find_Partial_View.
4866 2017-09-06  Vincent Celier  <celier@adacore.com>
4868         * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P...  The code
4869         from the Prj hierarchy has been removed from the GNAT driver.
4871 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4873         * sem_type.adb (Interface_Present_In_Ancestor): Within an
4874         expression function, or within a spec expression (default value,
4875         etc) a reference to an incomplete type is legal: legality of
4876         the operation will be checked when some related entity (type,
4877         object or subprogram) is frozen.
4879 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
4881         * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
4882         adjustments and a typo fix.
4884 2017-09-06  Yannick Moy  <moy@adacore.com>
4886         * sem_res.adb (Resolve_Call): Do not issue info
4887         message about inlining of calls to functions in assertions,
4888         for functions whose body has not been seen yet.
4890 2017-09-06  Bob Duff  <duff@adacore.com>
4892         * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
4893         we can use modern Ada in this package.
4894         * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
4895         Move Ada.Command_Line.Response_File to System.Response_File,
4896         and make Ada.Command_Line.Response_File into a rename of
4897         System.Response_File. This is to avoid having gnatbind depend
4898         Ada.Command_Line, which would damage the bootstrap process now
4899         that Ada.Command_Line contains modern Ada (the raise expression).
4900         * gnatbind.adb: Avoid dependence on
4901         Ada.Command_Line. Depend on System.Response_File instead
4902         of Ada.Command_Line.Response_File. Change one call to
4903         Ada.Command_Line.Command_Name to use Fill_Arg.  Change one call
4904         to Ada.Command_Line.Argument_Count to use Arg_Count.
4905         * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
4907 2017-09-06  Bob Duff  <duff@adacore.com>
4909         * frontend.adb (Frontend): Skip -gnatec=gnat.adc
4910         switch, because we've already read gnat.adc by default.
4912 2017-09-06  Bob Duff  <duff@adacore.com>
4914         * exp_ch5.adb (Get_Default_Iterator): Replace
4915         "Assert(False)" with "return Iter", because if an iterable
4916         type is derived from a noniterable one, then we won't find an
4917         overriding or inherited default iterator.
4919 2017-09-06  Yannick Moy  <moy@adacore.com>
4921         * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
4922         literal index used to access a string is null or negative.
4924 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
4926         * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
4927         allowed on loop parameters.
4928         (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
4929         on loop parameters.
4930         (Write_Field15_Name): Update the output for
4931         Status_Flag_Or_Transient_Decl.
4932         * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
4933         to loop parameters. Update the documentation of the attribute
4934         and the E_Loop_Parameter entity.
4935         * exp_ch7.adb (Process_Declarations): Remove the bogus guard
4936         which assumes that cursors can never be controlled.
4937         * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
4938         guard which assumes that cursors can never be controlled.
4940 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
4942         * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
4943         sem_warn.adb: Minor reformatting.
4945 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4947         * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
4948         fix and preserve older GNAT warning on overlapping actuals that
4949         are not elementary types.
4951 2017-09-06  Justin Squirek  <squirek@adacore.com>
4953         * sem_attr.adb: Comment correction.
4955 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
4957         * sem_util.adb: Minor reformatting.
4959 2017-09-06  Yannick Moy  <moy@adacore.com>
4961         * a-comlin.ads (Argument): Add precondition for analysis.
4963 2017-09-06  Yannick Moy  <moy@adacore.com>
4965         * sem_res.adb (Resolve): Update message for function call as statement.
4967 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4969         * sem_ch6.adb (Check_Returns): Clean up warnings coming from
4970         generated bodies for renamings that are completions, when renamed
4971         procedure is No_Return.
4972         * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
4973         rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
4974         with No_Return, the renamed entity must be No_Return as well.
4976 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
4978         * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
4979         Minor reformatting.
4981 2017-09-06  Justin Squirek  <squirek@adacore.com>
4983         * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
4984         attribute cases (Rewrite_Object_Reference_Image): Created to
4985         aid the rewriting of new-style 'Image attributes.
4986         * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
4987         (Check_Object_Reference_Image): Created to handle verification of
4988         'Image with object-references as prefixes.
4989         * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
4990         Create predicate to identify cases where an 'Image attribute's
4991         prefix applies to an object reference.
4993 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4995         * freeze.adb (Freeze_Entity): Do not generate a freeze
4996         node for a generic unit, even if it includes delayed aspect
4997         specifications. Freeze nodes for generic entities must never
4998         appear in the tree that reaches the back-end of the compiler.
5000 2017-09-06  Yannick Moy  <moy@adacore.com>
5002         * treepr.adb (Print_Entity_Info): Do not print empty Elist.
5004 2017-09-06  Yannick Moy  <moy@adacore.com>
5006         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
5007         to subprograms in other units as possibly inlined.
5009 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5011         * freeze.adb (Freeze_Entity): For a derived type that has no
5012         explicit delayed aspects but may inherit delayed aspects from its
5013         parent type, analyze aspect at freeze point for proper capture
5014         of an inherited aspect.
5016 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
5018         * lib-xref.adb (Get_Through_Renamings): Get through subprogram
5019         renamings; also, avoid repeated calls to Renamed_Object when getting
5020         through object renamings.
5022 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5024         * sem_ch3.adb (Array_Type_Declaration): Handle properly an
5025         array type declaration in a private part, when an index is a
5026         subtype indication of a discrete type with a private partial view.
5028 2017-09-06  Javier Miranda  <miranda@adacore.com>
5030         * exp_ch4.adb (Expand_Modular_Op): Force generating
5031         temporary to improve the generated code.
5033 2017-09-06  Tristan Gingold  <gingold@adacore.com>
5035         * s-fatgen.adb: Minor typo fix in comment.
5037 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5039         * exp_ch5.adb (Make_Field_Assign): If the type
5040         of the right-hand side has stored constraint, use its values
5041         (except for those that are renamings of parent discriminants)
5042         to produce additional assignments for the discriminants of the
5043         left-hand side, which are invisible in the righ-hand side and
5044         not retrievable as selected components.
5046 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5048         * sem_util.adb (Needs_One_Formal): The first formal of such a
5049         function must be a controlling formal, so that Obj.F (X, Y)
5050         can have the interpretation F(Obj)(X, Y).
5051         * sem_util.ads: Clarify documentation.
5053 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5055         * table.ads, table.adb: Restore original implementation.
5056         * namet.h (Names_Ptr): Adjust back.
5057         (Name_Chars_Ptr): Likewise.
5058         * uintp.h (Uints_Ptr): Likewise.
5059         (Udigits_Ptr): Likewise.
5060         * g-table.ads: Remove pragma Compiler_Unit_Warning.
5061         * par_sco.adb: Do not with GNAT.Table and use Table consistently.
5062         * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
5063         * spark_xrefs.ads: Likewise.
5064         * scos.h: Undo latest changes.
5066 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5068         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
5069         No_Return flag to instance if pragma applies to generic unit. This
5070         must be done explicitly because the pragma does not appear
5071         directly in the generic declaration (unlike the corresponding
5072         aspect specification).
5074 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5076         * sem_ch7.adb (Has_Referencer): Move up and expand comment
5077         explaining the test used to detect inlining.  Use same test
5078         in second occurrence.
5079         (Analyze_Package_Body_Helper): Minor formatting fixes.
5081 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5083         * exp_ch4.adb (Handle_Changed_Representation): For an untagged
5084         derived type with a mixture of renamed and constrained parent
5085         discriminants, the constraint for the target must obtain the
5086         discriminant values from both the operand and from the stored
5087         constraint for it, given that the constrained discriminants are
5088         not visible in the object.
5089         * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
5090         side may be derived from that of the left-hand side (as in the
5091         case of an assignment with a change of representation) so the
5092         discriminant to be used in the retrieval of the value of the
5093         component must be the entity in the type of the right-hand side.
5095 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5097         * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
5098         sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5099         * exp_util.adb (Is_Source_Object): Account for
5100         the cases where the source object may appear as a dereference
5101         or within a type conversion.
5102         * exp_ch6.adb: Fix missing space in error message.
5104 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5106         * sem_prag.adb: Update description of Eliminate.
5108 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5110         * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
5111         properly an attribute reference 'Loop_Entry that appears in the
5112         list of indices of an indexed expression, to prevent an infinite
5113         loop in the compiler.
5115 2017-09-06  Bob Duff  <duff@adacore.com>
5117         * s-fileio.adb (Name): Do not raise Use_Error for temp files.
5119 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5121         * sem_ch4.adb (Analyze_Set_Membership):  If an alternative
5122         in a set membership is an overloaded enumeration literal, and
5123         the type of the alternative is resolved from a previous one,
5124         replace the entity of the alternative as well as the type,
5125         to prevent inconsistencies between the entity and the type.
5127 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5129         * ali.ads (ALIs_Record): Add No_Component_Reordering component.
5130         (No_Component_Reordering_Specified): New switch.
5131         * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
5132         (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
5133         * bcheck.adb (Check_Consistent_No_Component_Reordering):
5134         New check.
5135         (Check_Configuration_Consistency): Invoke it.
5136         * debug.adb (d.r): Toggle the effect of the switch.
5137         (d.v): Change to no-op.
5138         * einfo.ads (Has_Complex_Representation):
5139         Restrict to record types.
5140         (No_Reordering): New alias for Flag239.
5141         (OK_To_Reorder_Components): Delete.
5142         (No_Reordering): Declare.
5143         (Set_No_Reordering): Likewise.
5144         (OK_To_Reorder_Components): Delete.
5145         (Set_OK_To_Reorder_Components): Likewise.
5146         * einfo.adb (Has_Complex_Representation): Expect record types.
5147         (No_Reordering): New function.
5148         (OK_To_Reorder_Components): Delete.
5149         (Set_Has_Complex_Representation): Expect base record types.
5150         (Set_No_Reordering): New procedure.
5151         (Set_OK_To_Reorder_Components): Delete.
5152         (Write_Entity_Flags): Adjust to above change.
5153         * fe.h (Debug_Flag_Dot_R): New macro and declaration.
5154         * freeze.adb (Freeze_Record_Type): Remove conditional code setting
5155         OK_To_Reorder_Components on record types with convention Ada.
5156         * lib-writ.adb (Write_ALI): Deal with NC marker.
5157         * opt.ads (No_Component_Reordering): New flag.
5158         (No_Component_Reordering_Config): Likewise.
5159         (Config_Switches_Type): Add No_Component_Reordering component.
5160         * opt.adb (Register_Opt_Config_Switches): Copy
5161         No_Component_Reordering onto No_Component_Reordering_Config.
5162         (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
5163         (Save_Opt_Config_Switches): Save No_Component_Reordering.
5164         (Set_Opt_Config_Switches): Set No_Component_Reordering.
5165         * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
5166         * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
5167         No_Reordering flag from the default.
5168         (Build_Derived_Private_Type): Likewise.
5169         (Build_Derived_Record_Type): Likewise.  Then inherit it
5170         for untagged types and clean up handling of similar flags.
5171         (Record_Type_Declaration): Likewise.
5172         * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
5173         remove redundant test on Is_Tagged_Type.
5174         * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
5175         (Sig_Flags): Likewise.
5176         * snames.ads-tmpl (Name_No_Component_Reordering): New name.
5177         (Pragma_Id): Add Pragma_No_Component_Reordering value.
5178         * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
5179         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
5180         Copy the layout of the parent type only if the No_Reordering
5181         settings match.
5182         (components_to_record): Reorder record types with
5183         convention Ada by default unless No_Reordering is set or -gnatd.r
5184         is specified and do not warn if No_Reordering is set in GNAT mode.
5186 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5188         * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
5189         new predicate to reject declarations that can be completions,
5190         when there is a visible prior homograph that is a null procedure.
5191         * sem_ch6.adb (Analyze_Null_Procedure): use it.
5192         * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
5194 2017-09-06  Thomas Quinot  <quinot@adacore.com>
5196         * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
5197         run of 253 characters or more.
5199 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5201         * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
5202         properly incomplete subtypes that may be created by explicit or
5203         implicit declarations.
5204         (Is_Base_Type): Take E_Incomplete_Subtype into account.
5205         (Subtype_Kind): Ditto.
5206         * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
5207         Ekind of a subtype of a discriminated incomplete type.
5208         (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
5209         incomplete types, to preserve error reporting.
5210         (Process_Incomplete_Dependents): Do not create a subtype
5211         declaration for an incomplete subtype that is created internally.
5212         * sem_ch7.adb (Analyze_Package_Specification): Handle properly
5213         incomplete subtypes that do not require a completion, either
5214         because they are limited views, of they are generic actuals.
5216 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5218         * checks.adb (Insert_Valid_Check): Remove the
5219         suspicious manipulation of the Do_Range_Check flag as ths is
5220         no linger needed. Suppress validity check when analysing the
5221         validation variable.
5223 2017-09-06  Philippe Gil  <gil@adacore.com>
5225         * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
5226         GNATCOLL.Memory
5228 2017-09-06  Bob Duff  <duff@adacore.com>
5230         * sem_elim.adb: Minor comment fix.
5232 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5234         * sem_util.adb (Is_Object_Reference): A function call is an
5235         object reference, and thus attribute references for attributes
5236         that are functions (such as Pred and Succ) as well as predefined
5237         operators are legal in contexts that require an object, such as
5238         the prefix of attribute Img and the Ada2020 version of 'Image.
5240 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5242         * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
5243         exp_ch3.adb, xoscons.adb: Minor reformatting.
5245 2017-09-06  Raphael Amiard  <amiard@adacore.com>
5247         * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
5248         Position parameter. If supplied, use it to provide efficient iteration.
5249         * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
5250         a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
5251         iteration.
5253 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5255         * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
5256         designated type is class-wide and the expression is an unchecked
5257         conversion, preserve the conversion when checking the tag of the
5258         designated object, to prevent spurious semantic errors when the
5259         expression in the conversion has an untagged type (for example
5260         an address attribute).
5262 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5264         * sem_res.adb (Resolve_Entry_Call): Check whether a protected
5265         operation is subject to a pragma Eliminate.
5267 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5269         * sem_elim.ads, exp_ch4.adb: Minor reformatting.
5271 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5273         * fe.h (Eliminate_Error_Msg): Remove.
5275 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5277         * gcc-interface/utils.c (make_packable_type): Update call to
5278         mode_for_size_tree.
5280 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5282         * gcc-interface/utils2.c (build_load_modify_store):
5283         Use int_mode_for_size.
5285 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5287         PR ada/62235
5288         * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5289         for Itypes that are E_Record_Subtype with a cloned subtype.
5290         <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
5292 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5294         * gcc-interface/trans.c (convert_with_check): Use a custom base type
5295         if the base type of the expression has a different machine mode.
5296         Rename a couple of parameters and local variable.
5298 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5300         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
5301         conversions around prefixes that are not references.
5303 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5305         * gcc-interface/utils.c (unchecked_convert): When the result type is a
5306         non-biased integral type with size 0, set the result to 0 directly.
5308 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5310         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
5311         (renaming_from_instantiation_p): ...this.
5312         * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
5313         instead of explicit tests on kind of entities.  Adjust for renaming.
5314         (gnat_to_gnu_profile_type): Likewise.
5315         (gnat_to_gnu_subprog_type): Likewise.
5316         * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
5317         (Case_Statement_to_gnu): Likewise.
5318         (gnat_to_gnu): Likewise.
5319         (process_freeze_entity): Likewise.
5320         (process_type): Likewise.
5321         (add_stmt_with_node): Adjust for renaming.
5322         * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
5323         (renaming_from_generic_instantiation_p): Rename to...
5324         (renaming_from_instantiation_p): ...this.  Use inline predicate.
5325         (pad_type_hasher::keep_cache_entry): Fold.
5327 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5329         * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
5330         (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
5331         (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
5332         (N_Slice): Likewise.
5333         (N_Selected_Component): Likewise.  Do not try again to translate it.
5334         (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
5336 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5338         * repinfo.ads: Document new treatment of dynamic values.
5339         (TCode): Bump upper bound to 29.
5340         (Dynamic_Val): New constant set to 29.
5341         * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
5342         (Rep_Value)  <Dynamic_Val>: Likewise.
5343         * repinfo.h (Dynamic_Val): New macro.
5344         * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
5345         DECL_P nodes too.
5346         <INTEGER_CST>: Set TCODE instead of recursing.
5347         <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
5348         <VAR_DECL>: New case.
5349         <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
5350         <BIT_AND_EXPR>: Adjust.
5351         <CALL_EXPR>: Do not fall through.
5353 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5355         * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
5356         there is no target, do not create a temporary for the return value for
5357         an allocator either.
5359 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5361         * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
5362         unconstrained array type.
5364 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5365             Alan Hayward  <alan.hayward@arm.com>
5366             David Sherwood  <david.sherwood@arm.com>
5368         * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
5369         instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
5371 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5372             Alan Hayward  <alan.hayward@arm.com>
5373             David Sherwood  <david.sherwood@arm.com>
5375         * gcc-interface/decl.c (check_ok_for_atomic_type): Use
5376         is_a <scalar_int_mode>.
5377         * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
5378         * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
5380 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5381             Alan Hayward  <alan.hayward@arm.com>
5382             David Sherwood  <david.sherwood@arm.com>
5384         * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
5385         instead of mode_for_size.
5386         (gnat_to_gnu_subprog_type): Likewise.
5387         * gcc-interface/utils.c (make_type_from_size): Likewise.
5389 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5390             Alan Hayward  <alan.hayward@arm.com>
5391             David Sherwood  <david.sherwood@arm.com>
5393         * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
5394         (fp_size_to_prec): Likewise.
5396 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5397             Alan Hayward  <alan.hayward@arm.com>
5398             David Sherwood  <david.sherwood@arm.com>
5400         * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
5401         <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
5403 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5404             Alan Hayward  <alan.hayward@arm.com>
5405             David Sherwood  <david.sherwood@arm.com>
5407         * gcc-interface/decl.c (validate_size): Update use of
5408         GET_MODE_WIDER_MODE, forcing a wider mode to exist.
5410 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5411             Alan Hayward  <alan.hayward@arm.com>
5412             David Sherwood  <david.sherwood@arm.com>
5414         * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
5415         (fp_size_to_prec): Likewise.
5417 2017-08-29  Martin Liska  <mliska@suse.cz>
5419         PR other/39851
5420         * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
5422 2017-08-08  Martin Liska  <mliska@suse.cz>
5424         * gcc-interface/trans.c: Include header files.
5426 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
5428         * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
5429         as new argument to the imported_module_or_decl debug hook.
5431 2017-07-25  Javier Miranda  <miranda@adacore.com>
5433         * checks.adb (Apply_Divide_Checks): Ensure that operands are not
5434         evaluated twice. 
5436 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
5438         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
5439         TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
5440         (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
5442 2017-07-18  Mike Frysinger  <vapier@chromium.org>
5444         * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
5445         (../../gnatlink$(exeext)): Likewise.
5447 2017-07-15  John Paul Adrian Glaubitz  <glaubitz@physik.fu-berlin.de>
5449         PR ada/81446
5450         * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
5451         (Backend_Overflow_Checks): Set to True.
5453 2017-06-23  Jakub Jelinek  <jakub@redhat.com>
5455         * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
5457 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
5459         * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
5460         notice.  New macro.
5461         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
5462         as a definition.
5463         (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
5464         definition.
5465         * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
5466         imported subprograms for the current compilation unit as
5467         definitions.  Disable debug info for references to variables.
5468         * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
5469         * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
5470         not built-in functions to their binding scope.
5471         (create_subprog_decl): Add a DEFINITION parameter.  If it is true, tag
5472         the function as a definition.  Update all callers.
5473         (gnat_write_global_declarations): Emit debug info for imported
5474         functions.  Filter out external variables for which debug info
5475         is disabled.
5477 2017-06-15  Nicolas Boulenguez  <nicolas.boulenguez@free.fr>
5479         PR ada/81105
5480         * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
5481         (i[3456]86-pc-gnu): Likewise.
5482         (x86_64 kfreebsd): Likewise.
5484 2017-06-12  Eric Botcazou  <ebotcazou@adacore.com>
5486         PR bootstrap/80897
5487         * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
5489 2017-06-12  Eric Botcazou  <ebotcazou@adacore.com>
5491         PR ada/81070
5492         * s-interr-hwint.adb: Reinstate.
5493         * gcc-interface/Makefile.in (RTEMS): Use it again.
5495 2017-06-08  Olivier Hainque  <hainque@adacore.com>
5497         * vx_crtbegin_auto.c: Update year in copyright notice.
5498         * vx_crtbegin.c: Likewise.
5499         * vx_crtbegin.inc: Likewise. 
5500         * vx_crtend.c:  Likewise.
5502 2017-06-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5504         * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
5505         * s-tpopsp-rtems.adb: Delete.
5507 2017-06-02  Olivier Hainque  <hainque@adacore.com>
5509         * vx_crtbegin_auto.c: New file.
5510         * vx_crtbegin.c: New file.
5511         * vx_crtbegin.inc: New file.
5512         * vx_crtend.c: New file.
5514 2017-05-25  Jonathan Wakely  <jwakely@redhat.com>
5516         * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
5517         const qualifiers that cause -Wignored-qualifiers warnings.
5519 2017-05-22  Eric Botcazou  <ebotcazou@adacore.com>
5521         * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5522         for Itypes that are E_Access_Subtype.
5523         <E_Access_Subtype>: Use the DECL of the base type directly.
5525 2017-05-22  Ed Schonberg  <schonberg@adacore.com>
5526             Eric Botcazou  <ebotcazou@adacore.com>
5528         * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
5529         limited view may appear in the profile of a function, and a call to
5530         that function in another unit in which the full view is available must
5531         use this full view to spurious type errors at the point of call.
5532         * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
5533         of parent body with a with clause for the main unit.
5534         * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
5535         (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
5536         types declared in external units like types from limited with clauses.
5537         Adjust final processing of defer_limited_with_list accordingly.
5538         * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
5539         again to translate the prefix after the field if it is incomplete.
5541 2017-05-22  Eric Botcazou  <ebotcazou@adacore.com>
5543         * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
5544         alignment for simple volatile fields and remove associated errors.
5546 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
5548         * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
5549         * gcc-interface/trans.c (get_elaboration_procedure): Make static.
5551 2017-05-15  Pierre-Marie de Rodat  <derodat@adacore.com>
5553         * gcc-interface/utils.c (can_materialize_object_renaming_p):
5554         Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
5555         process Original_Node instead of expanded names.
5557 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
5559         * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
5560         addressability check in the constrained case.
5562 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
5564         * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
5565         types not coming from a limited context.
5567 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
5569         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
5570         the inlined list that are not public.
5571         * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
5572         there is a pragma Inline_Always on the subprogram.
5574 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
5576         * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
5577         <N_Allocator>: Use properly typed constants.
5578         (extract_values): Move around.
5579         (pos_to_constructor): Minor tweaks.
5580         (Sloc_to_locus): Fix formatting.
5581         * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
5582         * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
5583         (Gigi_Equivalent_Type): Adjust head comment.
5584         * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
5586 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
5588         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
5589         is a representation clause on an extension, propagate the alignment of
5590         the parent type only if the platform requires strict alignment.
5592 2017-05-12  Eric Botcazou  <ebotcazou@adacore.com>
5594         * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
5595         instead of Word_Size.
5597         Revert
5598         2017-03-28  Andreas Schwab  <schwab@suse.de>
5600         PR ada/80117
5601         * system-linux-aarch64-ilp32.ads: New file.
5602         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
5603         from LIBGNAT_TARGET_PAIRS.
5604         (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
5605         (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
5606         LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
5607         or -mabi=ilp32, resp.
5609 2017-05-10  H.J. Lu  <hongjiu.lu@intel.com>
5611         PR ada/80626
5612         * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
5613         instead of Word_Size.
5615 2017-05-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5617         * raise-gcc.c (exception_class_eq): Make ec parameter const.
5619 2017-05-02  Richard Biener  <rguenther@suse.de>
5621         * gcc-interface/misc.c (gnat_post_options): Do not set
5622         -fstrict-overflow.
5624 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
5626         * gcc-interface/trans.c (assoc_to_constructor): Make sure
5627         Corresponding_Discriminant is only called on discriminants.
5628         Skip the saving of the result only for them.
5629         (gnat_to_gnu) <N_Selected_Component>: Likewise.
5630         <N_Unchecked_Type_Conversion>: Translate the result type first.
5631         (gigi): Set TREE_NOTHROW on Begin_Handler.
5632         (stmt_list_cannot_raise_p): New predicate.
5633         (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
5634         a cleanup if the statements of the handler cannot raise.
5635         (process_freeze_entity): Use Is_Record_Type.
5636         (process_type): Likewise.
5638 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
5640         * einfo.ads (Corresponding_Record_Component): New alias
5641         for Node21 used for E_Component and E_Discriminant.
5642         * einfo.adb (Corresponding_Record_Component): New function.
5643         (Set_Corresponding_Record_Component): New procedure.
5644         (Write_Field21_Name): Handle Corresponding_Record_Component.
5645         * sem_ch3.adb (Inherit_Component): Set
5646         Corresponding_Record_Component for every component in
5647         the untagged case.  Clear it afterwards for non-girder
5648         discriminants.
5649         * gcc-interface/decl.c (gnat_to_gnu_entity)
5650         <E_Record_Type>: For a derived untagged type with discriminants
5651         and constraints, apply the constraints to the layout of the
5652         parent type to deduce the layout.
5653         (field_is_aliased): Delete.
5654         (components_to_record): Test DECL_ALIASED_P directly.
5655         (annotate_rep): Check that fields are present except for
5656         an extension.
5657         (create_field_decl_from): Add DEBUG_INFO_P
5658         parameter and pass it in recursive and other calls.  Add guard
5659         for the manual CSE on the size.
5660         (is_stored_discriminant): New predicate.
5661         (copy_and_substitute_in_layout): Consider only
5662         stored discriminants and check that original fields are present
5663         in the old type.  Deal with derived types.  Adjust call to
5664         create_variant_part_from.
5666 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
5668         * exp_ch6.adb (Expand_Call_Helper): When locating the
5669         accessibility entity created for an access parameter, handle
5670         properly a reference to a formal of an enclosing subprogram. if
5671         the reference appears in an inherited class-wide condition, it
5672         is the rewriting of the reference in the ancestor expression,
5673         but the accessibility entity must be that of the current formal.
5675 2017-05-02  Javier Miranda  <miranda@adacore.com>
5677         * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
5678         (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
5679         Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
5680         Call Expand_Non_Binary_Modular_Op.
5682 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
5684         * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
5685         has discriminants, do not override the Stored_Constraint list of
5686         the full view of the derived type with that of the derived type.
5688 2017-05-02  Bob Duff  <duff@adacore.com>
5690         * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
5692 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
5694         * s-os_lib.ads: Minor typo fix.
5696 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
5698         * gnatls.adb: Merge and refactor code from Prj.Env and remove
5699         this deprecated dependency.
5701 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
5703         * exp_util.ads: minor comment addition.
5705 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
5707         * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
5708         pastos in part #3 of the head comment.
5710 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
5712         * exp_ch3.adb (Freeze_Type): Do not generate an invariant
5713         procedure body for a local (sub)type declaration within a
5714         predicate function. Invariant checks do not apply to these, and
5715         the expansion of the procedure will happen in the wrong scope,
5716         leading to misplaced freeze nodes.
5718 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
5720         * exp_util.adb (Insert_Library_Level_Action): Use proper scope
5721         to analyze generated actions.  If the main unit is a body,
5722         the required scope is that of the corresponding unit declaration.
5724 2017-05-02  Arnaud Charlet  <charlet@adacore.com>
5726         * einfo.adb (Declaration_Node): flip branches of
5727         an IF statement to avoid repeated negations in its condition;
5728         no change in semantics, only to improve readability.
5730 2017-05-02  Arnaud Charlet  <charlet@adacore.com>
5732         * sem_case.adb: Remove extra spaces in parameter declarations.
5734 2017-05-02  Justin Squirek  <squirek@adacore.com>
5736         * usage.adb: Replace space with hyphen ("run time" -> "run-time")
5737         in usage line for new -gnatwE switch.
5739 2017-05-02  Claire Dross  <dross@adacore.com>
5741         * a-cofuve.ads (Remove): Remove unnecessary
5742         conditions in precondition.
5744 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
5746         * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
5747         sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
5749 2017-05-02  Justin Squirek  <squirek@adacore.com>
5751         * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
5752         alternative expression.
5753         * sem_res.adb (Resolve_Case_Expression): Ditto.
5755 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
5757         * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
5758         Refine predicate for the case where the primitive operation
5759         is a renaming of equality.  An overriding operation that is
5760         a user-defined renaming of predefined equality inherits its
5761         slot from the overridden operation. Otherwise it is treated
5762         as a predefined op and occupies the same predefined slot as
5763         equality. A call to it is transformed into a call to its alias,
5764         which is the predefined equality. A dispatching call thus uses
5765         the proper slot if operation is further inherited and called
5766         with class-wide arguments.
5768 2017-05-02  Justin Squirek  <squirek@adacore.com>
5770         * errout.adb (Set_Msg_Text): Add a case to switch the message
5771         type when the character '[' is detected signifying a warning
5772         about a run-time exception.
5773         * opt.ads Add a new Warning_Mode value for new switch
5774         * switch-b.adb (Scan_Binder_Switches): Add case for the binder
5775         to handle new warning mode
5776         * usage.adb (Usage): Add usage entry for -gnatwE
5777         * warnsw.adb (Set_Warning_Switch): Add case for the new switch
5779 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
5781         * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
5782         declaration that operates on some fixed point type.
5784 2017-05-02  Justin Squirek  <squirek@adacore.com>
5786         * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
5788 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
5790         * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
5792 2017-05-02  Justin Squirek  <squirek@adacore.com>
5794         * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
5795         expression (Analyze_If_Expression): Add check for valid condition
5796         * sem_eval.adb (Eval_Case_Expression): Add check for error posted
5797         on case-expression
5798         * sem_res.adb (Resolve_If_Expression): Add check for valid
5799         condition and then-expression.
5801 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
5803         * exp_ch3.adb (Build_Initialization_Call): Generate a null
5804         statement if the initialization call is a null procedure, as
5805         can happen with a controlled type with no explicit Initialize
5806         procedure, or an array of such.
5807         * exp_ch7.adb (Process_Object_Declaration): For a type with
5808         controlled components that has a trivial Initialize procedure,
5809         insert declaration for finalization counter after object
5810         declaration itself.
5811         (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
5812         finalization block and attendant declarations if component has
5813         a trivial Initialize procedure.
5814         (Make_Init_Call): Do not generate a call if controlled type has
5815         a trivial Initialize procedure.
5817 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
5819         * g-forstr.ads (Data): Move Format component last.
5820         * g-forstr.adb ("+"): Adjust for above change.
5821         * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
5822         * g-sechas.ads (Context): Move Key last.
5823         * g-socket.ads (Service_Entry_Type): Move Aliases last.
5824         * s-fileio.adb (Temp_File_Record): Move Name last.
5825         * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
5826         * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
5828 2017-05-02  Jerome Lambourg  <lambourg@adacore.com>
5830         * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
5831         switch introduced recently. finally not needed.
5833 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
5835         * sem_ch6.adb (Analyze_Null_Procedure): Set the
5836         Corresponding_Body link for a null procedure declaration.
5838 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
5840         * atree.h (Flag290): Add missing terminating parenthesis.
5841         * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
5842         (Set_Is_Class_Wide_Clone): Likewise.
5843         * einfo.ads (Is_Class_Wide_Clone): Likewise.
5845 2017-05-02  Gary Dismukes  <dismukes@adacore.com>
5847         * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
5848         parameter Array_Comp to indicate the case of an array object
5849         with null-excluding components.
5850         * checks.adb (Null_Exclusion_Static_Checks):
5851         Call Compile_Time_Constraint_Error instead of
5852         Apply_Compile_Time_Constraint_Error in the component case. Also
5853         call that when Array_Comp is True, with an appropriate warning for
5854         the array component case. Only create an explicit initialization
5855         by null in the case of an object of a null-excluding access type
5856         (and no longer do that in the component case).
5857         * sem_ch3.adb (Check_Component): Add a Boolean parameter
5858         Array_Comp defaulted to False.  Pass Empty for the Comp
5859         actual when calling Null_Exclusion_Static_Checks in the case
5860         where Comp_Decl matches Object_Decl, because we don't have a
5861         component in that case. In the case of an object or component
5862         of an array type, pass True for Array_Comp on the recursive call
5863         to Check_Component.
5865 2017-05-02  Bob Duff  <duff@adacore.com>
5867         * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
5868         compute the linux priority from the Ada priority. Call this everywhere
5869         required. In particular, the previous version was not doing this
5870         computation when setting the ceiling priority in various places. It
5871         was just converting to C.int, which results in a ceiling that is off
5872         by 1.
5874 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
5876         * sem_ch3.adb: Comment predicate inheritance.
5878 2017-05-02  Tristan Gingold  <gingold@adacore.com>
5880         * s-trasym.ads: Add comment.
5882 2017-05-02  Bob Duff  <duff@adacore.com>
5884         * sem_elab.adb, sem_elab.ads: Minor comment fixes.
5885         * sem_ch4.adb: Minor reformatting.
5886         * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
5887         * s-taspri-posix-noaltstack.ads: Minor refactoring.
5888         * sinput.ads: Minor typo fix.
5890 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
5892         * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
5893         * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
5894         here from exp_ch9, to recognize objects whose creation requires
5895         dynamic allocation, so that the proper warning can be emitted
5896         when restriction No_Implicit_Heap_Allocation is in effect.
5897         * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
5898         to emit proper warning when an object that requires dynamic
5899         allocation is declared.
5901 2017-05-02  Tristan Gingold  <gingold@adacore.com>
5903         * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
5905 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
5907         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
5908         visibility rules for equality operators that apply within an
5909         instantiation apply within an inlined body.
5910         * sem_type.adb (Add_One_Interp): ditto.
5912 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
5914         * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
5915         procedures.
5917 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
5919         * snames.ads-tmpl
5920         (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
5921         Name_No_Tagged_Streams): Move to regular pragmas.  Add
5922         placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
5923         and Secondary_Stack_Size.
5924         (Pragma_Id): Move Pragma_Assume,
5925         Pragma_Attribute_Definition, Pragma_Loop_Optimize and
5926         Pragma_No_Tagged_Streams to second part.
5928 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
5930         * exp_attr.adb: Minor reformatting.
5932 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
5934         * sem_ch4.adb (Analyze_Selected_Component): Improve error
5935         detection for illegal references to private components or
5936         operations of a protected type in the body of the type.
5938 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
5940         * opt.ads: Add missing GNAT markers in comments.
5941         * opt.adb (Set_Opt_Config_Switches): Do not override earlier
5942         settings of Optimize_Alignment at the end.
5944 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
5946         * checks.adb (Apply_Constraint_Check): Do not apply
5947         a discriminant check when the associated type is a constrained
5948         subtype created for an unconstrained nominal type.
5949         * exp_attr.adb: Minor reformatting.
5951 2017-05-02  Bob Duff  <duff@adacore.com>
5953         * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
5954         the N_Raise_Expression case.
5955         * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
5956         and add assertions.
5958 2017-05-02  Yannick Moy  <moy@adacore.com>
5960         * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
5961         optimize length comparison in GNATprove mode.
5962         * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
5963         operator /= into negation of operator = when needed.
5964         (Expand_SPARK): Call new
5965         function to expand operator /=.
5967 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
5969         * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
5970         Simplify the expression for a fixed-fixed division to remove
5971         divisions by constants whenever possible, as an optimization
5972         for restricted targets.
5974 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
5976         * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
5978 2017-05-02  Bob Duff  <duff@adacore.com>
5980         * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
5981         to find primitive ops, instead of using an Identifier that will
5982         later be looked up. This is necessary because these ops are not
5983         necessarily visible at all places where we need to call them.
5984         * exp_util.ads: Minor comment fix.
5986 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
5988         * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
5989         references are fully conformant if they are both expansions
5990         of the discriminant of a protected type, within one of the
5991         protected operations. One occurrence may be expanded into a
5992         constant declaration while the other is an input parameter to
5993         the corresponding generated subprogram.
5995 2017-05-02  Justin Squirek  <squirek@adacore.com>
5997         * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
5998         recursivly searching composite-types for null-excluding access
5999         types and verifying them.
6000         (Analyze_Object_Declaration): Add a
6001         call to Check_Null_Excluding_Components for static verification
6002         of non-initialized objects.
6003         * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
6004         a parameter for a composite-type's component and an extra case
6005         for printing component information.
6007 2017-05-02  Yannick Moy  <moy@adacore.com>
6009         * sem_ch10.adb (Analyze_Subunit): Take
6010         configuration pragma into account when restoring appropriate
6011         pragma for analysis of subunit.
6013 2017-05-02  Justin Squirek  <squirek@adacore.com>
6015         * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
6016         s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
6017         g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
6018         clauses from the runtime.
6020 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6022         * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
6023         array components specially.
6025 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6027         * sem_ch8.adb (Premature_Usage): If the premature usage of
6028         an entity is as the expression in its own object decaration,
6029         rewrite the reference as Any_Id to prevent cascaded errors or
6030         compiler loops when such an entity is used in an address clause.
6032 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
6034         * gcc-interface/decl.c (components_to_record): Add missing guard.
6036 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
6038         * gcc-interface/decl.c (components_to_record): Add more comments.
6039         Put back pending fields onto the regular list if the misalignment
6040         happens to cancel itself.
6042 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6044         * sem_ch4.adb (Complete_Object_Operation): When rewriting the
6045         controlling actual in a prefixed call, preserve the original node
6046         information if the prefix itself has been rewritten, for ASIS use.
6048 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6050         * exp_ch6.adb (Insert_Post_Call_Actions):
6051         Code clean up. Insert the post-call actions after an enclosing
6052         procedure call when N denotes a function call and appears as an
6053         actual parameter in the procedure call.
6055 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6057         * freeze.adb (Check_Component_Storage_Order): If there is a clause
6058         for the component, also reject the attribute if the component
6059         doesn't end on a byte boundary and its scalar storage order is
6060         different from that of the enclosing record type.
6062 2017-04-28  Javier Miranda  <miranda@adacore.com>
6064         * atree.ads (Info_Messages): Removed.
6065         (Warning_Info_Messages): New counter.
6066         (Report_Info_Messages): New counter.
6067         * err_vars.ads Update documentation.
6068         * errout.adb (Delete_Warning_And_Continuations): Update
6069         Info_Message occurrences.
6070         (Error_Msg_Internal): Update Info_Message occurrences.
6071         (Delete_Warning): Update Info_Message occurrences.
6072         (Write_Error_Summary): Update Info_Message occurrences.
6073         (Output_Messages): Update Info_Message occurrences.
6074         (To_Be_Removed): Update Info_Message occurrences.
6075         (Reset_Warnings): Update Info_Message occurrences.
6076         * errutil.adb (Error_Msg): Update Info_Message occurrences.
6077         (Finalize): Update Info_Message occurrences.
6078         (Initialize): Update Info_Message occurrences.
6079         * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
6080         (Compilation_Errors): Update Info_Message_Occurences.
6082 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6084         * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
6085         * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
6086         * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
6087         * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
6088         * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
6089         * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
6090         Y_Size.
6091         * sem_eval.adb (Why_Not_Static): Initialize Typ.
6092         * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
6094 2017-04-28  Bob Duff  <duff@adacore.com>
6096         * sem_util.ads, sem_util.adb (Might_Raise): New function
6097         that replaces Is_Exception_Safe, but has the opposite
6098         sense. Is_Exception_Safe was missing various cases -- calls inside
6099         a pragma Debug, calls inside an 'if' or assignment statement,
6100         etc. Might_Raise now walks the entire subtree looking for things
6101         that can raise.
6102         * exp_ch9.adb (Is_Exception_Safe): Remove.
6103         (Build_Protected_Subprogram_Body): Replace call to
6104         Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
6105         constants where possible).
6106         * exp_ch7.adb: Rename Is_Protected_Body -->
6107         Is_Protected_Subp_Body. A protected_body is something different
6108         in the grammar.
6110 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6112         * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
6113         * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
6114         (P_Discrete_Choice_List): Initialize Expr_Node variable.
6115         * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
6116         (P_Protected): Likewise.
6117         * sem_case.adb (Check_Duplicates):
6118         Add pragma Warnings on variable.
6119         * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
6120         * sem_ch4.adb (List_Operand_Interps):  Add pragma Warnings on variable.
6121         * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
6122         (Analyze_Exit_Statement): Initialize Scope_Id variable.
6123         (Analyze_Iterator_Specification): Initialize Bas variable.
6124         * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
6125         Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
6126         (Analyze_Accept_Statement): Initialize Task_Nam.
6128 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6130         * checks.adb (Install_Primitive_Elaboration_Check):
6131         Do not generate an elaboration check if all checks have been
6132         suppressed.
6134 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6136         * sem_ch13.adb (Analyze_Aspect_Specifications, case
6137         Interrupt_Handler and Attach_Handler): Generate reference
6138         to protected operation to prevent spurious warnings about
6139         unreferenced entities. Previous scheme failed with style checks
6140         enabled.
6142 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6144         * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
6145         that follows an expression function must not be relocated to
6146         the generated body, because it applies to the code that follows.
6148 2017-04-28  Gary Dismukes  <dismukes@adacore.com>
6150         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
6151         Relaxed_RM_Semantics to avoid having CodePeer issue errors on
6152         code that might violate the more stringent checking for 'Access
6153         introduced in Ada 2005.
6155 2017-04-28  Arnaud Charlet  <charlet@adacore.com>
6157         * a-cforse.adb: minor style fix in comment.
6159 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6161         * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
6162         initialize Block_Decls variable.
6163         (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
6164         (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
6165         * exp_disp.adb (Expand_Interface_Actuals): Initialize
6166         Formal_DDT and Actual_DDT variables.
6167         (Expand_Interface_Thunk): Initialize Iface_Formal.
6168         (Make_DT): Initialize Size_Comp.
6169         (Make_Select_Specific_Data_Table): Initialize Decls.
6170         * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
6171         Also initialize more RPC_Receiver_* variables.
6172         (Build_To_Any_Function): Initialize Cstr_Formal.
6173         * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
6175 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6177         * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
6178         node between access types, freeze the designated type as well,
6179         so that dispatch table pointers are created in the proper scope,
6180         and not in the constructed body of the expression function.
6182 2017-04-28  Bob Duff  <duff@adacore.com>
6184         * alloc.ads (Nodes_Initial): Go back to previous value. The large
6185         value makes large compilations faster, but small compilations slower.
6187 2017-04-28  Arnaud Charlet  <charlet@adacore.com>
6189         * sem_util.adb: minor typos in Is_Child_Or_Sibling.
6191 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6193         * erroutc.adb (Compilation_Errors): Do not consider info messages
6194         as suitable warnings when warnings must be treated as errors.
6195         * sem_ch7.adb (Analyze_Package_Specification): Do not consider
6196         internally-generated packages when outputting completion
6197         information.
6198         * errout.adb (Output_Messages): Do not consider info messages as
6199         suitable warnings when warnings must be treated as errors.
6200         * errutil.adb (Finalize): Do not consider info messages as
6201         suitable warnings when warnings must be treated as errors.
6203 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6205         * warnsw.ads: Minor fix for incorrect wording in comment.
6207 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6209         * sem_res.adb (In_Instance_Code): New predicate in
6210         Valid_Conversion, to determine whether a type conversion appears
6211         as (or within) an actual for a formal object.  Type conversions
6212         in instances are not rechecked in Valid_Conversion because
6213         visibility changes between generic location andi instance may
6214         lead to spurious errors, but conversions within an actual must be
6215         fully checked, and they are not fully resolved when pre-analyzing
6216         the actuals.
6218 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6220         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
6221         New_Copy_Tree instead of Relocate_Node as any subsequent copies
6222         of the relocated node will have mangled Parent pointers.
6223         * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
6224         tables used in conjunction with entity and itype replication.
6225         (Visit_Entity): Rewrite the restriction on which entities
6226         require duplication.  The restriction now includes all types.
6228 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6230         * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
6231         a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
6232         a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
6233         cleanups.
6235 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6237         * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
6238         gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
6240 2017-04-28  Gary Dismukes  <dismukes@adacore.com>
6242         * exp_util.adb: Minor reformatting.
6244 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6246         * sem_ch4.adb: Fix copy/pasto.
6248 2017-04-27  Tristan Gingold  <gingold@adacore.com>
6250         * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
6251         raise-gcc.c. Fix include search path for raise-gcc.c
6253 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
6255         * fe.h (Warn_On_Questionable_Layout): Declare.
6256         * warnsw.ads (Warn_On_Record_Holes): Move down.
6257         (Warn_On_Questionable_Layout): New boolean variable.
6258         (Warning_Record): Add Warn_On_Questionable_Layout field.
6259         * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
6260         (Restore_Warnings): Likewise.
6261         (Save_Warnings): Likewise.
6262         (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
6263         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
6264         components_to_record.
6265         (gnu_field_to_gnat): New function.
6266         (warn_on_field_placement): Likewise.
6267         (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
6268         parameters.  Rename local variables and adjust recursive call.
6269         Rework final scan of the field list and implement warnings on the
6270         problematic placement of specific sorts of fields.
6272 2017-04-27  Bob Duff  <duff@adacore.com>
6274         * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
6275         * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
6276         * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
6277         * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
6278         * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
6279         * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
6280         For efficiency, cache results of Is_Internal_File_Name and
6281         Is_Predefined_File_Name in the Units table. This avoids a lot
6282         of repeated text processing.
6284 2017-04-27  Emmanuel Briot  <briot@adacore.com>
6286         * g-comlin.adb (Sort_Sections): remove useless test.
6288 2017-04-27  Claire Dross  <dross@adacore.com>
6290         * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
6291         allow the use of regular equality over elements in contracts.
6292         (Formal_Model): Ghost package containing model functions that are
6293         used in subprogram contracts.
6294         (Current_To_Last): Removed, model functions should be used instead.
6295         (First_To_Previous): Removed, model functions should be used instead.
6296         (Strict_Equal): Removed, model functions should be used instead.
6297         (No_Overlap): Removed, model functions should be used instead.
6298         (Equivalent_Keys): Functions over cursors are removed. They were
6299         awkward with explicit container parameters.
6300         * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
6301         allow the use of regular equality over elements in contracts.
6302         (Formal_Model): Ghost package containing model functions that
6303         are used in subprogram contracts.
6304         (Current_To_Last): Removed, model functions should be used instead.
6305         (First_To_Previous): Removed, model functions should be used instead.
6306         (Strict_Equal): Removed, model functions should be used instead.
6307         (No_Overlap): Removed, model functions should be used instead.
6309 2017-04-27  Yannick Moy  <moy@adacore.com>
6311         * gnat1drv.adb: Code cleanup.
6313 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6315         * exp_util.adb (Replace_Entity): The prefix of a 'Result
6316         attribute reference in a post- condition is the subprogram to
6317         which the condition applies. If the condition is inherited
6318         by a type extension, the prefix becomes a reference to the
6319         inherited operation, but there is no need to create a wrapper
6320         for this operation, because 'Result is expanded independently
6321         when elaborating the postconditions.
6323 2017-04-27  Bob Duff  <duff@adacore.com>
6325         * sinput.adb: Minor code cleanup.
6326         * namet.adb (Append): Create faster versions of
6327         Append(String) and Append(Name_Id) by using slice assignment
6328         instead of loops.
6329         * sem_util.adb (In_Instance): Speed this up by removing
6330         unnecessary tests; Is_Generic_Instance is defined for all
6331         entities.
6332         * sem_util.ads, sem_util.adb (In_Parameter_Specification):
6333         Remove unused function.
6334         * alloc.ads (Nodes_Initial): Use a much larger value, because
6335         the compiler was spending a lot of time copying the nodes table
6336         when it grows. This number was chosen in 1996, so is rather out
6337         of date with current memory sizes. Anyway, it's virtual memory.
6338         Get rid of Orig_Nodes_...; use Node_... instead.
6339         * atree.adb (Lock): Do not release the Nodes tables; it's a
6340         waste of time.
6341         Orig_Nodes_ ==> Nodes_
6342         * nlists.adb: Orig_Nodes_ ==> Nodes_
6343         * g-table.adb: Remove unused "with" clause.
6344         * g-table.ads, table.ads: Remove Big_Table_Type, which should
6345         not be used by clients.
6346         * g-dyntab.adb (Last_Allocated): New function
6347         to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
6349 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6351         * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
6352         check.
6353         (Subtypes_Statically_Match): Remove duplicate check.
6354         * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
6356 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6358         * exp_aggr.adb (Replace_Type): Remove the special processing
6359         for selected components.
6360         * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
6361         processing for attributes Fixed_Value and Integer_Value.
6362         * exp_util.adb (Side_Effect_Free): Merge the processing for
6363         qualified expressions, type conversions, and unchecked type
6364         conversions.
6365         * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
6366         and Optional.
6367         * par-ch3.adb (P_Declarative_Items): Merge the processing for
6368         tokens function, not, overriding, and procedure.
6369         * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
6370         for qualified expressions, type conversions, and unchecked
6371         type conversions.
6372         * sem_util.adb (Compile_Time_Constraint_Error): Merge the
6373         processing for Ada 83 and instances.
6374         (Object_Access_Level): Merge the processing for indexed components
6375         and selected components.
6376         * uname.adb (Add_Node_Name): Merge the processing for stubs.
6378 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6380         * checks.adb (Install_Primitive_Elaboration_Check):
6381         Do not generate the check when restriction No_Elaboration_Code
6382         is in effect.
6384 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6386         * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
6387         of Expand_Dispatching_Call. If the denoted subprogram has a
6388         class-wide precondition, this is the only precondition that
6389         applies to the call, rather that the class-wide preconditions
6390         that may apply to the body that is executed. (This is specified
6391         in AI12-0195).
6393 2017-04-27  Yannick Moy  <moy@adacore.com>
6395         * gnat1drv.adb (Adjust_Global_Switches): Issue
6396         a warning in GNATprove mode if the runtime library does not
6397         support IEEE-754 floats.
6399 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6401         * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
6402         is itself inherited it does not carry any contract information,
6403         so examine its parent operation which is its Alias.
6405 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6407         * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
6408         prefix can be an object reference in which case Obj'Image (X)
6409         can only be interpreted as an indexing of the parameterless
6410         version of the attribute.
6411         * par-ch4.adb (P_Name): An attribute reference can be the prefix of
6412         an indexing or a slice operation if the attribute does not require
6413         parameters. In Ada2012 'Image also belongs in this category,
6414         and A'Image (lo .. hi) is legal and must be parsed as a slice.
6416 2017-04-27  Yannick Moy  <moy@adacore.com>
6418         * exp_ch4.adb: Minor reformatting.
6419         * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
6420         disable the CodePeer and C generation modes. Similar to the
6421         opposite actions done in CodePeer mode.
6423 2017-04-27  Yannick Moy  <moy@adacore.com>
6425         * sem_res.adb: Remove duplicate code.
6426         * sem_attr.adb: Delete duplicate code.
6428 2017-04-27  Bob Duff  <duff@adacore.com>
6430         * g-dyntab.adb: Reduce the amount of copying in
6431         Release. No need to copy items past Last.
6433 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6435         * checks.adb Add with and use clauses for Sem_Disp.
6436         (Install_Primitive_Elaboration_Check): New routine.
6437         * checks.ads (Install_Primitive_Elaboration_Check): New routine.
6438         * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
6439         processing of 'Elaborated.
6440         * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
6441         elaboration check.
6443 2017-04-27  Bob Duff  <duff@adacore.com>
6445         * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
6446         If the table grows and then shrinks back to empty, we won't necessarily
6447         point back to the empty array. Code cleanups.
6448         * sinput.ads: Add 'Base to Size clause to match the declared
6449         component subtypes.
6451 2017-04-27  Claire Dross  <dross@adacore.com>
6453         * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
6454         allow the use of regular equality over elements in contracts.
6455         (Formal_Model): Ghost package containing model functions that
6456         are used in subprogram contracts.
6457         (Current_To_Last): Removed, model functions should be used instead.
6458         (First_To_Previous): Removed, model functions should be used instead.
6459         (Strict_Equal): Removed, model functions should be used instead.
6460         (No_Overlap): Removed, model functions should be used instead.
6461         * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
6462         Boolean generic parameter to disable contracts for equivalence
6463         between keys.
6464         (Witness): Create a witness of a key that is used for handling of
6465         equivalence between keys.
6466         (Has_Witness): Check whether a witness is contained in a map.
6467         (W_Get): Get the element associated to a witness.
6468         (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
6469         directly.
6470         * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
6471         Boolean generic parameter to disable contracts for equivalence
6472         between keys.
6473         * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
6474         of equivalence on functional maps.
6475         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
6476         of equivalence on functional maps.
6478 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6480         * exp_ch9.adb (Expand_Entry_Barrier): Code
6481         cleanup. Do not perform the optimization which removes the
6482         declarations of the discriminant and component renamings when
6483         validity checks on operands and attributes are in effect.
6485 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6487         * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
6488         freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
6489         a-cfhama.ads, a-cofove.ads: Minor reformatting.
6491 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6493         * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
6494         pointer dereference.
6495         * g-spipat.adb (Dump): Code clean up. Protect against a possible
6496         null pointer dereference.
6498 2017-04-27  Bob Duff  <duff@adacore.com>
6500         * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
6501         Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
6502         Free renames Init, since they do the same thing.
6503         * g-table.ads: Default for Table_Low_Bound.
6504         * table.ads: Default for Table_Low_Bound, Table_Initial, and
6505         Table_Increment.
6507 2017-04-27  Bob Duff  <duff@adacore.com>
6509         * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
6510         can reallocate.
6511         * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
6512         * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
6513         Reorder code so that above assertions do not fail.
6514         * table.ads: Remove obsolete comment on Locked.
6516 2017-04-27  Claire Dross  <dross@adacore.com>
6518         * a-cfdlli.ads: Code cleanup.
6520 2017-04-27  Yannick Moy  <moy@adacore.com>
6522         * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
6523         when needed for proof.  (Expand_SPARK): Call the new procedure.
6524         * exp_util.ads Fix typo.
6526 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
6528         * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
6529         fixes.
6531 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6533         * sem_elab.adb Add new type Visited_Element
6534         and update the contents of table Elab_Visited.  Various code clean up.
6535         (Check_Elab_Call): Determine whether a prior call to
6536         the same subprogram was already examined within the same context.
6537         (Check_Internal_Call_Continue): Register the subprogram being
6538         called as examined within a particular context. Do not suppress
6539         elaboration warnings.
6541 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
6543         * xoscons.adb, osint.ads: Minor reformatting.
6545 2017-04-27  Bob Duff  <duff@adacore.com>
6547         * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
6548         Table_Count_Type --> Table_Last_Type, because the name
6549         was confusing (a "count" usually starts at zero).  Add
6550         functionality supported or needed by other tables packages
6551         (Move, Release_Threshold).
6552         * g-table.ads, g-table.adb: This is now just a thin wrapper
6553         around g-dyntab.ads/g-dyntab.adb.  Add functionality supported
6554         or needed by other tables packages (Save, Restore).
6555         * table.ads, table.adb: This is now just a thin wrapper around
6556         * g-table.ads/g-table.adb.
6557         * namet.h, scos.h, uintp.h: These files are reaching into the
6558         private data of some instances of g-table, whose names changed,
6559         so the above change requires some adjustment here. It now uses
6560         public interfaces.
6562 2017-04-27  Bob Duff  <duff@adacore.com>
6564         * namet.adb, namet.ads: Minor: remove unused procedures.
6566 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
6568         * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
6569         (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
6570         Add pragma Warnings on Rtype variable in nested block.  *
6571         * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
6572         * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
6573         (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
6574         * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
6575         (Process_Component_List_For_Finalize): Initialize Counter_Id.
6576         (Build_Finalize_Statements): Initialize Bod_Stmts.
6577         * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
6579 2017-04-27  Claire Dross  <dross@adacore.com>
6581         * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
6582         allow the use of regular equality over elements in contracts.
6583         (Formal_Model): Ghost package containing model functions that are
6584         used in subprogram contracts.
6585         (Current_To_Last): Removed, model
6586         functions should be used instead.
6587         (First_To_Previous): Removed, model functions should be used instead.
6588         (Strict_Equal): Removed, model functions should be used instead.
6589         (No_Overlap): Removed, model functions should be used instead.
6590         (Equivalent_Keys): Functions over cursors are removed. They were
6591         awkward with explicit container parameters.
6592         * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
6593         (proof only) procedure to help GNATprove when equivalence over
6594         keys is not equality.
6596 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6598         * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
6599         sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
6600         Minor reformatting and code cleanups.
6602 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6604         * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
6605         subsidiary of Check_Inherited_Conditions, to build pragmas for an
6606         operation whose ancestor has classwide pre/postconditions. This
6607         is used both to check the legality of the inheritance in Ada
6608         and in SPARK, and to determine whether a wrapper is needed for
6609         an inherited operation.
6610         * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
6611         Improve placement of error message for inherited classwide
6612         conditions that become illegal on type derivation.
6614 2017-04-27  Yannick Moy  <moy@adacore.com>
6616         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
6617         SPARK_Mode from context on generic package.
6618         * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
6619         useless test.
6621 2017-04-27  Claire Dross  <dross@adacore.com>
6623         * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
6624         overflows in computations.
6625         * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
6626         overflows in computations.
6627         (Insert): Rewrite precondition to avoid overflows in computations.
6628         * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
6629         overflows in computations.
6630         (Insert): Rewrite precondition to avoid overflows in computations.
6632 2017-04-27  Steve Baird  <baird@adacore.com>
6634         * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
6635         flag when it is declared in order to avoid confusing CodePeer about
6636         the possibility of an uninitialized variable read.
6638 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6640         * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
6641         no dimensionality error if the subtype of the expression is
6642         identical to the nominal subtype in the declaration, even though
6643         the expression itself may have been constant-folded and lack a
6644         dimension vector.
6645         * sem_dim.ads: Add comments on setting of dimension vectors and
6646         its interaction with node rewritings and side-effect removal.
6648 2017-04-27  Bob Duff  <duff@adacore.com>
6650         * debug.adb: Minor comment correction.
6651         * sem_dim.ads: Minor reformatting and typo fixes.
6653 2017-04-27  Bob Duff  <duff@adacore.com>
6655         * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
6656         Last of the tables via function calls, rather than relying on layout
6657         of data structures.
6659 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6661         * exp_util.adb: No wrapper in GNATprove mode.
6663 2017-04-27  Yannick Moy  <moy@adacore.com>
6665         * sem_res.adb (Resolve_Comparison_Op): Always
6666         evaluate comparisons between values of universal types.
6668 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6670         * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
6671         an elaboration counter nor a check when in GNATprove mode.
6672         * sem_util.adb (Build_Elaboration_Entity): Do not create an
6673         elaboration counter when in GNATprove mode.
6675 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6677         * freeze.adb: copy-paste typo.
6679 2017-04-27  Yannick Moy  <moy@adacore.com>
6681         * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
6682         Use correct test to detect call in GNATprove mode instead of
6683         compilation.
6685 2017-04-27  Claire Dross  <dross@adacore.com>
6687         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
6688         New property function expressing that the element of a
6689         sequence are contained in the union of two sequences.
6690         (Formal_Model.M_Elements_Included): New property function
6691         expressing that the element of a sequence are another sequence.
6692         (Generic_Sorting): Use new property functions to state that
6693         elements are preserved by Sort and Merge.
6694         * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
6695         allow the use of regular equality over elements in contracts.
6696         (Formal_Model): Ghost package containing model functions
6697         that are used in subprogram contracts.  (Capacity):
6698         On unbounded containers, return the maximal capacity.
6699         (Current_To_Last): Removed, model functions should be used instead.
6700         (First_To_Previous): Removed, model functions should be used instead.
6701         (Append): Default parameter value replaced
6702         by new wrapper to allow more precise contracts.
6703         (Insert): Subprogram restored, it seems it was useful to users even if
6704         it is inefficient.
6705         (Delete): Subprogram restored, it seems it was useful to users even if
6706         it is inefficient.
6707         (Prepend): Subprogram restored, it seems it was useful to users even
6708         if it is inefficient.
6709         (Delete_First): Subprogram restored, it seems it
6710         was useful to users even if it is inefficient.  (Delete_Last):
6711         Default parameter value replaced by new wrapper to allow more
6712         precise contracts.
6713         (Generic_Sorting.Merge): Subprogram restored.
6714         * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
6715         allow the use of regular equality over elements in contracts.
6716         (Formal_Model): Ghost package containing model functions
6717         that are used in subprogram contracts.  (Capacity):
6718         On unbounded containers, return the maximal capacity.
6719         (Current_To_Last): Removed, model functions should be used
6720         instead.
6721         (First_To_Previous): Removed, model functions should be used instead.
6722         (Append): Default parameter value replaced
6723         by new wrapper to allow more precise contracts.
6724         (Insert): Subprogram restored, it seems it was useful to users even if
6725         it is inefficient.
6726         (Delete): Subprogram restored, it seems it was useful to users even if
6727         it is inefficient.
6728         (Prepend): Subprogram restored, it seems it was useful to users even
6729         if it is inefficient.
6730         (Delete_First): Subprogram restored, it seems it
6731         was useful to users even if it is inefficient.  (Delete_Last):
6732         Default parameter value replaced by new wrapper to allow more
6733         precise contracts.
6734         (Generic_Sorting.Merge): Subprogram restored.
6735         (Vector): Do not reuse formal vectors, as it is no longer possible
6736         to supply them with an equality function over elements.
6738 2017-04-27  Bob Duff  <duff@adacore.com>
6740         * g-dyntab.adb (Release): When allocating the new
6741         table, use the correct slice of the old table to initialize it.
6743 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
6745         * einfo.ads: Minor fixes in comments.
6747 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6749         * sem_prag.adb: disable clones in SPARK_Mode.
6751 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
6753         * sem_util.ads, contracts.adb: Minor reformatting.
6755 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6757         * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
6758         Build body of subprogram that has a class-wide condition that
6759         contains calls to other primitives.
6760         (Build_Class_Wide_Clone_Call); Build a call to the common
6761         class-wide clone of a subprogram with classwide conditions. The
6762         body of the subprogram becomes a wrapper for a call to the
6763         clone. The inherited operation becomes a similar wrapper to which
6764         modified conditions apply, and the call to the clone includes
6765         the proper conversion in a call the parent operation.
6766         (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
6767         subprogram that has a classwide condition that contains calls to
6768         other primitives, build an internal subprogram that is invoked
6769         through a type-specific wrapper for all inherited subprograms
6770         that may have a modified condition.
6771         * sem_prag.adb (Check_References): If subprogram has a classwide
6772         condition, create entity for corresponding clone, to be invoked
6773         through wrapper subprograns.
6774         (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
6775         message about placement if pragma isi internally generated.
6776         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
6777         a classwide clone, build body of clone as copy of original body,
6778         and rewrite original body as a wrapper as a wrapper for a call to
6779         the clone, so that it incorporates the original pre/postconditions
6780         of the subprogram.
6781         * freeze.adb (Check_Inherited_Conditions): For an inherited
6782         subprogram that inherits a classwide condition, build spec and
6783         body of corresponding wrapper so that call to inherited operation
6784         gets the modified conditions.
6785         * contracts.adb (Analyze_Contracts): If analysis of classwide
6786         condition has created a clone for a primitive operation, analyze
6787         declaration of clone.
6789 2017-04-27  Steve Baird  <baird@adacore.com>
6791         * exp_util.adb (Build_Allocate_Deallocate_Proc):
6792         Add "Suppress => All_Checks" to avoid generating unnecessary
6793         checks.
6795 2017-04-27  Yannick Moy  <moy@adacore.com>
6797         * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
6798         * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
6799         inlining body in GNATprove mode when switch -gnatdm used.
6800         * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
6801         in GNATprove mode when switch -gnatdm used.
6803 2017-04-27  Arnaud Charlet  <charlet@adacore.com>
6805         * sem_ch13.adb (Analyze_Attribute_Definition_Clause
6806         [Attribute_Address]): Call Set_Address_Taken when ignoring rep
6807         clauses, so that we keep an indication of the address clause
6808         before removing it from the tree.
6810 2017-04-27  Yannick Moy  <moy@adacore.com>
6812         * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
6813         of expression being qualified, when not an object name, or else
6814         evaluate the underlying name.
6816 2017-04-27  Jerome Lambourg  <lambourg@adacore.com>
6818         * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
6820 2017-04-27  Justin Squirek  <squirek@adacore.com>
6822         * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
6823         Process_Component_List_For_Finalization as a local variable.
6824         (Process_Component_For_Finalize): Add an extra parameter to avoid
6825         global references.
6826         (Process_Component_List_For_Finalization): Correct calls to
6827         Process_Component_For_Finalize to take Num_Comps as a parameter.
6829 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6831         * sem_ch8.adb (Find_Direct_Name): Account for the case where
6832         a use-visible entity is defined within a nested scope of an
6833         instance when giving priority to entities which were visible in
6834         the original generic.
6835         * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
6837 2017-04-27  Tristan Gingold  <gingold@adacore.com>
6839         * raise-gcc.c: Don't use unwind.h while compiling
6840         for the frontend, but mimic host behavior.
6842 2017-04-27  Javier Miranda  <miranda@adacore.com>
6844         * sem_ch3.adb (Build_Discriminated_Subtype):
6845         Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
6847 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6849         * sem_prag.adb (Analyze_Global_Item):
6850         Do not consider discriminants because they are not "entire
6851         objects". Remove the discriminant-related checks because they are
6852         obsolete.
6853         (Analyze_Input_Output): Do not consider discriminants
6854         because they are not "entire objects".
6856 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6858         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
6859         perform check if the current scope does not come from source,
6860         as is the case for a rewritten task body, because check has
6861         been performed already, and may not be doable because of changed
6862         visibility.
6864 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6866         * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
6867         a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
6868         Minor reformatting.
6870 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6872         * sem_ch4.adb (Analyze_Call): If the return type of a function
6873         is incomplete in an context in which the full view is available,
6874         replace the type of the call by the full view, to prevent spurious
6875         type errors.
6876         * exp_disp.adb (Check_Premature_Freezing): Disable check on an
6877         abstract subprogram so that compiler does not reject a parameter
6878         of a primitive operation of a tagged type being frozen, when
6879         the untagged type of that parameter cannot be frozen.
6881 2017-04-27  Bob Duff  <duff@adacore.com>
6883         * sem_attr.adb (Compute_Type_Key): Don't walk
6884         representation items for irrelevant types, which could be in a
6885         different source file.
6887 2017-04-27  Steve Baird  <baird@adacore.com>
6889         * exp_attr.adb (Expand_N_Attribute_Reference):
6890         Don't expand Image, Wide_Image, Wide_Wide_Image attributes
6891         for CodePeer.
6893 2017-04-27  Yannick Moy  <moy@adacore.com>
6895         * exp_unst.ads: Fix typos in comments.
6897 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6899         * sem_eval.adb (Choice_Matches): Handle properly a real literal
6900         whose type has a defined static predicate.
6902 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6904         * exp_ch4.adb (Insert_Dereference_Action):
6905         Do not adjust the address of a controlled object when the
6906         associated access type is subject to pragma No_Heap_Finalization.
6907         Code reformatting.
6909 2017-04-27  Pierre-Marie de Rodat  <derodat@adacore.com>
6911         * gcc-interface/utils.c (gnat_type_for_size): Set
6912         TYPE_ARTIFICIAL on created types.
6914 2017-04-27  Claire Dross  <dross@adacore.com>
6916         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
6917         modifications in functional containers.
6918         * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
6919         to improve readablity. Subprograms are separated between basic
6920         operations, constructors and properties. Universally quantified
6921         formulas in contracts are factorized in independant functions
6922         with a name and a comment.  Names of parameters are improved.
6924 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
6926         * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
6928 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6930         * sem_res.adb (Resolve_Type_Conversion): Do not
6931         install a predicate check here since this is already done during
6932         the expansion phase. Verify whether the operand satisfies the
6933         static predicate (if any) of the target type.
6934         * sem_ch3.adb (Analyze_Object_Declaration): Do
6935         not install a predicate check if the object is initialized by
6936         means of a type conversion because the conversion is subjected
6937         to the same check.
6939 2017-04-27  Tristan Gingold  <gingold@adacore.com>
6941         * raise.c (__gnat_builtin_longjmp): Remove.
6942         (__gnat_bracktrace):
6943         Add a dummy definition for the compiler (__gnat_eh_personality,
6944         __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
6945         __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
6946         __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
6947         * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
6948         * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
6949         and a-except-2005.adb.
6950         * raise-gcc.c: Allow build in compiler, compiled as a C++
6951         file.
6952         (__gnat_Unwind_ForcedUnwind): Adjust prototype.
6953         (db): Constify msg_format.
6954         (get_call_site_action_for): Don't use void arithmetic.
6955         * system.ads (Frontend_Exceptions): Set to False.
6956         (ZCX_By_Default): Set to True.
6957         (GCC_ZC_Support): Set to True.
6958         * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
6959         a-except.ad[sb].
6960         * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
6961         in gnat1 and gnatbind.
6962         * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
6963         s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
6964         * s-excmac.ads, s-excmac.adb: Copy of variants.
6965         * a-except.o: Adjust preequisites.
6966         Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
6968 2017-04-27  Claire Dross  <dross@adacore.com>
6970         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
6971         modifications in functional containers.
6972         * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
6973         to improve readablity. Subprograms are separated between basic
6974         operations, constructors and properties. Universally quantified
6975         formulas in contracts are factorized in independant functions
6976         with a name and a comment.  Names of parameters are improved.
6978 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
6980         * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
6982 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6984         * sem_res.adb (Resolve_Type_Conversion): Do not
6985         install a predicate check here since this is already done during
6986         the expansion phase. Verify whether the operand satisfies the
6987         static predicate (if any) of the target type.
6988         * sem_ch3.adb (Analyze_Object_Declaration): Do
6989         not install a predicate check if the object is initialized by
6990         means of a type conversion because the conversion is subjected
6991         to the same check.
6993 2017-04-27  Tristan Gingold  <gingold@adacore.com>
6995         * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
6996         replaced by their variants).
6998 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7000         * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
7001         cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
7002         a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
7004 2017-04-27  Tristan Gingold  <gingold@adacore.com>
7006         * s-excmac-gcc.ads, s-excmac-gcc.adb,
7007         s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
7008         Ada95.
7010 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7012         * exp_ch7.adb (Establish_Transient_Scope): Rewrite
7013         the loop which detects potential enclosing transient scopes. The
7014         loop now terminates much earlier as transient scopes are bounded
7015         by packages and subprograms.
7017 2017-04-27  Claire Dross  <dross@adacore.com>
7019         * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
7020         allow the use of regular equality over elements in contracts.
7021         (Cursor): Type is now public so that it can be used in
7022         model functions.
7023         (Formal_Model): Ghost package containing
7024         model functions that are used in subprogram contracts.
7025         (Current_To_Last): Removed, model functions should be used
7026         instead.
7027         (First_To_Previous): Removed, model functions should
7028         be used instead.
7029         (Strict_Equal): Removed, model functions
7030         should be used instead.
7031         (Append): Default parameter value
7032         replaced by new wrapper to allow more precise contracts.
7033         (Insert): Default parameter value replaced by new wrapper to
7034         allow more precise contracts.
7035         (Delete): Default parameter
7036         value replaced by new wrapper to allow more precise contracts.
7037         (Prepend): Default parameter value replaced by new wrapper to
7038         allow more precise contracts.
7039         (Delete_First): Default parameter
7040         value replaced by new wrapper to allow more precise contracts.
7041         (Delete_Last): Default parameter value replaced by new wrapper
7042         to allow more precise contracts.
7044 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7046         * exp_spark.adb (Expand_SPARK): Perform specialized expansion
7047         for object declarations.
7048         (Expand_SPARK_N_Object_Declaration): New routine.
7049         * sem_elab.adb (Check_A_Call): Include calls to the
7050         Default_Initial_Condition procedure of a type under the SPARK
7051         elaboration checks umbrella.
7053 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7055         * sem.adb (Analyze): Diagnose an illegal iterated component
7056         association.
7057         * sem_util.ads, sem_util.adb
7058         (Diagnose_Iterated_Component_Association): New routine.
7060 2017-04-27  Bob Duff  <duff@adacore.com>
7062         * adaint.c (__gnat_get_current_dir): Return 0 in length if
7063         getcwd fails.
7064         * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
7065         exception if getcwd failed.
7067 2017-04-27  Yannick Moy  <moy@adacore.com>
7069         * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
7070         entities with special prefix.
7072 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7074         * debug.adb Change the documentation of switch -gnatd.s.
7075         * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
7076         to manage the secondary stack when an enclosing scope already
7077         performs this functionality (aka relaxed management). Switch
7078         -gnatd.s may be used to force strict management in which case
7079         the block will manage the secondary stack unconditionally. Add
7080         a guard to stop the traversal when encountering a package or a
7081         subprogram scope.
7083 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7085         * sem_res.adb (Resolve_Call): Refine further the handling of
7086         limited views of return types in function calls. If the function
7087         that returns a limited view appears in the current unit,
7088         we do not replace its type by the non-limited view because
7089         this transformation is performed int the back-end. However,
7090         the type of the call itself must be the non-limited view, to
7091         prevent spurious resolution errors.
7093 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7095         * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
7096         Removed, proposed implementation using generics for class-wide
7097         preconditions proved impractical.
7098         (Class_Wide_Clone): New attribute of subprogram. Designates
7099         subprogram created for primitive operations with class-wide
7100         pre/postconditions that contain calls to other primitives. The
7101         clone holds the body of the original primitive, but the
7102         pre/postonditions do not apply to it. The original body is
7103         rewritten as a wrapper for a call to the clone.
7104         (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
7105         the flag is set, no code for the corresponding pre/postconditions
7106         is inserted into its body.
7108 2017-04-27  Bob Duff  <duff@adacore.com>
7110         * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
7111         Scalar_Storage_Order if -gnatI is given.
7112         * sem_prag.adb (Analyze_Pragma): Ignore
7113         Default_Scalar_Storage_Order if -gnatI is given.
7115 2017-04-27  Claire Dross  <dross@adacore.com>
7117         * a-cofuba.ads (Add): Take as an additional input parameter
7118         the position where the element should be inserted.
7119         (Remove): New function that removes an element from the container.
7120         * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
7121         * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
7122         (Remove): New function that removes an element from a set.
7123         * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
7124         (Remove): New function that removes an element from a sequence.
7125         (Insert): New function that adds anywhere in a sequence.
7127 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7129         * checks.adb (Generate_Range_Check): Revert previous change.
7131 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7133         * sem_util.adb: Minor reformatting/rewording.
7135 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7137         * lib-xref.adb (Generate_Reference): The use
7138         of attribute 'Result is not considered a violation of pragma
7139         Unreferenced.
7141 2017-04-27  Justin Squirek  <squirek@adacore.com>
7143         * cstand.adb (Create_Standard): Correctly set
7144         Directly_Designated_Type for Any_Access.
7145         * sem_type.adb (Covers): Minor grammar fixes.
7147 2017-04-27  Bob Duff  <duff@adacore.com>
7149         * sem_attr.adb: Minor cleanup.
7151 2017-04-27  Claire Dross  <dross@adacore.com>
7153         * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
7154         private child of Ada.Containers used to implement all functional
7155         containers.
7156         * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
7157         child of Ada.Containers. It provides functional indefinite unbounded
7158         maps which can be used as high level models for specification
7159         of data structures.
7160         * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
7161         child of Ada.Containers. It provides functional indefinite unbounded
7162         sets which can be used as high level models for specification
7163         of data structures.
7164         * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
7165         child of Ada.Containers.  It provides functional indefinite unbounded
7166         vectors which can be used as high level models for specification
7167         of data structures.
7168         * Makefile.rtl: Add new packages.
7169         * impunit.adb: Add new packages.
7171 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7173         * sem_ch4.adb: Minor reformatting.
7175 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7177         * sem_ch12.adb (Analyze_Associations): minor reformatting.
7178         (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
7179         point type actual that has user-defined arithmetic primitives,
7180         when there is a previous actual for a formal package that defines
7181         a fixed-point type with the parent user-defined operator.
7183 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7185         * checks.adb (Generate_Range_Check): Reinstate part of previous change.
7186         * sem_attr.adb (Resolve_Attribute): Generate a range check when
7187         the component type allows range checks.
7189 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7191         * sem_aux.adb (Is_Generic_Formal): Use original node to locate
7192         corresponding declaration, because formal derived types are
7193         rewritten as private extensions.
7195 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7197         * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
7198         dimensions of operands if node has been analyzed already, because
7199         previous analysis and dimension checking will have removed the
7200         dimension information from the operands.
7202 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7204         * debug.adb: Document the use of switch -gnatd.s.
7205         * einfo.ads Update the documentation on attribute
7206         Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
7207         the uses of these attributes from certain entities.
7208         * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
7209         which determines whether the block should continue to manage
7210         the secondary stack.
7211         (Manages_Sec_Stack): New routine.
7213 2017-04-27  Bob Duff  <duff@adacore.com>
7215         * atree.ads: Minor edit.
7217 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7219         * sinfo.ads: Update the section on Ghost mode. Add
7220         a section on SPARK mode. Update the placement of section on
7221         expression functions.
7223 2017-04-27  Bob Duff  <duff@adacore.com>
7225         * sinput.adb (Get_Source_File_Index): Don't
7226         assert that S is in the right range in the case where this is
7227         a .dg file under construction.
7229 2017-04-27  Yannick Moy  <moy@adacore.com>
7231         * sem_util.adb (Check_Result_And_Post_State):
7232         Handle more precisely each conjunct in expressions formed by
7233         and'ing sub-expressions.
7235 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7237         * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
7239 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7241         * gnat_rm.texi, gnat_ugn.texi,
7242         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7243         doc/gnat_ugn/platform_specific_information.rst,
7244         doc/gnat_ugn/gnat_and_program_execution.rst,
7245         doc/gnat_ugn/gnat_utility_programs.rst,
7246         doc/gnat_ugn/the_gnat_compilation_model.rst,
7247         doc/gnat_rm/implementation_defined_attributes.rst,
7248         doc/gnat_rm/the_gnat_library.rst,
7249         doc/gnat_rm/implementation_defined_pragmas.rst,
7250         doc/gnat_rm/representation_clauses_and_pragmas.rst,
7251         doc/gnat_rm/implementation_of_specific_ada_features.rst,
7252         doc/gnat_rm/implementation_defined_aspects.rst,
7253         doc/gnat_rm/implementation_defined_characteristics.rst: Update
7254         documentation.
7256 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7258         * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
7259         generating C code on complex case expressions.
7261 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7263         * sem_prag.adb (Analyze_Pragma): Generate a warning instead
7264         of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
7265         * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
7266         Ada_2012 instead of Ada_2005 to be compatible with the above
7267         change.
7268         * bindgen.adb: Silence new warning on pragma Ada_95.
7270 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7272         * checks.adb (Generate_Range_Check): Revert part of previous change.
7274 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7276         * sem_ch4.adb (Try_Container_Indexing): Handle properly a
7277         container indexing operation that appears as a an actual in a
7278         parameter association in a procedure call.
7280 2017-04-25  Olivier Ramonat  <ramonat@adacore.com>
7282         * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
7283         Fix spelling mistakes.
7285 2017-04-25  Bob Duff  <duff@adacore.com>
7287         * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
7288         * sinput-p.adb: Use regular fat pointers, with bounds checking,
7289         for source buffers.  Fix misc obscure bugs.
7290         * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
7291         checking, for source buffers.  Modify representation clause for
7292         Source_File_Record as appropriate.  Move Source_File_Index_Table
7293         from spec to body, because it is not used outside the body.
7294         Move Set_Source_File_Index_Table into the private part, because
7295         it is used only in the body and in children.  Use trickery to
7296         modify the dope in the generic instantiation case.  It's ugly,
7297         but not as ugly as the previous method.  Fix documentation.
7298         Remove obsolete code.
7299         * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
7300         indexing in source buffers.
7301         * fmap.adb: Avoid conversions from one string type to another.
7302         Remove a use of global name buffer.
7303         * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
7304         fixes.
7306 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
7308         * exp_util.adb, exp_ch4.adb: Minor reformatting.
7310 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7312         * checks.adb: Code clean up in various routines.
7313         (Generate_Range_Check): Do not generate a range check when the
7314         expander is not active or when index/range checks are suppressed
7315         on the target type.
7316         (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
7317         Remove variants that include a Supress parameter. These routines
7318         are never used, and were introduced before the current scope-based
7319         check suppression method.
7321 2017-04-25  Vasiliy Fofanov  <fofanov@adacore.com>
7323         * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
7324         code and some subprogram calls that are now noop.
7326 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7328         * exp_ch4.adb (Expand_N_Case_Expression): Take
7329         Minimize_Expression_With_Actions into account when possible.
7331 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7333         * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
7334         (Known_Null): Moved to Sem_Util.
7335         * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
7336         (Known_Null): Moved to Sem_Util.
7337         * sem_util.adb Add new enumeration type Null_Status_Kind.
7338         (Known_Non_Null): Moved from Exp_Util. Most of the logic in
7339         this routine is now carried out by Null_Status.
7340         (Known_Null): Moved from Exp_Util. Most of the logic in this routine
7341         is now carried out by Null_Status.
7342         (Null_Status): New routine.
7343         * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
7344         (Known_Null): Moved from Exp_Util.
7346 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7348         * sem_ch6.adb (Analyze_Expression_Function): Do not report an
7349         error on the return type of an expression function that is a
7350         completion, if the type is derived from a generic formal type.
7352 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7354         * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
7355         conversion are those of the target type.
7357 2017-04-25  Bob Duff  <duff@adacore.com>
7359         * a-clrefi.adb: Minor cleanup.
7361 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
7363         * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
7365 2017-04-25  Bob Duff  <duff@adacore.com>
7367         * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
7368         types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
7369         errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
7370         scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
7371         the Internal_Source buffer. This removes the incorrect call to "="
7372         the customer noticed.
7373         Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
7374         eventually need to eliminate them altogether. Or else get rid
7375         of zero-origin addressing.
7377 2017-04-25  Claire Dross  <dross@adacore.com>
7379         * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
7380         function used in GNATprove to know if an expression contains
7381         non-dispatching calls on primitives of a tagged type.
7383 2017-04-25  Bob Duff  <duff@adacore.com>
7385         * rtsfind.adb (Initialize): Initialize
7386         First_Implicit_With. Building the compiler with Normalize_Scalars
7387         and validity checking finds this being used as an uninitialized
7388         variable.
7390 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7392         * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
7393         Add a warning about SPARK mode management. The routine now
7394         saves and restores both the mode and associated pragma.
7395         (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
7396         SPARK mode management. The routine now saves and restores both
7397         the mode and associated pragma.
7398         (Analyze_Object_Contract):
7399         Add a warning about SPARK mode management. The routine
7400         now saves and restores both the mode and associated pragma.
7401         (Analyze_Package_Body_Contract): Add a warning about SPARK mode
7402         management.  The routine now saves and restores both the mode
7403         and associated pragma.  (Analyze_Package_Contract): Add a warning
7404         about SPARK mode management. The routine now saves and restores
7405         both the mode and associated pragma.
7406         (Analyze_Task_Contract):
7407         Add a warning about SPARK mode management. The routine now saves
7408         and restores both the mode and associated pragma.
7409         * expander.adb (Expand): Change the way the Ghost mode is saved
7410         and restored.
7411         * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
7412         saved and restored.
7413         * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
7414         and restored.
7415         * exp_util.adb (Build_DIC_Procedure_Body):
7416         Change the way the Ghost mode is saved and restored.
7417         (Build_DIC_Procedure_Declaration): Change the way the Ghost
7418         mode is saved and restored.
7419         (Build_Invariant_Procedure_Body):
7420         Change the way the Ghost mode is saved and restored.
7421         (Build_Invariant_Procedure_Declaration): Change the way the Ghost
7422         mode is saved and restored.
7423         (Make_Predicate_Call): Change the
7424         way the Ghost mode is saved and restored.
7425         * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
7426         saved and restored.
7427         * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7428         and its assignment.
7429         (Mark_And_Set_Ghost_Body): Remove parameter
7430         Mode and its assignment.
7431         (Mark_And_Set_Ghost_Completion):
7432         Remove parameter Mode and its assignment.
7433         (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
7434         assignment.
7435         (Mark_And_Set_Ghost_Instantiation): Remove parameter
7436         Mode and its assignment.
7437         (Mark_And_Set_Ghost_Procedure_Call):
7438         Remove parameter Mode and its assignment.
7439         (Set_Ghost_Mode):
7440         Remove parameter Mode and its assignment.
7441         * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7442         and update the comment on usage.
7443         (Mark_And_Set_Ghost_Body):
7444         Remove parameter Mode and update the comment on usage.
7445         (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
7446         update the comment on usage.
7447         (Mark_And_Set_Ghost_Declaration):
7448         Remove parameter Mode and update the comment on usage.
7449         (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
7450         update the comment on usage.
7451         (Mark_And_Set_Ghost_Procedure_Call):
7452         Remove parameter Mode and update the comment on usage.
7453         (Set_Ghost_Mode): Remove parameter Mode and update the comment
7454         on usage.
7455         * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
7456         types.
7457         * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
7458         of obsolete field SPARK_Mode_Pragma.
7459         (Load_Main_Source): Remove
7460         the assignment of obsolete field SPARK_Mode_Pragma.
7461         (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
7462         * lib-writ.adb (Add_Preprocessing_Dependency): Remove
7463         the assignment of obsolete field SPARK_Mode_Pragma.
7464         (Ensure_System_Dependency): Remove the assignment of obsolete
7465         field SPARK_Mode_Pragma.
7466         * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
7467         mode management. Change the way Ghost and SPARK modes are saved
7468         and restored.
7469         * sem.adb (Analyze): Change the way the Ghost mode is saved
7470         and restored.
7471         * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
7472         Ghost mode is saved and restored.
7473         (Process_Full_View): Change
7474         the way the Ghost mode is saved and restored.
7475         * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
7476         mode is saved and restored.
7477         * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
7478         mode is saved and restored.
7479         (Analyze_Subprogram_Body_Helper):
7480         Change the way the Ghost mode is saved and restored.
7481         * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
7482         Ghost mode is saved and restored.
7483         * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
7484         management. Save the SPARK mode-related data prior to any changes
7485         to the scope stack and contexts. The mode is then reinstalled
7486         before the subunit is analyzed in order to restore the original
7487         view of the subunit.
7488         * sem_ch12.adb (Analyze_Package_Instantiation): Update the
7489         warning on region management.  Change the way the Ghost and
7490         SPARK modes are saved and restored.
7491         (Inline_Instance_Body):
7492         Add a warning about SPARK mode management. Code clean up.
7493         (Analyze_Subprogram_Instantiation): Update the warning on region
7494         management.  Change the way the Ghost and SPARK modes are saved
7495         and restored.
7496         (Instantiate_Package_Body): Update the warning
7497         on region management. Change the way the Ghost and SPARK modes
7498         are saved and restored.
7499         (Instantiate_Subprogram_Body): Update
7500         the warning on region management. Change the way the Ghost and
7501         SPARK modes are saved and restored.
7502         (Set_Instance_Env): Add a
7503         warning about SPARK mode management. Change the way SPARK mode
7504         is saved and restored.
7505         * sem_ch13.adb (Build_Predicate_Functions):
7506         Change the way the Ghost mode is saved and restored.
7507         (Build_Predicate_Function_Declaration): Change the way the Ghost
7508         mode is saved and restored.
7509         * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
7510         mode management. Change the way SPARK mode is saved and restored.
7511         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
7512         Change the way the Ghost mode is saved and restored.
7513         (Analyze_Initial_Condition_In_Decl_Part): Change the way
7514         the Ghost mode is saved and restored.
7515         (Analyze_Pragma):
7516         Change the way the Ghost mode is saved and restored.
7517         (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
7518         Ghost mode is saved and restored.
7519         * sem_util.adb (Install_SPARK_Mode): New routine.
7520         (Restore_SPARK_Mode): New routine.
7521         (Save_SPARK_Mode_And_Set): Removed.
7522         (Set_SPARK_Mode): New routine.
7523         * sem_util.ads (Install_SPARK_Mode): New routine.
7524         (Restore_SPARK_Mode): New routine.
7525         (Save_SPARK_Mode_And_Set): Removed.
7526         (Set_SPARK_Mode): New routine.
7528 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7530         * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
7531         to determine whether a type is declared in a local package that
7532         has not yet been frozen.
7533         * freeze.adb (Freeze_Before): Use new predicate to determine
7534         whether a local package must be installed on the scope stack
7535         in order to evaluate in the proper scope actions generated by
7536         aspect specifications, such as Predicate
7537         * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
7538         using new predicate.
7540 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7542         * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
7543         comparisons between non- scalar expressions expressions because
7544         their values cannot be invalidated.
7545         * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
7546         comment on usage.
7548 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7550         * par_sco.adb: Minor reformatting.
7552 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7554         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
7555         is a type from an unfrozen local package, install package to
7556         complete the analysis of delayed aspects of the type.
7558 2017-04-25  Tristan Gingold  <gingold@adacore.com>
7560         * bingen.adb (System_Version_Control_Used): New variable.
7561         (Resolve_Binder_Options): Set the above variable.
7562         (Gen_Output_File_Ada): Conditionally call Gen_Versions.
7563         (Gen_Elab_Order): Emit blank line before.
7565 2017-04-25  Justin Squirek  <squirek@adacore.com>
7567         * sem_cat.adb (Validate_RT_RAT_Component): Added
7568         an extra check to ignore incomplete types.
7570 2017-04-25  Thomas Quinot  <quinot@adacore.com>
7572         * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
7573         bogus circuitry for the case where Name is Predicate.
7575 2017-04-25  Thomas Quinot  <quinot@adacore.com>
7577         * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
7578         Create SCOs for Predicate aspects in disabled
7579         state initially, to be enabled later on by...
7580         * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
7581         SCO for predicate as enabled.
7583 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7585         * comperr.adb (Compiler_Abort): Remove now obsolete pair of
7586         pragmas Warnings Off / On.
7587         * namet.adb (Finalize): Remove now obsolete pair of pragmas
7588         Warnings Off / On.
7589         * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
7590         * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
7591         consider comparisons between static expressions because their
7592         values cannot be invalidated.
7593         * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
7594         Warnings Off / On.
7595         (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
7596         * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
7598 2017-04-25  Bob Duff  <duff@adacore.com>
7600         * sem_elab.adb (In_Task_Activation): Trace internal calls in
7601         task bodies.
7603 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
7605         * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
7606         typo fixes.
7608 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7610         * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
7611         On/Off to defend against a spurious warning in conditional
7612         compilation.
7613         * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
7614         * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
7615         defend against a spurious warning in conditional compilation.
7616         * output.adb Add a pair of pragma Warnings On/Off to defend
7617         against a spurious warning in conditional compilation.
7618         * sem_eval.adb (Eval_Relational_Op): Major code clean up.
7619         (Fold_General_Op): New routine.
7620         (Fold_Static_Real_Op): New routine.
7621         (Test_Comparison): New routine.
7622         * sem_eval.ads (Test_Comparison): New routine.
7623         * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
7624         (Warn_On_Constant_Valid_Condition): New routine.
7625         (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
7626         to detect a specific case.
7627         * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
7628         * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
7629         to defend against a spurious warning in conditional compilation.
7630         (Tree_Write): Add a pair of pragma Warnings On/Off to defend
7631         against a spurious warning in conditional compilation.
7632         * usage.adb Add a pair of pragma Warnings On/Off to defend
7633         against a spurious warning in conditional compilation.
7635 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7637         * sinfo.ads, sem_ch13.adb: Update comment.
7639 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7641         * sem_util.adb (Is_Post_State): A reference to a
7642         generic in out parameter is considered a change in the post-state
7643         of a subprogram.
7645 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7647         * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
7648         declaration of a subprogram instance within its wrapper package,
7649         skip over null statements that may result from the rewriting of
7650         ignored pragmas.
7652 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7654         * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
7655         If the type is an unchecked_union, replace the attribute with
7656         a Raise_Program_Error (rather than inserting such before the
7657         attribute reference) to handle properly the case where we are
7658         processing a component of a larger record, and we need to prevent
7659         further expansion for the unchecked union.
7660         (Expand_Attribute_Reference, case 'Write): If the type is
7661         an unchecked_union, check whether enclosing scope is a Write
7662         subprogram. Replace attribute with a Raise_Program_Error if the
7663         discriminants of the unchecked_union type have not default values
7664         because such a use is erroneous..
7666 2017-04-25  Tristan Gingold  <gingold@adacore.com>
7668         * exp_ch9.adb (Expand_N_Task_Type_Declaration):
7669         Add relative_deadline to task record on edf profile.
7670         (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
7671         (Make_Task_Create_Call): Pass relative_deadline value.
7672         * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
7673         * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
7674         (Profile_Info): Add info for GNAT_Ravenscar_EDF.
7675         * sem_prag.adb (Set_Ravenscar_Profile): Handle
7676         GNAT_Ravenscar_EDF (set scheduling policy).
7677         (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
7678         pragma.
7679         (Sig_Flags): Add choice for Pragma_Deadline_Floor.
7680         * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
7681         New names.
7682         (Pragma_Deadline_Floor): New pragma.
7683         * targparm.adb (Get_Target_Parameters): Recognize
7684         GNAT_Ravenscar_EDF profile.
7686 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
7688         * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
7690 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7692         * sem_aux.adb (Nearest_Ancestor): Use original node of type
7693         declaration to locate nearest ancestor, because derived
7694         type declarations for record types are rewritten as record
7695         declarations.
7696         * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
7697         properly derivations that are completions of private types.
7698         (Add_Predicates): If type is private, examine rep. items of full
7699         view, which may include inherited predicates.
7700         (Build_Predicate_Functions): Ditto.
7702 2017-04-25  Javier Miranda  <miranda@adacore.com>
7704         * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
7705         to generate new entities for subtype declarations located in
7706         Expression_With_Action nodes.
7708 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7710         * sem_elab.adb (Check_A_Call): Remove
7711         local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
7712         need for Elaborate_All when SPARK elaboration checks are
7713         required. Update the checks for instances, variables, and calls
7714         to Default_Initial_Condition procedures.
7716 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7718         * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
7719         into a boolean aspect, in analogy with the Ada aspect No_Return.
7721 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7723         * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
7725 2017-04-25  Bob Duff  <duff@adacore.com>
7727         * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
7728         Is_True_Constant for an array variable that is passed to a
7729         foreign function as an 'in' parameter.
7730         * debug.adb: Document -gnatd.q.
7732 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7734         * sem_ch6.adb (Analyze_Expression_Function): If expression function
7735         is completion and return type is an access type do not freeze
7736         designated type: this will be done in the process of freezing
7737         the expression if needed.
7738         (Freeze_Expr_Types): Check whether type is complete before
7739         creating freeze node, to provide a better error message if
7740         reference is premature.
7741         * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
7742         functions created by type derivations.
7744 2017-04-25  Pascal Obry  <obry@adacore.com>
7746         * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
7748 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7750         * sem_res.adb (Resolve_Type_Conversion):
7751         When resolving against any fixed type, set the type of the
7752         operand as universal real when the operand is a multiplication
7753         or a division where both operands are of any fixed type.
7754         (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
7755         placement of an error message by pointing to the operand of a
7756         type conversion rather than the conversion itself.
7758 2017-04-25  Thomas Quinot  <quinot@adacore.com>
7760         * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
7761         Needs_Debug_Info when producing SCOs.
7763 2017-04-25  Thomas Quinot  <quinot@adacore.com>
7765         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
7766         Always pass a null finalization master for a library level named access
7767         type to which a pragme No_Heap_Finalization applies.
7769 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
7771         PR ada/78845
7773         * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
7774         set to A'First(2) and vice versa.
7776 2017-04-25  Yannick Moy  <moy@adacore.com>
7778         * freeze.adb (Freeze_Record_Type): Remove obsolete
7779         rule on volatile tagged record restriction on SPARK code.
7781 2017-04-25  Yannick Moy  <moy@adacore.com>
7783         * sem_prag.adb (minor) Fix SPARK RM reference.
7785 2017-04-25  Yannick Moy  <moy@adacore.com>
7787         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
7788         comment to reflect which entity is chosen as unique entity.
7789         (Unique_Entity): Return full view instead of private spec for
7790         protected type or task type. Fix possible incorrect access when
7791         called on entry.
7793 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
7795         * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
7796         array types only instead of all packed array types.
7798 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7800         * sem_ch6.adb (Conforming_Types): If type of formal as a specified
7801         dimension system, verify that dimensions of both match.
7802         (Check_Conformance): Add error message in case of dimension
7803         mismatch.
7804         * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
7805         predicate.
7807 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
7809         * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
7810         confusing.
7812 2017-04-25  Yannick Moy  <moy@adacore.com>
7814         * sem_util.adb: Minor refactoring.
7815         * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
7817 2017-04-25  Claire Dross  <dross@adacore.com>
7819         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
7820         ultimate alias when accessing overridden operation. Indeed, if the
7821         overridden operation is itself inherited, it won't have any explicit
7822         contract.
7824 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7826         * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
7827         overlap if the two formals have different types, because formally
7828         the corresponding actuals cannot designate the same objects.
7830 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7832         * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
7833         dimensions are present from context, use them.  b) If operand is
7834         a static constant rewritten as a literal, obtain the dimensions
7835         from the original declaration, otherwise use dimensions of type
7836         established from context.
7838 2017-04-25  Yannick Moy  <moy@adacore.com>
7840         * sem_util.adb (Is_Effectively_Volatile): Protect against base type
7841         of array that is private.
7843 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
7845         * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
7846         reformatting.
7848 2017-04-25  Yannick Moy  <moy@adacore.com>
7850         * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
7851         on body.
7853 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7855         * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
7856         the check that recognizes a call to a private overridding and
7857         replaces the called subprogram with its alias.
7859 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7861         * exp_util.adb: Minor reformatting.
7863 2017-04-25  Justin Squirek  <squirek@adacore.com>
7865         * exp_ch3.adb (Freeze_Type): Add condition to always treat
7866         interface types as a partial view of a private type for the
7867         generation of invariant procedure bodies.
7868         * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
7869         Add a condition to get the Corresponding_Record_Type for
7870         concurrent types, add condition to return in the absence of a
7871         class in the pragma, remove call to Replace_Type_References,
7872         and add call to Replace_References.
7873         (Add_Interface_Invariatns),
7874         (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
7875         to including the working type T.
7876         (Add_Own_Invariants): Remove
7877         legacy condition for separate units, remove dispatching for ASIS
7878         and save a copy of the expression in the pragma expression.
7879         (Build_Invariant_Procedure_Body): Default initalize vars,
7880         remove return condition on interfaces, always use the
7881         private type for interfaces, and move the processing of types
7882         until after the processing of invariants for the full view.
7883         (Build_Invariant_Procedure_Declaration): Remove condition
7884         to return if an interface type is encountered and add
7885         condition to convert the formal parameter to its class-wide
7886         counterpart if Work_Typ is abstract.
7887         (Replace_Type): Add call to Remove_Controlling_Arguments.
7888         (Replace_Type_Ref): Remove class-wide dispatching for the current
7889         instance of the type.
7890         (Replace_Type_References): Remove parameter "Derived"
7891         (Remove_Controlling_Arguments): Created in order to removing
7892         the controlliong argument from calls to primitives in the case
7893         of the formal parameter being an class-wide abstract type.
7894         * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
7895         to the change made to Freeze_Type in exp_ch3. Add a condition
7896         to treat interface types as a partial view.
7897         * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
7898         to Build_Invariant_Procedure_Declaration to properly generate a
7899         "partial" invariant procedure when Typ is an interface.
7901 2017-04-25  Bob Duff  <duff@adacore.com>
7903         * a-numeri.ads: Go back to using brackets encoding for the Greek
7904         letter pi.
7906 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7908         * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
7909         (10-15): if derived type T with progenitors is abstract,
7910         and primitive P of this type inherits non-trivial classwide
7911         preconditions from both a parent operation and from an interface
7912         operation, then the inherited operation is abstract if the parent
7913         operation is not null.
7914         * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
7915         with Covered_Interface_Op to yield the actual interface operation
7916         that is implemented by a given inherited operation.
7918 2017-04-25  Javier Miranda  <miranda@adacore.com>
7920         * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
7921         and right operands after performing the validity checks. Required
7922         because validity checks may remove side effects from the operands.
7924 2017-04-25  Javier Miranda  <miranda@adacore.com>
7926         * exp_attr.adb (Attribute_Unrestricted_Access):
7927         Do not disable implicit type conversion.  Required to generate
7928         code that displaces the pointer to reference the secondary
7929         dispatch table.
7931 2017-04-25  Pascal Obry  <obry@adacore.com>
7933         * prj-attr.adb, snames.ads-tmpl: Add package Install's
7934         Required_Artifacts attribute.
7936 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7938         * sem_util.adb (Same_Value): String literals are compile-time
7939         values, and comparing them must use Expr_Value_S.
7941 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7943         * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
7944         dereference is introduced for the object, and the object is
7945         overloaded, do not check whether it is aliased, because it may
7946         include an implicit dereference.
7947         * sem_type.adb (Disambiguate): If two interpretations are access
7948         attribute types with the same designated type keep either of
7949         them and do not report an ambiguity.  A true ambiguity will be
7950         reported elsewhere.
7952 2017-04-25  Bob Duff  <duff@adacore.com>
7954         * a-numeri.ads: Change the encoding of Greek letter Pi from
7955         brackets encoding to UTF-8.  Use pragma Wide_Character_Encoding
7956         to indicate the encoding. We considered using a byte order mark
7957         (BOM), but that causes various trouble (misc software eats the
7958         BOM, if you have a patch with a BOM, then it's not at the start
7959         of the patch, so it's not a BOM, the BOM affects with-ing files,
7960         etc.).
7961         * scng.adb, s-wchcnv.adb: Minor.
7963 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7965         * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
7966 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7968         * sem_ch3.adb (Add_Internal_Interface_Entities): Move
7969         Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
7970         Improve error message on operations that inherit non-conforming
7971         classwide preconditions from ancestor and progenitor.
7972         * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
7973         moved here from sem_ch3.
7974         * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
7975         check given in RM 6.1.1 (17) concerning renamings of overriding
7976         operations that inherits class-wide preconditions from ancestor
7977         or progenitor.
7979 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7981         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
7982         (Build_Adjust_Statements): Code cleanup.
7983         (Build_Finalizer): Update the initialization of
7984         Exceptions_OK.
7985         (Build_Finalize_Statements): Code cleanup.
7986         (Build_Initialize_Statements): Code cleanup.
7987         (Make_Deep_Array_Body): Update the initialization of
7988         Exceptions_OK.
7989         (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
7990         (Process_Object_Declaration): Generate a null exception handler only
7991         when exceptions are allowed.
7992         (Process_Transients_In_Scope): Update the initialization of
7993         Exceptions_OK.
7994         * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
7995         routine.
7996         * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
7997         restrictions when the handler is internally generated and the
7998         mode is warnings.
8000 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8002         * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
8003         enforce legality rule on classwide preconditions inherited from
8004         both an ancestor and a progenitor (RM 6.1.1 (10-13).
8005         * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
8006         subprogram need not be dispatching if it appears in a precondition
8007         for an abstract or null subprogram.
8009 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8011         * sem_ch10.adb: Minor typo fix.
8013 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
8015         * gcc-interface/Makefile.in: Cleanup VxWorks targets.
8017 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8019         * fname.adb (Is_Internal_File_Name): Arrange for the slices to
8020         have a length which is a power of 2.
8021         (Is_Predefined_File_Name): Likewise. Adjust comment.
8023 2017-04-25  Bob Duff  <duff@adacore.com>
8025         * exp_aggr.adb (Component_Count): Protect the
8026         arithmetic from attempting to convert a value >= 2**31 to Int,
8027         which would otherwise raise Constraint_Error.
8029 2017-04-25  Bob Duff  <duff@adacore.com>
8031         * opt.ads (Locking_Policy): Fix incorrect documentation. The
8032         first character of the policy name is not unique.
8034 2017-04-25  Bob Duff  <duff@adacore.com>
8036         * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
8037         * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
8038         about this flag not being used. It was already used, and it is
8039         now used more.
8041 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8043         * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
8044         (Ignore_SPARK_Mode_Pragmas): New routine.
8045         (Set_Ignore_SPARK_Mode_Pragmas): New routine.
8046         (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
8047         * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
8048         related entities.
8049         (Ignore_SPARK_Mode_Pragmas): New routine
8050         along with pragma Inline.
8051         (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
8052         * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
8053         Ignore_SPARK_Mode_Pragmas_In_Instance.
8054         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8055         Save and restore the value of global flag
8056         Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
8057         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
8058         the corresponding spec or the body must ignore all SPARK_Mode
8059         pragmas found within.
8060         (Analyze_Subprogram_Declaration): Mark
8061         the spec when it needs to ignore all SPARK_Mode pragmas found
8062         within to allow the body to infer this property in case it is
8063         instantiated or inlined later.
8064         * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
8065         value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8066         the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8067         when the corresponding spec also ignored all SPARK_Mode pragmas
8068         found within.
8069         (Analyze_Package_Declaration): Mark the spec when
8070         it needs to ignore all SPARK_Mode pragmas found within to allow
8071         the body to infer this property in case it is instantiated or
8072         inlined later.
8073         * sem_ch12.adb (Analyze_Formal_Package_Declaration):
8074         Save and restore the value of flag
8075         Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8076         formal spec when it needs to ignore all SPARK_Mode
8077         pragmas found within to allow the body to infer this
8078         property in case it is instantiated or inlined later.
8079         (Analyze_Package_Instantiation): Save and restore the value
8080         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
8081         the instance spec when it needs to ignore all SPARK_Mode
8082         pragmas found within to allow the body to infer this
8083         property in case it is instantiated or inlined later.
8084         (Analyze_Subprogram_Instantiation): Save and restore the value
8085         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8086         instance spec and anonymous package when they need to ignore
8087         all SPARK_Mode pragmas found within to allow the body to infer
8088         this property in case it is instantiated or inlined later.
8089         (Instantiate_Package_Body): Save and restore the value of global
8090         flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
8091         global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
8092         corresponding instance spec also ignored all SPARK_Mode pragmas
8093         found within.
8094         (Instantiate_Subprogram_Body): Save and restore the
8095         value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8096         the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8097         when the corresponding instance spec also ignored all SPARK_Mode
8098         pragmas found within.
8099         * sem_prag.adb (Analyze_Pragma): Update the reference to
8100         Ignore_Pragma_SPARK_Mode.
8101         * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
8102         all SPARK_Mode pragmas defined within yields mode "off".
8104 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8106         * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
8108 2017-04-25  Bob Duff  <duff@adacore.com>
8110         * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
8111         All_Checks" to avoid generating unnecessary checks.
8112         * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
8113         All_Checks".
8114         * sem.ads: Fix comment.
8115         * expander.ads: Fix comment.
8116         * exp_atag.ads: Fix comment: "Index = 0" should be
8117         "Index >= 0".
8119 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8121         * s-taprop-linux.adb: Minor editorial fixes.
8123 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8125         * sem_util.adb (New_Copy_Tree): Put back the declarations of the
8126         hash tables at library level.  Reinstate the NCT_Hash_Tables_Used
8127         variable and set it to True whenever the main hash table is
8128         populated.  Short- circuit the Assoc function if it is false
8129         and add associated guards.
8131 2017-04-25  Olivier Hainque  <hainque@adacore.com>
8133         * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
8134         specs without elaboration code that have an elaboration counter
8135         nevertheless, e.g.  when compiled with -fpreserve-control-flow.
8136         * sem_ch10.adb (Analyze_Compilation_Unit):
8137         Set_Elaboration_Entity_Required when requested to preserve
8138         control flow, to ensure the unit elaboration is materialized at
8139         bind time, resulting in the inclusion of the unit object file
8140         in the executable closure at link time.
8142 2017-04-25  Pierre-Marie de Rodat  <derodat@adacore.com>
8144         * exp_dbug.adb: In Debug_Renaming_Declaration,
8145         when dealing with indexed component, accept to produce a renaming
8146         symbol when the index is an IN parameter or when it is a name
8147         defined in an outer scope.
8149 2017-04-25  Yannick Moy  <moy@adacore.com>
8151         * errout.adb (Error_Msg): Adapt continuation
8152         message in instantiations and inlined bodies for info messages.
8154 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8156         * fname.adb (Has_Internal_Extension): Add pragma Inline.
8157         Use direct 4-character slice comparisons.
8158         (Has_Prefix): Add
8159         pragma Inline.  (Has_Suffix): Delete.
8160         (Is_Internal_File_Name):
8161         Test Is_Predefined_File_Name first.
8162         (Is_Predefined_File_Name):
8163         Use direct slice comparisons as much as possible and limit all
8164         comparisons to at most 8 characters.
8166 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8168         * checks.adb (Insert_Valid_Check): Code cleanup.
8169         * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
8170         (Expand_Actuals): Generate proper copy-back for a validation
8171         variable when it acts as the argument of a type conversion.
8172         * sem_util.adb (Is_Validation_Variable_Reference): Augment the
8173         predicate to operate on type qualifications.
8175 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8177         * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
8178         Minor reformatting.
8180 2017-04-25  Bob Duff  <duff@adacore.com>
8182         * sem_prag.adb (No_Return): Give an error if the pragma applies
8183         to a body. Specialize the error for the specless body case,
8184         as is done for (e.g.) pragma Convention.
8185         * debug.adb: Add switch -gnatd.J to disable the above legality
8186         checks. This is mainly for use in our test suite, to avoid
8187         rewriting a lot of illegal (but working) code.  It might also
8188         be useful to customers. Under this switch, if a pragma No_Return
8189         applies to a body, and the procedure raises an exception (as it
8190         should), the pragma has no effect. If the procedure does return,
8191         execution is erroneous.
8193 2017-04-25  Bob Duff  <duff@adacore.com>
8195         * exp_ch6.adb (Expand_Actuals): This is the
8196         root of the problem. It took N as an 'in out' parameter, and in
8197         some cases, rewrote N, but then set N to Original_Node(N). So
8198         the node returned in N had no Parent. The caller continued
8199         processing of this orphaned node. In some cases that caused a
8200         crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
8201         and trips over the Empty Parent). The solution is to make N an
8202         'in' parameter.  Instead of rewriting it, return the list of
8203         post-call actions, so the caller can do the rewriting later,
8204         after N has been fully processed.
8205         (Expand_Call_Helper): Move most of Expand_Call here. It has
8206         too many premature 'return' statements, and we want to do the
8207         rewriting on return.
8208         (Insert_Post_Call_Actions): New procedure to insert the post-call
8209         actions in the appropriate place. In the problematic case,
8210         that involves rewriting N as an Expression_With_Actions.
8211         (Expand_Call): Call the new procedures Expand_Call_Helper and
8212         Insert_Post_Call_Actions.
8214 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8216         * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
8217         properly type derived from generic formal types, to handle
8218         properly modified version of ACATS 4.1B B611017.
8220 2017-04-25  Javier Miranda  <miranda@adacore.com>
8222         * exp_unst.adb (Subp_Index): Adding missing
8223         support for renamings and functions that return a constrained
8224         array type (i.e. functions for which the frontend built a
8225         procedure with an extra out parameter).
8227 2017-04-25  Pascal Obry  <obry@adacore.com>
8229         * s-string.adb: Minor code clean-up.
8231 2017-04-25  Bob Duff  <duff@adacore.com>
8233         * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
8234         procedure.
8235         * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
8236         function for Non_Blocking_Wait_Process.
8238 2017-04-25  Bob Duff  <duff@adacore.com>
8240         * prep.adb (Preprocess): Remove incorrect
8241         Assert. Current character can be ASCII.CR.
8243 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8245         * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
8246         convention Stdcall, which has a number of exceptions. Convention
8247         is legal on a component declaration whose type is an anonymous
8248         access to subprogram.
8250 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8252         * sem_ch4.adb: sem_ch4.adb Various reformattings.
8253         (Try_One_Prefix_Interpretation): Use the base type when dealing
8254         with a subtype created for purposes of constraining a private
8255         type with discriminants.
8257 2017-04-25  Javier Miranda  <miranda@adacore.com>
8259         * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
8260         * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
8261         dispatching primitives (Restore_Warnings): Restore warning on
8262         late dispatching primitives (Save_Warnings): Save warning on late
8263         dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
8264         to enable/disable this warning.
8265         (WA_Warnings): Set warning on late dispatching primitives.
8266         * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
8267         that its parent type has a private extension.
8268         * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
8269         New subprogram.
8270         * usage.adb: Document -gnatw.j and -gnatw.J.
8272 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8274         * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
8275         reformatting.
8277 2017-04-25  Bob Duff  <duff@adacore.com>
8279         * binde.adb (Validate): Do not pass dynamic strings
8280         to pragma Assert, because older compilers do not support that.
8282 2017-04-25  Bob Duff  <duff@adacore.com>
8284         * s-fileio.adb (Close): When a temp file is
8285         closed, delete it and clean up its Temp_File_Record immediately,
8286         rather than waiting until later.
8287         (Temp_File_Record): Add File
8288         component, so Close can know which Temp_File_Record corresponds
8289         to the file being closed.
8290         (Delete): Don't delete temp files,
8291         because they are deleted by Close.
8292         (Open): Set the File component
8293         of Temp_File_Record. This requires moving the creation of the
8294         Temp_File_Record to the end, after the AFCB has been created.
8296 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8298         * checks.adb (Insert_Valid_Check): Do not generate
8299         a validity check when inside a generic.
8301 2017-04-25  Yannick Moy  <moy@adacore.com>
8303         * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
8305 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
8307         * snames.ads-tmpl (Snames): More names for detecting predefined
8308         potentially blocking subprograms.
8310 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8312         * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
8313         concerning inheritance of class-wide preconditions do not apply
8314         to postconditions.
8316 2017-04-25  Bob Duff  <duff@adacore.com>
8318         * s-ficobl.ads: Minor comment fix.
8320 2017-04-25  Yannick Moy  <moy@adacore.com>
8322         * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
8323         conversions from float to integer in GNATprove mode.
8324         (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
8325         to call Apply_Type_Conversion_Checks, so that range checks
8326         are properly positioned when needed on conversions, including
8327         when converting from float to integer.  (Determine_Range): In
8328         GNATprove mode, take into account the possibility of conversion
8329         from float to integer.
8330         * sem_res.adb (Resolve_Type_Conversion): Only enforce range
8331         check on conversions from fixed-point to integer, not anymore
8332         on conversions from floating-point to integer, when in GNATprove
8333         mode.
8335 2017-04-25  Yannick Moy  <moy@adacore.com>
8337         * checks.adb (Determine_Range_R): Special case type conversions
8338         from integer to float in order to get bounds in that case too.
8339         * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
8340         mode, for computations involved in interval checking.
8342 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8344         * checks.adb (Insert_Valid_Check): Partially reimplement validity
8345         checks.
8346         * einfo.adb Node36 is now used as Validated_Object.
8347         (Validated_Object): New routine.
8348         (Set_Validated_Object): New routine.
8349         (Write_Field36_Name): Add an entry for Validated_Object.
8350         * einfo.ads Add new attribute Validated_Object along with
8351         usage in entities.
8352         (Validated_Object): New routine along with pragma Inline.
8353         (Set_Validated_Object): New routine along with pragma Inline.
8354         * exp_attr.adb (Make_Range_Test): Add processing for validation
8355         variables to avoid extra reads and copies of the prefix.
8356         * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
8357         variables in order to reflect any changes done in the variable
8358         back into the original object.
8359         * sem_util.adb (Is_Validation_Variable_Reference): New routine.
8360         * sem_util.ads (Is_Validation_Variable_Reference): New routine.
8362 2017-04-25  Steve Baird  <baird@adacore.com>
8364         * exp_ch7.adb (Build_Array_Deep_Procs,
8365         Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
8366         generate Finalize_Address routines for CodePeer.
8368 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8370         * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
8371         Analyze_Pre_Post_Condition, to implement the legality checks
8372         mandated by AI12-0131: Pre'Class shall not be specified for an
8373         overriding primitive subprogram of a tagged type T unless the
8374         Pre'Class aspect is specified for the corresponding primitive
8375         subprogram of some ancestor of T.
8377 2017-04-25  Bob Duff  <duff@adacore.com>
8379         * sem_ch8.adb (Use_One_Type): If a use_type_clause
8380         is redundant, set its Used_Operations to empty. This is only
8381         necessary for use clauses that appear in the parent of a generic
8382         child unit, because those use clauses get reanalyzed when we
8383         instantiate the generic, and we don't want the Used_Operations
8384         carried over from the original context (where it was probably
8385         not redundant).
8387 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8389         * exp_ch6.adb: Minor reformatting.
8391 2017-04-25  Bob Duff  <duff@adacore.com>
8393         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
8394         Use Source_Index (Current_Sem_Unit) to find the correct casing.
8395         * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
8396         (Current_Sem_Unit) to find the correct casing.
8397         * par.adb (Par): Null out Current_Source_File, to ensure that
8398         the above bugs won't rear their ugly heads again.
8400 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8402         * sem_ch8.adb (Find_Type): For an attribute reference
8403         'Class, if prefix type is synchronized and previous errors
8404         have suppressed the creation of the corresponding record type,
8405         create a spurious class-wide for the synchonized type itself,
8406         to catch other misuses of the attribute
8408 2017-04-25  Steve Baird  <baird@adacore.com>
8410         * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
8411         is True, then don't generate the accessibility check for the
8412         tag of a tagged result.
8413         * exp_intr.adb (Expand_Dispatching_Constructor_Call):
8414         if CodePeer_Mode is True, then don't generate the
8415         tag checks for the result of call to an instance of
8416         Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
8417         descendant of" check and the accessibility check).
8419 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8421         * sem_ch13.adb: Code cleanups.
8422         * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
8423         * sem_ch8.ads: Minor comment fix.
8425 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8427         * exp_ch4.adb (Library_Level_Target): New function.
8428         (Expand_Concatenate): When optimization is enabled, also expand
8429         the operation out-of-line if the concatenation is present within
8430         the expression of the declaration of a library-level object and
8431         not only if it is the expression of the declaration.
8433 2017-04-25  Bob Duff  <duff@adacore.com>
8435         * freeze.adb (Freeze_Object_Declaration): Do
8436         not Remove_Side_Effects if there is a pragma Linker_Section,
8437         because in that case we want static initialization in the
8438         appropriate section.
8440 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8442         * exp_dbug.adb: Minor rewording and reformatting.
8444 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8446         * sem_attr.adb (Statically_Denotes_Object): New predicate, to
8447         handle the proposed changes to rules concerning potentially
8448         unevaluated expressions, to include selected components that
8449         do not depend on discriminants, and indexed components with
8450         static indices.
8451         * sem_util.adb (Is_Potentially_Unevaluated): Add check for
8452         predicate in quantified expression, and fix bugs in the handling
8453         of case expressions and membership test.
8454         (Analyze_Attribute_Old_Result): use new predicate.
8455         (Analyze_Attribute, case Loop_Entry): ditto.
8457 2017-04-25  Bob Duff  <duff@adacore.com>
8459         * s-secsta.adb (SS_Info): Add a comment
8460         explaining why we don't need to walk all the chunks in order to
8461         compute the total size.
8463 2017-04-25  Bob Duff  <duff@adacore.com>
8465         * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
8466         of the global name buffer to 4*Max_Line_Length.
8468 2017-04-25  Javier Miranda  <miranda@adacore.com>
8470         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
8471         renaming entity for debug information, mark the entity as needing debug
8472         info if it comes from sources.
8474 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8476         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
8477         restriction converning the use of 'Address where the prefix is
8478         of a controlled type.
8480 2017-04-25  Pierre-Marie de Rodat  <derodat@adacore.com>
8482         * exp_dbug.adb: In Debug_Renaming_Declaration,
8483         skip slices that are made redundant by an indexed component
8484         access.
8485         * atree.h: New definition for Original_Node.
8487 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8489         * sem_prag.adb, sem_prag.ads: Minor reformatting.
8491 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8493         * sem_ch3.adb (Check_Entry_Contract): Call
8494         Preanalyze_Spec_Expression so that resolution takes place as well.
8495         * sem_util.adb (Check_Internal_Protected_Use): Reject properly
8496         internal calls that appear in preconditions of protected
8497         operations, in default values for same, and in contract guards
8498         for contract cases in SPARK.
8500 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8502         * a-numaux.ads: Fix description of a-numaux-darwin
8503         and a-numaux-x86.
8504         (Double): Define to Long_Float.
8505         * a-numaux-vxworks.ads (Double): Likewise.
8506         * a-numaux-darwin.ads
8507         (Double): Likewise.
8508         * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
8509         * a-numaux-x86.ads: Fix package description.
8510         * a-numaux-x86.adb (Is_Nan): Minor tweak.
8511         (Reduce): Adjust and complete description. Call Is_Nan instead of
8512         testing manually. Use an integer temporary to hold rounded value.
8513         * a-numaux-darwin.adb (Reduce): Likewise.
8514         (Is_Nan): New function.
8516 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8518         * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
8519         on analysis of prefix whose type is a current instance of a
8520         synchronized type, but where the prefix itself is an entity that
8521         is an object.
8523 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8525         * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
8526         the identity of callable entities therein, because they have been
8527         properly resolved, and prefixed calls may have been rewritten
8528         as normal calls.
8530 2017-04-25  Patrick Bernardi  <bernardi@adacore.com>
8532         * exp_ch3.adb (Build_Init_Statements): Convert
8533         the expression of the pragma/aspect Secondary_Stack_Size to
8534         internal type System.Parameters.Size_Type before assigning
8535         it to the Secondary_Stack_Size component of the task type's
8536         corresponding record.
8538 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8540         * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
8541         (etc) optimizations when the type is modular and the offsets
8542         are equal.
8544 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8546         * s-osinte-freebsd.ads: Minor comment tweaks
8548 2017-04-25  Javier Miranda  <miranda@adacore.com>
8550         * urealp.adb (UR_Write): Reverse previous patch
8551         adding documentation on why we generate multiplications instead
8552         of divisions (needed to avoid expressions whose computation with
8553         large numbers may cause division by 0).
8555 2017-04-25  Bob Duff  <duff@adacore.com>
8557         * erroutc.adb (Set_Specific_Warning_Off,
8558         Set_Warnings_Mode_Off): Use the correct source file for
8559         Stop. Was using Current_Source_File, which is only valid during
8560         parsing. Current_Source_File will have a leftover value from
8561         whatever file happened to be parsed last, because of a with_clause
8562         or something.
8564 2017-04-25  Bob Duff  <duff@adacore.com>
8566         * lib.ads, lib.adb (In_Internal_Unit): New functions similar
8567         to In_Predefined_Unit, but including GNAT units.
8568         * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
8569         with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
8570         because Should_Ignore_Pragma was not working reliably outside
8571         the parser, because Current_Source_File is not valid.
8572         * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
8573         * par-prag.adb: Call Should_Ignore_Pragma_Par.
8575 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
8577         * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
8578         codepeer mode.
8580 2017-04-25  Javier Miranda  <miranda@adacore.com>
8582         * urealp.adb (UR_Write): Fix output of constants with a base other
8583         that 10.
8585 2017-04-25  Justin Squirek  <squirek@adacore.com>
8587         * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
8588         * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
8589         Add extra parameter for Process_Interface_Name.
8590         (Process_Interface_Name): Add parameter for pragma to analyze
8591         corresponding aspect.
8592         * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
8593         from sem_ch13.adb
8595 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8597         * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
8598         correction.
8600 2017-04-25  Yannick Moy  <moy@adacore.com>
8602         * sem_res.adb (Resolve_Comparison_Op): Do not
8603         attempt evaluation of relational operations inside assertions.
8605 2017-04-25  Justin Squirek  <squirek@adacore.com>
8607         * exp_util.adb (Add_Interface_Invariants):
8608         Restored, code moved back from Build_Invariant_Procedure_Body.
8609         (Add_Parent_Invariants): Restored, code moved back from
8610         Build_Invariant_Procedure_Body.
8611         (Build_Invariant_Procedure_Body):
8612         Remove refactored calls and integrated code from
8613         Add_Parent_Invariants and Add_Interface_Invariants.
8615 2017-04-25  Johannes Kanig  <kanig@adacore.com>
8617         * errout.adb (Output_Messages): Adjust computation of total
8618         errors
8619         * erroutc.adb (Error_Msg): In statistics counts, deal
8620         correctly with informational messages that are not warnings.
8621         * errutil.adb (Finalize): adjust computation of total errors.
8623 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
8625         * terminals.c (__gnat_terminate_pid): New.
8626         * g-exptty.ads (Terminate_Process): New. Update comments.
8628 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
8630         * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
8632 2017-04-25  Justin Squirek  <squirek@adacore.com>
8634         * sem_ch3.adb (Analyze_Declarations): Minor
8635         correction to comments, move out large conditional and scope
8636         traversal into a predicate.
8637         (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
8638         logic.
8640 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8642         * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
8643         of prefix whose type is a current instance of a synchronized
8644         type. If the prefix is an object this is an external call (or
8645         requeue) that can only access public operations of the object. The
8646         previous predicate was too restrictive, and did not allow public
8647         protected operations, only task entries.
8649 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8651         * sem_ch5.adb, fname.adb: Minor reformatting.
8653 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8655         * einfo.adb (Is_Anonymous_Access_Type): New routine.
8656         * einfo.ads Update the placement of
8657         E_Anonymous_Access_Subprogram_Type along with all subtypes that
8658         mention the ekind.
8659         (Is_Anonymous_Access_Type): New routine.
8660         * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
8661         master for an access type subject to pragma No_Heap_Finalization.
8662         * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
8663         allocated or deallocated does not finalization actions if the
8664         associated access type is subject to pragma No_Heap_Finalization.
8665         * opt.ads Add new global variable No_Heap_Finalization_Pragma.
8666         * par-prag.adb Pragma No_Heap_Finalization does not need special
8667         processing from the parser.
8668         * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
8669         ??? comments. Use the new predicate Is_Anonymous_Access_Type.
8670         * sem_prag.adb Add an entry in table Sig_Flags for pragma
8671         No_Heap_Finalization.
8672         (Analyze_Pragma): Add processing for
8673         pragma No_Heap_Finalization. Update various error messages to
8674         use Duplication_Error.
8675         * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
8676         * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
8677         and corresponding pragma id.
8679 2017-04-25  Bob Duff  <duff@adacore.com>
8681         * freeze.adb (Freeze_Record_Type): Use the
8682         underlying type of the component type to determine whether it's
8683         elementary. For representation clause purposes, a private type
8684         should behave the same as its full type.
8685         * fname.ads, fname.adb (Is_Predefined_File_Name):
8686         Make sure things like "system.ali" are recognized as predefined.
8688 2017-04-25  Javier Miranda  <miranda@adacore.com>
8690         * debug.adb: Update documentation of -gnatd.6.
8692 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8694         * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
8695         element iterator when the name is an overloaded function call,
8696         one of whose interpretations yields an array.
8698 2017-04-25  Bob Duff  <duff@adacore.com>
8700         * uname.ads, uname.adb (Is_Predefined_Unit_Name,
8701         Is_Internal_Unit_Name): New functions for operating on unit
8702         names, as opposed to file names. There's some duplicated code
8703         with fname.adb, which is unfortunate, but it seems like we don't
8704         want to add dependencies here.
8705         * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
8706         to Is_Predefined_Unit_Name; the former was wrong, because Uname
8707         is not a file name at all.
8708         * fname.ads, fname.adb: Document the fact that
8709         Is_Predefined_File_Name and Is_Internal_File_Name can be called
8710         for ALI files, and fix the code so it works properly for ALI
8711         files. E.g. these should return True for "system.ali".
8713 2017-04-25  Justin Squirek  <squirek@adacore.com>
8715         * exp_util.adb (Add_Invariant): Removed,
8716         code moved to Add_Invariant_Check, Add_Inherited_Invariant,
8717         and Add_Own_Invariant.  (Add_Invariant_Check): Used
8718         for adding runtime checks from any kind of invariant.
8719         (Add_Inherited_Invariant): Generates invariant checks for
8720         class-wide invariants (Add_Interface_Invariants): Removed, code
8721         moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
8722         Create a types own invariant procedure (Add_Parent_Invariants):
8723         Removed, code moved to Build_Invariant_Procedure_Body
8724         (Build_Invariant_Procedure_Body): Add refactored calls
8725         and integrated code from Add_Parent_Invariants and
8726         Add_Interface_Invariants.
8727         (Process_Type): Removed, the
8728         relavant code was inlined into both Add_Own_Invariant and
8729         Add_Inherited_Invariant.
8731 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8733         * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
8734         scn.adb, osint.adb, fname.adb: Minor reformatting.
8736 2017-04-25  Pascal Obry  <obry@adacore.com>
8738         * s-taprop-mingw.adb: Do not check for CloseHandle in
8739         Finalize_TCB.
8741 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8743         * sem_util.adb (Check_Part_Of_Reference):
8744         Continue to examine the context if the reference appears within
8745         an expression function.
8747 2017-04-25  Justin Squirek  <squirek@adacore.com>
8749         * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
8750         and Build_Invariant_Procedure_Declaration.
8751         * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
8752         and Build_Invariant_Procedure_Declaration from exp_ch7
8753         and break-out Is_Untagged_Private_Derivation from
8754         Build_Invariant_Procedure_Body.
8755         (Replace_Type_References):
8756         Append an extra parameter to allow for dispatching replacements
8757         and add the corrasponding logic.
8758         (Type_Invariant): Remove
8759         Replace_Typ_Refs and replace its references with calls to
8760         Replace_Type_References.
8761         * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
8763 2017-04-25  Bob Duff  <duff@adacore.com>
8765         * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
8766         that returns True when appropriate.
8767         * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
8768         when compiling predefined files.
8769         * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
8770         "gnat.adc" should not be considered a predefined file name.
8771         That required (or at least encouraged) a lot of cleanup of global
8772         variable usage. We shouldn't be communicating information via
8773         the global name buffer.
8774         * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
8775         * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
8776         required by the above-mentioned cleanup.
8778 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8780         * osint.adb (Find_File): Handle properly a request for a
8781         configuration file whose name is a directory.
8783 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8785         * sem_attr.adb, sem_ch5.adb: Minor reformatting.
8787 2017-04-25  Bob Duff  <duff@adacore.com>
8789         * types.ads: Minor: Fix '???' comment.
8790         * sem_ch8.adb: Minor comment fix.
8792 2017-04-25  Bob Duff  <duff@adacore.com>
8794         * sem_prag.adb: Remove suspicious uses of Name_Buf.
8795         * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
8796         Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
8797         Add String_To_Name with no side effects.
8799 2017-04-25  Justin Squirek  <squirek@adacore.com>
8801         * sem_ch3.adb (Analyze_Declarations): Add
8802         additional condition for edge case.
8804 2017-04-25  Bob Duff  <duff@adacore.com>
8806         * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
8807         reserved words inside pragmas. This is necessary to allow the
8808         pragma name Interface to be used in pragma Ignore_Pragma.
8809         * par.adb: Minor comment fix.
8811 2017-04-25  Javier Miranda  <miranda@adacore.com>
8813         * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
8814         * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
8815         * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
8816         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
8817         occurrences of RE_Type_Is_Abstract
8819 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8821         * exp_util.adb (Build_Chain): Account for ancestor
8822         subtypes while traversing the derivation chain.
8824 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8826         * sem_attr.adb: minor reformatting.
8828 2017-04-25  Doug Rupp  <rupp@adacore.com>
8830         * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
8832 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8834         * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
8835         the first pass over an assignment statement with target names,
8836         to prevent the generation of subtypes (such as discriminated
8837         record components)that may carry the target name outside of the
8838         tree for the assignment. The subtypes will be generated when
8839         the assignment is reanalyzed in full.
8840         (Analyze_Target_Name): Handle properly class-wide types.
8842 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8844         * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
8845         * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
8846         the purposes of freezing.
8847         * exp_util.adb Update the documentation and structure of the
8848         type map used in class-wide semantics of assertion expressions.
8849         (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
8850         and resolve the triaged expression because all substitutions
8851         refer to the proper entities.  Update the replacement of
8852         references.
8853         (Build_DIC_Procedure_Body): Add formal parameter
8854         For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
8855         are now only processed when freezing occurs.  Build a body only
8856         when one is needed.
8857         (Entity_Hash): Removed.
8858         (Map_Types): New routine.
8859         (Replace_Object_And_Primitive_References): Removed.
8860         (Replace_References): New routine.
8861         (Replace_Type_References): Moved to the library level of Exp_Util.
8862         (Type_Map_Hash): New routine.
8863         (Update_Primitives_Mapping): Update the mapping call.
8864         (Update_Primitives_Mapping_Of_Types): Removed.
8865         * exp_util.ads (Build_DIC_Procedure_Body): Add formal
8866         parameter For_Freeze and update the comment on usage.
8867         (Map_Types): New routine.
8868         (Replace_References): New routine.
8869         (Replace_Type_References): Moved to the library level of Exp_Util.
8870         (Update_Primitives_Mapping_Of_Types): Removed.
8871         * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
8872         properties of the private type to the full view in case the full
8873         view derives from a parent type and inherits a DIC pragma.
8874         * sem_prag.adb (Analyze_Pragma): Guard against a case where a
8875         DIC pragma is placed at the top of a declarative region.
8877 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
8879         * a-tasatt.adb: Complete previous change and use an unsigned
8880         int to avoid overflow checks.
8882 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8884         * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
8885         the error message when the attribute reference is an actual in
8886         a call to a subprogram inherited from a generic formal type with
8887         unknown discriminants, which makes the subprogram and its formal
8888         parameters intrinsic (see RM 6.3.1 (8) and (13)).
8890 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8892         * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
8893         sem_prag.adb: Minor reformatting.
8895 2017-04-25  Bob Duff  <duff@adacore.com>
8897         * sem_attr.adb (Type_Key): Add code in the
8898         recursive Compute_Type_Key to protect against fetching the source
8899         code for Standard, in case a component of the type is declared
8900         in Standard. There was already code to do this for the original
8901         type, but not for its components.
8903 2017-04-25  Javier Miranda  <miranda@adacore.com>
8905         * exp_ch3.adb (Build_Initialization_Call): Handle
8906         subtypes of private types when searching for the underlying full
8907         view of a private type.
8909 2017-04-25  Javier Miranda  <miranda@adacore.com>
8911         * sem_res.adb (Set_Mixed_Mode_Operand): A universal
8912         real conditional expression can appear in a fixed-type context
8913         and must be resolved with that context to facilitate the code
8914         generation to the backend.
8916 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8918         * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
8919         to indicate whether during inline processing, when some unit U1
8920         appears in the context of a unit U2 compiled for instantiation
8921         or inlining purposes, the body of U1 needs to be compiled as well.
8922         * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
8923         context is a package declaration.
8924         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
8925         Analyze_Generic_Package_Declaration): ditto.
8926         * inline.adb (Analyze_Inlined_Bodies): Check
8927         Body_Needed_For_Inlining.
8929 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8931         * par.adb (Current_Assign_Node): Global variable use to record
8932         the presence of a target_name in the right hand side of the
8933         assignment being parsed.
8934         * par-ch4.adb (P_Name): If the name is a target_name, mark the
8935         enclosing assignment node accordingly.
8936         * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
8937         appropriately.
8938         * sem_ch5.adb (Analyze_Assignment): Disable expansion before
8939         analyzing RHS if the statement has target_names.
8940         * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
8941         properly choices that are subtype marks.
8942         * exp_ch5.adb: Code cleanup.
8944 2017-04-25  Bob Duff  <duff@adacore.com>
8946         * s-memory.adb: Add a comment regarding efficiency.
8947         * atree.adb: Fix the assertion, and combine 2 assertions into one,
8948         "the source has an extension if and only if the destination does."
8949         * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
8951 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
8953         * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
8954         conversion.
8956 2017-04-25  Doug Rupp  <rupp@adacore.com>
8958         * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
8959         handling for ppc64-vx7.
8960         * sigtramp-vxworks-target.inc
8961         [SIGTRAMP_BODY]: Add section for ppc64-vx7.
8963 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
8965         * ada_get_targ.adb: New file.
8967 2017-04-25  Bob Duff  <duff@adacore.com>
8969         * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
8970         Direct_Val (Right), instead of the incorrect Direct_Val (Left).
8971         (UI_GCD): Remove ??? comment involving possible efficiency
8972         improvements. This just isn't important after all these years.
8973         Also minor cleanup.
8974         * uintp.ads: Minor cleanup.
8976 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8978         * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
8979         Revert previous changes.
8980         * scng.adb: Minor reformatting.
8981         * s-stratt.ads: Fix unbalanced parens in comment.
8983 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8985         * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
8986         Minor reformatting.
8988 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8990         * scng.adb (Scan): Handle '@' appropriately.
8991         * sem_ch5.adb: Code cleanup.
8993 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8995         * freeze.adb (Check_Expression_Function): Do not check for the
8996         use of deferred constants if the freezing of the expression
8997         function is triggered by its generated body, rather than a
8998         premature use.
9000 2017-04-25  Javier Miranda  <miranda@adacore.com>
9002         * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
9003         subtypes of private types when performing the view conversion.
9005 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9007         * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9008         the purposes of freezing.
9009         * exp_util.adb Update the documentation and structure of the
9010         type map used in class-wide semantics of assertion expressions.
9011         (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9012         and resolve the triaged expression because all substitutions
9013         refer to the proper entities.  Update the replacement of
9014         references.
9015         (Build_DIC_Procedure_Body): Add formal parameter
9016         For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9017         are now only processed when freezing occurs.  Build a body only
9018         when one is needed.
9019         (Entity_Hash): Removed.
9020         (Map_Types): New routine.
9021         (Replace_Object_And_Primitive_References): Removed.
9022         (Replace_References): New routine.
9023         (Replace_Type_References): Moved to the library level of Exp_Util.
9024         (Type_Map_Hash): New routine.
9025         (Update_Primitives_Mapping): Update the mapping call.
9026         (Update_Primitives_Mapping_Of_Types): Removed.
9027         * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9028         parameter For_Freeze and update the comment on usage.
9029         (Map_Types): New routine.
9030         (Replace_References): New routine.
9031         (Replace_Type_References): Moved to the library level of Exp_Util.
9032         (Update_Primitives_Mapping_Of_Types): Removed.
9033         * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9034         properties of the private type to the full view in case the full
9035         view derives from a parent type and inherits a DIC pragma.
9036         * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9037         DIC pragma is placed at the top of a declarative region.
9039 2017-04-25  Tristan Gingold  <gingold@adacore.com>
9041         * s-mmap.ads (Data): Add pragma Inline.
9043 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9045         * checks.adb (Insert_Valid_Check): Do not use
9046         a renaming to alias a volatile name because this will lead to
9047         multiple evaluations of the volatile name. Use a constant to
9048         capture the value instead.
9050 2017-04-25  Doug Rupp  <rupp@adacore.com>
9052         * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
9054 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9056         * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
9057         Add out parameter to indicate to caller that a wrapper must
9058         be constructed for an inherited primitive whose inherited
9059         pre/postcondition has called to overridden primitives.
9060         * freeze.adb (Check_Inherited_Conditions): Build wrapper body
9061         for inherited primitive that requires it.
9062         * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
9063         legal primitive operations and belong to the list of bodies
9064         generated after the freeze point of a type.
9065         * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
9066         of Build_Class_Wide_Expression.
9067         * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
9068         to construct the specification of the wrapper subprogram created
9069         for an inherited operation.
9071 2017-04-25  Bob Duff  <duff@adacore.com>
9073         * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
9074         pthread_mutexattr_setprioceiling): Add new interfaces for these
9075         pthread operations.
9076         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
9077         protocols as appropriate for Locking_Policy 'C' and 'I'.
9078         * s-taprop-posix.adb: Minor reformatting to make it more similar
9079         to s-taprop-linux.adb.
9081 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9083         * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
9084         Handle properly a multi- level derivation involving both renamed
9085         and constrained parent discriminants, when the type to be
9086         constrained has fewer discriminants that the ultimate ancestor.
9088 2017-04-25  Bob Duff  <duff@adacore.com>
9090         * sem_util.adb (Is_Object_Reference): In the
9091         case of N_Explicit_Dereference, return False if it came from a
9092         conditional expression.
9094 2017-04-25  Bob Duff  <duff@adacore.com>
9096         * par-ch4.adb (P_Case_Expression): If a semicolon
9097         is followed by "when", assume that ";" was meant to be ",".
9099 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
9101         * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
9102         fixes.
9104 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
9106         * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
9107         loading of an entity.
9108         * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
9109         previously repeated in the analysis.
9110         * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
9111         procedure SPARK_Implicit_Load.  (Analyze_Task_Type_Declaration):
9112         use new procedure SPARK_Implicit_Load.
9113         * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
9114         SPARK_Implicit_Load.
9116 2017-04-25  Javier Miranda  <miranda@adacore.com>
9118         * sem_util.adb (New_Copy_Tree): By default
9119         copying of defining identifiers is prohibited because
9120         this would introduce an entirely new entity into the
9121         tree. This patch introduces an exception to this general
9122         rule: the declaration of constants and variables located in
9123         Expression_With_Action nodes.
9124         (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
9125         (In_Map): New subprogram.
9126         (Visit_Entity): New subprogram.
9127         (Visit_Node): Handle EWA_Level,
9128         EWA_Inner_Scope_Level, and take care of defining entities defined
9129         in Expression_With_Action nodes.
9131 2017-04-25  Thomas Quinot  <quinot@adacore.com>
9133         * exp_ch6.adb: minor comment edit.
9134         * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
9135         procedure specifications that come from source.
9136         * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
9137         Null_Statement attribute.
9138         * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
9139         procedure, generate statement SCO for the generated NULL statement.
9140         * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
9141         parser, if available.
9143 2017-04-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9145         * system-linux-s390.ads: Use Long_Integer'Size to define
9146         Memory_Size.
9148 2017-04-04  Eric Botcazou  <ebotcazou@adacore.com>
9150         * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
9152 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
9154         * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
9155         * g-socket.adb (To_Host_Entry): Fix typo in comment.
9156         * gnat_ugn.texi: Fix typo.
9157         * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
9158         * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
9159         * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
9160         * sem_util.adb (Mark_Coextensions): Likewise.
9161         * sem_util.ads (Available_Full_View_Of_Component): Likewise.
9163 2017-03-28  Andreas Schwab  <schwab@suse.de>
9165         PR ada/80117
9166         * system-linux-aarch64-ilp32.ads: New file.
9167         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
9168         from LIBGNAT_TARGET_PAIRS.
9169         (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
9170         (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
9171         LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
9172         or -mabi=ilp32, resp.
9174 2017-03-14  James Cowgill  <James.Cowgill@imgtec.com>
9176         * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
9178 2017-03-08  Thanassis Tsiodras  <ttsiodras@gmail.com>
9180         PR ada/79903
9181         * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
9183 2017-03-08  Eric Botcazou  <ebotcazou@adacore.com>
9185         PR ada/79945
9186         * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
9188         * system-linux-arm.ads (Default_Bit_Order): Likewise.
9189         * system-linux-mips.ads (Default_Bit_Order): Likewise.
9190         * system-linux-armeb.ads: Delete.
9191         * system-linux-mipsel.ads: Likewise.
9192         * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
9193         (ARM/Linux): Likewise.
9195 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
9197         PR c/79677
9198         * gcc-interface/misc.c (gnat_handle_option): Pass true to
9199         handle_generated_option GENERATED_P.
9201 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9203         * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
9204         around a justified modular type if it doesn't have the same scalar
9205         storage order as the enclosing record type.
9207 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9209         * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
9210         of boolean rvalues to function calls.
9212 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9214         * gcc-interface/utils.c (fold_bit_position): New function.
9215         (rest_of_record_type_compilation): Call it instead of bit_position to
9216         compute the field position and remove the call to remove_conversions.
9217         (compute_related_constant): Factor out the multiplication in both
9218         operands, if any, and streamline the final test.
9220 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9222         * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
9224 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9226         * gcc-interface/decl.c: Include demangle.h.
9227         (is_cplusplus_method): Return again true for a primitive operation
9228         only if it is dispatching.  For a subprogram with an interface name,
9229         call the demangler to get the number of C++ parameters and compare it
9230         with the number of Ada parameters.
9232 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9234         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
9235         there is no end label, put the location of the At_End procedure on
9236         the call to the procedure.
9238 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9240         * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
9241         value for array types with TYPE_INDEX_TYPE set on their domain type.
9242         * gcc-interface/utils.c (max_size): For operations and expressions, do
9243         not build a new node if the operands have not changed or are missing.
9245 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9247         * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
9248         argument when recursing on TRUTH_NOT_EXPR.
9250 2017-02-12  John Marino  <gnugcc@marino.st>
9252         * system-freebsd-x86.ads: Rename into...
9253         * system-freebsd.ads: ...this.
9254         (Default_Bit_Order): Define using Standard'Default_Bit_Order.
9255         * gcc-interface/Makefile.in: Support aarch64-freebsd.
9256         (x86-64/FreeBSD): Adjust to above renaming.
9257         (i386/FreeBSD): Likewise.
9259 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
9261         * comperr.adb: Update FSF bug reporting URL.
9263 2017-02-01  Eric Botcazou  <ebotcazou@adacore.com>
9264             Jakub Jelinek  <jakub@redhat.com>
9266         PR ada/79309
9267         * adaint.c (__gnat_killprocesstree): Fix broken string handling.
9269 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
9271         PR lto/79061
9272         * gcc-interface/utils.c (get_global_context): Pass main_input_filename
9273         to build_translation_unit_decl.
9275 2017-01-23  Javier Miranda  <miranda@adacore.com>
9277         * sem_util.adb (New_Copy_Tree): Code cleanup:
9278         removal of the internal map (ie. variable Actual_Map, its
9279         associated local variables, and all the code handling it).
9280         * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
9281         force loading of the System package when processing a task type.
9282         (Analyze_Protected_Type_Declaration): in GNATprove mode force
9283         loading of the System package when processing a protected type.
9284         * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
9285         force loading of the System package when processing compilation
9286         unit with a main-like subprogram.
9287         * frontend.adb (Frontend): remove forced loading of the System
9288         package.
9290 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9292         * sem_prag.adb (Default_Initial_Condition): If the desired type
9293         declaration is a derived type declaration with discriminants,
9294         it is rewritten as a private type declaration.
9295         * sem_ch13.adb (Replace_Type_References_Generic,
9296         Visible_Component): A discriminated private type with descriminnts
9297         has components that must be rewritten as selected components
9298         if they appear as identifiers in an aspect expression such as
9299         a Default_Initial_Condition.
9300         * sem_util.adb (Defining_Entity): support N_Iterator_Specification
9301         nodes.
9303 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9305         * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
9306         * gnat1drv.adb Generate an empty object file for an ignored
9307         Ghost compilation unit.
9308         * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
9310 2017-01-23  Yannick Moy  <moy@adacore.com>
9312         * sem_ch4.adb (Analyze_Indexed_Component_Form):
9313         Adapt to inlined prefix with string literal subtype.
9314         * inline.adb (Expand_Inlined_Call): Keep unchecked
9315         conversion inside inlined call when formal type is constrained.
9317 2017-01-23  Javier Miranda  <miranda@adacore.com>
9319         * sem_util.adb (New_Copy_Tree): Code cleanup:
9320         removal of global variables. All the global variables, global
9321         functions and tables of this subprogram are now declared locally.
9323 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
9325         * exp_strm.ads: Minor reformatting and typo fixes.
9327 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9329         * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
9330         exp_aggr.adb: Minor reformatting.
9331         * g-diopit.adb: minor grammar/punctuation fix in comment.
9332         * g-byorma.ads: minor fix of unbalanced parens in comment.
9334 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9336         * par.adb: Update the documentation of component Labl.
9337         * par-ch6.adb (P_Return_Statement): Set the expected label of
9338         an extended return statement to Error.
9340 2017-01-23  Tristan Gingold  <gingold@adacore.com>
9342         * s-boustr.ads, s-boustr.adb (Is_Full): New function.
9344 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9346         * expander.adb: Handle N_Delta_Aggregate.
9348 2017-01-23  Javier Miranda  <miranda@adacore.com>
9350         * exp_ch6.adb (Expand_Call): Improve the code that
9351         checks if some formal of the called subprogram is a class-wide
9352         interface, to handle subtypes of class-wide interfaces.
9354 2017-01-23  Javier Miranda  <miranda@adacore.com>
9356         * checks.adb (Apply_Parameter_Aliasing_Checks):
9357         Remove side effects of the actuals before generating the overlap
9358         check.
9360 2017-01-23  Justin Squirek  <squirek@adacore.com>
9362         * exp_strm.ads, exp_strm.ads
9363         (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
9364         as to avoid getting the underlying type by default.
9365         * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
9366         underlying type in the Iiput and output attribute cases when
9367         building their respective functions.
9369 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
9371         * scng.adb: Minor reformatting of error message.
9373 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9375         * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
9376         to freeze the return type of an expression funxtion that is a
9377         completion, if the type is a limited view and the non-limited
9378         view is available.
9380 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9382         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
9383         aggregate construct.
9384         (P_Record_Or_Array_Component_Association): An array aggregate
9385         can start with an Iterated_Component_Association.
9386         * scng.adb: Modify error message on improper use of @ in earlier
9387         versions of the language.
9388         * sinfo.ads: New node kind N_Delta_Aggregate.
9389         * sinfo.adb: An N_Delta_Aggregate has component associations and
9390         an expression.
9391         * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
9392         * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
9393         Create a new index for each one of the choices in the association,
9394         to prevent spurious homonyms in the scope.
9395         (Resolve_Delta_Aggregate): New.
9396         * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
9397         * exp_util.adb (Insert_Actions): Take into account
9398         N_Delta_Aggregate.
9399         * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
9400         * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
9401         and local procedures Expand_Delta_Array_Aggregate and
9402         expand_Delta_Record_Aggregate.
9403         * sprint.adb: Handle N_Delta_Aggregate.
9405 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9407         * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
9408         empty name when the exception declaration is subject to pragma
9409         Discard_Names.
9410         (Null_String): New routine.
9412 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9414         * par-ch9.adb (P_Protected_Definition): Parse
9415         any optional and potentially illegal pragmas which appear in
9416         a protected operation declaration list.
9417         (P_Task_Items): Parse
9418         any optional and potentially illegal pragmas which appear in a
9419         task item list.
9421 2017-01-23  Pascal Obry  <obry@adacore.com>
9423         * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
9424         is needed when a foreign thread call a Win32 API using a thread handle
9425         like GetThreadTimes() for example.
9427 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9429         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9430         allow an 'Address clause to be specified on a prefix of a
9431         class-wide type.
9433 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9435         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9436         attribute 'Valid is a renaming of the original expression when
9437         the expression denotes a name. For all other kinds of expression,
9438         use a constant to capture the value.
9439         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9440         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9442 2017-01-23  Justin Squirek  <squirek@adacore.com>
9444         * sem_eval.adb (Eval_Integer_Literal): Add special
9445         case to avoid optimizing out check if the literal appears in
9446         an if-expression.
9448 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9450         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9451         allow an 'Address clause to be specified on a prefix of a
9452         class-wide type.
9454 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9456         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9457         attribute 'Valid is a renaming of the original expression when
9458         the expression denotes a name. For all other kinds of expression,
9459         use a constant to capture the value.
9460         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9461         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9463 2017-01-23  Justin Squirek  <squirek@adacore.com>
9465         * sem_eval.adb (Eval_Integer_Literal): Add special
9466         case to avoid optimizing out check if the literal appears in
9467         an if-expression.
9469 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9471         * sem_ch4.adb (Try_Primitive_Operations,
9472         Is_Valid_First_Argument_Of): argument is valid if it is a derived
9473         type with unknown discriminants that matches its underlying
9474         record view.
9475         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
9476         expression if its type is derived from a limited type with
9477         unknown discriminants, because the expansion (which is a call)
9478         must be expanded in the enclosing context to add the proper build-
9479         in-place parameters to the call.
9480         * lib.ads, exp_ch9.adb: Minor fixes in comments.
9482 2017-01-23  Yannick Moy  <moy@adacore.com>
9484         * frontend.adb (Frontend): Do not load runtime
9485         unit for GNATprove when parsing failed.
9486         * exp_ch9.adb: minor removal of extra whitespace
9487         * exp_ch6.adb: minor typo in comment
9488         * sem_util.adb: Code cleanup.
9489         * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
9490         * a-ngcefu.adb: minor style fix in whitespace
9492 2017-01-23  Thomas Quinot  <quinot@adacore.com>
9494         * scos.ads: Document usage of 'd' as default SCO kind for
9495         declarations.
9496         * par_sco.adb (Traverse_Declarations_Or_Statements.
9497         Traverse_Degenerate_Subprogram): New supporting routine for expression
9498         functions and null procedures.
9499         (Traverse_Declarations_Or_Statements.Traverse_One): Add
9500         N_Expression_Function to the subprogram case; add required
9501         support for null procedures and expression functions.
9503 2017-01-23  Bob Duff  <duff@adacore.com>
9505         * namet.ads (Bounded_String): Decrease the size of type
9506         Bounded_String to avoid running out of stack space.
9507         * namet.ads (Append): Don't ignore buffer overflow; raise
9508         Program_Error instead.
9510 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9512         * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
9513         sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
9514         reformatting.
9515         * exp_ch9.adb: minor style fix in comment.
9517 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9519         * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
9520         for a limited record extension with unknown discriminants whose
9521         full view has no discriminants.
9523 2017-01-23  Yannick Moy  <moy@adacore.com>
9525         * exp_spark.adb: Alphabetize with clauses.
9527 2017-01-23  Yannick Moy  <moy@adacore.com>
9529         * sem_util.adb (Has_Enabled_Property): Treat
9530         protected objects and variables differently from other variables.
9532 2017-01-23  Thomas Quinot  <quinot@adacore.com>
9534         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
9535         Split original Ada 95 part off into new subprogram
9536         below. Call that subprogram (instead of proceeding with
9537         AI95-0133 behaviour) if debug switch -gnatd.p is in use.
9538         (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
9539         * debug.adb Document new switch -gnatd.p
9540         * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
9541         record for reverse bit order if an error has already been posted
9542         on the record type.  This avoids generating extraneous "info:"
9543         messages for illegal code.
9545 2017-01-23  Justin Squirek  <squirek@adacore.com>
9547         * sem_ch3.adb (Analyze_Declarations): Correct comments
9548         * freeze.adb (Find_Constant): Add detection of deferred constants
9549         so they are not incorrectly flagged as premature.
9551 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9553         * scans.ads: New token At_Sign. Remove '@' from list of illegal
9554         characters for future version of the language. '@' is legal name.
9555         * scng.ads, scng.adb (Scan):  Handle '@' appropriately.
9556         * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
9557         denotes a Target_Name.
9558         * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
9559         * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
9560         (Has_Target_Names): New flag on N_Assignment_Statement, to
9561         indicate that RHS has occurrences of N_Target_Name.
9562         * sem.adb: Call Analyze_Target_Name.
9563         * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
9564         (urrent_LHS): Global variable that denotes LHS of assignment,
9565         used in the analysis of Target_Name nodes.
9566         * sem_res.adb (Resolve_Target_Name): New procedure.
9567         * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
9568         N is an assignment statement whose RHS contains occurences of @
9569         that designate the value of the LHS of the assignment. If the
9570         LHS is side-effect free the target names can be replaced with
9571         a copy of the LHS; otherwise the semantics of the assignment
9572         is described in terms of a procedure with an in-out parameter,
9573         and expanded as such.
9574         (Expand_N_Assignment_Statement): Call
9575         Expand_Assign_With_Target_Names when needed.
9576         * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
9577         * sprint.adb: Handle N_Target_Name.
9579 2017-01-23  Eric Botcazou  <ebotcazou@adacore.com>
9581         * checks.adb: Minor fix in comment.
9583 2017-01-23  Philippe Gil  <gil@adacore.com>
9585         * g-debpoo.adb (Do_Report) remove freed chunks from chunks
9586         count in Sort = Memory_Usage or Allocations_Count
9588 2017-01-23  Justin Squirek  <squirek@adacore.com>
9590         * sem_ch3.adb: Code cleanup.
9592 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9594         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
9595         variables to the local variable section. Update the profile
9596         of various nested routine that previously had visibility
9597         of those globals. One the matching phase has completed,
9598         remove certain classes of clauses which are considered noise.
9599         (Check_Dependency_Clause): Properly detect a match between two
9600         'Result attributes. Update the various post-match cases to use
9601         Is_Already_Matched as this routine now automatically recognizes
9602         a previously matched 'Result attribute.
9603         (Is_Already_Matched): New routine.
9604         (Remove_Extra_Clauses): New routine.
9605         (Report_Extra_Clauses): Remove the detection of ... => null
9606         clauses as this is now done in Remove_Extra_Clauses.
9608 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9610         * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
9611         report on spurious overlaps between values involving a subtype
9612         with a static predicate, because the expansion of such a subtype
9613         into individual ranges in inhibited in ASIS mode.
9615 2017-01-23  Justin Squirek  <squirek@adacore.com>
9617         * sem_ch3.adb (Analyze_Declarations): Add detection
9618         of an edge case and delay freezing if it is present.
9620 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9622         * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
9623         sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
9625 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9627         * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
9628         access-to-subprogram types inherit the convention of the
9629         associated subprogram.  (Set_Profile_Convention): New routine.
9630         * sem_ch6.adb (Check_Conformance): Do not compare the conventions
9631         of the two entities directly, use Conventions_Match to account
9632         for anonymous access-to-subprogram and subprogram types.
9633         (Conventions_Match): New routine.
9635 2017-01-23  Claire Dross  <dross@adacore.com>
9637         * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
9638         which return Universal_Integer, force the overflow check flag for
9639         Length and Range_Length for types as big as Long_Long_Integer.
9641 2017-01-23  Claire Dross  <dross@adacore.com>
9643         * exp_spark.adb (Expand_SPARK_Attribute_Reference):  For
9644         attributes which return Universal_Integer, introduce a conversion
9645         to the expected type with the appropriate check flags set.
9646         * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
9647         base type if the range is null. It may still be invalid if it
9648         is higher than the lower bound. This is checked later in the
9649         context in which the range appears.
9651 2017-01-23  Pierre-Marie de Rodat  <derodat@adacore.com>
9653         * scos.ads: Introduce a constant to represent ignored
9654         dependencies in SCO_Unit_Table_Entry.
9656 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9658         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
9659         spaces from error messages.
9661 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9663         * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
9664         subsidiary to Expand_N_Object_ Declaration, to compute a guard on
9665         an object declaration for an array type with a modular index type
9666         with the size of Long_Long_Integer. Special processing is needed
9667         in this case to compute reliably the size of the object, and
9668         eventually  to raise Storage_Error, when wrap-around arithmetic
9669         might compute a meangingless size for the object.
9671 2017-01-23  Justin Squirek  <squirek@adacore.com>
9673         * a-wtenau.adb, par-endh.adb, sem_prag.adb,
9674         sem_type.adb: Code cleanups.
9676 2017-01-23  Bob Duff  <duff@adacore.com>
9678         * sem_res.adb (Resolve_Call): In the part of the code where
9679         it is deciding whether to turn the call into an indexed
9680         component, avoid doing so if the call is to an instance of
9681         Unchecked_Conversion. Otherwise, the compiler turns it into an
9682         indexed component, and resolution of that turns it back into a
9683         function call, and so on, resulting in infinite recursion.
9684         * sem_util.adb (Needs_One_Actual): If the first formal has a
9685         default, then return False.
9687 2017-01-21  Eric Botcazou  <ebotcazou@adacore.com>
9689         * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
9690         optimizations when the type is modular and the offsets are equal.
9692 2017-01-20  Thomas Quinot  <quinot@adacore.com>
9694         * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
9695         message.
9697 2017-01-20  Nicolas Roche  <roche@adacore.com>
9699         * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
9701 2017-01-20  Bob Duff  <duff@adacore.com>
9703         * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
9704         (etc) optimizations when the type is modular.
9706 2017-01-20  Yannick Moy  <moy@adacore.com>
9708         * sem_ch6.adb (Move_Pragmas): move some pragmas,
9709         but copy the SPARK_Mode pragma instead of moving it.
9710         (Build_Subprogram_Declaration): Ensure that the generated spec
9711         and original body share the same SPARK_Pragma aspect/pragma.
9712         * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
9713         procedure to copy SPARK_Mode aspect.
9715 2017-01-20  Bob Duff  <duff@adacore.com>
9717         * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
9718         even in ASIS mode.
9719         * sem_ch13.adb (Resolve_Name): Enable setting the entity to
9720         Empty even in ASIS mode.
9722 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
9724         * exp_ch9.adb: minor style fixes in comments.
9725         * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
9726         relative statement introduces an implicit dependency on
9727         Ada.Real_Time.Clock_Time.
9728         * sem_util.adb: Minor reformatting.
9730 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
9732         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
9733         must be treated as delayed aspect even if the expression is
9734         a literal, because the aspect affects the freezing and the
9735         elaboration of the object to which it applies.
9737 2017-01-20  Tristan Gingold  <gingold@adacore.com>
9739         * s-osinte-vxworks.ads (Interrup_Range): New subtype.
9741 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
9743         * lib-xref.adb (Generate_Reference): Do not warn about the
9744         presence of a pragma Unreferenced if the entity appears as the
9745         actual in a procedure call that does not come from source.
9747 2017-01-20  Pascal Obry  <obry@adacore.com>
9749         * expect.c, terminals.c: Fix some warnings about unused variables.
9750         * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
9751         of the runtime.
9753 2017-01-20  Bob Duff  <duff@adacore.com>
9755         * exp_attr.adb (Constrained): Apply an access check (check that
9756         the prefix is not null) when the prefix denotes an object of an
9757         access type; that is, when there is an implicit dereference.
9759 2017-01-20  Gary Dismukes  <dismukes@adacore.com>
9761         * s-rident.ads (constant Profile_Info): Remove
9762         No_Calendar from GNAT_Extended_Ravenscar restrictions.
9764 2017-01-20  Tristan Gingold  <gingold@adacore.com>
9766         *  s-maccod.ads: Add pragma No_Elaboration_Code_All
9768 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
9770         * ghost.adb (Mark_Ghost_Clause): New routine.
9771         (Prune_Node): Do not prune compilation unit nodes.
9772         (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
9773         This does not touch the node itself, but does prune all its fields.
9774         * ghost.ads (Mark_Ghost_Clause): New routine.
9775         * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
9776         package clause mentions Ghost and non-Ghost packages. Mark a
9777         use package clause as Ghost when it mentions a Ghost package.
9778         (Analyze_Use_Type): Emit an error when a use type clause mentions
9779         Ghost and non-Ghost types. Mark a use type clause as Ghost when
9780         it mentions a Ghost type.
9781         * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
9782         Ghost when it withs a Ghost unit.
9784 2017-01-20  Javier Miranda  <miranda@adacore.com>
9786         * sem_res.adb (Resolve_Call): If a function call
9787         returns a limited view of a type and at the point of the call the
9788         function is not declared in the extended main unit then replace
9789         it with the non-limited view, which must be available. If the
9790         called function is in the extended main unit then no action is
9791         needed since the back-end handles this case.
9793 2017-01-20  Eric Botcazou  <ebotcazou@adacore.com>
9795         * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
9796         (Contains_Subprograms_Refs): ...this.  Adjust comment
9797         for constants.  (Is_Subp_Or_Const_Ref): Rename into...
9798         (Is_Subprogram_Ref): ...this.
9799         (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
9800         Has_Non_Subprograms_Referencer and adjust comment.  Remove
9801         incorrect shortcut for package declarations and bodies.
9803 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
9805         * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
9806         base type differs from that of the completion and the private
9807         subtype is an itype (created for a constraint on an access
9808         type e.g.), set Delayed_Freeze on both to prevent out-of-scope
9809         anomalies in gigi.
9811 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
9813         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
9814         When inheriting the SPARK_Mode of a prior expression function,
9815         look at the properly resolved entity rather than the initial
9816         candidate which may denote a homonym.
9818 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
9820         * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
9821         Precondition or Postcondition, and the context is pragma
9822         Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
9823         and suggest the standard names Assertion_Policy /Pre /Post
9824         instead.
9826 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
9828         * sem_ch10.adb, sem_cat.adb: Minor reformatting.
9830 2017-01-20  Javier Miranda  <miranda@adacore.com>
9832         * sem_ch3.adb (Access_Type_Declaration): Protect access to the
9833         Entity attribute.
9834         * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
9835         * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
9836         malformed trees.
9838 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
9840         * sem_ch13.adb (Analyze_Aspect_Specification, case
9841         Dynamic_Predicate): If the entity E is a subtype that inherits
9842         a static predicate for its parent P,, the inherited and the
9843         new predicate combine in the generated predicate function,
9844         and E only has a dynamic predicate.
9846 2017-01-20  Tristan Gingold  <gingold@adacore.com>
9848         * s-boustr.ads, s-boustr.adb: New package.
9849         * Makefile.rtl: Add s-boustr.
9851 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
9853         * inline.adb (Process_Formals): Qualify the
9854         expression of a return statement when it yields a universal type.
9856 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
9858         * freeze.adb (Freeze_All): Freeze the default
9859         expressions of all eligible formal parameters that appear in
9860         entries, entry families, and protected subprograms.
9862 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
9864         * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
9865         for illegal inherited Implicit_Dereference aspects with renamed
9866         discriminants.
9868 2017-01-20  Javier Miranda  <miranda@adacore.com>
9870         * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
9871         * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
9872         * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
9873         (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
9874         Set_Prev, Tree_Read): Adding assertion.
9875         * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
9876         * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
9877         (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
9878         Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
9879         Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
9880         Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
9881         Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
9882         Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
9883         Set_ListN_With_Parent): Adding assertion.
9885 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
9887         * sem_prag.adb (Process_Convention): Diagnose properly a pragma
9888         import that applies to several homograph subprograms. when one
9889         of them is declared by a subprogram body.
9891 2017-01-20  Justin Squirek  <squirek@adacore.com>
9893         * exp_ch6.adb (Expand_Call): Remove optimization
9894         that nulls out calls to null procedures.
9896 2017-01-20  Yannick Moy  <moy@adacore.com>
9898         * inline.adb (Expand_Inlined_Call): Keep more
9899         precise type of actual for inlining whenever possible. In
9900         particular, do not switch to the formal type in GNATprove mode in
9901         some case where the GNAT backend might require it for visibility.
9903 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
9905         * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
9906         aspect Implicit_Dereference can be inherited by a full view if
9907         the partial view has no discriminants, because there is no way
9908         to apply the aspect to the partial view.
9909         (Build_Derived_Record_Type): If derived type renames discriminants
9910         of the parent, the new discriminant inherits the aspect from
9911         the old one.
9912         * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
9913         call through an access discriminant designating a subprogram.
9914         * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
9915         properly a parameterless call through an access discriminant on
9916         the left-hand side of an assignment.
9917         * sem_res.adb (resolve): If an interpreation involves a
9918         discriminant with an implicit dereference and the expression is an
9919         entity, resolution takes place later in the appropriate routine.
9920         * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
9921         access discriminants that designate a subprogram type.
9923 2017-01-20  Pascal Obry  <obry@adacore.com>
9925         * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
9927 2017-01-20  Yannick Moy  <moy@adacore.com>
9929         * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
9930         on implicitly with'ed units in GNATprove mode.
9931         * sinfo.ads (Implicit_With): Document use of flag for implicitly
9932         with'ed units in GNATprove mode.
9934 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
9936         * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
9937         unit Do not report an error on a non-static entity that appears
9938         in the context of a spec expression, such as an aspect expression.
9940 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
9942         * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
9943         (Is_Underlying_Full_View): New routine.
9944         (Set_Is_Underlying_Full_View): New routine.
9945         (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
9946         * einfo.ads Add new attribute Is_Underlying_Full_View.
9947         (Is_Underlying_Full_View): New routine along with pragma Inline.
9948         (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
9949         * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
9950         class-wide types and underlying full views. The first subtype
9951         is used as the working type for all Itypes, not just array base types.
9952         (Build_DIC_Procedure_Declaration): Do not consider
9953         class-wide types and underlying full views. The first subtype
9954         is used as the working type for all Itypes, not just array
9955         base types.
9956         * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
9957         view or an underlying full view without clobbering the attributes
9958         of a previous freeze node.
9959         (Inherit_Freeze_Node): New routine.
9960         * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
9961         full view as such.
9962         (Build_Underlying_Full_View): Mark an underlying full view as such.
9963         * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
9964         full view as such.
9966 2017-01-20  Yannick Moy  <moy@adacore.com>
9968         * sinfo.ads: Document lack of Do_Division_Check flag
9969         on float exponentiation.
9971 2017-01-19  Javier Miranda  <miranda@adacore.com>
9973         * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
9974         identifier attribute of a block-statement node. Required to avoid
9975         assertion failure when building the new containers library.
9977 2017-01-19  Bob Duff  <duff@adacore.com>
9979         * exp_ch3.adb: Update comment.
9981 2017-01-19  Vincent Celier  <celier@adacore.com>
9983         * gprep.adb (Gnatprep): Parse the definition file without
9984         "replace in comments" even when switch -C is used.
9986 2017-01-19  Justin Squirek  <squirek@adacore.com>
9988         * exp_ch9.adb (Is_Pure_Barrier): Create function
9989         Is_Count_Attribute to identify an expansion of the 'Count
9990         attribute.
9992 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
9994         * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
9995         statements within an element iterator loop are only analyzed
9996         agter the loop is rewritten. Within a generic the analysis must
9997         be performed in any case to complete name capture.
9999 2017-01-19  Bob Duff  <duff@adacore.com>
10001         * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
10002         before checking for unrecognized pragmas.
10003         Initialize Pname on its declarations; that's always good style.
10005 2017-01-19  Claire Dross  <dross@adacore.com>
10007         * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
10008         body into the tree for GNATprove by setting its Parent field. The
10009         components invariants of composite types are not checked by
10010         the composite type's invariant procedure in GNATprove mode.
10011         (Build_Invariant_Procedure_Declaration): Semi-insert the
10012         declaration into the tree for GNATprove by setting its Parent
10013         field.
10014         * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
10015         the component invariants to the array type  invariant procedure
10016         so that the procedure can be used to  check the array type
10017         invariants if any.
10018         (Freeze_Record_Type): In GNATprove mode, do
10019         not add the component invariants to the record type  invariant
10020         procedure so that the procedure can be used to  check the record
10021         type invariants if any.
10023 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10025         * lib-xref-spark_specific.adb: Minor reformatting.
10026         * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
10028 2017-01-19  Javier Miranda  <miranda@adacore.com>
10030         * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
10031         Build_Back_End_Aggregate.
10032         (Generate_Aggregate_For_Derived_Type): Code cleanup.
10033         (Prepend_Stored_Values): Code cleanup.
10035 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10037         * sem_ch6.adb (Analyze_Expression_Function): Check for an
10038         incomplete return type after attempting to freeze it, so that
10039         other freeze actiona are generated in the proper order.
10041 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10043         * sem_aggr.adb (Resolve_Aggregate): If the type is a string
10044         type, ie. a type whose component is a character type, and the
10045         aggregate is positional, do not convert into a string literal
10046         if the index type is not an integer type, because the original
10047         type may be required in an enclosing operation.
10049 2017-01-19  Bob Duff  <duff@adacore.com>
10051         * binde.adb, debug.adb: Enable new elaboration order algorithm
10052         by default. -dp switch reverts to the old algorithm.
10054 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10056         * sem_ch3.adb Add with and use clauses for Exp_Ch7.
10057         (Analyze_Declarations): Create the DIC and Invariant
10058         procedure bodies s after all freezing has taken place.
10059         (Build_Assertion_Bodies): New routine.
10060         * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
10061         and Exp_Util.
10062         (Analyze_Package_Specification): Remove the
10063         generation of the DIC and Invariant procedure bodies. This is
10064         now done by Analyze_Declarations.
10065         * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
10066         procedures are never treated as primitives.
10068 2017-01-19  Yannick Moy  <moy@adacore.com>
10070         * frontend.adb: Analyze inlined bodies and check elaboration
10071         rules in GNATprove mode too.
10072         * sem_elab.adb (Delay_Element): Add Boolean component to save
10073         indication that call is in SPARK code.  (Check_Elab_Calls):
10074         Check elaboration rules in GNATprove mode, and correctly set
10075         the current value of SPARK_Mode.
10076         * lib-xref-spark_specific.adb
10077         (Add_SPARK_Xrefs): Simplify iteration over dereferences.
10079 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10081         * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
10082         checks on the expression for the high bound of concatenation
10083         when checks are disabled, to suppress warnings about potential
10084         constraint errors in restricted runtimes.
10086 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10088         * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
10089         representation-to-position function as inlined.
10090         * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
10091         the purity of an internally generated entity if it has been
10092         explicitly marked as pure for optimization purposes.
10093         * exp_aggr.adb: Minor reformatting.
10095 2017-01-19  Javier Miranda  <miranda@adacore.com>
10097         * exp_ch6.adb (Expand_Call): Remove side effects on
10098         actuals that are allocators with qualified expression since the
10099         initialization of the object is performed by means of individual
10100         statements (and hence it must be done before the call).
10102 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10104         * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
10105         (Build_Derived_Enumeration_Type): If the derived type inherits a
10106         dynamic predicate from its parent, the bounds of the type must
10107         freeze because an explicit constraint is constructed for the
10108         type and the corresponding range is elaborated now.
10110 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
10112         * sem_attr.ads: minor fix of inconsistent casing in comment
10113         * lib-writ.ads: minor align comments in columns
10114         * sem_ch3.adb: Minor reformatting.
10115         * spark_xrefs.ads: minor fix typo in SPARK-related comment
10116         * table.ads: minor style fix in comment
10117         * lib-xref-spark_specific.adb
10118         (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
10119         * sem_ch12.adb: minor whitespace fix
10120         * freeze.adb: Add comment.
10121         * sem_util.adb (Unique_Name): for instances of
10122         generic subprograms ignore the name of the wrapper package.
10124 2017-01-19  Javier Miranda  <miranda@adacore.com>
10126         * exp_aggr.adb (Resolve_Record_Aggregate):
10127         Factorize code needed for aggregates of limited and unlimited
10128         types in a new routine.
10129         (Pass_Aggregate_To_Back_End): New subprogram.
10131 2017-01-19  Yannick Moy  <moy@adacore.com>
10133         * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
10135 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10137         * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
10138         public, for use elsewhere.
10139         * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
10140         an Inlined_body, recognize a call that uses object notation
10141         and has not been rewritten as a regular call because regular
10142         expansion has not taken place.
10144 2017-01-19  Bob Duff  <duff@adacore.com>
10146         * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
10147         in case of generic formal discrete types, because it causes crashes in
10148         the compiler when built with assertions on.
10150 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10152         * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
10153         sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
10155 2017-01-19  Bob Duff  <duff@adacore.com>
10157         * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
10158         Increment Warnings_Detected.  It was decrementing, which is
10159         wrong since we just issued a warning message.
10160         * binderr.ads (Errors_Detected, Warnings_Detected): Declare
10161         these variables to be of subtype Nat instead of Int, because
10162         they should never be negative.
10164 2017-01-19  Javier Miranda  <miranda@adacore.com>
10166         * contracts.adb (Build_Postconditions_Procedure): Replace
10167         Generate_C_Code by Modify_Tree_For_C.
10168         * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
10169         Replace Generate_C_Code by Modify_Tree_For_C.
10170         * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
10171         Modify_Tree_For_C.
10172         * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
10173         Generate_C_Code by Modify_Tree_For_C.
10174         * exp_ch4.adb (Expand_Allocator_Expression): Replace
10175         Generate_C_Code by Modify_Tree_For_C.
10176         * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
10177         by Modify_Tree_For_C.
10178         * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
10179         Generate_C_Code by Modify_Tree_For_C.
10180         * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
10181         by Modify_Tree_For_C.
10182         * sinfo.ads (Modify_Tree_For_C): Adding documentation.
10184 2017-01-19  Javier Miranda  <miranda@adacore.com>
10186         * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
10187         subprogram.
10188         (Is_Inlinable_Expression_Function): New subprogram.
10189         * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
10190         to Sem_Util.
10191         (Is_Inlinable_Expression_Function): Moved to Sem_Util.
10193 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10195         * sem_ch4.adb (Diagnose_Call): Improve error message when a
10196         selected component has a prefix that might be interpreted
10197         as a parameterless function call, but none of the candidate
10198         interpretations is parameterless, and there is a hidden homonym
10199         of the prefix that is a package.
10200         * sem_ch8.adb (Find_Selected_Component): If the prefix might be
10201         interpreted as a parameterless function call and its analysis
10202         fails, do not call Analyze_Selected_Component.
10204 2017-01-19  Steve Baird  <baird@adacore.com>
10206         * sem_util.ads: Add new Use_Full_View Boolean parameter to
10207         Get_Index_Bounds.
10208         * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
10209         calls to a newly-defined Scalar_Range_Of_Right_View function.
10211 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
10213         * gnat1drv.adb: minor fix of unbalanced parens in comment
10214         * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
10215         to visible part of the package to allow re-use in GNATprove.
10216         * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
10217         from repeated code of Traverse_Compilation_Unit.
10218         (Traverse_Declaration_Or_Statement): fixed detection of
10219         generic subprograms and packages; also, iteration over case
10220         statement alternatives rewritten to avoid testing if the first
10221         alternative is present (since it must be present due to Ada
10222         syntax restrictions).
10224 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10226         * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
10227         returning by reference not just for subprogram body stubs,
10228         but for all subprogram cases.
10229         * sem_util.adb: Code reformatting.
10230         (Requires_Transient_Scope): Update the call to Results_Differ.
10231         (Results_Differ): Update the parameter profile and the associated
10232         comment on usage.
10234 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10236         * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
10237         identifier nodes that do not come from source, to handle properly
10238         dimensionality check within an inlined body which inclddes both
10239         original operands and rewritten operands. This removes spurious
10240         dimensionality errors in the presence of front-end inlining,
10241         as well as in SPARK mode.
10243 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
10245         PR driver/49726
10246         * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
10248 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10250         * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
10252 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
10254         * doc/gnat_ugn/getting_started_with_gnat.rst,
10255         doc/gnat_ugn/inline_assembler.rst,
10256         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
10257         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
10258         doc/gnat_ugn/about_this_guide.rst,
10259         doc/gnat_ugn/platform_specific_information.rst,
10260         doc/gnat_ugn/example_of_binder_output.rst,
10261         doc/gnat_ugn/gnat_and_program_execution.rst,
10262         doc/gnat_ugn/gnat_utility_programs.rst,
10263         doc/gnat_ugn/the_gnat_compilation_model.rst,
10264         doc/gnat_rm/implementation_defined_attributes.rst,
10265         doc/gnat_rm/compatibility_and_porting_guide.rst,
10266         doc/gnat_rm/standard_library_routines.rst,
10267         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
10268         doc/gnat_rm/implementation_defined_pragmas.rst,
10269         doc/gnat_rm/the_gnat_library.rst,
10270         doc/gnat_rm/obsolescent_features.rst,
10271         doc/gnat_rm/about_this_guide.rst,
10272         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
10273         doc/gnat_rm/implementation_of_ada_2012_features.rst,
10274         doc/gnat_rm/interfacing_to_other_languages.rst,
10275         doc/gnat_rm/implementation_defined_aspects.rst,
10276         doc/gnat_rm.rst: Update documentation.
10277         * gnat_rm.texi, gnat_ugn.texi: Regenerated.
10279 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10281         * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
10282         * scil_ll.adb: Minor style fix in comment.
10283         * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
10284         even if entity is already set, because the node may be renalyzed
10285         after inlining transformations.
10287 2017-01-13  Javier Miranda  <miranda@adacore.com>
10289         * sem_res.adb (Resolve_Call): Do not establish a transient scope
10290         for a call to inlinable expression function (since the call will
10291         be replaced by its returned object).
10292         * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
10293         * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
10294         (Expand_Call): For inlinable expression function call replace the
10295         call by its returned object.
10296         (Is_Inlinable_Expression_Function): New subprogram.
10298 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10300         * checks.adb: Minor typo fix and reformatting.
10302 2017-01-13  Javier Miranda  <miranda@adacore.com>
10304         * contracts.adb (Contract_Only_Subprograms): Remove formal.
10305         (Copy_Original_Specification): Removed.
10306         (Skip_Contract_Only_Subprogram): Move here checks previously
10307         located in the caller of this routine (to leave the code more clean).
10308         (Build_Contract_Only_Subprogram): Code cleanup.
10309         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
10310         (Get_Contract_Only_Missing_Body_Name): Removed.
10312 2017-01-13  Javier Miranda  <miranda@adacore.com>
10314         * sem_ch6.adb (Cloned_Expression): New subprogram.
10315         (Freeze_Expr_Types): Complete previous patch since the expression
10316         of an expression-function may have iterators and loops with
10317         defining identifiers which, as part of the preanalysis of the
10318         expression, may be left decorated with itypes that will not be
10319         available in the tree passed to the backend.
10321 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10323         * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
10324         conversion to Integer of an expression that is an attribute
10325         reference 'Pos on an enumeration type.
10327 2017-01-13  Bob Duff  <duff@adacore.com>
10329         * atree.ads: Minor comment fix.
10331 2017-01-13  Justin Squirek  <squirek@adacore.com>
10333         * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
10334         calls in accessibility check on return statement.
10336 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10338         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10339         Ensure that the input body is a subprogram body before trying to
10340         determine whether it denoted an expression function.  Note that
10341         subprogram body stubs cannot denote expression functions.
10343 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10345         * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
10346         and typo fixes.
10348 2017-01-13  Javier Miranda  <miranda@adacore.com>
10350         * einfo.ads (Component_Bit_Offset): Fix documentation.
10351         * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
10352         on record holes for components with unknown compile-time offsets.
10354 2017-01-13  Bob Duff  <duff@adacore.com>
10356         * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
10357         * g-locfil.ads: Minor comment fix.
10359 2017-01-13  Bob Duff  <duff@adacore.com>
10361         * binde.adb (Elab_New): New elaboration order algorithm
10362         that is expected to cause fewer ABE issues. This is a work in
10363         progress. The new algorithm is currently disabled, and can be
10364         enable by the -dp switch, or by modifying the Do_Old and Do_New
10365         etc. flags and rebuilding. Experimental code is included to
10366         compare the results of the old and new algorithms.
10367         * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
10368         can have multiple of these tables, so the old and new algorithms
10369         can coexist.
10370         * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
10371         parameter of type array. This avoids the global variable, and
10372         allows bounds checking (which is normally defeated by the tables
10373         packages). It also ensures that the Elab_Order is read-only
10374         to Bindgen.
10375         * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
10376         subprograms that need it, as above.
10377         * debug.adb: Document new -dp switch. Modify doc of old -do
10378         switch.
10379         * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
10380         and Bindgen.  Move writing of closure (-R and -Ra switches)
10381         to Binde; that's more convenient.
10383 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10385         * sem_ch6.adb (Analyze_Expression_Function): If the expression
10386         function is a completion, all entities referenced in the
10387         expression are frozen. As a consequence, a reference to an
10388         uncompleted private type from an enclosing scope is illegal.
10390 2017-01-13  Javier Miranda  <miranda@adacore.com>
10392         * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
10393         (Analyze_Subprogram_Body_Helper): At the occurrence of an
10394         expression function declaration that is a completion, its
10395         expression causes freezing (AI12-0103).
10397 2017-01-13  Vadim Godunko  <godunko@adacore.com>
10399         * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
10400         Reference functions of Ada.Containers.Indefinite_Holders.
10402 2017-01-13  Bob Duff  <duff@adacore.com>
10404         * s-os_lib.ads: Minor comment fixes.
10406 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10408         * exp_ch3.adb (Default_Initialize_Object): Do not default
10409         initialize an object when it is of a task type and restriction
10410         No_Tasking is in effect because the initialization is obsolete.
10411         * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
10412         restriction No_Tasking is in effect.
10413         (Build_Master_Renaming): Do not rename a master when restriction
10414         No_Tasking is in effect.
10416 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10418         * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
10419         the legality of An others clause applies as well to a choice in
10420         an Iterated_component_ association.
10421         (Resolve_Iterated_Component_Association): An others choice
10422         is legal.
10423         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
10424         Iterated_Component_Association is not static.
10426 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10428         * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
10429         control is passed to the expresion handler before the new mode
10430         is set.
10431         * sem_ch12.adb (Analyze_Package_Instantiation,
10432         Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
10433         in case control is passed to the expresion handler before the
10434         new mode is set.
10436 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10438         * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
10439         exp_aggr.adb: Minor reformatting.
10441 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10443         * inline.adb: Minor reformatting and typo fix.
10445 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10447         * sem_util.ads, sem_util.adb (Choice_List): Move function here
10448         from sem_aggr.adb, for use elsewhere.
10449         * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
10450         * sem_aggr.adb (Resolve_Array_Aggregate): Remove
10451         Iterated_Component_Present.
10452         * exp_aggr.adb: Use Choice_List throughout, to handle
10453         Iterated_Component_Associations.
10454         (Gen_Loop): Generate proper loop for an
10455         Iterated_Component_Association: loop variable has the identifier
10456         of the original association. Generate a loop even for a single
10457         component choice, in order to make loop parameter visible in
10458         expression.
10459         (Flatten): An Iterated_Component_Association is not static.
10461 2017-01-13  Yannick Moy  <moy@adacore.com>
10463         * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
10464         float exponentiation for statically known small negative values
10465         is the reciprocal of the exponentiation for the opposite value
10466         of the exponent.
10467         * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
10468         Ensure that the value of float exponentiation for negative values
10469         is the reciprocal of the exponentiation for the opposite value
10470         of the exponent.
10471         * inline.adb (Expand_Inlined_Call): Fix the count
10472         for the number of generated gotos.
10474 2017-01-13  Yannick Moy  <moy@adacore.com>
10476         * inline.adb: Code cleanup.
10477         * sem_util.adb (Is_OK_Volatile_Context): Add
10478         expression in delay statement as OK for volatile context.
10480 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10482         * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
10483         mode a choice that is a subtype with a static predicate is
10484         replaced by the values it covers. This transformation must not
10485         be performed in ASIS mode, to preserve the source for analysis.
10487 2017-01-13  Justin Squirek  <squirek@adacore.com>
10489         * nlists.ads: Correct minor typo.
10491 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10493         * sem_ch13.adb: Minor reformatting and typo fix.
10495 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10497         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
10498         Iterated_Component_Association is a named association in an
10499         array aggregate.
10500         * sem_aggr.adb (Resolve_Iterated_Component_Association): New
10501         procedure, subsidiary of Resolve_Array_Aggregate, to analyze
10502         and resolve the discrete choices and the expression of the
10503         new construct.
10504         * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
10505         Loop_Actions and Box_Present are attributes of
10506         N_Iterated_Component_Association nodes. Box_Present is always
10507         False in this case.
10508         * sprint.adb (Sprint_Node): An Iterated_Component_Association
10509         has a Discrete_Choices list, as specified in the RM. A
10510         Component_Association for aggregate uses instead a Choices list.
10511         We have to live with this small inconsistency because the new
10512         construct also has a defining identifier, and there is no way
10513         to merge the two node structures.
10515 2017-01-13  Yannick Moy  <moy@adacore.com>
10517         * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
10518         list of pragmas to remove.  Remove pragmas from the list of
10519         statements in the body to inline.
10520         * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
10522 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10524         * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
10525         Analyze_Declarations, to analyze and resolve the expressions of
10526         aspect specifications in the current declarative list, so that
10527         the expressions have proper entity and type info.  This is needed
10528         for ASIS when there is no subsequent expansion to generate this
10529         semantic information.
10530         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
10531         original expression, to suppress cascaded errors when expression
10532         has been constant-folded.
10533         (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
10534         ASIS mode, because there is no subsequent expansion to decorate
10535         the tree.
10537 2017-01-13  Yannick Moy  <moy@adacore.com>
10539         * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
10540         New function to detect when a call may be inlined or not in
10541         GNATprove mode.
10542         (Expand_Inlined_Call): Ensure that a temporary
10543         is always created in the cases where a type conversion may be
10544         needed on an input parameter in GNATprove mode, so that GNATprove
10545         sees the check to perform.
10546         * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
10547         when not applicable due to actual requiring type conversion
10548         with possible check but no temporary value can be copied for
10549         GNATprove to see the check.
10551 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10553         * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
10554         exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
10555         layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
10556         exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
10557         exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
10558         g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
10559         sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
10560         prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
10561         a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
10562         get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
10563         g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
10564         sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
10565         s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
10566         contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
10567         g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
10568         g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
10569         a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
10570         ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
10571         get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
10572         prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
10573         exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
10574         s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
10575         a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
10576         a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
10577         g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
10578         par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
10579         uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
10580         a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
10581         statements to reflect the new style for case alternatives. Various
10582         code clean up and reformatting.
10584 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10586         * exp_util.adb: Minor reformatting.
10588 2017-01-13  Yannick Moy  <moy@adacore.com>
10590         * exp_spark.adb: Code cleanup.
10591         * sem_ch9.adb (Analyze_Delay_Until): Resolve
10592         expression so that calls are identified as such inside delay
10593         until.
10595 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10597         * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
10598         * par-ch3.adb (P_Discrete_Choice_List): An
10599         Iterated_Component_Association is an array aggregate component.
10600         * par-ch4.adb (P_Iterated_Component_Association): New procedure.
10601         (Is_Quantified_Expression): New function that performs a lookahead
10602         to distinguish quantified expressions from iterated component
10603         associations.
10604         (P_Aggregate_Or_Paren_Expr): Recognize iterated component
10605         associations.
10606         (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
10607         * sem.adb (Analyze): Handle Iterated_Component_Association.
10608         * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
10609         component associations.
10610         * sinfo.ads, sinfo.adb: Entries for for
10611         N_Iterated_Component_Association and its fields.
10612         * sprint.adb (Sprint_Node_Actual): Handle
10613         N_Iterated_Component_Association.
10615 2017-01-13  Justin Squirek  <squirek@adacore.com>
10617         * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
10618         of the style check until after preanalysis of acutals.
10620 2017-01-13  Yannick Moy  <moy@adacore.com>
10622         * sem_ch13.adb: Minor reformatting.
10623         * par-ch11.adb: minor style fix in whitespace
10624         * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
10625         reduced to Add_Artificial_ALI_File; style fix in declaration of
10626         Text; grammar fix in comment.
10627         * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
10628         * freeze.adb: Cleanup to pass pragma instead of
10629         expression to call.
10630         * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
10631         replace System'To_Address by equivalent call.
10633 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
10635         * bindusg.adb: Improve usage output for -f switch.
10637 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10639         * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
10640         Minor reformatting.
10642 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10644         * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
10645         treat comparisons on strings as legal in a Static_Predicate.
10646         (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
10647         a function call that is the expansion of a string comparison.The
10648         function call is built when compiling the corresponding predicate
10649         function, but the expression has been found legal as a static
10650         predicate during earlier analysis.
10651         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
10652         properly a function call that is the expansion of a string
10653         comparison operation, in order to recover the Static_Predicate
10654         expression and apply it to a static argument when needed.
10656 2017-01-13  Tristan Gingold  <gingold@adacore.com>
10658         * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
10659         (Open_Read): Re-implement using Open_Read_No_Exception.
10660         (Open_Write): Raise exception in case of error.
10661         * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
10662         * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
10663         reaise exception.
10664         * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
10666 2017-01-13  Yannick Moy  <moy@adacore.com>
10668         * checks.adb: Code cleanup.
10670 2017-01-13  Yannick Moy  <moy@adacore.com>
10672         * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
10673         expression instead of unanalyzed aspect expression for checking
10674         the validity of inheriting an operation. Also copy the expression
10675         being passing it to Build_Class_Wide_Expression, as this call
10676         modifies its argument.
10677         * sem_util.ads Fix comment to reference correct function name
10678         New_Copy_Tree.
10680 2017-01-13  Javier Miranda  <miranda@adacore.com>
10682         * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
10683         when we propagate information about the indexes back to the original
10684         indexing mode and the prefix of the index is a function call, do not
10685         remove any parameter from such call.
10687 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10689         * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
10690         * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
10691         a build-in-place function whose result type is tagged.
10693 2017-01-13  Yannick Moy  <moy@adacore.com>
10695         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
10696         Do not generate a wrapper when the only candidate is a class-wide
10697         subprogram.
10698         (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
10699         inside a generic context.
10701 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10703         * exp_util.adb (Add_Inherited_Tagged_DIC):
10704         Pass the object parameters of both the parent and the derived
10705         type DIC procedure to the reference replacement circuitry.
10706         (Find_DIC_Type): Modify the circuitry to present the partial
10707         view of a private type in case the private type defines its own
10708         DIC pragma.
10709         (Replace_Object_And_Primitive_References): Add two
10710         optional formal parameters.  Update the comment on usage. Update
10711         the replacement of references to object parameters.
10713 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10715         * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
10717 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10719         * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
10720         an out parameter that is a type conversion, independently of th
10721         range check that may apply to the expression of the conversion,
10722         for use in GNATProve.
10724 2017-01-13  Yannick Moy  <moy@adacore.com>
10726         * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
10727         GNATprove_Mode here to Frontend.
10728         * frontend.adb (Frontend): Move the implicit with for System
10729         in GNATprove_Mode here as it ismore correct this way; the old
10730         place only worked by chance, since there were no overloaded names.
10731         * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
10732         * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
10733         four attributes identified in SRM 9(18), add an implicit with
10734         to Ada.Task_Identification.
10735         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
10736         Deal specially with the wrapper introduced for AI05-0071 in GNATprove
10737         mode.
10738         * checks.adb (Apply_Discriminant_Check,
10739         Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
10740         In GNATprove mode, we do not apply the checks, but we still
10741         analyze the expression to possibly issue errors on SPARK
10742         code when a run-time error can be detected at compile time.
10743         (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
10744         in GNATprove mode.
10746 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10748         * expander.adb (Expand): Add a warning about using return
10749         statements in Ghost management code.
10750         * exp_ch3.adb (Freeze_Type): Add a warning about using return
10751         statements in Ghost management code.
10752         * exp_ch7.adb (Build_Invariant_Procedure_Body,
10753         Build_Invariant_Procedure_Declaration): Add a warning about
10754         using return statements in Ghost management code.
10755         * exp_disp.adb (Make_DT): Add a warning about using return
10756         statements in Ghost management code.
10757         * exp_util.adb (Build_DIC_Procedure_Body,
10758         Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
10759         warning about using return statements in Ghost management code.
10760         * freeze.adb (Freeze_Entity): Add a warning about using return
10761         statements in Ghost management code.
10762         * sem.adb (Analyze, Do_Analyze): Add a warning about using return
10763         statements in Ghost management code.
10764         * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
10765         a warning about using return statements in Ghost management code.
10766         * sem_ch5.adb (Analyze_Assignment): Add a warning about using
10767         return statements in Ghost management code.
10768         * sem_ch6.adb (Analyze_Procedure_Call,
10769         Analyze_Subprogram_Body_Helper): Add a warning about using return
10770         statements in Ghost management code.
10771         * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
10772         using return statements in Ghost management code.
10773         * sem_ch12.adb (Analyze_Package_Instantiation,
10774         Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
10775         Instantiate_Subprogram_Body): Add a warning about using return
10776         statements in Ghost management code.
10777         * sem_ch13.adb (Build_Predicate_Functions,
10778         Build_Predicate_Function_Declarations): Add a warning about
10779         using return statements in Ghost management code.
10780         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
10781         Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
10782         Analyze_Pre_Post_Condition_In_Decl_Part):  Add a warning about
10783         using return statements in Ghost management code.
10785 2017-01-13  Tristan Gingold  <gingold@adacore.com>
10787         * s-mmosin-mingw.adb: Fix pragma import.
10789 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
10791         * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
10792         codepeer mode.
10794 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10796         * atree.adb (Allocate_Initialize_Node): A newly created node is
10797         no longer marked as Ghost at this level.
10798         (Mark_New_Ghost_Node): New routine.
10799         (New_Copy): Mark the copy as Ghost.
10800         (New_Entity): Mark the entity as Ghost.
10801         (New_Node): Mark the node as Ghost.
10802         * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
10803         apply to unanalyzed entities.
10804         (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
10805         entities.
10806         (Set_Is_Checked_Ghost_Entity): This attribute now
10807         applies to all entities as well as unanalyzed entities.
10808         (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
10809         all entities as well as unanalyzed entities.
10810         * expander.adb Add with and use clauses for Ghost.
10811         (Expand): Install and revert the Ghost region associated with the node
10812         being expanded.
10813         * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
10814         (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
10815         (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
10816         (Expand_Freeze_Record_Type): Remove all Ghost-related code.
10817         (Freeze_Type): Install and revert the Ghost region associated
10818         with the type being frozen.
10819         * exp_ch5.adb Remove with and use clauses for Ghost.
10820         (Expand_N_Assignment_Statement): Remove all Ghost-related code.
10821         * exp_ch6.adb Remove with and use clauses for Ghost.
10822         (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
10823         (Expand_N_Subprogram_Body): Remove all Ghost-related code.
10824         * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
10825         Ghost region of the working type.
10826         (Build_Invariant_Procedure_Declaration): Install and revert
10827         the Ghost region of the working type.
10828         (Expand_N_Package_Body): Remove all Ghost-related code.
10829         * exp_ch8.adb Remove with and use clauses for Ghost.
10830         (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
10831         code.
10832         (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
10833         (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
10834         (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
10835         code.
10836         * exp_ch13.adb Remove with and use clauses for Ghost.
10837         (Expand_N_Freeze_Entity): Remove all Ghost-related code.
10838         * exp_disp.adb (Make_DT): Install and revert the Ghost region of
10839         the tagged type. Move the generation of various entities within
10840         the Ghost region of the type.
10841         * exp_prag.adb Remove with and use clauses for Ghost.
10842         (Expand_Pragma_Check): Remove all Ghost-related code.
10843         (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
10844         (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
10845         (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
10846         * exp_util.adb (Build_DIC_Procedure_Body): Install
10847         and revert the Ghost region of the working types.
10848         (Build_DIC_Procedure_Declaration): Install and revert the
10849         Ghost region of the working type.
10850         (Make_Invariant_Call): Install and revert the Ghost region of the
10851         associated type.
10852         (Make_Predicate_Call): Reimplemented. Install and revert the
10853         Ghost region of the associated type.
10854         * freeze.adb (Freeze_Entity): Install and revert the Ghost region
10855         of the entity being frozen.
10856         (New_Freeze_Node): Removed.
10857         * ghost.adb Remove with and use clauses for Opt.
10858         (Check_Ghost_Completion): Update the parameter profile
10859         and all references to formal parameters.
10860         (Ghost_Entity): Update the comment on usage.
10861         (Install_Ghost_Mode): New routines.
10862         (Is_Ghost_Assignment): New routine.
10863         (Is_Ghost_Declaration): New routine.
10864         (Is_Ghost_Pragma): New routine.
10865         (Is_Ghost_Procedure_Call): New routine.
10866         (Is_Ghost_Renaming): Removed.
10867         (Is_OK_Declaration): Reimplemented.
10868         (Is_OK_Pragma): Reimplemented.
10869         (Is_OK_Statement): Reimplemented.
10870         (Is_Subject_To_Ghost): Update the comment on usage.
10871         (Mark_And_Set_Ghost_Assignment): New routine.
10872         (Mark_And_Set_Ghost_Body): New routine.
10873         (Mark_And_Set_Ghost_Completion): New routine.
10874         (Mark_And_Set_Ghost_Declaration): New routine.
10875         (Mark_And_Set_Ghost_Instantiation): New routine.
10876         (Mark_And_Set_Ghost_Procedure_Call): New routine.
10877         (Mark_Full_View_As_Ghost): Removed.
10878         (Mark_Ghost_Declaration_Or_Body): New routine.
10879         (Mark_Ghost_Pragma): New routine.
10880         (Mark_Ghost_Renaming): New routine.
10881         (Mark_Pragma_As_Ghost): Removed.
10882         (Mark_Renaming_As_Ghost): Removed.
10883         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
10884         (Prune_Node): Freeze nodes no longer need special pruning, they
10885         are processed by the general ignored Ghost code mechanism.
10886         (Restore_Ghost_Mode): New routine.
10887         (Set_Ghost_Mode): Reimplemented.
10888         (Set_Ghost_Mode_From_Entity): Removed.
10889         * ghost.ads Add with and use clauses for Ghost.
10890         (Check_Ghost_Completion): Update the parameter profile
10891         along with the comment on usage.
10892         (Install_Ghost_Mode): New routine.
10893         (Is_Ghost_Assignment): New routine.
10894         (Is_Ghost_Declaration): New routine.
10895         (Is_Ghost_Pragma): New routine.
10896         (Is_Ghost_Procedure_Call): New routine.
10897         (Mark_And_Set_Ghost_Assignment): New routine.
10898         (Mark_And_Set_Ghost_Body): New routine.
10899         (Mark_And_Set_Ghost_Completion): New routine.
10900         (Mark_And_Set_Ghost_Declaration): New routine.
10901         (Mark_And_Set_Ghost_Instantiation): New routine.
10902         (Mark_And_Set_Ghost_Procedure_Call): New routine.
10903         (Mark_Full_View_As_Ghost): Removed.
10904         (Mark_Ghost_Pragma): New routine.
10905         (Mark_Ghost_Renaming): New routine.
10906         (Mark_Pragma_As_Ghost): Removed.
10907         (Mark_Renaming_As_Ghost): Removed.
10908         (Restore_Ghost_Mode): New routine.
10909         (Set_Ghost_Mode): Redefined.
10910         (Set_Ghost_Mode_From_Entity): Removed.
10911         * sem.adb (Analyze): Install and revert the Ghost region of the
10912         node being analyzed.
10913         (Do_Analyze): Change the way a clean Ghost
10914         region is installed and reverted.
10915         * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
10916         all Ghost-related code.
10917         (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
10918         (Analyze_Number_Declaration): Remove all Ghost-related code.
10919         (Analyze_Object_Declaration): Install and revert the Ghost region of
10920         a deferred object declaration's completion.
10921         (Array_Type_Declaration): Remove all Ghost-related code.
10922         (Build_Derived_Type): Update the comment on
10923         the propagation of Ghost attributes from a parent to a derived type.
10924         (Derive_Subprogram): Remove all Ghost-related code.
10925         (Make_Class_Wide_Type): Remove all Ghost-related code.
10926         (Make_Implicit_Base): Remove all Ghost-related code.
10927         (Process_Full_View): Install and revert the Ghost region of
10928         the partial view.  There is no longer need to check the Ghost
10929         completion here.
10930         * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
10931         region of the left hand side.
10932         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
10933         all Ghost-related code.
10934         (Analyze_Expression_Function): Remove all Ghost-related code.
10935         (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
10936         (Analyze_Procedure_Call): Install and revert the Ghost region of
10937         the procedure being called.
10938         (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
10939         region of the spec or body.
10940         (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
10941         (Build_Subprogram_Declaration): Remove all Ghost-related code.
10942         (Find_Corresponding_Spec): Remove all Ghost-related code.
10943         (Process_Formals): Remove all Ghost-related code.
10944         * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
10945         the Ghost region of the spec.
10946         (Analyze_Package_Declaration): Remove all Ghost-related code.
10947         * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
10948         Ghost when it aliases a Ghost entity.
10949         (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
10950         a Ghost entity.
10951         (Analyze_Object_Renaming): Mark a renaming as Ghost when
10952         it aliases a Ghost entity.
10953         (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
10954         a Ghost entity.
10955         (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
10956         aliases a Ghost entity.
10957         * sem_ch11.adb Remove with and use clauses for Ghost.
10958         (Analyze_Exception_Declaration): Remove all Ghost-related code.
10959         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
10960         Ghost-related code.
10961         (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
10962         code.
10963         (Analyze_Package_Instantiation): Install and revert the Ghost region
10964         of the package instantiation.
10965         (Analyze_Subprogram_Instantiation): Install
10966         and revert the Ghost region of the subprogram instantiation.
10967         (Instantiate_Package_Body): Code clean up. Install and revert the
10968         Ghost region of the package body.
10969         (Instantiate_Subprogram_Body): Code clean up. Install and revert the
10970         Ghost region of the subprogram body.
10971         * sem_ch13.adb (Build_Predicate_Functions): Install
10972         and revert the Ghost region of the related type.
10973         (Build_Predicate_Function_Declaration): Code clean up. Install
10974         and rever the Ghost region of the related type.
10975         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
10976         Install and revert the Ghost region of the pragma.
10977         (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
10978         Ghost region of the pragma.
10979         (Analyze_Pragma): Install and revert the Ghost region of various
10980         pragmas.  Mark a pragma as Ghost when it is related to a Ghost entity
10981         or encloses a Ghost entity.
10982         (Analyze_Pre_Post_Condition): Install and revert the Ghost
10983         region of the pragma.
10984         (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
10985         Ghost region of the pragma.
10986         * sem_res.adb (Resolve): Remove all Ghost-related code.
10987         * sem_util.adb (Is_Declaration): Reimplemented.
10988         (Is_Declaration_Other_Than_Renaming): New routine.
10989         * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
10990         * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
10991         (Is_Ghost_Pragma): Removed.
10992         (Is_Ignored_Ghost_Pragma): New routine.
10993         (Set_Is_Checked_Ghost_Pragma): New routine.
10994         (Set_Is_Ghost_Pragma): Removed.
10995         (Set_Is_Ignored_Ghost_Pragma): New routine.
10996         * sinfo.ads: Update the documentation on Ghost mode and
10997         Ghost regions.  New attributes Is_Checked_Ghost_Pragma
10998         and Is_Ignored_Ghost_Pragma along with usages in nodes.
10999         Remove attribute Is_Ghost_Pragma along with usages in nodes.
11000         (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11001         (Is_Ghost_Pragma): Removed along with pragma Inline.
11002         (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11003         (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11004         (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
11005         (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11007 2017-01-12  Tristan Gingold  <gingold@adacore.com>
11009         * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
11010         s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
11012 2017-01-12  Yannick Moy  <moy@adacore.com>
11014         * errout.adb, errout.ads (Initialize): Factor common treatment
11015         in Reset_Warnings.
11016         (Reset_Warnings): New procedure to reset counts related to warnings.
11017         (Record_Compilation_Errors): New variable to store the presence of an
11018         error, used in gnat2why to allow changing the Warning_Mode.
11019         (Compilation_Errors): Use new variable Record_Compilation_Errors to
11020         store the presence of an error.
11022 2017-01-12  Javier Miranda  <miranda@adacore.com>
11024         * sem_ch13.adb (Analyze_Aspect_Specifications):
11025         For Interrupt_Handler and Attach_ Handler aspects, decorate the
11026         internally built reference to the protected procedure as coming
11027         from sources and force its analysis.
11029 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11031         * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
11032         inherit predicates if any from the first_subtype of the parent,
11033         not from the anonymous parent type.
11034         * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
11035         predicate is not a static subtype.
11037 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11039         * freeze.adb (Check_Suspicious_Convention): New procedure
11040         performing a warning check on discriminated record types with
11041         convention C or C++. Factored out of procedure Freeze_Record_Type,
11042         and changed to only apply to base types (to avoid spurious
11043         warnings on subtypes). Minor improvement of warning messages
11044         to refer to discriminated rather than variant record types.
11045         (Freeze_Record_Type): Remove code for performing a suspicious
11046         convention check.
11047         (Freeze_Entity): Only call Freeze_Record_Type
11048         on types that aren't declared within any enclosing generic units
11049         (rather than just excluding the type when the innermost scope
11050         is generic). Call Check_Suspicious_Convention whether or not
11051         the type is declared within a generic unit.
11052         * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
11053         * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
11054         from Sem_Ch8).
11056 2017-01-12  Tristan Gingold  <gingold@adacore.com>
11058         * sysdep.c, adaint.c, rtinit.c, ming32.h:
11059         (__gnat_current_codepage): Renamed from CurrentCodePage
11060         (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
11062 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11064         * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
11065         quantified expressions, following AI12-050: the loop parameters
11066         of two quantified expressions are conformant if they have the
11067         same identifier.
11069 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
11071         * gcc-interface/Makefile.in: Clean up VxWorks targets.
11073 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11075         * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
11076         Hnadle properly the attribute reference when it appears as part
11077         of an expression in another loop aspect.
11079 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11081         * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
11082         subsidiary of Build_Initialization_Call, to complete generation
11083         of predicate checks on discriminants whose (sub)types have
11084         predicates, and to add checks on variants that do not have an
11085         others clause.
11086         * sem_util.adb (Gather_Components): A missing Others alternative is
11087         not an error when the type of the discriminant is a static predicate
11088         (and coverage has been checked when analyzing the case statement). A
11089         runtime check is generated to verify that a given discriminant
11090         satisfies the predicate (RM 3.8.1. (21.1/2)).
11092 2017-01-12  Yannick Moy  <moy@adacore.com>
11094         * gnat1drv.adb (Adjust_Global_Switches): Only
11095         perform checking of exception mechanism when generating code.
11097 2017-01-12  Justin Squirek  <squirek@adacore.com>
11099         * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
11100         Remove handling of access component with invariant.
11101         (Build_Invariant_Procedure_Declaration): Remove return on class
11102         wide type.
11103         * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
11104         conditional exception for component or array so Has_Own_Invariants
11105         flag is not falsly set.
11106         * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
11107         wide type to have no invariant flags.
11109 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11111         * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
11112         sem_ch13.adb: Minor reformatting.
11114 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11116         * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
11117         adjustment primitive when the ancestor type was not properly frozen.
11118         (Gen_Assign): Guard against a missing initialization
11119         primitive when the component type was not properly frozen.
11120         (Initialize_Array_Component): Guard against a missing adjustment
11121         primitive when the component type was not properly frozen.
11122         (Initialize_Record_Component): Guard against a missing adjustment
11123         primitive when the component type was not properly frozen.
11124         (Process_Transient_Component_Completion): The transient object may
11125         not be finalized when its associated type was not properly frozen.
11126         * exp_ch3.adb (Build_Assignment): Guard against a missing
11127         adjustment primitive when the component type was not properly frozen.
11128         (Build_Initialization_Call): Guard against a missing
11129         initialization primitive when the associated type was not properly
11130         frozen.
11131         (Expand_N_Object_Declaration): Guard against a missing
11132         adjustment primitive when the base type was not properly frozen.
11133         (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
11134         body when there is no adjustment primitive available. Create an
11135         empty Deep_Finalize body when there is no finalization primitive
11136         available.
11137         * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
11138         missing finalization primitive when the designated type was
11139         not properly frozen.
11140         (Expand_N_Allocator): Guard against a missing initialization primitive
11141         when the designated type was not properly frozen.
11142         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
11143         only when the corresponding adjustment primitive is available.
11144         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
11145         adjustment/finalization statements only when there is an available
11146         primitive to carry out the action.
11147         (Build_Initialize_Statements): Generate the initialization/finalization
11148         statements only when there is an available primitive to carry out the
11149         action.
11150         (Make_Adjust_Call): Do not generate a call when the underlying
11151         type is not present due to a possible missing full view.
11152         (Make_Final_Call): Do not generate a call when the underlying
11153         type is not present due to a possible missing full view.
11154         (Make_Finalize_Address_Stmts): Generate an empty body when the
11155         designated type lacks a finalization primitive.
11156         (Make_Init_Call): Do not generate a call when the underlying type is
11157         not present due to a possible missing full view.
11158         (Process_Component_For_Adjust): Add the adjustment call only when the
11159         corresponding adjustment primitive is available.
11160         (Process_Component_For_Finalize): Add the finalization call only when
11161         the corresponding finalization primitive is available.
11162         (Process_Object_Declaration): Use a null statement to emulate a
11163         missing call to the finalization primitive of the object type.
11164         * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
11165         (Make_Final_Call): Update the comment on usage.
11166         (Make_Init_Call): Update the comment on usage.
11167         * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
11169 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
11171         * einfo.ads: Update documentation of Address_Taken.
11172         * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
11173         [Access_Attribute]): Only consider 'Access/'Unchecked_Access
11174         for subprograms when setting Address_Taken flag.
11176 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
11178         * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
11179         Configurable_Run_Time_Mode off when analysing with'ed predefined
11180         libraries.
11182 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11184         * sem_prag.adb: Minor reformatting.
11185         * sem_util.adb (Unique_Entity): fix result for
11186         bodies of entry families.
11188 2017-01-12  Justin Squirek  <squirek@adacore.com>
11190         * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
11191         Resolve_Suppressible in the pragma Assertion_Policy case.
11192         (Resolve_Suppressible): Created this function to factor out
11193         common code used to resolve Suppress to either Ignore or Check
11194         * snames.ads-tmpl: Add name for Suppressible.
11196 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11198         * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
11199         reformatting.
11200         * debug.adb: Minor comment fixes.
11202 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
11204         * sem_util.adb (Unique_Entity): For concurrent
11205         bodies that are defined with stubs and complete a declaration
11206         of a single concurrent object return the entity of an implicit
11207         concurrent type, not the entity of the anonymous concurrent
11208         object.
11209         * debug.adb: -gnatd.J is no longer used.
11210         * make.adb (Globalize): Removed, no longer used.
11211         * sem_ch9.adb: minor typo in comment for entry index
11213 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
11215         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11216         * exp_ch3.adb (Build_Init_Statements): As part of initialising
11217         the value record of a task, set its _Secondary_Stack_Size field
11218         if present.
11219         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11220         a _Secondary_Stack_Size field in the value record of
11221         the task if a Secondary_Stack_Size rep item is present.
11222         (Make_Task_Create_Call): Include secondary stack size
11223         parameter. If No_Secondary_Stack restriction is in place, passes
11224         stack size of 0.
11225         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11226         Secondary_Stack_Size.
11227         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11228         function to define the overhead of the secondary stack.
11229         * s-tarest.adb (Create_Restricted_Task,
11230         Create_Restricted_Task_Sequential): Functions now include
11231         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11232         * s-tarest.adb (Create_Restricted_Task,
11233         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
11234         include Secondary_Stack_Size parameter.
11235         (Task_Wrapper): Secondary stack now allocated to the size specified by
11236         the Secondary_Stack_Size parameter in the task's ATCB.
11237         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
11238         Secondary_Stack_Size component.
11239         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
11240         Create_Restricted_Task_Sequential): Function now include
11241         Secondary_Stack_Size parameter.
11242         (Task_Wrapper): Secondary stack now allocated to the size
11243         specified by the Secondary_Stack_Size parameter in the task's
11244         ATCB.
11245         * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
11246         to include Secondary_Stack_Size parameter.
11247         * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
11248         Secondary_Stack_Size aspect, turning the aspect into its corresponding
11249         internal attribute.
11250         (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
11251         * snames.adb-tmpl, snames.ads-tmpl: Added names
11252         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
11253         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
11255 2017-01-12  Yannick Moy  <moy@adacore.com>
11257         * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
11258         subtree.
11260 2017-01-12  Justin Squirek  <squirek@adacore.com>
11262         * exp_attr.adb (Expand_N_Attribute_Reference):
11263         Fix Finalization_Size case by properly resolving the type after
11264         rewritting the node.
11266 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11268         * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
11269         the tree.
11270         (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
11271         * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
11272         exp_sel.ads: Minor reformatting.
11274 2017-01-12  Justin Squirek  <squirek@adacore.com>
11276         * exp_ch6.adb (Expand_Call): Add guard to prevent
11277         invariant checks from being created for internally generated
11278         subprograms.
11280 2017-01-12  Bob Duff  <duff@adacore.com>
11282         * lib-writ.ads: Remove incorrect comment.
11284 2017-01-12  Javier Miranda  <miranda@adacore.com>
11286         * debug.adb (-gnatd.K): Enable generation of contract-only
11287         procedures in CodePeer mode.
11288         * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
11289         New subprogram.
11290         (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
11291         set.
11292         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
11293         subprogram.
11294         (Get_Contract_Only_Missing_Body_Name): New subprogram.
11295         (Get_Contract_Only_Body): New subprogram.
11296         (Set_Contract_Only_Body): New subprogram.
11297         (Is_Contract_Only_Body): New subprogram.
11298         (Set_Is_Contract_Only_Body): New subprogram.
11299         (SCIL_Nodes): Replace table by hash-table.
11301 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11303         * exp_ch6.adb: Minor reformatting.
11304         * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
11306 2017-01-12  Bob Duff  <duff@adacore.com>
11308         * binde.adb (Forced): New reason for a dependence.
11309         (Force_Elab_Order): Implementation of the new switch.
11310         * binde.ads: Minor comment fixes.
11311         * bindusg.adb: Add -f switch. Apparently, there was an -f switch
11312         long ago that is no longer supported; removed comment about that.
11313         * opt.ads (Force_Elab_Order_File): Name of file specified for
11314         -f switch.
11315         * switch-b.adb: Parse -f switch.
11317 2017-01-12  Justin Squirek  <squirek@adacore.com>
11319         * exp_ch6.adb (Check_View_Conversion): Created this function
11320         to properly chain calls to check type invariants that may be
11321         present in a subprogram call after the subprogram.
11322         (Expand_Call): Add a conditional to identify when a view conversion
11323         needs to be checked.
11324         * nlists.adb, nlists.ads (Prepend_New): New routine.
11325         (Prepend_New_To): New routine.
11327 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11329         * sinfo.ads: Minor reformatting.
11331 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11333         * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
11334         reformatting.
11336 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11338         * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
11339         variable Definite. Create a local object and pass its 'Access to the
11340         BIP function when the result type is either definite or it does not
11341         require any finalization or secondary stack management.
11343 2017-01-12  Bob Duff  <duff@adacore.com>
11345         * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
11346         exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
11347         frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
11348         par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
11349         sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
11350         sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
11351         sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
11352         sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
11353         Change name to Pragma_Name_Unmapped.
11354         (Pragma_Name_Mapped): Change name to Pragma_Name.
11355         This is because the "mapped" version should be the usual case.
11357 2017-01-09  Hristian Kirtchev  <kirtchev@adacore.com>
11359         * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
11360         Is_Default_Init_Cond_Procedure, and
11361         Has_Inherited_Default_Init_Cond.  Add uses of flags
11362         Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
11363         (Default_Init_Cond_Procedure): Removed.
11364         (DIC_Procedure): New routine.
11365         (Has_Default_Init_Cond): Removed.
11366         (Has_DIC): New routine.
11367         (Has_Inheritable_Invariants): The attribute applies to the base type.
11368         (Has_Inherited_Default_Init_Cond): Removed.
11369         (Has_Inherited_DIC): New routine.
11370         (Has_Inherited_Invariants): The attribute applies to the base type.
11371         (Has_Own_DIC): New routine.
11372         (Has_Own_Invariants): The attribute applies to the base type.
11373         (Is_Default_Init_Cond_Procedure): Removed.
11374         (Is_DIC_Procedure): New routine.
11375         (Set_Default_Init_Cond_Procedure): Removed.
11376         (Set_DIC_Procedure): New routine.
11377         (Set_Has_Default_Init_Cond): Removed.
11378         (Set_Has_Inheritable_Invariants): The attribute applies
11379         to the base type.
11380         (Set_Has_Inherited_Default_Init_Cond): Removed.
11381         (Set_Has_Inherited_DIC): New routine.
11382         (Set_Has_Inherited_Invariants): The attribute applies to the base type.
11383         (Set_Has_Own_DIC): New routine.
11384         (Set_Has_Own_Invariants): The attribute applies to the base type.
11385         (Set_Is_Default_Init_Cond_Procedure): Removed.
11386         (Set_Is_DIC_Procedure): New routine.
11387         (Write_Entity_Flags): Update the output of all flags related to
11388         default initial condition.
11389         * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
11390         of the call to the DIC procedure.
11391         (Freeze_Type): Generate the body of the DIC procedure.
11392         * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
11393         all occurrences of Create_Append with Append_New_To. Do
11394         not generate an invariant procedure for a class-wide type.
11395         The generated body acts as a freeze action of the working type.
11396         (Build_Invariant_Procedure_Declaration): Do not generate an
11397         invariant procedure for a class-wide type.
11398         (Create_Append): Removed.
11399         * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
11400         sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
11401         class-wide pre/postcondition description and data structures from
11402         Sem_Prag.
11403         (Build_Class_Wide_Expression): Moved from Sem_Prag.
11404         (Build_DIC_Call): New routine.
11405         (Build_DIC_Procedure_Body): New routine.
11406         (Build_DIC_Procedure_Declaration): New routine.
11407         (Entity_Hash): Moved from Sem_Prag.
11408         (Find_DIC_Type): New routine.
11409         (Update_Primitives_Mapping): Reimplemented.
11410         (Update_Primitives_Mapping_Of_Types): New routine.
11411         * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
11412         (Build_DIC_Call): New routine.
11413         (Build_DIC_Procedure_Body): New routine.
11414         (Build_DIC_Procedure_Declaration): New routine.
11415         (Update_Primitives_Mapping): Moved from Sem_Prag.
11416         (Update_Primitives_Mapping_Of_Types): New routine.
11417         * nlists.adb (Append_New): New routine.
11418         (Append_New_To): New routine.
11419         * nlists.ads (Append_New): New routine.
11420         (Append_New_To): New routine.
11421         * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
11422         of DIC procedures here. This is now done at the end of the
11423         visible declarations, private declarations, and at the freeze
11424         point of a type.
11425         (Analyze_Private_Extension_Declaration):
11426         A private extension inherits the DIC pragma of a parent type.
11427         (Analyze_Subtype_Declaration): No need to propagate invariant
11428         attributes to a subtype as those apply to the base type.
11429         (Build_Derived_Record_Type): No need to inherit invariants here
11430         as this is now done in Build_Derived_Type.
11431         (Build_Derived_Type): Inherit both the DIC pragma and invariants from
11432         a parent type.
11433         (Process_Full_View): Update the propagation of DIC attributes.
11434         (Propagate_Default_Init_Cond_Attributes): Removed.
11435         * sem_ch7.adb Add with and use clauses for Exp_Util.
11436         (Analyze_Package_Specification): Create the body of the DIC
11437         procedure at the end of the visible and private declarations.
11438         (Preserve_Full_Attributes): Propagate DIC attributes.
11439         * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
11440         DIC attributes.
11441         (Analyze_Task_Type_Declaration): Propagate DIC attributes.
11442         * sem_elab.adb (Check_A_Call): Update the call to
11443         Is_Nontrivial_Default_Init_Cond_Procedure.
11444         * sem_prag.adb Remove the with and use clauses for
11445         GNAT.HTable. Move the handling of class- wide pre/postcondition
11446         description and data structures to Exp_Util.
11447         (Analyze_Pragma): Create the declaration of the DIC procedure. There
11448         is no need to propagate invariant-related attributes at this point
11449         as this is done in Build_Invariant_Procedure_Declaration.
11450         (Build_Class_Wide_Expression): Moved to Exp_Util.
11451         (Entity_Hash): Moved to Exp_Util.
11452         (Update_Primitives_Mapping): Moved to Exp_Util.
11453         * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
11454         (Update_Primitives_Mapping): Moved to Exp_Util.
11455         * sem_util.adb: Remove with and use clauses for Ghost
11456         and Sem_Ch13.
11457         (Build_Default_Init_Cond_Call): Removed.
11458         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11459         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11460         (Get_Views): Reimplemented.
11461         (Has_Full_Default_Initialization): Reimplement the section on DIC.
11462         (Inherit_Default_Init_Cond_Procedure): Removed.
11463         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11464         (Is_Nontrivial_DIC_Procedure): New routine.
11465         (Is_Verifiable_DIC_Pragma): New routine.
11466         (Propagate_DIC_Attributes): New routine.
11467         * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
11468         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11469         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11470         (Inherit_Default_Init_Cond_Procedure): Removed.
11471         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11472         (Is_Nontrivial_DIC_Procedure): New routine.
11473         (Is_Verifiable_DIC_Pragma): New routine.
11474         (Propagate_DIC_Attributes): New routine.
11475         * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
11476         on DIC.
11477         * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
11478         usage in nodes.
11479         (Expression_Copy): New routine along with pragma Inline.
11480         (Set_Expression_Copy): New routine along with pragma Inline.
11482 2017-01-06  Bob Duff  <duff@adacore.com>
11484         * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
11485         "Bind_Main_Program" to "not Bind_For_Library", because otherwise
11486         we won't generate the call to s_stalib_adafinal when the main
11487         is not written in Ada.
11489 2017-01-06  Bob Duff  <duff@adacore.com>
11491         * sem_prag.adb: Minor: remove pragma Warnings.
11493 2017-01-06  Tristan Gingold  <gingold@adacore.com>
11495         * Makefile.rtl: Do not compile s-stchop by default.
11497 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
11499         * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
11500         sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
11501         snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
11502         s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
11503         Reverted previous change for now.
11505 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
11507         * exp_ch3.adb (Build_Initialization_Call): Apply predicate
11508         check to default discriminant value if checks are enabled.
11509         (Build_Assignment): If type of component has static predicate,
11510         apply check to its default value, if any.
11512 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
11514         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11515         * exp_ch3.adb (Build_Init_Statements): As part of initialising
11516         the value record of a task, set its _Secondary_Stack_Size field
11517         if present.
11518         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11519         a _Secondary_Stack_Size field in the value record of
11520         the task if a Secondary_Stack_Size rep item is present.
11521         (Make_Task_Create_Call): Include secondary stack size
11522         parameter. If No_Secondary_Stack restriction is in place, passes
11523         stack size of 0.
11524         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11525         Secondary_Stack_Size.
11526         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11527         function to define the overhead of the secondary stack.
11528         * s-tarest.adb (Create_Restricted_Task,
11529         Create_Restricted_Task_Sequential): Functions now include
11530         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11531         * s-tarest.adb (Create_Restricted_Task,
11532         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
11533         now include Secondary_Stack_Size parameter.
11534         (Task_Wrapper):
11535         Secondary stack now allocated to the size specified by the
11536         Secondary_Stack_Size parameter in the task's ATCB.
11537         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
11538         Secondary_Stack_Size component.
11539         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
11540         Create_Restricted_Task_Sequential): Function now include
11541         Secondary_Stack_Size parameter.
11542         (Task_Wrapper): Secondary stack
11543         now allocated to the size specified by the Secondary_Stack_Size
11544         parameter in the task's ATCB.
11545         * sem_ch13.adb (Analyze_Aspect_Specification): Add support
11546         for Secondary_Stack_Size aspect, turning the aspect into its
11547         corresponding internal attribute.
11548         (Analyze_Attribute_Definition):
11549         Process Secondary_Stack_Size attribute.
11550         * snames.adb-tmpl, snames.ads-tmpl: Added names
11551         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
11552         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
11554 2017-01-06  Pascal Obry  <obry@adacore.com>
11556         * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
11557         Sequential_IO and Direct_IO.
11559 2017-01-06  Bob Duff  <duff@adacore.com>
11561         * snames.ads-tmpl (Renamed): New name for the pragma argument.
11562         * par-ch2.adb: Allow the new pragma (with analysis deferred
11563         to Sem_Prag).
11564         * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
11565         Keep a mapping from new pragma names to old names.
11566         * sem_prag.adb: Check legality of pragma Rename_Pragma, and
11567         implement it by calling Map_Pragma_Name.
11568         * checks.adb, contracts.adb, einfo.adb, errout.adb,
11569         * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
11570         * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
11571         * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
11572         * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
11573         * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
11574         * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
11575         as appropriate.
11577 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
11579         * exp_ch9.adb: Minor reformatting.
11581 2017-01-06  Tristan Gingold  <gingold@adacore.com>
11583         * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
11584         * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
11585         (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
11586         (unused).
11587         * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
11588         Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
11589         * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
11590         Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
11592 2017-01-06  Bob Duff  <duff@adacore.com>
11594         * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
11595         dummy implementation of Map_Pragma_Name.
11597 2017-01-06  Tristan Gingold  <gingold@adacore.com>
11599         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
11600         entry_body variable constant.
11601         * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
11602         * s-tpoben.ads (Protected_Entry_Body_Access): Now access
11603         to constant.
11604         * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
11605         now access to constant.
11607 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
11609         * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
11610         reformatting and typo fixes.
11612 2017-01-06  Bob Duff  <duff@adacore.com>
11614         * snames.ads-tmpl: New names for pragma renaming.
11615         * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
11616         * par-prag.adb: Add new pragma name to case statement.
11617         * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
11618         of the pragma.
11619         * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
11620         Dummy implementation of Pragma_Name_Mapped.
11622 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
11624         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
11625         better detect call within an entry_wrapper.
11626         * sem_res.adb (Resolve_Call): A protected call within an
11627         entity_wrapper is analyzed in the context of the protected
11628         object but corresponds to a pre-analysis and is not an access
11629         before elaboration.
11630         * sem_attr.adb: Minor reformatting.
11632 2017-01-06  Justin Squirek  <squirek@adacore.com>
11634         * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
11635         Finalization_Size to allow a prefix of any non-class-wide type.
11636         * sem_attr.ads Modify comment for Finalization_Size to include
11637         definite type use case.
11639 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
11641         * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
11642         on procedures that are wrappers created for entries that have
11643         preconditions.
11644         * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
11645         body is an entry_wrapper, compile it in the context of the
11646         synchronized type, because a precondition may refer to funtions
11647         of the type.
11648         * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
11649         body entity.
11650         * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
11651         within an Entry_Wrapper this is an external call whose target
11652         is the synchronized object that is the actual in the call to
11653         the wrapper.
11655 2017-01-06  Yannick Moy  <moy@adacore.com>
11657         * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
11658         in tree, which means not analyzing the previous prefix if the node has
11659         been rewritten into its prefix.
11661 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
11663         * s-tpobop.adb: Minor reformatting.
11665 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
11667         * checks.adb (Ensure_Valid): Do not generate a validity check
11668         within a generated predicate function, validity checks will have
11669         been applied earlier when required.
11671 2017-01-06  Tristan Gingold  <gingold@adacore.com>
11673         * s-tpoben.ads (Protection_Entries): Add comment and reorder
11674         components for performances.
11675         * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
11676         semantic.
11678 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
11680         * sem_eval.adb (Check_Expression_Against_Static_Predicate):
11681         If expression is compile-time known and obeys a static predicate
11682         it must be labelled as static, to prevent spurious warnings and
11683         run-time errors, e.g. in case statements. This is relevant when
11684         the expression is the result of constant-folding a type conversion
11685         whose expression is a variable with a known static value.
11687 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
11689         * exp_attr.adb, sem_attr.ads: Minor reformatting.
11691 2017-01-06  Justin Squirek  <squirek@adacore.com>
11693         * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
11694         expansion of Finalization_Size attribute.
11695         * sem_attr.adb (Analyze_Attribute): Add entry to check the
11696         semantics of Finalization_Size.
11697         (Eval_Attribute): Add null entry for Finalization_Size.
11698         * sem_attr.ads: Add Finalization_Size to the implementation
11699         dependent attribute list.
11700         * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
11702 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
11704         * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
11705         iterator specification with a serious syntactic error, transform
11706         construct into an infinite loop in order to continue analysis
11707         and prevent a compiler abort.
11709 2017-01-06  Tristan Gingold  <gingold@adacore.com>
11711         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
11712         max_queue_lengths_array if unused.
11714 2017-01-06  Bob Duff  <duff@adacore.com>
11716         * errout.adb (Set_Msg_Text): Protect against out-of-bounds
11717         array access, in case "\" is at the end of Text.
11718         * stylesw.adb (Set_Style_Check_Options): Don't include input
11719         characters in the error message template, because they could
11720         be control characters such as "\", which Errout will try to
11721         interpret.
11723 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
11725         * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
11726         For a private type examine the visible declarations that follow
11727         the partial view, not just the private declarations that follow
11728         the full view.
11730 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
11732         * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
11733         code cleanup.
11735 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
11737         * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
11738         alias of the inherited op is the parent iterator, no need to
11739         examine dispatch table positions which might not be established
11740         yet if type is not frozen.
11741         * sem_disp.adb (Check_Controlling_Formals): The formal of a
11742         predicate function may be a subtype of a tagged type.
11743         * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
11744         of representation items for the completion of a type extension
11745         where a predicate applies to the partial view.
11746         * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
11747         parameter that designates function whose actual receives a
11748         predicate check, to improve warning message when the check will
11749         lead to infinite recursion.
11750         * sem_res.adb (Resolve_Actuals): Pass additional parameter to
11751         Apply_Predicate_Check.
11753 2017-01-06  Tristan Gingold  <gingold@adacore.com>
11755         * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
11756         Gnat_Extended_Ravenscar.
11757         * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
11759 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
11761         * sem_util.ads: Minor typo fix and reformatting.
11763 2017-01-06  Yannick Moy  <moy@adacore.com>
11765         * ghost.adb Minor fixing of references to SPARK RM.
11766         (Check_Ghost_Context): Check whether reference is to a lvalue
11767         before issuing an error about violation of SPARK RM 6.9(13)
11768         when declaration has Ghost policy Check and reference has Ghost
11769         policy Ignore.
11770         * sem_util.adb Minor indentation.
11771         * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
11772         Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
11773         * sem_util.ads (Unique_Defining_Entity): Document the result
11774         for package body stubs.
11776 2017-01-06  Tristan Gingold  <gingold@adacore.com>
11778         * raise-gcc.c (abort): Macro to call Abort_Propagation.
11779         * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
11780         constant.
11781         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
11782         Do not generate the Entry_Max_Queue_Lengths_Array if all default
11783         values.
11784         * exp_util.adb (Corresponding_Runtime_Package): Consider
11785         Max_Queue_Length pragma.
11787 2017-01-06  Justin Squirek  <squirek@adacore.com>
11789         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
11790         Remove declaration generation in the case of
11791         System_Tasking_Protected_Objects_Single_Entry being used,
11792         and add a warning message when this is detected to occur.
11793         (Make_Initialize_Protection): Remove reference pass in the case
11794         of System_Tasking_Protected_Objects_Single_Entry.
11795         * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
11796         * s-tposen.adb (Initialize_Protection_Entry): Remove
11797         Entry_Queue_Max parameter.
11798         * s-tposen.ads: Remove the types use to store the entry queue
11799         maximum.
11800         * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
11802 2017-01-06  Yannick Moy  <moy@adacore.com>
11804         * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
11805         behavior of function, to also accept out of range positions
11806         and raise Constraint_Error in such case, and to copy sloc from
11807         literal if No_Location passed as location.
11808         * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
11809         of functions to raise Constraint_Error in case of value not in
11810         appropriate range.
11812 2017-01-06  Tristan Gingold  <gingold@adacore.com>
11814         * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
11815         Invalidate_Stack_Cache.
11817 2017-01-06  Eric Botcazou  <ebotcazou@adacore.com>
11819         * s-os_lib.adb: Minor fix to the signature of Readlink.
11821 2017-01-06  Javier Miranda  <miranda@adacore.com>
11823         * sem_ch6.adb (Conforming_Types): Handle another
11824         confusion between views in a nested instance with an actual
11825         private type whose full view is not in scope.
11827 2017-01-06  Arnaud Charlet  <charlet@adacore.com>
11829         * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
11830         mark a rewritten if statement as explicit (Comes_From_Source).
11832 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
11834         * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
11836 2017-01-06  Tristan Gingold  <gingold@adacore.com>
11838         * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
11840 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
11842         * sem_case.adb: Minor reformatting.
11844 2017-01-06  Thomas Quinot  <quinot@adacore.com>
11846         * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
11848 2017-01-06  Justin Squirek  <squirek@adacore.com>
11850         * aspects.adb: Register aspect in Canonical_Aspect.
11851         * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
11852         into respective tables.
11853         * einfo.ads, einfo.adb: Add a new attribute for
11854         handling the parameters for Pragma_Max_Entry_Queue
11855         (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
11856         for accessing and setting were added as well.
11857         * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
11858         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
11859         declaration for pramga arguments and store them in the protected
11860         type node.
11861         (Make_Initialize_Protection): Pass a reference to
11862         the Entry_Max_Queue_Lengths_Array in the protected type node to
11863         the runtime.
11864         * rtsfind.adb: Minor grammar fix.
11865         * rtsfind.ads: Register new types taken from the
11866         runtime libraries RE_Protected_Entry_Queue_Max and
11867         RE_Protected_Entry_Queue_Max_Array
11868         * s-tposen.adb, s-tpoben.adb
11869         (Initialize_Protection_Entry/Initialize_Protection_Entries):
11870         Add extra parameter and add assignment to local object.
11871         * s-tposen.ads, s-tpoben.ads: Add new types to
11872         store entry queue maximums and a field to the entry object record.
11873         * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
11874         for Aspect_Max_Queue_Length.
11875         (Check_Aspect_At_Freeze_Point):
11876         Add aspect to list of aspects that don't require delayed analysis.
11877         * sem_prag.adb (Analyze_Pragma): Add case statement for
11878         Pragma_Max_Queue_Length, check semantics, and register arugments
11879         in the respective entry nodes.
11880         * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
11881         and Has_Max_Queue_Length
11882         * snames.ads-tmpl: Add constant for the new aspect-name
11883         Name_Max_Queue_Length and corrasponding pragma.
11885 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
11887         * exp_util.adb (Is_Controlled_Function_Call):
11888         Reimplemented. Consider any node which has an entity as the
11889         function call may appear in various ways.
11891 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
11893         * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
11894         an unchecked type conversion when performing a view conversion
11895         to/from a private type. In all other cases use a regular type
11896         conversion to ensure that any relevant checks are properly
11897         installed.
11899 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
11901         * sem_prag.adb, sem_ch8.adb: Minor reformatting.
11903 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
11905         * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
11906         error on case expression that is an entity, when coverage is
11907         incomplete and entity has a static value obtained by local
11908         propagation.
11909         (Handle_Static_Predicate): New procedure, subsidiary of
11910         Check_Choices, to handle case alternatives that are either
11911         subtype names or subtype indications involving subtypes that
11912         have static predicates.
11914 2017-01-06  Thomas Quinot  <quinot@adacore.com>
11916         * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
11917         (GNAT.Socket): Add support for Busy_Polling and Generic_Option
11919 2017-01-06  Bob Duff  <duff@adacore.com>
11921         * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
11922         Elaborate_All(P) to P itself. That could happen in obscure cases,
11923         and always introduced a cycle (P body must be elaborated before
11924         P body).
11925         * lib-writ.ads: Comment clarification.
11926         * ali-util.ads: Minor comment fix.
11927         * ali.adb: Minor reformatting.
11929 2017-01-06  Tristan Gingold  <gingold@adacore.com>
11931         * a-exexpr-gcc.adb: Improve comment.
11933 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
11935         * s-linux-mips.ads: Use correct signal and errno constants.
11936         (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
11938 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
11940         * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
11941         * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
11942         sections.
11944 2017-01-01  Eric Botcazou  <ebotcazou@adacore.com>
11946         * gnatvsn.ads: Bump copyright year.
11948 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
11950         * gnat_ugn.texi: Bump @copying's copyright year.
11951         * gnat_rm.texi: Likewise.
11953 Copyright (C) 2017 Free Software Foundation, Inc.
11955 Copying and distribution of this file, with or without modification,
11956 are permitted in any medium without royalty provided the copyright
11957 notice and this notice are preserved.