* gcc-interface/decl.c (gnat_to_gnu_entity): Robustify test for types
[official-gcc.git] / gcc / ada / ChangeLog
blob70c596efbaef6eb57642c9de057df9c1a20e53d9
1 2017-12-13  Eric Botcazou  <ebotcazou@adacore.com>
3         * gcc-interface/decl.c (gnat_to_gnu_entity): Robustify test for types
4         descendant of System.Address.
5         (gnat_to_gnu_subprog_type): Likewise.
7 2017-12-08  Jakub Jelinek  <jakub@redhat.com>
9         * gcc-interface/utils.c (gnat_internal_attribute_table): Add
10         exclusions to the comment.
12 2017-12-07  Martin Sebor  <msebor@redhat.com>
14         PR c/81544
15         * gcc-interface/utils.c (gnat_internal_attribute_table): Initialize
16         new member of struct attribute_spec.
18 2017-12-06  Simon Wright  <simon@pushface.org>
20         PR ada/66205
21         * bindgen.adb (Gen_AdaFinal): If the restriction No_Task_Termination is
22         set, generate a null body.
24 2017-12-05  Piotr Trojanek  <trojanek@adacore.com>
26         * sem_util.adb (Contains_Refined_State): Remove.
28 2017-12-05  Ed Schonberg  <schonberg@adacore.com>
30         * sem_ch13.adb (Analyze_Aspect_Specifications, case Predicate): A
31         predicate cannot apply to a formal type.
33 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
35         * exp_unst.ads: Fix typos.
37 2017-12-05  Jerome Lambourg  <lambourg@adacore.com>
39         * libgnarl/s-taprop__qnx.adb: Better detect priority ceiling bug in
40         QNX.  At startup, the first mutex created has a non-zero ceiling
41         priority whatever its actual policy. This makes some tests fail
42         (c940013 for example).
44 2017-12-05  Bob Duff  <duff@adacore.com>
46         * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Call
47         Expand_Cleanup_Actions for N_Extended_Return_Statement.
48         * exp_ch7.adb (Expand_Cleanup_Actions): Handle
49         N_Extended_Return_Statement by transforming the statements into a
50         block, and (indirectly) calling Expand_Cleanup_Actions on the block.
51         It's too hard for Expand_Cleanup_Actions to operate directly on the
52         N_Extended_Return_Statement, because it has a different structure than
53         the other node kinds that Expand_Cleanup_Actions.
54         * exp_util.adb (Requires_Cleanup_Actions): Add support for
55         N_Extended_Return_Statement.  Change "when others => return False;" to
56         "when others => raise ...;" so it's clear what nodes this function
57         handles.  Use named notation where appropriate.
58         * exp_util.ads: Mark incorrect comment with ???.
60 2017-12-05  Javier Miranda  <miranda@adacore.com>
62         * exp_ch9.adb (Install_Private_Data_Declarations): Add missing
63         Debug_Info_Needed decoration of internally generated discriminal
64         renaming declaration.
66 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
68         * exp_unst.adb (Unnest_Subprogram): Add handling of 'Access on
69         nested subprograms.
71 2017-12-05  Sergey Rybin  <rybin@adacore.com>
73         * doc/gnat_ugn/gnat_utility_programs.rst: Add description of '--ignore'
74         option for gnatmetric, gnatpp, gnat2xml, and gnattest.
76 2017-12-05  Piotr Trojanek  <trojanek@adacore.com>
78         * sem_util.adb (Contains_Refined_State): Remove.
80 2017-12-05  Piotr Trojanek  <trojanek@adacore.com>
82         * rtsfind.ads: Add new enumeration literals: RE_Clock_Time (for
83         Ada.Real_Time.Clock_Time) and RO_CA_Clock_Time (for
84         Ada.Calendar.Clock_Time).
86 2017-12-05  Ed Schonberg  <schonberg@adacore.com>
88         * sem_ch4.adb (Is_Private_Overriding): If the candidate private
89         subprogram is overloaded, scan the list of homonyms in the same
90         scope, to find the inherited operation that may be overridden
91         by the candidate.
92         * exp_ch11.adb, exp_ch7.adb: Minor reformatting.
94 2017-12-05  Bob Duff  <duff@adacore.com>
96         * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
97         Init_Assignment is rewritten, we need to set Assignment_OK on the new
98         node.  Otherwise, we will get spurious errors when initializing via
99         assignment statement.
101 2017-12-05  Hristian Kirtchev  <kirtchev@adacore.com>
103         * sem_elab.adb: Update the terminology and switch sections.
104         (Check_SPARK_Model_In_Effect): New routine.
105         (Check_SPARK_Scenario): Verify the model in effect for SPARK.
106         (Process_Conditional_ABE_Call_SPARK): Verify the model in effect for
107         SPARK.
108         (Process_Conditional_ABE_Instantiation_SPARK): Verify the model in
109         effect for SPARK.
110         (Process_Conditional_ABE_Variable_Assignment_SPARK): Verify the model
111         in effect for SPARK.
113 2017-12-05  Nicolas Setton  <setton@adacore.com>
115         * terminals.c (__gnat_setup_child_communication): As documented,
116         __gnat_setup_child_communication should not terminate - it is intended
117         to be used as the child process of a call to fork().  However, execvp
118         might actually return in some cases, for instance when attempting to
119         run a 32-bit binary on a 64-bit Linux distribution when the
120         compatibility packages are not installed. In these cases, exit the
121         program to conform to the documentation.
123 2017-12-05  Olivier Hainque  <hainque@adacore.com>
125         * libgnat/s-tsmona.adb: Fix for oversight in the tsmona interface
126         update.
128 2017-12-05  Gary Dismukes  <dismukes@adacore.com>
130         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Minor typo fix
131         and reformatting.
132         * gnat_ugn.texi: Regenerate.
134 2017-12-05  Olivier Hainque  <hainque@adacore.com>
136         * sem_util.adb (Set_Convention): Always clear Can_Use_Internal_Rep
137         on access to subprogram types with foreign convention.
139 2017-12-05  Yannick Moy  <moy@adacore.com>
141         * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix User's
142         Guide description of default settings of warnings.
144 2017-12-05  Olivier Hainque  <hainque@adacore.com>
146         * s-dwalin.adb (Read_And_Execute_Isn): Adjust test checking for the end
147         of section. Add comments explaining the rationale of the computation.
149 2017-12-05  Bob Duff  <duff@adacore.com>
151         * exp_ch11.adb: Minor refactoring.
153 2017-12-05  Hristian Kirtchev  <kirtchev@adacore.com>
155         * debug.adb: Add debug switches d_a, d_e, and d_p, along with
156         documentation.
157         (Set_Underscored_Debug_Flag): New routine.
158         * debug.ads: Add the flags for all underscore switches.
159         (Set_Underscored_Debug_Flag): New routine.
160         * einfo.adb: Flag303 is now Suppress_Elaboration_Warnings.
161         (Suppress_Elaboration_Warnings): New routine.
162         (Set_Suppress_Elaboration_Warnings): New routine.
163         (Write_Entity_Flags): Add output for Suppress_Elaboration_Warnings.
164         * einfo.ads: Add new flag Suppress_Elaboration_Warnings.
165         (Suppress_Elaboration_Warnings): New routine along with pragma Inline.
166         (Set_Suppress_Elaboration_Warnings): New routine along with pragma
167         Inline.
168         * exp_ch3.adb (Build_Init_Procedure): Restore the behavior of the
169         legacy elaboration model.
170         (Default_Initialize_Object): Restore the behavior of the legacy
171         elaboration model.
172         * exp_ch9.adb: Add with and use clause for Sem_Elab.
173         (Build_Task_Activation_Call): Restore the behavior of the legacy
174         elaboration model.
175         * frontend.adb (Frontend): Restore the behavior of the legacy
176         elaboration model.
177         * opt.ads: Add new flags Legacy_Elaboration_Checks and
178         Relaxed_Elaboration_Checks, along with documentation.
179         * sem_attr.adb (Analyze_Access_Attribute): Restore the behavior of the
180         legacy elaboration model.
181         * sem_ch5.adb (Analyze_Assignment): Restore the behavior of the legacy
182         elaboration model.
183         * sem_ch7.adb (Analyze_Package_Declaration): Restore the behavior of
184         the legacy elaboration model.
185         * sem_ch8.adb (Attribute_Renaming): Restore the behavior of the legacy
186         elaboration model.
187         * sem_ch12.adb (Analyze_Instance_And_Renamings): Restore the behavior
188         of the legacy elaboration model.
189         (Analyze_Package_Instantiation): Restore the behavior of the legacy
190         elaboration model.
191         (Analyze_Subprogram_Instantiation): Restore the behavior of the legacy
192         elaboration model.
193         * sem_elab.adb: Update the documentation of the Processing phase.
194         Update the documentation on elaboration-related compilation
195         switches.  Update the documentation on adding a new target.  Add
196         Processing_Attributes which represent the state of the Processing
197         phase.  Resurrect the previous elaboration model as "legacy elaboration
198         model".
199         (Build_Call_Marker): This routine does not function when the legacy
200         elaboration model is in effect. Do not consider entry calls and requeue
201         statements when debug flag d_e is in effect. Do not consider calls to
202         subprograms which verify the runtime semantics of certain assertion
203         pragmas when debug flag d_p is in effect.
204         (Build_Variable_Reference_Marker): This routine does not function when
205         the legacy elaboration model is in effect.
206         (Check_Elaboration_Scenarios): This routine does not function when the
207         legacy elaboration model is in effect.
208         (Ensure_Prior_Elaboration): The various flags have now been replaced
209         with a state. Do not generate implicit Elaborate[_All] pragmas when
210         their creation has been suppressed.
211         (Ensure_Prior_Elaboration_Static): The with clause is marked based on
212         the requested pragma, not on the nature of the scenario.
213         (In_External_Context): Removed.
214         (Is_Assertion_Pragma_Target): New routine.
215         (Is_Potential_Scenario): Stop the traversal of a task body when
216         reaching an accept or select statement, and debug switch d_a is in
217         effect.
218         (Kill_Elaboration_Scenario): This routine does not function when the
219         legacy elaboration model is in effect.
220         (Process_Activation_Generic): The various flags have now been replaced
221         with a state.
222         (Process_Conditional_ABE): The various flags have now been replaced
223         with a state.
224         (Process_Conditional_ABE_Access): The various flags have now been
225         replaced with a state.
226         (Process_Conditional_ABE_Activation_Impl): The various flags have now
227         been replaced with a state. Do not process an activation call which
228         activates a task whose type is defined in an external instance, and
229         debug switch dL is in effect. Suppress the generation of implicit
230         Elaborate[_All] pragmas once a conditional ABE check has been
231         installed.
232         (Process_Conditional_ABE_Call): The various flags have now been
233         replaced with a state. Do not process a call which invokes a subprogram
234         defined in an external instance, and debug switch dL is in effect.
235         (Process_Conditional_ABE_Call_Ada): The various flags have now been
236         replaced with a state. Suppress the generation of implicit
237         Elaborate[_All] pragmas once a conditional ABE check has been
238         installed.
239         (Process_Conditional_ABE_Call_SPARK): The various flags have now been
240         replaced with a state.
241         (Process_Conditional_ABE_Instantiation): The various flags have now
242         been replaced with a state.
243         (Process_Conditional_ABE_Instantiation_Ada): The various flags have now
244         been replaced with a state. Suppress the generation of implicit
245         Elaborate[_All] pragmas once a conditional ABE check has been
246         installed.
247         (Process_Conditional_ABE_Instantiation_SPARK): The various flags have
248         now been replaced with a state.
249         (Process_Guaranteed_ABE_Activation_Impl): The various flags have now
250         been replaced with a state.
251         (Process_Single_Activation): The various flags have now been replaced
252         with a state.
253         (Record_Elaboration_Scenario): This routine does not function when the
254         legacy elaboration model is in effect.
255         (Traverse_Body): The various flags have now been replaced with a state.
256         * sem_elab.ads: Resurrect the pre-18.x elaboration model as "legacy
257         elaboration model".
258         * sem_prag.adb (Analyze_Pragma): Restore the behavior of the legacy
259         elaboration model.
260         * sem_res.adb (Resolve_Call): Restore the behavior of the legacy
261         elaboration model.
262         (Resolve_Entity_Name): Restore the behavior of the legacy elaboration
263         model.
264         * sem_util.adb (Mark_Elaboration_Attributes): This routine does not
265         function when the legacy elaboration model is in effect.
266         * sinfo.adb (Is_Known_Guaranteed_ABE): Update the assertion check.
267         (No_Elaboration_Check): New routine.
268         (Set_Is_Known_Guaranteed_ABE): Update the assertion check.
269         (Set_No_Elaboration_Check): New routine.
270         * sinfo.ads: Update the documentation of flag Is_Known_Guaranteed_ABE
271         along with occurrences in nodes.  Add new flag No_Elaboration_Check
272         along with occurrences in nodes.
273         * switch-c.adb (Scan_Front_End_Switches): Add processing for debug
274         switches with underscores.  Add processing for switches -gnatH and
275         -gnatJ.
276         * usage.adb (Usage): Add output for switches -gnatH and -gnatJ.
277         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
278         documentation to include the legacy and relaxed elaboration models.
279         * gnat_ugn.texi: Regenerate.
281 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
283         * doc/gnat_ugn/platform_specific_information.rst: Minor edit.
284         Improve doc on required packages for linux 32bits.
286 2017-12-05  Doug Rupp  <rupp@adacore.com>
288         * tracebak.c (ppc64-vx7): USE_GCC_UNWINDER for 64bit.
290 2017-12-05  Javier Miranda  <miranda@adacore.com>
292         * checks.adb (Generate_Range_Check): Force evaluation of the node in
293         more cases.  This patch was written to improve the code generated by
294         the CCG compiler but it is enabled for all targets since double
295         evaluation is always a potential source of inefficiency.
297 2017-12-05  Gary Dismukes  <dismukes@adacore.com>
299         * doc/gnat_ugn/gnat_utility_programs.rst: Remove reference to obsolete
300         -fdump-xref switch.
302 2017-12-05  Eric Botcazou  <ebotcazou@adacore.com>
304         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use the SLOC of the
305         iteration scheme throughout, except for the new loop statement(s).
307 2017-12-05  Ed Schonberg  <schonberg@adacore.com>
309         * exp_aggr.adb (Gen_Assign): Do not analyze the expressionn of the
310         assignment if it is part of an Iterated_Component_Association: the
311         analysis needs to take place once the loop structure is analyzed and
312         the loop parameter made visible, because references to it typically
313         appear in the corresponding expression.  This is necessary if the
314         expression is an aggregate, because previous pre-analysis of the
315         expression does not handle nested aggregates properly.
317 2017-12-05  Bob Duff  <duff@adacore.com>
319         * sem_res.adb (Resolve_Allocator): Avoid coextension processing for an
320         allocator that is the expansion of a build-in-place function call.
322 2017-12-05  Olivier Hainque  <hainque@adacore.com>
324 libgnat/
325         * s-trasym__dwarf.adb (spec of Module_Name.Get): Instead of
326         possibly adjusting the lookup address by a load address, expect
327         a extra argument through which the load address can be conveyed
328         separately.
329         (Multi_Module_Symbolic_Traceback): Adjust accordingly. Pass the
330         retrieved load address to Init_Module.
331         * s-tsmona__linux.adb (Get): Honor the new interface.
332         * s-tsmona__mingw.adb (Get): Likewise.
333         * s-dwalin.ads: Adjust comments to be explicit about which
334         addresses are from module info and which are run-time addresses,
335         offsetted by the module load address.
336         * s-dwalin.adb (Set_Load_Address): Simply set C.Load_Slide.
337         Do not alter the module Low and High (relative) addresses.
338         (Is_Inside): Improve documentation regarding the kinds of addresses
339         at hand and correct the test.
340         (Symbolic_Traceback): Use separate variables with explicit names
341         for the address in traceback (run-time value) and the address to
342         lookup within the shared object (module-relative). Adjust the
343         computation of address passed to Symbolic_Address for symbolization.
345 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
347         * opt.ads (Expand_Nonbinary_Modular_Ops): New flag.
348         * exp_ch4.adb (Expand_Nonbinary_Modular_Op): Use
349         Expand_Nonbinary_Modular_Ops instead of Modify_Tree_For_C, so that
350         other back-ends can also benefit from the front-end expansion. Remove
351         test for Modify_Tree_For_C in all callers to better share code.
352         * gnat1drv.adb (Adjust_Global_Switches): Set
353         Expand_Nonbinary_Modular_Ops when generating C code.
355 2017-12-05  Ed Schonberg  <schonberg@adacore.com>
357         * exp_ch5.adb (Expand_Formal_Container_Loop): Ensure that the loop
358         parameter becomes invisible after analyzing the loop, which has been
359         rewritten as a while-loop.
361 2017-12-05  Doug Rupp  <rupp@adacore.com>
363         * vxaddr2line.adb: Revise and enhance for new ports, remove dead ports,
364         and update for 64bit ports.
366 2017-12-05  Bob Duff  <duff@adacore.com>
368         * exp_ch6.adb (Build_In_Place_Formal): Search for the formal by suffix
369         instead of the full name.
370         * sem_ch6.adb (Create_Extra_Formals): Make sure there are extra formals
371         in the case of an instance of a generic.
373 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
375         (Adjust_Global_Switches): Create an alias GNAT_Annotate to map to
376         pragma Annotate.
378 2017-12-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
380         * gcc-interface/Makefile.in (RTEMS): Define EH_MECHANISM.
382 2017-12-04  Sebastian Huber  <sebastian.huber@embedded-brains.de>
384         * gcc-interface/Makefile.in (RTEMS): Use s-osprim__rtems.adb.
385         * libgnat/s-osprim__rtems.adb: New file.
386         * libgnarl/s-osinte__rtems.adb (pthread_cond_t): Fix alignment.
387         (pthread_mutexattr_t): Likewise.
388         (pthread_rwlockattr_t): Likewise.
389         (pthread_rwlock_t): Likewise.
390         (time_t): Use 64-bit integer.
392 2017-12-01  Sebastian Huber  <sebastian.huber@embedded-brains.de>
394         * libgnarl/s-osinte__rtems.ads (pthread_cond_t): Use correct size and
395         alignment.
396         (pthread_mutex_t): Likewise.
397         (pthread_rwlock_t): Likewise.
399 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
401         * gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR
402         using build2 instead of build3.
404 2017-11-23  Eric Botcazou  <ebotcazou@adacore.com>
406         PR ada/83091
407         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not build a variant
408         type for the implementation type of a packed array.
410 2017-11-23  Mike Stump  <mikestump@comcast.net>
411             Eric Botcazou  <ebotcazou@adacore.com>
413         * gcc-interface/trans.c (gnat_gimplify_stmt) <LOOP_STMT>: Pass 3rd
414         operand to ANNOTATE_EXPR and also pass unrolling hints.
416 2017-11-20  Eric Botcazou  <ebotcazou@adacore.com>
418         PR ada/83016
419         * gnatlink.adb (Process_Args): Accept multiple switches for --LINK.
420         (Usage): Adjust.
421         * gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES).
422         (common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in
423         the invocations of $(GNATLINK).
424         (../../gnatdll$(exeext)): Likewise.
425         (../../vxaddr2line$(exeext)): Likewise.
426         (gnatmake-re): Likewise.
427         (gnatlink-re): Likewise.
429 2017-11-16  Doug Rupp  <rupp@adacore.com>
431         * gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
433 2017-11-16  Steve Baird  <baird@adacore.com>
435         * debug.adb: Update another comment to indicate gnat2scil's use of the
436         -gnatd.7 switch.
438 2017-11-16  Bob Duff  <duff@adacore.com>
440         * exp_ch6.adb (Expand_Call_Helper): Avoid creating a transient scope in
441         the case of nested build-in-place calls.
443 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
445         * doc/gnat_ugn/gnat_utility_programs.rst: Document the switches
446         available in gnatsymbolize.
448 2017-11-16  Steve Baird  <baird@adacore.com>
450         * debug.adb: Update comment to indicate gnat2scil's use of the -gnatd.7
451         switch.
453 2017-11-16  Gary Dismukes  <dismukes@adacore.com>
455         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, sem_ch6.adb,
456         sem_elab.adb: Minor editorial corrections.
457         * gnat_ugn.texi: Regenerate.
459 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
461         * doc/gnat_ugn/gnat_utility_programs.rst (GNAT UGN): Add
462         gnatsymbolize documentation.
463         * gnat_ugn.texi: Regenerate.
465 2017-11-16  Steve Baird  <baird@adacore.com>
467         * sem_ch3.adb (Build_Derived_Record_Type): Replace all uses of
468         "Scope (Parent_Type)" with "Scope (Parent_Base)".
470 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
472         * opt.ads: Elaboration warnings are now on by default. Add a comment
473         explaining why this is needed.
474         * sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration
475         warnings.
476         * sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of
477         elaboration warnings.
478         (Analyze_Subprogram_Instantiation): Preserve the status of elaboration
479         warnings.
480         * sem_elab.adb: Update the structure of Call_Attributes and
481         Instantiation_Attributes.
482         (Build_Call_Marker): Propagate the status of elaboration warnings from
483         the call to the marker.
484         (Extract_Call_Attributes): Extract the status of elaboration warnings.
485         (Extract_Instantiation_Attributes): Extract the status of elaboration
486         warnings.
487         (Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are
488         now dependent on the status of elaboration warnings.
489         (Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now
490         dependent on the status of elaboration warnings.
491         (Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics
492         are now dependent on the status of elaboration warnings.
493         (Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced
494         for formal Call_Attrs. Elaboration diagnostics are now dependent on the
495         status of elaboration warnings.
496         (Process_Guaranteed_ABE_Call): Elaboration diagnostics are now
497         dependent on the status of elaboration warnings.
498         (Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now
499         dependent on the status of elaboration warnings.
500         * sem_prag.adb (Analyze_Pragma): Remove the unjustified warning
501         concerning pragma Elaborate.
502         * sem_res.adb (Resolve_Call): Preserve the status of elaboration
503         warnings.
504         (Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node
505         from the procedure call to the entry call.
506         * sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter
507         Warnings.
508         (Mark_Elaboration_Attributes_Node): Preserve the status of elaboration
509         warnings
510         * sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter
511         Warnings. Update the comment on usage.
512         * sinfo.adb (Is_Dispatching_Call): Update to use Flag6.
513         (Is_Elaboration_Warnings_OK_Node): New routine.
514         (Set_Is_Dispatching_Call): Update to use Flag6.
515         (Set_Is_Elaboration_Warnings_OK_Node): New routine.
516         * sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new
517         attribute Is_Elaboration_Warnings_OK_Node along with occurrences
518         in nodes.
519         (Is_Elaboration_Warnings_OK_Node): New routine along with pragma
520         Inline.
521         (Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma
522         Inline.
523         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various
524         sections to indicate how to suppress elaboration warnings.  Document
525         switches -gnatwl and -gnatwL.
526         * gnat_ugn.texi: Regenerate.
528 2017-11-16  Sylvain Dailler  <dailler@adacore.com>
530         * sem_util.adb (Get_Enum_Lit_From_Pos): Add a condition for Pos
531         lower than 0.
533 2017-11-16  Bob Duff  <duff@adacore.com>
535         * sem_ch13.adb (Check_Expr_Constants): Avoid error message in case of
536         System'To_Address.
538 2017-11-16  Yannick Moy  <moy@adacore.com>
540         * sem_elab.adb (Include): Fix mode of parameter Curr to out.
542 2017-11-16  Piotr Trojanek  <trojanek@adacore.com>
544         * sem_util.ads, sem_util.adb (Is_CCT_Instance): Allow calls where
545         Context_Id denotes a record type.
547 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
549         * sem_ch8.adb (Check_SPARK_Primitive_Operation): Enable the check in
550         instantiations.
552 2017-11-16  Doug Rupp  <rupp@adacore.com>
554         Initial gnat port to aarch64-wrs-vxworks7
555         * libgnarl/s-vxwork__aarch64.ads,
556         libgnat/system-vxworks7-aarch64-rtp-smp.ads,
557         libgnat/system-vxworks7-aarch64.ads: New files
558         * sigtramp-vxworks-target.inc (aarch64): New section.
559         * tracebak.c (USE_ARM_UNWINDING): Disable for ARMARCH8A.
561 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
563         * sem_elab.adb (Include): Including a node which is also a compilation
564         unit terminates the search because there are no more lists to examine.
566 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
568         * sem_ch8.adb (Analyze_Subprogram_Renaming): Ensure that a renaming
569         declaration does not define a primitive operation of a tagged type for
570         SPARK.
571         (Check_SPARK_Primitive_Operation): New routine.
573 2017-11-16  Arnaud Charlet  <charlet@adacore.com>
575         * libgnat/a-elchha.adb (Last_Chance_Handler): Display Argv (0) in
576         message when using -E binder switch.
578 2017-11-16  Piotr Trojanek  <trojanek@adacore.com>
580         * errout.ads: Fix minor typo in comment.
582 2017-11-16  Ed Schonberg  <schonberg@adacore.com>
584         * sem_ch3.adb (Process_Subtype): If the subtype indication does not
585         syntactically denote a type, return Any_Type to prevent subsequent
586         compiler crashes or infinite loops.
588 2017-11-16  Steve Baird  <baird@adacore.com>
590         * lib-writ.adb: Fix bug which causes Program_Error to be raised in some
591         cases when writing out a .ali file when a Rename_Pragma pragma is in
592         effect.
593         * lib-writ.adb (Write_Unit_Information): Replace call to
594         Pragma_Name_Unmapped with call to Pragma_Name.
596 2017-11-16  Gary Dismukes  <dismukes@adacore.com>
598         * sem_elab.adb: Minor typo fixes.
600 2017-11-16  Justin Squirek  <squirek@adacore.com>
602         * sem_res.adb (Resolve_Allocator): Correct warning messages and make
603         them more explicit.
605 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
607         * atree.ads (Nkind_In): Add 10 and 11 parameter versions.
608         * checks.adb (Install_Primitive_Elaboration_Check): Mark the setting of
609         the elaboration flag as elaboration code.
610         * einfo.adb (Contract): Update the comments.
611         (Ignore_SPARK_Mode_Pragmas): Update the comments.
612         (SPARK_Aux_Pragma): Update the comments.
613         (SPARK_Aux_Pragma_Inherited): Update the comments.
614         (SPARK_Pragma): Update the comments. The attribute now applies
615         to all types and abstract states.
616         (SPARK_Pragma_Inherited): Update the comments. The attribute now
617         applies to all types and abstract states.
618         (Set_Contract): Update the comments.
619         (Set_Ignore_SPARK_Mode_Pragmas): Update the comments.
620         (Set_SPARK_Aux_Pragma): Update the comments.
621         (Set_SPARK_Aux_Pragma_Inherited): Update the comments.
622         (Set_SPARK_Pragma): Update the comments. The attribute now applies to
623         all types and abstract states.
624         (Set_SPARK_Pragma_Inherited): Update the comments. The attribute now
625         applies to all types and abstract states.
626         (Write_Field40_Name): Add output for SPARK_Pragma when it appears on a
627         type and abstract states.
628         * einfo.ads: Update the documentation of attributes SPARK_Pragma and
629         SPARK_Pragma_Inherited.  Both of them now apply to all types and
630         abstract states.
631         * exp_util.adb (Set_Elaboration_Flag): Mark the setting of the
632         elaboration flag as elaboration code.
633         * sem_ch3.adb: Add with and use clauses for Sem_Elab.
634         (Analyze_Full_Type_Declaration): Set the SPARK_Mode of the type. Record
635         a derived type for later processing by the ABE mechanism.
636         (Analyze_Incomplete_Type_Decl): Set the SPARK_Mode of the type.
637         (Analyze_Private_Extension_Declaration): Set the SPARK_Mode of the
638         type.
639         * sem_ch7.adb (Analyze_Private_Type_Declaration): Set the SPARK_Mode of
640         the type.
641         * sem_elab.adb: Define the term "early call region".  Update the
642         terminology for "scenario" and "target".  Update the architecture of
643         the ABE mechanism.  Update the steps which must be taken when adding a
644         new scenario.  Update the section on debugging ABE issues.  Add new
645         hash tables Early_Call_Regions and Recorded_SPARK_Scenarios.  Add new
646         table SPARK_Scenarios.  Hash table Elaboration_Context is now
647         Elaboration_Statuses.  The majority of Process_xxx routines have been
648         updated to better reflect their role.
649         (Add_Unit): Reimplemented.
650         (Check_Elaboration_Constituent): New routine.
651         (Check_Elaboration_Scenarios): Verify previously recorded scenarios for
652         conditional ABE issues. Verify previously recorded SPARK scenarios.
653         (Check_SPARK_Derived_Type): New routine.
654         (Check_SPARK_Instantiation): New routine.
655         (Check_SPARK_Scenario): New routine.
656         (Check_SPARK_Refined_State_Pragma): New routine.
657         (Early_Call_Region): New routine.
658         (Elaboration_Status): New routine.
659         (Ensure_Prior_Elaboration): Add new formal parameter Prag_Nam. The
660         implicit Elabotate[_All] pragma is now specified via Prag_Nam.
661         (Find_Early_Call_Region): New routine.
662         (Info_Scenario): Add output for refinement constituents.
663         (Is_Recorded_SPARK_Scenario): New routine.
664         (Is_Suitable_SPARK_Derived_Type): New routine.
665         (Is_Suitable_SPARK_Instantiation): New routine.
666         (Is_Suitable_SPARK_Refined_State_Pragma): New routine.
667         (Is_Visited_Body): New routine.
668         (Kill_Elaboration_Scenario): Reimplemented.
669         (Output_Active_Scenarios): Add output for pragma Refined_State.
670         (Output_SPARK_Refined_State_Pragma): New routine.
671         (Process_Conditional_ABE_Call): Remove the use of -gnatd.v. The effect
672         is now achieved by different means.
673         (Process_Conditional_ABE_Call_SPARK): Verify that a call which precedes
674         the subprogram body appears within the early call region of the body.
675         Either ensure the prior elaboration of external subprograms or verify
676         that the context meets the suitable elaboration requirement.
677         (Process_Conditional_ABE_Instantiation_SPARK): New routine.
678         (Record_Elaboration_Scenario): Reimplement the portion which enforces
679         the level restrictions of the static model. Add support for SPARK
680         scenarios.
681         (Record_SPARK_Elaboration_Scenario): New routine.
682         (Reset_Visited_Bodies): New routine.
683         (Set_Early_Call_Region): New routine.
684         (Set_Elaboration_Status): New routine.
685         (Set_Is_Recorded_SPARK_Scenario): New routine.
686         (Update_Elaboration_Scenario): Reimplemented.
687         * sem_elab.ads: Add new subtype Library_Or_Instantiation_Level.
688         * sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Save the pragma
689         for examination by the ABE Processing phase.
690         (Create_Abstract_State): Save the SPARK_Mode from the context.
691         * sem_util.adb (Is_Non_Preelaborable_Construct): New routine.
692         * sem_util.ads (Is_Non_Preelaborable_Construct): New routine.
693         * sinfo.adb (Is_Elaboration_Code): New routine.
694         (Set_Is_Elaboration_Code): New routine.
695         (Nkind_In): Add 10 and 11 parameter versions.
696         * sinfo.ads: Add new attribute Is_Elaboration_Code along with
697         occurrences in nodes.
698         (Is_Elaboration_Code): New routine along with pragma Inline.
699         (Set_Is_Elaboration_Code): New routine along with pragma Inline.
700         (Nkind_In): Add 10 and 11 parameter versions.
702 2017-11-16  Justin Squirek  <squirek@adacore.com>
704         * sem.adb (Analyze): Remove requirement that the original node of N be
705         an operator in the case that analysis on the node yields the relevant
706         operator - so prefer it instead.
708 2017-11-16  Bob Duff  <duff@adacore.com>
710         * sem_ch6.adb (Create_Extra_Formals): The type of the BIP_Object_Access
711         formal must not have a designated type that is the full view coming
712         from a limited-with'ed package.
713         * sem_util.adb,sem_util.ads (Incomplete_View_From_Limited_With): New
714         function called from sem_ch6.
715         * sem_ch5.adb (Analyze_Assignment): Treat user-defined concatenation
716         specially for b-i-p cases.
718 2017-11-10  Martin Sebor  <msebor@redhat.com>
720         PR c/81117
721         * adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
722         * argv.c (__gnat_fill_arg, __gnat_fill_env): Likewise.
724 2017-11-10  Eric Botcazou  <ebotcazou@adacore.com>
726         * gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
727         not fall through to the next case.
728         <ARRAY_TYPE>: Deal specially with a dereference from another array
729         type with the same element type.
731 2017-11-09  Gary Dismukes  <dismukes@adacore.com>
733         * exp_util.adb, freeze.adb: Minor reformatting.
735 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
737         * gcc-interface/Makefile.in: Add rules to build aarch64-qnx runtimes.
739 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
741         * gcc-interface/trans.c (gnat_to_gnu): Add processing for
742         N_Variable_Reference_Marker nodes.
744 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
746         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
747         the pragma Compile_Time_Error when it appears in a generic package
748         declaration and uses an expanded name to denote the current unit.
750 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
752         * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
753         * tracebak.c: Add support for tracebacks in QNX.
755 2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
757         * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
759 2017-11-09  Yannick Moy  <moy@adacore.com>
761         * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
762         justification.
764 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
766         * doc/gnat_ugn/platform_specific_information.rst: Document packages
767         needed on GNU/Linux by GNAT.
768         * gnat_ugn.texi: Regenerate.
770 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
772         * contracts.adb (Analyze_Contracts): Remove the three parameter
773         version. This routine now only analyzes contracts and does not perform
774         any freezing actions.
775         (Analyze_Previous_Contracts): Removed.
776         (Freeze_Previous_Contracts): New routine.
777         * contracts.ads (Analyze_Previous_Contracts): Removed.
778         (Freeze_Previous_Contracts): New routine.
779         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
780         enclosing package spec regardless of whether the list denotes the
781         visible or private declarations.  Fix the removal of partial state
782         refinements when the context is a package spec.
783         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
784         contracts.
785         * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
786         * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
787         (Analyze_Protected_Body): Freeze previous contracts.
788         (Analyze_Task_Body): Freeze previous contracts.
789         * sem_prag.adb: Comment reformatting.
791 2017-11-09  Bob Duff  <duff@adacore.com>
793         * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
794         Export this so users can use it without importing
795         System.Tasking.Utilities.
796         * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
797         that fails when Make_Independent is called on a user task.
798         * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
799         capitalization style ((style) bad casing of "Master_of_Task").
801 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
803         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
804         uninitialized variable uncovered by Codepeer.
806 2017-11-09  Arnaud Charlet  <charlet@adacore.com>
808         * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
810 2017-11-09  Javier Miranda  <miranda@adacore.com>
812         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
813         (Static_Dispatch_Tables): Minor rewording.
814         * gnat_rm.texi: Regenerate.
816 2017-11-09  Justin Squirek  <squirek@adacore.com>
818         * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
819         use_clauses within instances.
820         (Use_One_Package): Add condition to check for "hidden" open scopes to
821         avoid skipping over packages that have not been properly installed even
822         though they are visible.
824 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
826         * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
827         private operation of a protected type, when the type has no visible
828         operations.
830 2017-11-09  Javier Miranda  <miranda@adacore.com>
832         * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
833         * exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
834         if available.
836 2017-11-09  Bob Duff  <duff@adacore.com>
838         * exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
839         sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
840         sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
841         variables.
843 2017-11-09  Yannick Moy  <moy@adacore.com>
845         * exp_disp.adb (Make_DT): Default initialize Ifaces_List and
846         Ifaces_Comp_List.
848 2017-11-09  Pascal Obry  <obry@adacore.com>
850         * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
851         only for foreign threads.  We initialize the thread handle only if not
852         yet initialized. This happens in Enter_Task for foreign threads only.
853         But for native threads (Ada tasking) we do want to keep the real
854         handle (from Create_Task) to be able to free the corresponding
855         resources in Finalize_TCB (CloseHandle).
857 2017-11-09  Yannick Moy  <moy@adacore.com>
859         * sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
860         P_Base_Type.
861         (Error_Attr_P): Fix name in pragma No_Return.
862         (Unexpected_Argument): Add pragma No_Return.
863         (Placement_Error): Add pragma No_Return.
865 2017-11-09  Javier Miranda  <miranda@adacore.com>
867         * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
868         dispatch table is statically built.
869         (Make_DT): Declare constant the Interface_Table object associated with
870         an statically built dispatch table. For this purpose the Offset_To_Top
871         value of each interface is computed using the dummy object.
872         * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
873         the Offset_To_Top field of secondary dispatch tables when the dispatch
874         table is statically built.
875         (Initialize_Tag): Do not generate calls to Register_Interface_Offset
876         when the dispatch table is statically built.
877         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
878         Document the new GNAT restriction Static_Dispatch_Tables.
879         * gnat_rm.texi: Regenerate.
881 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
883         * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
884         to avoid a dormant bug.
886 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
888         * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
889         as such capability is not available on the OS.
890         * link.c: Make sure linker options for QNX are correct.
891         * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
892         * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
893         in particular a workaround with locks priority ceiling where a higher
894         priority task is allowed to lock a lower ceiling priority lock. This
895         also fixes the scheduling of FIFO tasks when the priority of a task is
896         lowered.
897         * libgnat/system-qnx-aarch64.ads: Fix priority ranges.
899 2017-11-09  Yannick Moy  <moy@adacore.com>
901         * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
902         message.
903         * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
904         condition.
905         * namet.adb (Copy_One_Character): Add assumption for static analysis,
906         as knowledge that Hex(2) is in the range 0..255 is too complex for
907         CodePeer.
908         (Finalize): Add assumption for static analysis, as the fact that there
909         are symbols in the table depends on a global invariant at this point in
910         the program.
911         * set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
912         * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
913         true.
915 2017-11-09  Javier Miranda  <miranda@adacore.com>
917         * libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
918         * exp_disp.adb (Building_Static_DT): Check restriction.
919         (Building_Static_Secondary_DT): Check restriction.
920         (Make_DT): Initialize the HT_Link to No_Tag.
921         * opt.ads (Static_Dispatch_Tables): Rename flag...
922         (Building_Static_Dispatch_Tables): ... into this.  This will avoid
923         conflict with the restriction name.
924         * gnat1drv.adb: Update.
925         * exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
926         * exp_ch3.adb (Expand_N_Object_Declaration): Update.
928 2017-11-09  Pascal Obry  <obry@adacore.com>
930         * libgnarl/s-taprop__mingw.adb: Minor code clean-up.  Better using a
931         named number.
933 2017-11-09  Yannick Moy  <moy@adacore.com>
935         * binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
936         * checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
937         use.  Default initialize Hi, Lo.
938         (Selected_Range_Checks): Retype Num_Checks more precisely.
939         (Determine_Range, Determine_Range_R): Default initialize Hi_Right,
940         Lo_Right.
941         * contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
942         Unmodified.
943         (Process_Postconditions): Mark parameter Stmts as Unmodified.
944         * exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
945         * exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
946         (Expand_Concatenate): Default initialize High_Bound.
947         (Optimize_Length_Comparison): Default initialize Ent, Index.
948         * exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
949         L_Lo.
950         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
951         Return_Stmt.
952         * exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
953         remove pragma Warnings(Off).
954         * exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
955         * exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
956         * freeze.adb (Check_Component_Storage_Order): Default initialize
957         Comp_Byte_Aligned rather than silencing messages with pragma
958         Warnings(Off), which does not work for CodePeer initialization
959         messages, and given that here the possible read of an unitialized value
960         depends on a proper use of parameters by the caller.
961         * inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
962         * sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
963         * sem_ch3.adb (Build_Derived_Array_Type): Default initialize
964         Implicit_Base.
965         * sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
966         pragma Warnings(Off).
967         (Analyze_Case_Expression): Rescope checking block within branch where
968         Others_Present is set by the call to Check_Choices.
969         * sem_ch5.adb (Analyze_Assignment): Default initialize
970         Save_Full_Analysis.
971         * sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
972         and restructure code to defend against previous errors, so that, in
973         that case, control does not flow to the elsif condition which read an
974         uninitialized Obj_Decl.
975         * sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
976         (Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
977         which seem to be left uninitialized and possibly read in some cases.
978         * sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
979         precisely.  This requires to exchange the test for exiting in case of
980         too many positions and the increment to Position, inside the loop.
981         * sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
982         which cannot be read uninitialized, but the reasons for that are quite
983         subtle.
984         * sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
985         * sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
986         Spec_Id.
987         * sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
988         and test for presence of non-null Opnd_Type before testing its scope,
989         in a test which would read its value uninitialized, and is very rarely
990         exercized (it depends on the presence of an extension of System).
991         * sem_spark.ads: Update comment to fix name of main analysis procedure.
992         * sem_warn.adb (Warn_On_Known_Condition): Default initialize
993         Test_Result.
994         * set_targ.adb (FailN): Mark procedure with No_Return.
995         * stylesw.adb (Save_Style_Check_Options): Delete useless code to
996         initialize all array Options to white space, as there is already code
997         doing the same for the remaining positions in Options at the end of the
998         procedure.
1000 2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
1002         * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
1003         generic instantiations either.
1005 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1007         * sem_prag.adb (Analyze_Part_Of): Reword error message.
1008         (Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
1009         SPARK_Mode appears with an illegal mode, treat this as a non-existent
1010         mode.
1012 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
1014         * sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
1015         a limited view of a type T declared in unit U1, when the function is
1016         declared in another unit U2 and the call appears in a procedure within
1017         another unit.
1019 2017-11-09  Justin Squirek  <squirek@adacore.com>
1021         * sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
1022         when processing generic instances.
1024 2017-11-09  Bob Duff  <duff@adacore.com>
1026         * namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
1027         Error_Name and No_Name.  Use this (versus Name_Id) to indicate which
1028         objects can have those special values. Valid_Name_Id could usefully be
1029         used all over the compiler front end, but that's too much trouble for
1030         now. If we did that, we might want to rename:
1031         Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
1032         For parameters of type Valid_Name_Id, remove some redundant tests,
1033         including the ones found by CodePeer.  Use Is_Valid_Name instead of
1034         membership test when appropriate.
1035         (Error_Name_Or_No_Name): Delete this; it's no longer needed.
1036         * sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
1037         "in Error_Name_Or_No_Name".
1038         (Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
1039         Error_Name_Or_No_Name".
1041 2017-11-09  Arnaud Charlet  <charlet@adacore.com>
1043         * gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
1044         mode here unless -gnateC is specified.
1045         * switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
1046         -gnatC here.
1048 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1050         * lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
1051         part of the ALI writing; they are now processed directly from memory
1052         when requested by the backend.
1053         * lib-xref.ads (Collect_SPARK_Xrefs): Remove.
1054         (Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
1055         * lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
1056         (Add_SPARK_File): Remove.
1057         (Add_SPARK_Xref): Refactored from removed code; filters xref entries
1058         that are trivially uninteresting to the SPARK backend.
1059         * spark_xrefs.ads: Remove code that is no longer needed.
1060         * spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
1062 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
1064         * sem_elab.adb: Update the documentation on adding a new elaboration
1065         schenario. Add new hash table Recorded_Top_Level_Scenarios.
1066         (Is_Check_Emitting_Scenario): Removed.
1067         (Is_Recorded_Top_Level_Scenario): New routine.
1068         (Kill_Elaboration_Scenario): Reimplemented.
1069         (Record_Elaboration_Scenario): Mark the scenario as recorded.
1070         (Set_Is_Recorded_Top_Level_Scenario): New routine.
1071         (Update_Elaboration_Scenario): Reimplemented.
1072         * sinfo.adb (Is_Recorded_Scenario): Removed.
1073         (Set_Is_Recorded_Scenario): Removed.
1074         * sinfo.ads: Remove attribute Is_Recorded_Scenario along with
1075         occurrences in nodes.
1076         (Is_Recorded_Scenario): Removed along with pragma Inline.
1077         (Set_Is_Recorded_Scenario): Removed along with pragma Inline.
1079 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1081         * sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
1082         error message.
1084 2017-11-09  Justin Squirek  <squirek@adacore.com>
1086         * sem_res.adb (Resolve_Allocator): Add warning messages corresponding
1087         to the allocation of an anonymous access-to-controlled object.
1089 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
1091         * sigtramp-qnx.c: Fix obvious typo.
1093 2017-11-09  Doug Rupp  <rupp@adacore.com>
1095         * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
1097 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
1099         * sem_res.adb (Resolve): If expression is an entity whose type has
1100         implicit dereference, generate reference to it, because no reference is
1101         generated for an overloaded entity during analysis, given that its
1102         identity may not be known.
1104 2017-11-09  Javier Miranda  <miranda@adacore.com>
1106         * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
1107         offset-to-top field by addition.
1108         (Make_Secondary_DT): Initialize the offset-to-top field with a negative
1109         offset.
1110         * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
1111         return a negative offset-to-top value.
1112         (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
1113         Set_Static_Offset_To_Top passing a negative offet-to-top value;
1114         initialize also the offset-to-top field with a negative offset.
1115         * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
1116         an addition since the offset-to-top field is now a negative value.
1117         (Displace): Displace the pointer to the object means of a substraction
1118         since it is now a negative value.
1119         (Set_Dynamic_Offset_to_top): Displace the pointer to the object by
1120         means of a substraction since it is now a negative value.
1122 2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
1124         * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
1125         before Errout.Output_Messages also in the case of compilation errors.
1127 2017-11-09  Javier Miranda  <miranda@adacore.com>
1129         * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
1130         the Class Level): Fix error interfacing with C strings.
1131         * gnat_ugn.texi: Regenerate.
1133 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
1135         * system-qnx-aarch64.ads: Fix the priority constants.
1136         * s-osinte__qnx.ads: Fix constants for handling the locking protocols
1137         and scheduling.
1138         * s-osinte__qnx.adb: New file , prevents the use of priority 0 that
1139         corresponds to an idle priority on QNX.
1141 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1143         * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
1144         comments.
1146 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1148         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
1149         in expression funtions that are expanded into variables.
1151 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1153         * sem_util.adb: Minor whitespace cleanup.
1155 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
1157         * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
1158         s-taprop version rather than a custom one.
1159         * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
1161 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1163         * lib-xref.ads, lib-xref-spark_specific.adb
1164         (Traverse_Compilation_Unit): Move declaration to package body.
1166 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1168         * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
1169         the type of the renaming from its defining entity, rather then the
1170         subtype mark as there may not be a subtype mark.
1172 2017-11-08  Jerome Lambourg  <lambourg@adacore.com>
1174         * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
1175         libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
1176         libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
1177         libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
1178         terminals.c: Initial port of GNAT for aarch64-qnx
1180 2017-11-08  Elisa Barboni  <barboni@adacore.com>
1182         * exp_util.adb (Find_DIC_Type): Move...
1183         * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
1185 2017-11-08  Justin Squirek  <squirek@adacore.com>
1187         * sem_res.adb (Resolve_Allocator): Add info messages corresponding to
1188         the owner and corresponding coextension.
1190 2017-11-08  Ed Schonberg  <schonberg@adacore.com>
1192         * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
1193         following separate procedures.
1194         (Resolve_Delta_Array_Aggregate): Previous code form
1195         Resolve_Delta_Aggregate.
1196         (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
1197         ARG decisions on the legality rules for delta aggregates for records:
1198         in the case of a variant record, components from different variants
1199         cannot be specified in the delta aggregate, and this must be checked
1200         statically.
1202 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1204         * spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
1205         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1206         removed component.
1208 2017-11-08  Gary Dismukes  <dismukes@adacore.com>
1210         * sem_ch4.adb: Minor typo fix.
1212 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1214         * spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
1215         Spec_Scope_Num components.
1216         * spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
1217         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1218         removed components.
1219         (Collect_SPARK_Xrefs): Skip setting proper values of removed
1220         components.
1222 2017-11-08  Gary Dismukes  <dismukes@adacore.com>
1224         * exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
1225         name is a discriminant in check for unconditional accessibility
1226         violation within instances.
1228 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1230         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
1231         for constants (with variable input).
1232         (Is_Constant_Object_Without_Variable_Input): Remove.
1234 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1236         * exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
1238 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1240         * spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
1241         cross-references.
1242         (dspark): Remove hardcoded table bound.
1244 2017-11-08  Ed Schonberg  <schonberg@adacore.com>
1246         * sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
1247         the type of the base of the construct to determine the type (or
1248         candidate interpretations) of the delta aggregate. This allows the
1249         construct to appear in a context that expects a private extension.
1250         * sem_res.adb (Resolve): Handle properly a delta aggregate with an
1251         overloaded base.
1253 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1255         * spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
1256         with Entity_Id of the reference.
1257         * spark_xrefs.adb (dspark): Adapt pretty-printing routine.
1258         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
1259         reference, not the file and scope indices.
1261 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1263         * errout.ads (Current_Node): New.
1264         * errout.adb (Error_Msg): Use Current_Node.
1265         * par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
1266         when relevant.
1267         * style.adb: Call Error_Msg_N when possible.
1269 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1271         * spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
1272         Entity.
1273         * lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
1274         the Scope_Id record component.
1276 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1278         * spark_xrefs.ads (SPARK_File_Record): Remove string components.
1279         * spark_xrefs.adb (dspark): Remove pretty-printing of removed
1280         SPARK_File_Record components.
1281         * lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
1282         representation of files/units.
1284 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1286         * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
1287         Remove Inside_Stubs parameter.
1289 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1291         * spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
1292         represented by Entity_Id.
1293         (SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
1294         represented by Entity_Id; this information is not repeated as
1295         Scope_Entity.
1296         (Heap): Moved from lib-xref-spark_specific.adb, to reside next to
1297         Name_Of_Heap_Variable.
1298         * spark_xrefs.adb (dspark): Adapt debug routine to above changes in
1299         data types.
1300         * lib-xref-spark_specific.adb: Adapt routines for populating SPARK
1301         scope and xrefs tables to above changes in data types.
1303 2017-11-08  Justin Squirek  <squirek@adacore.com>
1305         * sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
1306         primitives of generic actuals.
1307         (Mark_Use_Type): Add recursive call to properly mark class-wide type's
1308         base type clauses as per ARM 8.4 (8.2/3).
1310 2017-11-08  Ed Schonberg  <schonberg@adacore.com>
1312         * sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
1313         categorization dependency of the body, as is done for non-generic
1314         units.
1315         (New_Overloaded_Entity, Visible_Part_Type): Remove linear search
1316         through declarations (Simple optimization, no behavior change).
1318 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1320         * spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
1321         (SPARK_Scope_Record): Remove inessential components.
1322         * spark_xrefs.adb (dspark): Remove pretty-printing of removed record
1323         components.
1324         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
1325         removed record components.
1326         (Add_SPARK_Xrefs): Remove setting of removed record components.
1328 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1330         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
1331         empty entities.
1333 2017-11-08  Javier Miranda  <miranda@adacore.com>
1335         * sem_disp.adb (Is_Inherited_Public_Operation): Extend the
1336         functionality of this routine to handle multiple levels of derivations.
1338 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1340         * einfo.adb: Elist36 is now used as Nested_Scenarios.
1341         (Nested_Scenarios): New routine.
1342         (Set_Nested_Scenarios): New routine.
1343         (Write_Field36_Name): New routine.
1344         * einfo.ads: Add new attribute Nested_Scenarios along with occurrences
1345         in entities.
1346         (Nested_Scenarios): New routine along with pragma Inline.
1347         (Set_Nested_Scenarios): New routine along with pragma Inline.
1348         * sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
1349         (Process_Nested_Scenarios): New routine.
1350         (Traverse_Body): When a subprogram body is traversed for the first
1351         time, find, save, and process all suitable scenarios found within.
1352         Subsequent traversals of the same subprogram body utilize the saved
1353         scenarios.
1355 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1357         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
1358         protected operations.
1359         (Add_SPARK_Xrefs): Simplify detection of empty entities.
1360         * get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
1361         put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
1362         reading and testing SPARK cross-references stored in the ALI files.
1363         * lib-xref.ads (Output_SPARK_Xrefs): Remove.
1364         * lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
1365         ALI file.
1366         * spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
1367         with description of the SPARK xrefs ALI format.
1368         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
1369         and put_spark_refs.o.
1371 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1373         * exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
1374         when the associated access type is subject to pragma
1375         No_Heap_Finalization.
1376         * exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
1377         designated type in case it comes from a limited withed unit.
1379 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1381         * exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
1382         SPARK-related flags.  Add ??? comment.
1383         * exp_util.adb (Insert_Actions): Add an entry for node
1384         N_Variable_Reference_Marker.
1385         * sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
1386         * sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
1387         and record a variable reference marker for the current name.
1388         (Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
1389         a variable reference marker for the current name.
1390         * sem_elab.adb (Build_Variable_Reference_Marker): New routine.
1391         (Extract_Variable_Reference_Attributes): Reimplemented.
1392         (Info_Scenario): Add output for variable references and remove output
1393         for variable reads.
1394         (Info_Variable_Read): Removed.
1395         (Info_Variable_Reference): New routine.
1396         (Is_Suitable_Scenario): Variable references are now suitable scenarios
1397         while variable reads are not.
1398         (Output_Active_Scenarios): Add output for variable references and
1399         remove output for variable reads.
1400         (Output_Variable_Read): Removed.
1401         (Output_Variable_Reference): New routine.
1402         (Process_Variable_Read): Removed.
1403         (Process_Variable_Reference): New routine.
1404         (Process_Variable_Reference_Read): New routine.
1405         * sem_elab.ads (Build_Variable_Reference_Marker): New routine.
1406         * sem_res.adb (Resolve_Actuals): Build and record a variable reference
1407         marker for the current actual.
1408         * sem_spark.adb (Check_Node): Add an entry for node
1409         N_Variable_Reference_Marker.
1410         * sem_util.adb (Within_Subprogram_Call): Moved to the library level.
1411         * sem_util.ads (Within_Subprogram_Call): Moved to the library level.
1412         * sinfo.adb (Is_Read): New routine.
1413         (Is_Write): New routine.
1414         (Target): Updated to handle variable reference markers.
1415         (Set_Is_Read): New routine.
1416         (Set_Is_Write): New routine.
1417         (Set_Target): Updated to handle variable reference markers.
1418         * sinfo.ads: Add new attributes Is_Read and Is_Write along with
1419         occurrences in nodes. Update attribute Target. Add new node
1420         kind N_Variable_Reference_Marker.
1421         (Is_Read): New routine along with pragma Inline.
1422         (Is_Write): New routine along with pragma Inline.
1423         (Set_Is_Read): New routine along with pragma Inline.
1424         (Set_Is_Write): New routine along with pragma Inline.
1425         * sprint.adb (Sprint_Node_Actual): Add an entry for node
1426         N_Variable_Reference_Marker.
1428 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1430         * sem_util.adb (Subprogram_Name): Append suffix for overloaded
1431         subprograms.
1433 2017-11-08  Yannick Moy  <moy@adacore.com>
1435         * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
1436         about unused use-type or use-package clauses inside inlined bodies.
1438 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1440         * sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
1441         In_Partial_Fin along with a comment on its usage. Do not guarantee the
1442         prior elaboration of a unit when the need came from a partial
1443         finalization context.
1444         (In_Initialization_Context): Relocated to Process_Call.
1445         (Is_Partial_Finalization_Proc): New routine.
1446         (Process_Access): Add new parameter In_Partial_Fin along with a comment
1447         on its usage.
1448         (Process_Activation_Call): Add new parameter In_Partial_Fin along with
1449         a comment on its usage.
1450         (Process_Activation_Conditional_ABE_Impl): Add new parameter
1451         In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1452         diagnostics when the activation occurs in a partial finalization
1453         context.
1454         (Process_Activation_Guaranteed_ABE_Impl): Add new parameter
1455         In_Partial_Fin along with a comment on its usage.
1456         (Process_Call): Add new parameter In_Partial_Fin along with a comment
1457         on its usage. A call is within a partial finalization context when it
1458         targets a finalizer or primitive [Deep_]Finalize, and the call appears
1459         in initialization actions. Pass this information down to the recursive
1460         steps of the Processing phase.
1461         (Process_Call_Ada): Add new parameter In_Partial_Fin along with a
1462         comment on its usage. Remove the guard which suppresses the generation
1463         of implicit Elaborate[_All] pragmas. This is now done in
1464         Ensure_Prior_Elaboration.
1465         (Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
1466         with a comment on its usage. Do not emit any ABE diagnostics when the
1467         call occurs in a partial finalization context.
1468         (Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
1469         comment on its usage.
1470         (Process_Instantiation): Add new parameter In_Partial_Fin along with a
1471         comment on its usage.
1472         (Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
1473         with a comment on its usage.
1474         (Process_Instantiation_Conditional_ABE): Add new parameter
1475         In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1476         diagnostics when the instantiation occurs in a partial finalization
1477         context.
1478         (Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
1479         with a comment on its usage.
1480         (Process_Scenario): Add new parameter In_Partial_Fin along  with a
1481         comment on its usage.
1482         (Process_Single_Activation): Add new parameter In_Partial_Fin along
1483         with a comment on its usage.
1484         (Traverse_Body): Add new parameter In_Partial_Fin along with a comment
1485         on its usage.
1487 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1489         * sem_ch13.adb: Add optional parameter to Error_Msg.
1491 2017-11-08  Jerome Lambourg  <lambourg@adacore.com>
1493         * fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
1494         for the Interfaces.* hierarchy as longer unit names are now allowed.
1496 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1498         * sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
1499         subprogram as well.  Support more cases of entities.
1500         (Append_Entity_Name): Add some defensive code.
1502 2017-11-06  Eric Botcazou  <ebotcazou@adacore.com>
1504         * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
1506 2017-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1508         PR ada/82785
1509         * gcc-interface/Makefile.in (m68k/Linux): Fix typo.
1511 2017-10-21  Eric Botcazou  <ebotcazou@adacore.com>
1513         * gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
1515 2017-10-21  Eric Botcazou  <ebotcazou@adacore.com>
1517         * gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
1518         (convert): Do not use an unchecked conversion for converting from a
1519         type to another type padding it.
1521 2017-10-20  Doug Rupp  <rupp@adacore.com>
1523         * libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
1524         needed for using monotonic clock.
1525         * libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
1526         changes.
1527         * libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
1528         out monotonic clock related functions body.
1529         (Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
1530         Compute_Deadline): Move to...
1531         * libgnarl/s-tpopmo.adb: ... here. New separate package body.
1533 2017-10-20  Ed Schonberg  <schonberg@adacore.com>
1535         * sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
1536         case where the controlling formal is an anonymous access to interface
1537         type.
1538         * exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
1539         access type, handle properly the the constructed dereference that
1540         designates the object used in the rewritten synchronized call.
1541         (Parameter_Block_Pack): If the type of the actual is by-copy, its
1542         generated declaration in the parameter block does not need an
1543         initialization even if the type is a null-excluding access type,
1544         because it will be initialized with the value of the actual later on.
1545         (Parameter_Block_Pack): Do not add controlling actual to parameter
1546         block when its type is by-copy.
1548 2017-10-20  Justin Squirek  <squirek@adacore.com>
1550         * sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
1551         scope stack traversal into the context clause.
1553 2017-10-20  Bob Duff  <duff@adacore.com>
1555         * sinfo.ads: Fix a comment typo.
1557 2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1559         * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
1560         warning against usage in conjunction with -gnatn.
1561         (-fdump-xref): Delete entry.
1562         * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
1563         -fdump-xref switch.
1564         * gnat_ugn.texi: Regenerate.
1566 2017-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
1568         * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
1569         Minor reformatting.
1571 2017-10-20  Yannick Moy  <moy@adacore.com>
1573         * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
1574         compare a dimensioned expression with a literal.
1575         (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
1576         special value zero.
1577         * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
1578         dimensionality system in GNAT.
1579         * gnat_ugn.texi: Regenerate.
1581 2017-10-20  Yannick Moy  <moy@adacore.com>
1583         * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
1584         inadequate silencing of errors.
1585         * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
1586         checking the subprogram body generated from an expression function,
1587         when this is done as part of the preanalysis done on expression
1588         functions, as the subprogram body may not yet be attached in the AST.
1589         The error if any will be issued later during the analysis of the body.
1590         (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
1592 2017-10-20  Arnaud Charlet  <charlet@adacore.com>
1594         * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
1595         warning on ineffective use clause.
1597 2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1599         * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
1600         * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
1601         to issue the warning on the absence of local raise.
1602         (Possible_Local_Raise): Do not issue the warning for Call_Markers.
1603         (Warn_If_No_Local_Raise): New procedure to issue the warning on the
1604         absence of local raise.
1605         * sem_elab.adb: Add with and use clauses for Exp_Ch11.
1606         (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
1607         where a scenario could give rise to raising Program_Error.
1608         * sem_elab.adb: Typo fixes.
1609         * fe.h (Warn_If_No_Local_Raise): Declare.
1610         * gcc-interface/gigi.h (get_exception_label): Change return type.
1611         * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
1612         simple vector of Entity_Id.
1613         (gnu_storage_error_label_stack): Likewise.
1614         (gnu_program_error_label_stack): Likewise.
1615         (gigi): Adjust to above changes.
1616         (Raise_Error_to_gnu): Likewise.
1617         (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
1618         (N_Push_Constraint_Error_Label): Push the label onto the stack.
1619         (N_Push_Storage_Error_Label): Likewise.
1620         (N_Push_Program_Error_Label): Likewise.
1621         (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
1622         a warning on the absence of local raise.
1623         (N_Pop_Storage_Error_Label): Likewise.
1624         (N_Pop_Program_Error_Label): Likewise.
1625         (push_exception_label_stack): Delete.
1626         (get_exception_label): Change return type to Entity_Id and adjust.
1627         * gcc-interface/utils2.c (build_goto_raise): Change type of first
1628         parameter to Entity_Id and adjust.  Set TREE_USED on the label.
1629         (build_call_raise): Adjust calls to get_exception_label and also
1630         build_goto_raise.
1631         (build_call_raise_column): Likewise.
1632         (build_call_raise_range): Likewise.
1633         * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
1634         Document actual default behavior.
1636 2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
1638         * einfo.ads: Minor consistent punctuation in comment.  All numbered
1639         items in the comment of Is_Internal are now terminated with a period.
1641 2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
1643         * exp_util.adb (Build_Temporary): Mark created temporary entity as
1644         internal.
1646 2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
1648         * sem_type.adb (In_Generic_Actual): Simplified.
1650 2017-10-20  Justin Squirek  <squirek@adacore.com>
1652         * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
1653         verify a renaming exists for a generic formal before comparing it to
1654         the actual as defaulted formals will not have a renamed_object.
1656 2017-10-20  Javier Miranda  <miranda@adacore.com>
1658         * exp_ch6.adb (Replace_Returns): Fix wrong management of
1659         N_Block_Statement nodes.
1661 2017-10-20  Bob Duff  <duff@adacore.com>
1663         * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
1664         component of an array aggregate if it is initialized by a
1665         build-in-place function call.
1666         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
1667         bip for nonlimited types.
1668         * debug.adb: Document -gnatd.9.
1670 2017-10-20  Bob Duff  <duff@adacore.com>
1672         * sem_ch12.adb: Remove redundant setting of Parent.
1674 2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1676         * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
1677         of the operands is a string literal.
1679 2017-10-20  Bob Duff  <duff@adacore.com>
1681         * einfo.ads: Comment fix.
1683 2017-10-20  Clement Fumex  <fumex@adacore.com>
1685         * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
1687 2017-10-20  Ed Schonberg  <schonberg@adacore.com>
1689         * sem_dim.adb (Extract_Power): Accept dimension values that are not
1690         non-negative integers when the dimensioned base type is an Integer
1691         type.
1693 2017-10-20  Bob Duff  <duff@adacore.com>
1695         * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
1696         that an allocator came from a b-i-p return statement.
1697         * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
1698         object of a nonlimited build-in-place function call.
1699         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
1700         Alloc_For_BIP_Return flag on generated allocators.
1701         * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
1702         If the N_Assignment_Statement has been transformed into something else,
1703         then Should_Transform_BIP_Assignment won't work.
1704         * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
1705         "Remove Adjust if we're building the return object of an extended
1706         return statement in place." Back out that part of the change, because
1707         the Alloc_For_BIP_Return flag is now used for that.
1709 2017-10-19  Bob Duff  <duff@adacore.com>
1711         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
1712         should be "T".  Handle case of a subtype of a class-wide type.
1714 2017-10-19  Bob Duff  <duff@adacore.com>
1716         * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
1717         which node kinds can legitimately be ignored, and raise Program_Error
1718         for others.
1720 2017-10-19  Hristian Kirtchev  <kirtchev@adacore.com>
1722         * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
1723         instantiation that acts as a compilation unit.
1724         (Find_Code_Unit): Reimplemented.
1725         (Find_Top_Unit): Reimplemented.
1726         (Find_Unit_Entity): New routine.
1727         (Process_Instantiation_SPARK): Correct the elaboration requirement a
1728         package instantiation imposes on a unit.
1730 2017-10-19  Bob Duff  <duff@adacore.com>
1732         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
1733         for a narrow set of controlled types.
1735 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
1737         * sinput.ads (Line_Start): Add pragma Inline.
1738         * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
1740 2017-10-19  Bob Duff  <duff@adacore.com>
1742         * exp_attr.adb (Expand_N_Attribute_Reference): Disable
1743         Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
1744         build-in-place function call so that the temp is declared in the right
1745         place.
1747 2017-10-18  Eric Botcazou  <ebotcazou@adacore.com>
1749         * gcc-interface/misc.c (gnat_tree_size): Move around.
1751         * gcc-interface/utils.c (max_size): Deal with SSA names.
1753 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
1755         * gcc-interface/misc.c (gnat_tree_size): New function.
1756         (LANG_HOOKS_TREE_SIZE): Redefine.
1758 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1760         * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
1761         Remote_Call_Interface is not a suitable preelaboratd context when the
1762         call appears in the package body.
1764 2017-10-14  Eric Botcazou  <ebotcazou@adacore.com>
1766         * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
1767         * layout.adb (Set_Elem_Alignment): Likewise.  Use M name as maximum
1768         alignment for consistency.  If Align is non-zero, use the minimum of
1769         Align and M for the alignment.
1770         * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
1771         setting the alignment directly.
1773 2017-10-14  Ed Schonberg  <schonberg@adacore.com>
1775         * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
1776         optional string in an Assert pragma until the expansion of the pragma
1777         has rewritten it as a conditional statement, so that the string
1778         argument is only evaluaed if the assertion fails. This is mandated by
1779         RM 11.4.2.
1781 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1783         * debug.adb: Switch -gnatd.v and associated flag are now used to
1784         enforce the SPARK rules for elaboration in SPARK code.
1785         * sem_elab.adb: Describe switch -gnatd.v.
1786         (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
1787         (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
1788         in effect.
1789         (Process_Variable_Assignment): Clarify why variable assignments are
1790         processed reglardless of whether -gnatd.v is in effect.
1791         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
1792         sections on elaboration code and compilation switches.
1793         * gnat_ugn.texi: Regenerate.
1795 2017-10-14  Gary Dismukes  <dismukes@adacore.com>
1797         * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
1798         sem_warn.adb: Minor reformattings.
1800 2017-10-14  Ed Schonberg  <schonberg@adacore.com>
1802         * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
1803         for reverse iteration over formal containers.
1804         * gnat_rm.texi: Regenerate.
1806 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1808         * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
1809         Ensure_Prior_Elaboration_Dynamic for consistency reasons.
1810         (Ensure_Static_Prior_Elaboration): Renamed to
1811         Ensure_Prior_Elaboration_Static for consistency reasons.
1812         (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
1813         reflect its new purpose.
1814         (Is_Initialized): New routine.
1815         (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
1816         in order to reflect its new purpose.
1817         (Is_Variable_Read): New routine.
1818         (Output_Variable_Reference): Renamed to Output_Variable_Read in order
1819         to reflect its new purpose.
1820         (Process_Variable_Assignment): This routine now acts as a top level
1821         dispatcher for variable assignments.
1822         (Process_Variable_Assignment_Ada): New routine.
1823         (Process_Variable_Assignment_SPARK): New routine.
1824         (Process_Variable_Reference): Renamed to Process_Variable_Read in order
1825         to reflects its new purpose. A reference to a variable is now suitable
1826         for ABE processing only when it is a read. The logic in the routine now
1827         reflects the latest SPARK elaboration rules.
1829 2017-10-14  Justin Squirek  <squirek@adacore.com>
1831         * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
1832         triggers marking on formal subprograms.
1834 2017-10-14  Javier Miranda  <miranda@adacore.com>
1836         * checks.adb (Ensure_Valid): Do not skip adding the validity check on
1837         renamings of objects that come from the sources.
1839 2017-10-14  Eric Botcazou  <ebotcazou@adacore.com>
1841         * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
1842         parameter and set the alignment of the type to Align.
1843         (Copy_Float_Type): Adjust call to Build_Float_Type.
1844         (Register_Float_Type): Add pragma Unreferenced for Precision.  Adjust
1845         call to Build_Float_Type and do not set RM_Size and Alignment.
1847 2017-10-14  Patrick Bernardi  <bernardi@adacore.com>
1849         * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
1850         GNATRTL_NONTASKING_OBJ.
1852 2017-10-14  Bob Duff  <duff@adacore.com>
1854         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
1855         enabling b-i-p for nonlimited controlled types (but disabled).
1857 2017-10-14  Justin Squirek  <squirek@adacore.com>
1859         * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
1860         Has_Warnings_Off with Warnings_Off.
1862 2017-10-14  Piotr Trojanek  <trojanek@adacore.com>
1864         * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
1866 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1868         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
1869         enclosing package at the end of the visible declarations.
1870         * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
1871         an initialization item which is undefined due to some illegality.
1873 2017-10-14  Patrick Bernardi  <bernardi@adacore.com>
1875         * ali.adb: Add new ALI line 'T' to read the number of tasks contain
1876         within each unit that require a default-sized primary and secondary
1877         stack to be generated by the binder.
1878         (Scan_ALI): Scan new 'T' lines.
1879         * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
1880         * bindgen.adb (Gen_Output_File): Count the number of default-sized
1881         stacks within the closure that are to be created by the binder.
1882         (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
1883         stacks and record these in System.Secodnary_Stack.
1884         (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
1885         closure of the program being bound.
1886         * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
1887         * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
1888         (Expand_N_Object_Declaration): Count the number of default-sized stacks
1889         used by task objects contained within the object whose declaration is
1890         being expanded.  Only performed when either the restrictions
1891         No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
1892         effect.
1893         * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
1894         (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
1895         the expansion of a task type if the size of the stack is known at
1896         run-time and the restrictions No_Implicit_Heap_Allocations or
1897         No_Implicit_Task_Allocations are in effect.
1898         (Make_Task_Create_Call): If using a restricted profile provide
1899         secondary stack parameter: either the statically created stack or null.
1900         * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
1901         Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
1902         Unit_Record initialization expressions.
1903         * lib-writ.adb (Add_Preprocessing_Dependency,
1904         Ensure_System_Dependency): Include Primary_Stack_Count and
1905         Sec_Stack_Count in Unit_Record initialization expression.
1906         (Write_ALI): Write T lines.
1907         (Write_Unit_Information): Do not output 'T' lines if there are no
1908         stacks for the binder to generate.
1909         * lib-writ.ads: Updated library information documentation to include
1910         new T line entry.
1911         * lib.adb (Increment_Primary_Stack_Count): New routine.
1912         (Increment_Sec_Stack_Count): New routine.
1913         (Primary_Stack_Count): New routine.
1914         (Sec_Stack_Count): New routine.
1915         * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
1916         Unit_Record and updated documentation.
1917         (Increment_Primary_Stack_Count): New routine along with pragma Inline.
1918         (Increment_Sec_Stack_Count): New routine along with pragma Inline.
1919         (Primary_Stack_Count): New routine along with pragma Inline.
1920         (Sec_Stack_Count): New routine along with pragma Inline.
1921         * opt.ads: New constant No_Stack_Size.  Flag Default_Stack_Size
1922         redefined.  New flag Default_Sec_Stack_Size and
1923         Quantity_Of_Default_Size_Sec_Stacks.
1924         * rtfinal.c Fixed erroneous comment.
1925         * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
1926         System.Secondary_Stack to System.Parameters.  Add RE_SS_Stack.
1927         * sem_util.adb (Number_Of_Elements_In_Array): New routine.
1928         * sem_util.ads (Number_Of_Elements_In_Array): New routine.
1929         * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
1930         * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
1931         (Set_Sec_Stack_Addr): Removed routine.
1932         (Get_Sec_Stack): New routine.
1933         (Set_Sec_Stack): New routine.
1934         (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
1935         reflect new procedure and global names.
1936         * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
1937         libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
1938         libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
1939         parameter profile to allow the secondary stack size to be specified.
1940         * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
1941         profile to include Sec_Stack_Address.  Update Tasking.Initialize_ATCB
1942         call to remove Secondary_Stack_Size reference.  Add secondary stack
1943         address and size to SSL.Create_TSD call.
1944         (Task_Wrapper): Remove secondary stack creation.
1945         * libgnarl/s-tarest.ads (Create_Restricted_Task,
1946         Create_Restricted_Task_Sequential): Update parameter profile to include
1947         Sec_Stack_Address and clarify the Size parameter.
1948         * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
1949         from profile and body.
1950         (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
1951         * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
1952         Common_ATCB.
1953         (Initialize_ATCB): Update the parameter profile to remove
1954         Secondary_Stack_Size.
1955         * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
1956         call to Initialize_ATCB.  Add secondary stack address and size to
1957         SSL.Create_TSD call, and catch any storage exception from the call.
1958         (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
1959         new subprogram and component names.
1960         (Task_Wrapper): Remove secondary stack creation.
1961         (Vulnerable_Complete_Master): Update to reflect TSD changes.
1962         * libgnarl/s-tassta.ads: Reformat comments.
1963         (Create_Task): Update parameter profile.
1964         * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
1965         profile to include secondary stack size. Remove secondary size
1966         parameter from Initialize_ATCB call and add it to Create_TSD call.
1967         * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
1968         libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
1969         * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
1970         libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
1971         Percentage.  Remove constants Dynamic, Sec_Stack_Percentage and
1972         Sec_Stack_Dynamic.  Add constant Runtime_Default_Sec_Stack_Size and
1973         Sec_Stack_Dynamic.
1974         (Default_Sec_Stack_Size): New routine.
1975         * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
1976         now Preelaborate.
1977         * libgnat/s-soflin.adb: Removed unused with-clauses.  With
1978         System.Soft_Links.Initialize to initialize non-tasking TSD.
1979         (Create_TSD): Update parameter profile. Initialize the TSD and
1980         unconditionally call SS_Init.
1981         (Destroy_TSD): Update SST.SS_Free call.
1982         (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
1983         Set_Sec_Stack_Addr_Soft): Remove routines.
1984         (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
1985         Set_Sec_Stack_Soft): Add routines.
1986         (NT_TSD): Move to private part of package specification.
1987         * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
1988         with suppressed access checks.  Renamed *_Sec_Stack_Addr_* routines and
1989         objects to *_Sec_Stack_*.  TSD: removed warning suppression and
1990         component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
1991         (Create_TSD): Update parameter profile.
1992         (NT_TSD): Move to private section from body.
1993         * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
1994         * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
1995         * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
1996         Remove routine.
1997         (Get_Sec_Stack, Set_Sec_Stack): Add routine.
1998         (Thread_Body_Enter): Update parameter profile and body to adapt to new
1999         System.Secondary_Stack.
2000         (Init_RTS): Update body for new System.Soft_Links names.
2001         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
2002         s-soliin.o.
2004 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
2006         * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
2007         operating on trees as wide_ints.
2009 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2011         * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
2012         as a scoping construct when it is byproduct of exception handling.
2014 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2016         * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
2017         semantic field Target of node N_Call_Marker.
2019 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2021         * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
2022         attempts to copy a limited value, when the allocator is the expression
2023         in an expression function.
2025 2017-10-09  Joel Brobecker  <brobecker@adacore.com>
2027         * doc/share/conf.py: Tell the style checker that this is a Python
2028         fragment, and therefore that pyflakes should not be run to validate
2029         this file.
2031 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
2033         * einfo.ads (Is_Boolean_Type): Add pragma Inline.
2034         (Is_Entity_Name): Likewise.
2035         (Is_String_Type): Likewise.
2036         * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
2037         and remove useless comparisons on the base types.
2038         (Covers): Use simple tests for Standard_Void_Type.  Move up cheap tests
2039         on T2.  Always test Is_Private_Type before Full_View_Covers.
2041 2017-10-09  Bob Duff  <duff@adacore.com>
2043         * exp_ch4.adb: Minor refactoring.
2045 2017-10-09  Javier Miranda  <miranda@adacore.com>
2047         * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
2048         not components.
2050 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2052         * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
2053         are verified only in the static model.
2055 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2057         * sem_ch5.adb (Analyze_Iterator_Specification,
2058         Check_Reverse_Iteration): Check that the domain of iteration supports
2059         reverse iteration when it is a formal container.  This requires the
2060         presence of a Previous primitive in the Iterable aspect.
2061         * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
2062         primitives Last and Previous to support reverse iteration over formal
2063         containers.
2064         (Validate_Iterable_Aspect): Add check for reverse iteration operations.
2065         * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
2066         for reverse iteration using primitives Last and Previous in generated
2067         loop.
2069 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2071         * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
2072         of the Defining_Program_Unit_Name, which is an identifier, in order to
2073         construct the string for the fully qualified name.
2075 2017-10-09  Justin Squirek  <squirek@adacore.com>
2077         * sem_ch3.adb: Rename Uses_Unseen_Priv into
2078         Contains_Lib_Incomplete_Type.
2080 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2082         * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
2083         sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
2084         exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
2085         prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
2086         sem_ch10.adb, par-ch8.adb: Minor reformatting.
2088 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2090         * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
2091         in the static model.
2092         (Is_Suitable_Variable_Assignment): This scenario is now only relevant
2093         in the static model.
2094         (Is_Suitable_Variable_Reference): This scenario is now only relevant in
2095         the static model.
2097 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2099         * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
2100         expressions when the enclosing scope is a subprogram body and the next
2101         declaration is a body that freezes entities previously declared in the
2102         scope.
2104 2017-10-09  Justin Squirek  <squirek@adacore.com>
2106         * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
2107         ghost packages and living packages in use clauses.
2108         (Use_One_Type, Note_Redundant_Use): Correct warning messages
2110 2017-10-09  Justin Squirek  <squirek@adacore.com>
2112         * osint.ads: Document new parameter FD for Read_Source_File.
2114 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2116         * exp_util.adb (Make_Predicate_Call): If the type of the expression to
2117         which the predicate check applies is tagged, convert the expression to
2118         that type. This is in most cases a no-op, but is relevant if the
2119         expression is clas-swide, because the predicate function being invoked
2120         is not a primitive of the type and cannot take a class-wide actual.
2122 2017-10-09  Gary Dismukes  <dismukes@adacore.com>
2124         * exp_disp.adb: Minor reformatting.
2126 2017-10-09  Arnaud Charlet  <charlet@adacore.com>
2128         * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
2130 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2132         * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
2133         GNATprove.
2134         (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
2136 2017-10-09  Bob Duff  <duff@adacore.com>
2138         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
2139         immediately if the call has already been processed (by a previous call
2140         to Make_Build_In_Place_Call_In_Anonymous_Context).
2141         * sem_elab.adb: Minor typo fixes.
2143 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2145         * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
2146         predicate, do not replace an identifier that matches the type if the
2147         identifier is a selector in a selected component, because this
2148         indicates a reference to some homograph of the type itself, and  not to
2149         the current occurence in the predicate.
2151 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
2153         * repinfo.adb (List_Record_Layout): Tweak formatting.
2154         (Write_Val): Remove superfluous spaces in back-end layout mode.
2156 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
2158         * sem_res.adb (Property_Error): Remove.
2159         (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
2160         current wording of the rule.
2162 2017-10-09  Justin Squirek  <squirek@adacore.com>
2164         * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
2165         before analyzing a given scope due to an expression function.
2166         (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
2168 2017-10-09  Bob Duff  <duff@adacore.com>
2170         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
2171         Defining_Identifier (Obj_Decl) in two places, because it might have
2172         changed.
2173         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
2174         involving 'Input on (not visibly) derived types.
2176 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2178         * atree.adb: Add new soft link Rewriting_Proc.
2179         (Rewrite): Invoke the subprogram attached to the rewriting soft link.
2180         (Set_Rewriting_Proc): New routine.
2181         * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
2182         (Set_Rewriting_Proc): New routine.
2183         * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
2184         for *E*laboration flag to maintain consistency with other elaboration
2185         flag generating subprograms.
2186         * debug.adb: Document the new usage of flag -gnatdL.
2187         * einfo.adb: Node19 is now used as Receiving_Entry.  Node39 is now used
2188         as Protected_Subprogram.  Flag148 is now used as
2189         Is_Elaboration_Checks_OK_Id.  Flag302 is now used as
2190         Is_Initial_Condition_Procedure.
2191         (Is_Elaboration_Checks_OK_Id): New routine.
2192         (Is_Initial_Condition_Procedure): New routine.
2193         (Protected_Subprogram): New routine.
2194         (Receiving_Entry): New routine.
2195         (SPARK_Pragma): Update assertion.
2196         (SPARK_Pragma_Inherited): Update assertion.
2197         (Suppress_Elaboration_Warnings): Removed.
2198         (Set_Is_Elaboration_Checks_OK_Id): New routine.
2199         (Set_Is_Initial_Condition_Procedure): New routine.
2200         (Set_Protected_Subprogram): New routine.
2201         (Set_Receiving_Entry): New routine.
2202         (Set_SPARK_Pragma): Update assertion.
2203         (Set_SPARK_Pragma_Inherited): Update assertion.
2204         (Write_Entity_Flags): Update the output for Flag148 and Flag302.
2205         (Write_Field19_Name): Add output for Receiving_Entry.
2206         (Write_Field39_Name): Add output for Protected_Subprogram.
2207         (Write_Field40_Name): Update the output for SPARK_Pragma.
2208         * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
2209         Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
2210         Remove attribute Suppress_Elaboration_Warnings.  Update the stricture
2211         of various entities.
2212         (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
2213         (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
2214         (Protected_Subprogram): New routine along with pragma Inline.
2215         (Receiving_Entry): New routine along with pragma Inline.
2216         (Suppress_Elaboration_Warnings): Removed.
2217         (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
2218         Inline.
2219         (Set_Is_Initial_Condition_Procedure): New routine along with pragma
2220         Inline.
2221         (Set_Protected_Subprogram): New routine along with pragma Inline.
2222         (Set_Receiving_Entry): New routine along with pragma Inline.
2223         (Set_Suppress_Elaboration_Warnings): Removed.
2224         * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
2225         consistency with other finalizer generating subprograms.
2226         (Default_Initialize_Object): Mark the block which wraps the call to
2227         finalize as being part of initialization.
2228         * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
2229         Initial_Condition.
2230         (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
2231         (Next_Suitable_Statement): Update the comment on usage. Skip over call
2232         markers generated by the ABE mechanism.
2233         * exp_ch9.adb (Activation_Call_Loc): New routine.
2234         (Add_Accept): Link the accept procedure to the original entry.
2235         (Build_Protected_Sub_Specification): Link the protected or unprotected
2236         version to the original subprogram.
2237         (Build_Task_Activation_Call): Code cleanup. Use a source location which
2238         is very close to the "begin" or "end" keywords when generating the
2239         activation call.
2240         * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
2241         * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
2242         process loops.
2243         (Expand_SPARK_N_Loop_Statement): New routine.
2244         (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
2245         call to the Default_Initial_Condition procedure.
2246         (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
2247         * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
2248         effect.
2249         (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
2250         (Insert_Actions): Add processing for N_Call_Marker.
2251         (Kill_Dead_Code): Explicitly kill an elaboration scenario.
2252         * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
2253         * frontend.adb: Initialize Sem_Elab. Process all saved top level
2254         elaboration scenarios for ABE issues.
2255         * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
2256         nodes.
2257         * lib.adb (Earlier_In_Extended_Unit): New variant.
2258         * sem.adb (Analyze): Ignore N_Call_Marker nodes.
2259         (Preanalysis_Active): New routine.
2260         * sem.ads (Preanalysis_Active): New routine.
2261         * sem_attr.adb (Analyze_Access_Attribute): Save certain
2262         elaboration-related attributes. Save the scenario for ABE processing.
2263         * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
2264         effect. Save certain elaboration-related attributes.
2265         * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
2266         attributes. Save the scenario for ABE processing.
2267         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
2268         mode in effect. Save certain elaboration-related attributes.
2269         (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
2270         locating the first real statement.
2271         (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
2272         certain elaboration-related attributes.
2273         * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
2274         elaboration warnings.
2275         * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
2276         generated for purposes of wrapping an attribute used as a generic
2277         actual.
2278         (Find_Direct_Name): Save certain elaboration-related attributes. Save
2279         the scenario for ABE processing.
2280         (Find_Expanded_Name): Save certain elaboration-related attributes. Save
2281         the scenario for ABE processing.
2282         * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
2283         elaboration-related attributes.
2284         (Analyze_Requeue): Save certain elaboration-related attributes. Save
2285         the scenario for ABE processing.
2286         (Analyze_Single_Task_Declaration): Save certain elaboration-related
2287         attributes.
2288         (Analyze_Task_Type_Declaration): Save certain elaboration-related
2289         attributes.
2290         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
2291         elaboration-related attributes.
2292         (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
2293         effect. Save certain elaboration-related attributes.
2294         (Analyze_Package_Instantiation): Save certain elaboration-related
2295         attributes.  Save the scenario for ABE processing. Create completing
2296         bodies in case the instantiation results in a guaranteed ABE.
2297         (Analyze_Subprogram_Instantiation): Save certain elaboration-related
2298         attributes Save the scenario for ABE processing. Create a completing
2299         body in case the instantiation results in a guaranteed ABE.
2300         (Provide_Completing_Bodies): New routine.
2301         * sem_elab.ads: Brand new implementation.
2302         * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
2303         Elaborate_Body): Do not suppress elaboration warnings.
2304         * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
2305         operator.
2306         (Resolve_Call): Save certain elaboration-related attributes. Save the
2307         scenario for ABE processing.
2308         (Resolve_Entity_Name): Do not perform any ABE processing here.
2309         (Resolve_Entry_Call): Inherit certain attributes from the original call.
2310         * sem_util.adb (Begin_Keyword_Location): New routine.
2311         (Defining_Entity): Update the parameter profile. Add processing for
2312         concurrent subunits that are rewritten as null statements.
2313         (End_Keyword_Location): New routine.
2314         (Find_Enclosing_Scope): New routine.
2315         (In_Instance_Visible_Part): Code cleanup.
2316         (In_Subtree): Update the parameter profile. Add new version.
2317         (Is_Preelaborable_Aggregate): New routine.
2318         (Is_Preelaborable_Construct): New routine.
2319         (Mark_Elaboration_Attributes): New routine.
2320         (Scope_Within): Update the parameter profile.
2321         (Scope_Within_Or_Same): Update the parameter profile.
2322         * sem_util.ads (Begin_Keyword_Location): New routine.
2323         (Defining_Entity): Update the parameter profile and the comment on
2324         usage.
2325         (End_Keyword_Location): New routine.
2326         (Find_Enclosing_Scope): New routine.
2327         (In_Instance_Visible_Part): Update the parameter profile.
2328         (In_Subtree): Update the parameter profile. Add new version.
2329         (Is_Preelaborable_Aggregate): New routine.
2330         (Is_Preelaborable_Construct): New routine.
2331         (Mark_Elaboration_Attributes): New routine.
2332         (Scope_Within): Update the parameter profile and the comment on usage.
2333         (Scope_Within_Or_Same): Update the parameter profile and the comment on
2334         usage.
2335         * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
2336         to determine whether a loop has meaningful condition actions.
2337         (Has_Condition_Actions): New routine.
2338         * sinfo.adb (ABE_Is_Certain): Removed.
2339         (Is_Declaration_Level_Node): New routine.
2340         (Is_Dispatching_Call): New routine.
2341         (Is_Elaboration_Checks_OK_Node): New routine.
2342         (Is_Initialization_Block): New routine.
2343         (Is_Known_Guaranteed_ABE): New routine.
2344         (Is_Recorded_Scenario): New routine.
2345         (Is_Source_Call): New routine.
2346         (Is_SPARK_Mode_On_Node): New routine.
2347         (No_Elaboration_Check): Removed.
2348         (Target): New routine.
2349         (Was_Attribute_Reference): New routine.
2350         (Set_ABE_Is_Certain): Removed.
2351         (Set_Is_Declaration_Level_Node): New routine.
2352         (Set_Is_Dispatching_Call): New routine.
2353         (Set_Is_Elaboration_Checks_OK_Node): New routine.
2354         (Set_Is_Initialization_Block): New routine.
2355         (Set_Is_Known_Guaranteed_ABE): New routine.
2356         (Set_Is_Recorded_Scenario): New routine.
2357         (Set_Is_Source_Call): New routine.
2358         (Set_Is_SPARK_Mode_On_Node): New routine.
2359         (Set_No_Elaboration_Check): Removed.
2360         (Set_Target): New routine.
2361         (Set_Was_Attribute_Reference): New routine.
2362         * sinfo.ads: Remove attribute ABE_Is_Certain.  Attribute
2363         Do_Discriminant_Check now utilizes Flag3.  Attribute
2364         No_Side_Effect_Removal now utilizes Flag17.  Add new node
2365         N_Call_Marker.  Update the structure of various nodes.
2366         (ABE_Is_Certain): Removed along with pragma Inline.
2367         (Is_Declaration_Level_Node): New routine along with pragma Inline.
2368         (Is_Dispatching_Call): New routine along with pragma Inline.
2369         (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
2370         (Is_Initialization_Block): New routine along with pragma Inline.
2371         (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2372         (Is_Recorded_Scenario): New routine along with pragma Inline.
2373         (Is_Source_Call): New routine along with pragma Inline.
2374         (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2375         (No_Elaboration_Check): Removed along with pragma Inline.
2376         (Target): New routine along with pragma Inline.
2377         (Was_Attribute_Reference): New routine along with pragma Inline.
2378         (Set_ABE_Is_Certain): Removed along with pragma Inline.
2379         (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
2380         (Set_Is_Dispatching_Call): New routine along with pragma Inline.
2381         (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
2382         Inline.
2383         (Set_Is_Initialization_Block): New routine along with pragma Inline.
2384         (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2385         (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
2386         (Set_Is_Source_Call): New routine along with pragma Inline.
2387         (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2388         (Set_No_Elaboration_Check): Removed along with pragma Inline.
2389         (Set_Target): New routine along with pragma Inline.
2390         (Set_Was_Attribute_Reference): New routine along with pragma Inline.
2391         * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
2393 2017-10-09  Bob Duff  <duff@adacore.com>
2395         * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
2397 2017-10-09  Bob Duff  <duff@adacore.com>
2399         * freeze.ads: Minor comment fixed.
2401 2017-10-09  Bob Duff  <duff@adacore.com>
2403         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
2404         care of unchecked conversions in addition to regular conversions. This
2405         takes care of a case where a type is derived from a private untagged
2406         type that is completed by a tagged controlled type.
2408 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2410         * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
2411         rewriting a class-wide condition, handle properly the case where the
2412         controlling argument of the operation to which the condition applies is
2413         an access to a tagged type, and the condition includes a dispatching
2414         call with an implicit dereference.
2416 2017-10-09  Bob Duff  <duff@adacore.com>
2418         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
2419         the code at the end of this procedure that was setting the type of a
2420         class-wide object to the specific type returned by a function call.
2421         Treat this case as indefinite instead.
2423 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2425         * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
2426         Suppress spurious ambiguity error when two traversals of the homonym
2427         chain (first directly, and then through an examination of relevant
2428         interfaces) retrieve the same operation, when other irrelevant homonyms
2429         of the operatioh are also present.
2431 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2433         * sem_util.adb (Object_Access_Level): If the object is the return
2434         statement of an expression function, return the level of the function.
2435         This is relevant when the object involves an implicit conversion
2436         between access types and the expression function is a completion, which
2437         forces the analysis of the expression before rewriting it as a body, so
2438         that freeze nodes can appear in the proper scope.
2440 2017-10-09  Bob Duff  <duff@adacore.com>
2442         * atree.adb: Make nnd apply to everything "interesting", including
2443         Rewrite.  Remove rrd.
2445 2017-10-09  Javier Miranda  <miranda@adacore.com>
2447         * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
2448         processing the declaration of the dummy object internally created by
2449         Make_DT to compute the offset to the top of components referencing
2450         secondary dispatch tables.
2451         (Initialize_Tag): Do not initialize the offset-to-top field if it has
2452         been initialized initialized.
2453         * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
2454         * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
2455         (Make_DT): Create a dummy constant object if we can statically build
2456         secondary dispatch tables.
2457         (Make_Secondary_DT): For statically allocated secondary dispatch tables
2458         use the dummy object to compute the offset-to-top field value by means
2459         of the attribute 'Position.
2461 2017-10-09  Bob Duff  <duff@adacore.com>
2463         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
2464         code so if BIPAlloc is not passed in, it will likely raise
2465         Program_Error instead of cause miscellaneous chaos.
2466         (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
2467         as for the other Is_B-I-P... functions.
2468         * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
2469         aggregate whose ancestor part is a build-in-place call returning a
2470         nonlimited type, transform the assignment to the ancestor part to use a
2471         temp.
2472         * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
2473         creating an Itype for a library unit entity.
2474         (Check_Initialization): Avoid spurious error message on
2475         internally-generated call.
2476         * sem_ch5.adb (Analyze_Assignment): Handle the case where the
2477         right-hand side is a build-in-place call. This didn't happen when b-i-p
2478         was only for limited types.
2479         * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
2480         implies >= Ada 2005.
2481         * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
2482         repeatedly.
2483         * sem_util.adb (Next_Actual): Handle case of build-in-place call.
2485 2017-10-09  Arnaud Charlet  <charlet@adacore.com>
2487         * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
2489 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
2491         * libgnarl/s-taprob.adb: Minor whitespace fix.
2493 2017-10-09  Bob Duff  <duff@adacore.com>
2495         * namet.ads: Minor comment fix.
2497 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
2499         * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
2500         just like other program units listed in Ada RM 10.1(1).
2502 2017-10-09  Justin Squirek  <squirek@adacore.com>
2504         * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
2506 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2508         * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
2509         actual for a formal package is an instantiation of a child unit, create
2510         a freeze node for the instance of the parent if it appears in the same
2511         scope and is not frozen yet.
2513 2017-10-09  Pierre-Marie de Rodat  <derodat@adacore.com>
2515         * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
2516         in-source documentation for tagged types's Offset_To_Top.
2518 2017-10-09  Bob Duff  <duff@adacore.com>
2520         * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
2521         confusing.  Same for N_Loc.  Remove assumption that b-i-p implies
2522         limited.  This is for the case of a function call that occurs as the
2523         default for a record component.
2524         (Expand_N_Object_Declaration): Deal with the case where expansion has
2525         created an object declaration initialized with something like
2526         F(...)'Reference.
2527         * exp_ch3.adb: Minor reformatting.
2529 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2531         * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
2532         the attribute is an object, but it may appear within a conversion. The
2533         object itself must be retrieved when generating the range test that
2534         implements the validity check on a scalar type.
2536 2017-10-05  Eric Botcazou  <ebotcazou@adacore.com>
2538         PR ada/82393
2539         * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
2540         * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
2542 2017-10-02  Eric Botcazou  <ebotcazou@adacore.com>
2543             Pierre-Marie de Rodat  <derodat@adacore.com>
2545         PR ada/82384
2546         * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
2547         (time_t): Change from derived type to subtype.
2548         (timeval): Use suseconds_t for tv_usec.
2549         * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
2551 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
2553         * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
2554         handling the form (plus/mult (convert @0) @1).
2556 2017-09-29  Bob Duff  <duff@adacore.com>
2558         * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
2559         what we had before.
2560         (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
2561         change. Set the Etype in the class-wide case. This fixes a regression
2562         in the libadalang test suite.
2564 2017-09-29  Joel Brobecker  <brobecker@adacore.com>
2566         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2567         doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
2568         in comment markup.
2569         * gnat_ugn.texi: Regenerate.
2571 2017-09-29  Justin Squirek  <squirek@adacore.com>
2573         * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
2574         fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
2575         gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
2576         sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
2577         for checking source file status and error message and/or call to
2578         Read_Source_File.
2579         * libgnat/s-os_lib.ads: Add new potential value constant for
2580         uninitialized file descriptors.
2581         * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
2582         return result of IO to encompass a read access failure in addition to a
2583         file-not-found error.
2585 2017-09-29  Bob Duff  <duff@adacore.com>
2587         * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
2588         functions returning nonlimited types. Allow for qualified expressions
2589         and type conversions.
2590         (Expand_N_Extended_Return_Statement): Correct the computation of
2591         Func_Bod to allow for child units.
2592         (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
2593         limited (initialization of In_Place_Expansion), and implies >= Ada
2594         2005.
2595         (Is_Build_In_Place_Result_Type): New function to accompany
2596         Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
2597         sometimes we just have the type on our hands, not the function.  For
2598         now, does the same thing as the old version, so build-in-place is
2599         disabled for nonlimited types, except that you can use -gnatd.9 to
2600         enable it.
2601         * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
2602         accompany Is_Build_In_Place_Function and
2603         Is_Build_In_Place_Function_Call, because sometimes we just have the
2604         type on our hands, not the function.
2605         (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
2606         cases.
2607         (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
2608         questionable code at the end that was setting the Etype.
2609         * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
2610         determine whether "return (...agg...);" is returning from a
2611         build-in-place function.
2612         (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
2613         Remove assumption that b-i-p implies limited (initialization of
2614         In_Place_Expansion).
2615         (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
2616         an unchecked conversion.  Add assertions.
2617         (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
2618         secondary stack here, just because the type needs finalization.  That
2619         code is obsolete.
2620         (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
2621         For "return (...agg...);" don't assume b-i-p implies limited.
2622         Needs_Finalization does not imply secondary stack.
2623         (Expand_Array_Aggregate): Named notation.  Reverse the sense of
2624         Component_OK_For_Backend -- more readability with fewer double
2625         negatives.
2626         * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
2627         b-i-p implies >= Ada 2005.
2628         * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
2629         b-i-p implies >= Ada 2005.  Remove Adjust if we're building the return
2630         object of an extended return statement in place.
2631         * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
2632         Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
2633         b-i-p implies >= Ada 2005.
2634         * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
2635         b-i-p implies >= Ada 2005.
2636         * exp_ch7.adb: Comment fix.
2637         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
2638         assumptions that b-i-p implies >= Ada 2005.
2639         * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
2640         b-i-p implies >= Ada 2005.
2641         * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
2642         (Expr), in case Pool_Id is not set.
2643         (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
2644         qualified or converted.
2645         (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
2646         (Param)) = N_Identifier; that's all it could be.
2647         * sinfo.ads: Comment fixes.
2648         * snames.ads-tmpl: Comment fixes.
2649         * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
2651 2017-09-29  Justin Squirek  <squirek@adacore.com>
2653         * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
2654         all cases related to marking entity identifiers.
2656 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
2658         * adaint.c (win32_wait): Properly handle error and take into account
2659         the WIN32 limitation on the number of simultaneous wait objects.
2661 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
2663         * cal.c: Minor proofreading.
2665 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
2667         * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
2668         * gnat_ugn.texi: Regenerate.
2670 2017-09-29  Bob Duff  <duff@adacore.com>
2672         * lib-xref.ads: Comment fix.
2674 2017-09-29  Bob Duff  <duff@adacore.com>
2676         * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
2677         Discriminants can't need finalization.
2679 2017-09-29  Ed Schonberg  <schonberg@adacore.com>
2681         * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
2682         for types in expression if the function is within a generic unit.
2683         * sem_res.adb (Resolve): In a generic context do not freeze an
2684         expression, unless it is an entity. This exception is solely for the
2685         purpose of detecting illegal uses of deferred constants in generic
2686         units.
2687         * sem_res.adb: Minor reformatting.
2689 2017-09-29  Justin Squirek  <squirek@adacore.com>
2691         * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
2692         redundant warnings.
2694 2017-09-29  Yannick Moy  <moy@adacore.com>
2696         * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
2698 2017-09-29  Eric Botcazou  <ebotcazou@adacore.com>
2700         * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
2701         * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
2702         Document the effect of pragma Optimize_Alignment (Space) on non-packed
2703         record types.
2704         * gnat_rm.texi: Regenerate.
2706 2017-09-25  Justin Squirek  <squirek@adacore.com>
2708         * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
2709         exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
2710         gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
2711         gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
2712         libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
2713         libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
2714         libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
2715         libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
2716         libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
2717         libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
2718         put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
2719         sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
2720         Removal of ineffective use-clauses.
2721         * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
2722         constant folded barriers.
2723         * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
2724         Subtype_Marks and Names list in use-clause nodes to their new singular
2725         counterparts (e.g. Subtype_Mark, Name).
2726         * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
2727         Prev_Ids and More_Ids in use-clause nodes.
2728         (P_Use_Clause): Modify to take a list as a parameter.
2729         (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
2730         subtype_marks within an aggregate use-clauses into individual clauses.
2731         * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
2732         P_Use_Clause to match its new behavior.
2733         * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
2734         * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
2735         errors.
2736         * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
2737         Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
2738         the declarative region.
2739         * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
2740         after analysis (Analyze_Package_Specification): Update use clause chain
2741         when there is no body.
2742         * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
2743         parameter to determine weither the installation of scopes should also
2744         propagate on the use-clause "chain".
2745         (Mark_Use_Clauses): Created to traverse use-clause chains and determine
2746         what constitutes a valid "use" of a clause.
2747         (Update_Use_Clause_Chain): Created to aggregate common machinary used
2748         to clean up use-clause chains (and warn on ineffectiveness) at the end
2749         of declaritive regions.
2750         * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
2751         package name from a use-package clause.
2752         (Analyze_Package_Name_List): Created to perform analysis on a list of
2753         package names (similar to Analyze_Package_Name).
2754         (Find_Most_Prev): Created to traverse to the beginning of a given
2755         use-clause chain.
2756         (Most_Decendant_Use_Clause): Create to identify which clause from a
2757         given set is highest in scope (not always the most prev).
2758         (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
2759         handle the new chaining algorithm, also many changes related to
2760         redundant clauses. A new parameter has also been added to force
2761         installation to handle certain cases.
2762         * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
2763         Analyze_Task_Body): Mark use clauses on relevant entities.
2764         * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
2765         Install_Parents): Add parameter to determine weither the installation
2766         of scopes should also propagate on the use-clause "chain".
2767         * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
2768         Install_Context to avoid redundant chaining of use-clauses.
2769         * sem_ch13.adb: Minor reformatting.
2770         * sem_res.adb (Resolve): Mark use clauses on operators.
2771         (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
2772         entities.
2773         * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
2774         Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
2775         represent any given clause's usage/reference/necessity.
2776         (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
2777         nodes to allow loose chaining of redundant clauses.
2778         (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
2779         Set_More_Ids, Set_Name): Modify set procedure calls to reflect
2780         reorganization in node fields.
2781         * types.ads (Source_File_Index): Adjust index bounds.
2782         (No_Access_To_Source_File): New constant.
2784 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2786         * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
2787         the expression to be used in the generated attribute specification
2788         (rather than relocating it) to avoid resolving a potentially malformed
2789         tree when the expression is resolved through an ASIS-specific call to
2790         Resolve_Aspect_Expressions.  This manifests itself as a crash on a
2791         function with parameter associations.
2793 2017-09-25  Yannick Moy  <moy@adacore.com>
2795         * exp_spark.adb (Expand_SPARK_Indexed_Component,
2796         Expand_SPARK_Selected_Component): New procedures to insert explicit
2797         dereference if required.
2798         (Expand_SPARK): Call the new procedures.
2800 2017-09-25  Patrick Bernardi  <bernardi@adacore.com>
2802         * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
2803         libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
2804         libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
2805         libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
2806         libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
2808 2017-09-25  Vasiliy Fofanov  <fofanov@adacore.com>
2810         * adaint.c (win32_wait): Properly handle error and take into account
2811         the WIN32 limitation on the number of simultaneous wait objects.
2813 2017-09-25  Yannick Moy  <moy@adacore.com>
2815         * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
2816         invariant procedure in GNATprove mode.
2817         * sem_ch5.adb (Analyze_Assignment): Likewise.
2819 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
2821         * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
2822         "back-end" in comments.
2824 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2826         * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
2827         call that appears in a classwide precondition and that mentions an
2828         access formal of the subprogram, must use the accessibility level of
2829         the actual in the call. This is one case in which a reference to a
2830         formal parameter appears outside of the body of the subprogram.
2832 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2834         * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
2835         for GNATprove.
2836         (Resolve_Entry): Clean up predicate
2838 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2840         * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
2841         than Program_Error because U_E is more in line with respect to the
2842         intended behavior.
2844 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2846         * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
2847         Storage_Size does not freeze, and thus can include references to
2848         deferred constants.
2850 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2852         * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
2853         reference when it appears within a pragma of no significance to SPARK.
2854         (In_Insignificant_Pragma): New routine.
2855         * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
2857 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2859         * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
2860         actual is a renaming, indicate that it is the renamed package that must
2861         be frozen before the instantiation.
2863 2017-09-25  Yannick Moy  <moy@adacore.com>
2865         * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
2866         of dimensionality system in GNAT UG.
2867         * gnat_ugn.texi: Regenerate.
2869 2017-09-25  Yannick Moy  <moy@adacore.com>
2871         * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
2872         GNATprove_Mode when switch -gnatdF used.
2874 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
2876         * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
2877         the backend.
2879 2017-09-25  Javier Miranda  <miranda@adacore.com>
2881         * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
2882         expansion of user-defined enumeration types when the generation of
2883         names for enumeration literals is suppressed.
2885 2017-09-25  Gary Dismukes  <dismukes@adacore.com>
2887         * libgnarl/s-taprop__linux.adb: Minor reformatting.
2889 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2891         * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
2892         that appear as selector names of parameter associations, as these are
2893         never resolved by visibility.
2895 2017-09-25  Justin Squirek  <squirek@adacore.com>
2897         * sem_res.adb (Resolve_Entry): Generate reference for index entities.
2899 2017-09-25  Doug Rupp  <rupp@adacore.com>
2901         * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
2903 2017-09-25  Javier Miranda  <miranda@adacore.com>
2905         * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
2906         (Expand_User_Defined_Enumeration_Image): New subprogram.
2907         (Expand_Image_Attribute): Enable speed-optimized expansion of
2908         user-defined enumeration types when we are compiling with optimizations
2909         enabled.
2911 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
2913         * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
2914         routine is already provided by Einfo.
2915         * einfo.adb (Has_Null_Abstract_State): Replace with the body from
2916         Sem_Util, which had better comments and avoided double calls to
2917         Abstract_State.
2919 2017-09-25  Bob Duff  <duff@adacore.com>
2921         * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
2923 2017-09-25  Doug Rupp  <rupp@adacore.com>
2925         * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
2926         (Compute_Base_Monotonic_Clock): New function.
2927         (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
2928         (Timed_Delay): Likewise.
2929         (Monotonic_Clock): Likewise.
2930         * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
2932 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2934         * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
2935         previous change.
2937 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2939         * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
2940         Minor reformatting.
2942 2017-09-20  Alexandre Oliva <aoliva@redhat.com>
2944         * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
2946 2017-09-18  Bob Duff  <duff@adacore.com>
2948         * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
2949         reference types in the access-to-access case.
2951 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
2953         * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
2954         of the "aliased" keyword on the prefix from here to...
2955         (Resolve_Attribute) <Attribute_Access>: ...here.  Remove useless call
2956         to Check_No_Implicit_Aliasing.
2957         * sinfo.ads (Non_Aliased_Prefix): Delete.
2958         (Set_Non_Aliased_Prefix): Likewise.
2959         * sinfo.adb (Non_Aliased_Prefix): Delete.
2960         (Set_Non_Aliased_Prefix): Likewise.
2962 2017-09-18  Bob Duff  <duff@adacore.com>
2964         * exp_ch5.adb (Build_Formal_Container_Iteration,
2965         Expand_Formal_Container_Element_Loop): Convert the container to the
2966         root type before passing it to the iteration operations, so it will be
2967         of the right type.
2969 2017-09-18  Bob Duff  <duff@adacore.com>
2971         * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
2973 2017-09-18  Bob Duff  <duff@adacore.com>
2975         * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
2976         and it's a bit-packed array, pass False to the Consider_IS parameter of
2977         Needs_Simple_Initialization.
2979 2017-09-18  Hristian Kirtchev  <kirtchev@adacore.com>
2981         * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
2982         the preexisting body.
2983         * sem_prag.adb (Check_Inline_Always_Placement): New routine.
2984         (Process_Inline): Verify the placement of pragma Inline_Always. The
2985         pragma must now appear on the initial declaration of the related
2986         subprogram.
2988 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
2990         * sem_ch3.adb (Analyze_Declarations): In ASIS mode,  At the end of the
2991         declarative list in a subprogram body, analyze aspext specifications to
2992         provide basic semantic information, because otherwise the aspect
2993         specifications might only be snalyzed during expansion, when related
2994         subprograms are generated.
2996 2017-09-18  Bob Duff  <duff@adacore.com>
2998         * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
2999         validity checks have rewritten the tree.
3001 2017-09-18  Bob Duff  <duff@adacore.com>
3003         * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
3005 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
3007         * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
3008         qualified exxpression for an aggregate in a generic unit, verify that
3009         the scope of the type is itself visible and not hidden, so that the
3010         qualified expression is correctly resolved in any instance.
3012 2017-09-18  Bob Duff  <duff@adacore.com>
3014         * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
3015         mark refers to the current instance. Set the type to Any_Type in that
3016         case, to avoid later crashes.
3018 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
3020         * exp_ch3.adb (Replace_Discriminant_References): New procedure,
3021         subsidiary of Build_Assignment, used to handle the initialization code
3022         for a mutable record component whose default value is an aggregate that
3023         sets the values of the discriminants of the components.
3025 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
3027         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
3028         the entity as being volatile for an overlay that toggles the scalar
3029         storage order.
3031 2017-09-18  Fedor Rybin  <frybin@adacore.com>
3033         * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
3034         options -U main and --harness-only are not compatible.
3036 2017-09-18  Hristian Kirtchev  <kirtchev@adacore.com>
3038         * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
3040 2017-09-18  Piotr Trojanek  <trojanek@adacore.com>
3042         * einfo.ads (Is_Imported): Update comment, as this
3043         routine also applies to constants.
3045 2017-09-18  Yannick Moy  <moy@adacore.com>
3047         * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
3048         holding state.
3050 2017-09-18  Justin Squirek  <squirek@adacore.com>
3052         * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
3053         constant indication for Pragma_Linker_Section.
3055 2017-09-18  Bob Duff  <duff@adacore.com>
3057         Alternate fix for PR ada/71358
3058         * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
3059         Instead, make a local copy of Config, and if it's null, allocate an
3060         empty Command_Line_Configuration_Record, so we won't crash on null
3061         pointer dereference.
3063 2017-09-16  Eric Botcazou  <ebotcazou@adacore.com>
3065         * libgnarl/a-intnam__rtems.ads: Update copyright date.
3066         * libgnarl/s-interr__hwint.adb: Likewise.
3067         * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
3068         * libgnarl/s-osinte__rtems.adb: Likewise.
3069         * libgnarl/s-osinte__rtems.ads: Likewise.
3071 2017-09-13  Nicolas Roche  <roche@adacore.com>
3073         * Make-lang.in: In the fallback mechanim, parse the associated .ali
3074         file and try to guess the locations of dependencies.
3076 2017-09-13  Eric Botcazou  <ebotcazou@adacore.com>
3078         * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
3079         the suppression status of Alignment_Check on the current scope.
3080         (Alignment_Checks_Suppressed): New function to use the saved instead of
3081         the current suppression status of Alignment_Check.
3082         (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
3083         (Analyze_Attribute_Definition_Clause): Instead of manually appending to
3084         the table, call Register_Address_Clause_Check.
3085         (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
3086         recorded address clause instead of its entity.
3088 2017-09-13  Jerome Guitton  <guitton@adacore.com>
3090         * libgnarl/s-tpopsp__vxworks-tls.adb,
3091         libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
3092         (Self): Register thread if task id is null.
3094 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
3096         * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
3098 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
3100         * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
3101         from an entity to only scope index, as a mapping from an entity to the
3102         same entity was useless.
3103         (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
3104         to E.
3105         (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
3106         to E.
3107         (Is_Constant_Object_Without_Variable_Input): remove local "Result"
3108         variable, just use return statements.
3110 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
3112         * libgnarl/s-vxwext__kernel-smp.adb,
3113         libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
3114         New file.
3116 2017-09-13  Hristian Kirtchev  <kirtchev@adacore.com>
3118         * einfo.adb: Flag42 is now Is_Controlled_Active.
3119         (Is_Controlled): This attribute is now synthesized.
3120         (Is_Controlled_Active): This attribute is now an explicit flag rather
3121         than a synthesized attribute.   (Set_Is_Controlled): Removed.
3122         (Set_Is_Controlled_Active): New routine.
3123         (Write_Entity_Flags): Update the output for Flag42.
3124         * einfo.ads: Update the documentation of the following attributes:
3125         Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
3126         and Is_Controlled_Active have swapped their functionality.
3127         (Is_Controlled): Renamed to Is_Controlled_Active.
3128         (Is_Controlled_Active): Renamed to Is_Controlled.
3129         (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
3130         * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
3131         Is_Controlled.
3132         * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
3133         (Needs_Finalization): Code clean up. Remove the tests for
3134         Disable_Controlled because a) they were incorrect as they would reject
3135         a type which is sublect to the aspect, but may contain controlled
3136         components, and b) they are no longer necessary.
3137         * exp_util.ads (Needs_Finalization): Update comment on documentation.
3138         * freeze.adb (Freeze_Array_Type): Restore the original use of
3139         Is_Controlled.
3140         (Freeze_Record_Type): Restore the original use of Is_Controlled.
3141         * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
3142         Is_Controlled.
3143         (Array_Type_Declaration): Restore the original use of Is_Controlled.
3144         (Build_Derived_Private_Type): Restore the original use of
3145         Is_Controlled.
3146         (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
3147         type derived from Ada.Finalization.[Limited_]Controlled.
3148         (Build_Derived_Type): Restore the original use of Is_Controlled.
3149         (Record_Type_Definition): Restore the original use of Is_Controlled.
3150         * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
3151         Is_Controlled.
3152         * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
3153         (Analyze_Aspect_Specifications): Use routine
3154         Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
3156 2017-09-13  Vincent Celier  <celier@adacore.com>
3158         * clean.adb (Gnatclean): Fix error when looking for target
3159         of <target>-gnatclean
3161 2017-09-13  Javier Miranda  <miranda@adacore.com>
3162             Ed Schonberg  <schonberg@adacore.com>
3164         * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
3165         expanded name that designates the current instance of a child unit in
3166         its own body and appears as the prefix of a reference to an entity
3167         local to the child unit.
3169 2017-09-12  Bob Duff  <duff@adacore.com>
3171         * sem_warn.adb: Minor comment.
3173 2017-09-12  Bob Duff  <duff@adacore.com>
3175         * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
3176         libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
3177         be Default_Initialized_Item, and apply pragma Unmodified to it,
3178         to suppress the warning.
3180 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
3182         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
3183         for access types.
3185 2017-09-12  Yannick Moy  <moy@adacore.com>
3187         * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
3188         together with Global when ignoring one in CodePeer mode.
3190 2017-09-12  Javier Miranda  <miranda@adacore.com>
3192         * sem_ch3.adb (Analyze_Declarations): In nested
3193         package declarations that have a private part enable missing check
3194         of the RM rule 13.1.1(11/3): usage names in aspect definitions are
3195         resolved at the end of the immediately enclosing declaration list.
3197 2017-09-12  Bob Duff  <duff@adacore.com>
3199         * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
3200         Empty.
3202 2017-09-12  Georges-Axel Jaloyan  <jaloyan@adacore.com>
3204         * debug.adb: Reserving flag -gnatdF for safe pointer checking.
3205         * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
3206         dF flag.
3207         * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
3208         in preparation for the evolution of the SPARK language that
3209         includes a pointer analysis for checking non-aliasing of access
3210         types. The Check_Safe_Pointers function is the entry point, and
3211         will traverse the AST and raise compile-time errors everytime
3212         it detects non-begign aliasing.  Detailed comments are present
3213         in the sem_spark.ads file.
3214         * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
3215         functions to iterate over the list of globals of a subprogram.
3216         * libgnat/system.ads: Add restriction No_Finalization.
3217         * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
3218         dependency on g-dynhta.adb.
3220 2017-09-12  Bob Duff  <duff@adacore.com>
3222         * sem_ch6.adb (Analyze_Expression_Function): Call
3223         Check_Dynamically_Tagged_Expression.
3224         * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
3225         "and then Is_Tagged_Type (Typ)" because there is an earlier
3226         "Assert (Is_Tagged_Type (Typ))".
3228 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
3230         * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
3232 2017-09-11  Arnaud Charlet  <charlet@adacore.com>
3234         * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
3235         * doc/gnat_ugn/platform_specific_information.rst: Remove doc
3236         for no longer supported platforms.
3237         * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
3238         description of the semantics for dimensionality analysis.
3239         * gnat_ugn.texi: Regenerated.
3241 2017-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3243         * freeze.adb (Has_Incomplete_Compoent): Delete.
3244         (Freeze_Profile):
3245         Do not inhibit the freezing of the profile of an expression
3246         function here.
3247         (Freeze_Subprogram): Do not re-create extra formals.
3248         * sem_ch6.adb (Analyze_Expression_Function): Always
3249         pre-analyze the expression if the function is not a completion.
3250         (Analyze_Subprogram_Body_Helper): For the body generated
3251         from an expression function that is not a completion, do
3252         not freeze the profile and temporary mask the types declared
3253         outside the expression that are not yet frozen.
3254         * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
3255         during the pre-analysis of an expression function.
3257 2017-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3259         * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
3260         (gigi): Likewise.
3262 2017-09-11  Yannick Moy  <moy@adacore.com>
3264         * lib-xref-spark_specific.adb: Minor rewrite.
3266 2017-09-11  Jerome Lambourg  <lambourg@adacore.com>
3268         * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
3269         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
3270         renaming into account.
3272 2017-09-11  Jerome Lambourg  <lambourg@adacore.com>
3274         * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
3275         * gcc-interface/Makefile.in: Take this renaming into account.
3277 2017-09-11  Arnaud Charlet  <charlet@adacore.com>
3279         * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
3280         longer used.
3282 2017-09-11  Yannick Moy  <moy@adacore.com>
3284         * sem_util.adb (Check_Result_And_Post_State):
3285         Do not issue a warning about missing reference to an outcome if
3286         the subprogram is ghost and has no outputs.
3287         * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
3288         reformatting.
3290 2017-09-11  Yannick Moy  <moy@adacore.com>
3292         * gnat1drv.adb (Adjust_Global_Switches): Set
3293         Check_Validity_Of_Parameters to False in GNATprove mode.
3294         * opt.ads (Check_Validity_Of_Parameters): Document switch to
3295         set option.
3297 2017-09-09  Pierre-Marie de Rodat  <derodat@adacore.com>
3299         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
3300         generate debug info for inner record types if -fgnat-encodings=minimal.
3301         (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
3302         type as the debug type.
3304 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3306         * gcc-interface/decl.c (components_to_record): Do not reorder in non-
3307         packed record types if pragma Optimize_Alignment (Space) is enabled.
3309 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3311         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
3312         limits for expression functions.
3313         (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
3315 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3317         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
3318         layout of the record from the parent type only if both are or are not
3319         unchecked unions.
3320         (is_stored_discriminant): Return false for an unchecked union.
3322 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3324         * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
3325         return NULL_EXPR.
3327 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3329         * gcc-interface/decl.c (promote_object_alignment): New function taken
3330         from...
3331         (gnat_to_gnu_entity) <E_Variable>: ...here.  Invoke it.
3332         (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
3333         create a padding type on success before doing the atomic check.
3335 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3337         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
3338         promotion to static memory earlier in the processing.
3340 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3342         * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
3343         and TYPE_BY_REFERENCE_P flags on types after various promotions.
3344         * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
3345         Consider all kinds of entities.
3347 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3349         * gcc-interface/utils.c (convert): When converting to a padding type,
3350         reuse an existing CONSTRUCTOR if it has got the right size.
3352 2017-09-08  Nicolas Roche  <roche@adacore.com>
3354         * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
3355         source in libgnat/
3356         * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
3357         a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
3358         i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
3359         a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
3360         a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
3361         s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
3362         a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
3363         s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
3364         a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
3365         a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
3366         a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
3367         a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
3368         a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
3369         s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
3370         a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
3371         s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
3372         s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
3373         a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
3374         a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
3375         system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
3376         a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
3377         a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
3378         s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
3379         g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
3380         g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
3381         g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
3382         a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
3383         calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
3384         a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
3385         a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
3386         a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
3387         a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
3388         directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
3389         system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
3390         system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
3391         a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
3392         system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
3393         g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
3394         a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
3395         s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
3396         s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
3397         g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
3398         a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
3399         a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
3400         g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
3401         a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
3402         a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
3403         a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
3404         g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
3405         a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
3406         a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
3407         s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
3408         a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
3409         s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
3410         s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
3411         s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
3412         a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
3413         system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
3414         s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
3415         g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
3416         g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
3417         s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
3418         s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
3419         g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
3420         g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
3421         g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
3422         system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
3423         g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
3424         g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
3425         s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
3426         i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
3427         g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
3428         s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
3429         g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
3430         s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
3431         a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
3432         a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
3433         g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
3434         s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
3435         g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
3436         g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
3437         a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
3438         a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
3439         s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
3440         s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
3441         a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
3442         a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
3443         a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
3444         s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
3445         s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
3446         s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
3447         a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
3448         a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
3449         s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
3450         a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
3451         a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
3452         s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
3453         a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
3454         g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
3455         a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
3456         a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
3457         s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
3458         a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
3459         g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
3460         a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
3461         s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
3462         system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
3463         a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
3464         a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
3465         s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
3466         s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
3467         g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
3468         s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
3469         g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
3470         system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
3471         g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
3472         g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
3473         a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
3474         a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
3475         g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
3476         a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
3477         system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
3478         s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
3479         g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
3480         a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
3481         a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
3482         a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
3483         s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
3484         s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
3485         g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
3486         a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
3487         a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
3488         a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
3489         a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
3490         g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
3491         g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
3492         a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
3493         g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
3494         a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
3495         s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
3496         a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
3497         s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
3498         s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
3499         a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
3500         s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
3501         a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
3502         s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
3503         g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
3504         g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
3505         a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
3506         s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
3507         a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
3508         a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
3509         a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
3510         s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
3511         s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
3512         a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
3513         a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
3514         system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
3515         s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
3516         a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
3517         a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
3518         s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
3519         s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
3520         a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
3521         a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
3522         i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
3523         s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
3524         a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
3525         s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
3526         g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
3527         s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
3528         a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
3529         a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
3530         a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
3531         a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
3532         s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
3533         a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
3534         a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
3535         a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
3536         g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
3537         s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
3538         g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
3539         a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
3540         system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
3541         a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
3542         s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
3543         a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
3544         g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
3545         i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
3546         s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
3547         a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
3548         g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
3549         s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
3550         s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
3551         a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
3552         a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
3553         a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
3554         a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
3555         a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
3556         g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
3557         s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
3558         a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
3559         a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
3560         a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
3561         s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
3562         s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
3563         s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
3564         s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
3565         g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
3566         a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
3567         s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
3568         a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
3569         a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
3570         a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
3571         s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
3572         a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
3573         s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
3574         a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
3575         g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
3576         i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
3577         s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
3578         s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
3579         a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
3580         s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
3581         s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
3582         s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
3583         s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
3584         a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
3585         s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
3586         a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
3587         s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
3588         s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
3589         s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
3590         s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
3591         s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
3592         a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
3593         g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
3594         a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
3595         s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
3596         system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
3597         g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
3598         a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
3599         a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
3600         a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
3601         s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
3602         a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
3603         g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
3604         a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
3605         s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
3606         a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
3607         a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
3608         a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
3609         a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
3610         s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
3611         g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
3612         g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
3613         system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
3614         s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
3615         s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
3616         a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
3617         g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
3618         a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
3619         s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
3620         s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
3621         s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
3622         unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
3623         s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
3624         g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
3625         a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
3626         s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
3627         a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
3628         a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
3629         to libgnat subdirectory.
3631 2017-09-08  Yannick Moy  <moy@adacore.com>
3633         * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
3634         return the entity associated with the call.
3635         * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
3636         Replace the internal Get_Function_Id with the new
3637         Sem_Aux.Get_Called_Entity.
3638         (Iterate_Call_Parameters): New
3639         procedure to iterate on formals and actuals at the same time.
3640         * sem_ch12.adb (Analyze_Subprogram_Instantiation):
3641         Set SPARK_Mode from spec when set, for analysis
3642         of instance. Restore after analysis of instance.
3643         (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
3644         set, for analysis of body instance. Restored automatically at
3645         the end of the subprogram.
3646         * gnat1drv.adb (Adjust_Global_Switches): Set
3647         Check_Validity_Of_Parameters to False in GNATprove mode.
3648         * opt.ads (Check_Validity_Of_Parameters): Document switch to
3649         set option.
3651 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3653         * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
3654         (New_Copy_Tree): ...there.  Reset the hash tables only if they
3655         were used in the previous invocation.
3656         * s-htable.adb: Fix typo.
3658 2017-09-08  Bob Duff  <duff@adacore.com>
3660         * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
3662 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3664         * sem_aggr.adb: minor style fix.
3666 2017-09-08  Bob Duff  <duff@adacore.com>
3668         * sprint.adb (Write_Corresponding_Source): Ignore if there is
3669         no current source file.
3670         (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
3671         Print something helpful in case N is invalid.
3672         * sprint.ads: Minor comment fix.
3674 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3676         * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
3677         access types.
3679 2017-09-08  Bob Duff  <duff@adacore.com>
3681         * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
3682         Ada_2020, along the same lines as the other Ada version pragmas.
3684 2017-09-08  Gary Dismukes  <dismukes@adacore.com>
3686         * sem_ch12.adb: Minor typo fixes and reformatting.
3688 2017-09-08  Yannick Moy  <moy@adacore.com>
3690         * sem_aggr.adb (Resolve_Record_Aggregate):
3691         Rewrite bounds of aggregate subexpressions which may depend on
3692         discriminants of the enclosing aggregate.
3694 2017-09-08  Yannick Moy  <moy@adacore.com>
3696         * sem_ch5.adb: Prevent assertion failure on illegal code.
3698 2017-09-08  Yannick Moy  <moy@adacore.com>
3700         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
3701         calling Renamed_Entity on an entity which cannot be a renaming.
3703 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3705         * exp_aggr.adb: Add with & use clause for Urealp.
3706         (Aggr_Assignment_OK_For_Backend): Accept (almost all)
3707         elementary types instead of just discrete types.
3708         * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
3709         * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
3710         Be prepared for the FP zero value in the memset case.  Add small
3711         guard.
3713 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3715         * s-htable.adb (Static_HTable.Reset): Use aggregate instead
3716         of loop.
3718 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
3720         * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
3721         of New_Copy because the latter leaves the syntactic structure of
3722         the tree inconsistent (a child is accessible through two parents)
3723         and prevents proper replication of itypes by subsequent calls
3724         to New_Copy_Tree.
3725         * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
3726         New_Copy because the latter leaves the syntactic structure of the
3727         tree inconsistent (a child is accessible through two parents)
3728         and prevents proper replication of itypes by subsequent calls
3729         to New_Copy_Tree.
3730         * sem_util.adb (In_Subtree): New routine.
3731         (New_Copy_Tree): Reimplemented.
3732         * sem_util.ads (In_Subtree): New routine.
3733         (New_Copy_Tree): Reimplemented.
3735 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3737         * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
3738         for aspect Default_Value is a static scalar value, but it does
3739         not freeze the type. Yhis allows for subsequent representation
3740         clauses for the type.
3742 2017-09-08  Javier Miranda  <miranda@adacore.com>
3744         * sem_ch8.adb (Find_Direct_Name.Undefined): Do
3745         not add entries into the undefined reference table when we are
3746         compiling with errors ignored.
3748 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3750         * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
3751         check if the instance is within an enclosing instance body. The
3752         formal package was legal in the enclosing generic, and is
3753         legal in the enclosing instantiation.  This optimisation may be
3754         applicable elsewhere, and it also removes spurious errors that
3755         may arise with on-the-fly processing  of instantiations that
3756         contain Inline_Always subprograms.
3758 2017-09-08  Vincent Celier  <celier@adacore.com>
3760         * gnatcmd.adb: Disregard empty argument of GNAT driver.
3762 2017-09-08  Justin Squirek  <squirek@adacore.com>
3764         * checks.adb (Insert_Valid_Check): Manually decorate
3765         the generated temporary for range valdity checks.
3767 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3769         * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
3771 2017-09-08  Justin Squirek  <squirek@adacore.com>
3773         * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
3774         case to handle underscore flags.
3775         * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
3776         new procedure to handle underscores.
3778 2017-09-08  Javier Miranda  <miranda@adacore.com>
3780         * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
3781         divisions with fixed point results to avoid generating twice
3782         the runtime check on divide by zero.
3783         * checks.adb (Apply_Divide_Checks): Ensure that operands are
3784         not evaluated twice (once for their runtime checks and once for
3785         their regular computation).
3787 2017-09-08  Yannick Moy  <moy@adacore.com>
3789         * sem_prag.adb (Analyze_Part_Of): Add missing
3790         return statements after issuing errors.  Add detection of
3791         out-of-order item and single concurrent type.
3793 2017-09-08  Nicolas Roche  <roche@adacore.com>
3795         * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
3796         s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
3797         s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
3798         s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
3799         a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
3800         a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
3801         s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
3802         s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
3803         a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
3804         s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
3805         s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
3806         s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
3807         s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
3808         s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
3809         s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
3810         s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
3811         s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
3812         s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
3813         a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
3814         s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
3815         s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
3816         s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
3817         s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
3818         s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
3819         s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
3820         s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
3821         s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
3822         a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
3823         s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
3824         s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
3825         s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
3826         a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
3827         s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
3828         s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
3829         s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
3830         a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
3831         s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
3832         s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
3833         s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
3834         s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
3835         s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
3836         a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
3837         g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
3838         a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
3839         g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
3840         s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
3841         s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
3842         g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
3843         s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
3844         s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
3845         s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
3846         s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
3847         a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
3848         a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
3850 2017-09-08  Arnaud Charlet <charlet@adacore.com>
3852         * doc/share/conf.py, doc/share/latex_elements.py,
3853         doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
3854         highlighting.
3856 2017-09-08  Arnaud Charlet <charlet@adacore.com>
3858         * gnat_rm.texi, gnat_ugn.texi,
3859         doc/gnat_ugn/the_gnat_compilation_model.rst,
3860         doc/gnat_ugn/getting_started_with_gnat.rst,
3861         doc/gnat_ugn/inline_assembler.rst,
3862         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3863         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
3864         doc/gnat_ugn/about_this_guide.rst,
3865         doc/gnat_ugn/platform_specific_information.rst,
3866         doc/gnat_ugn/example_of_binder_output.rst,
3867         doc/gnat_ugn/gnat_and_program_execution.rst,
3868         doc/gnat_ugn/gnat_utility_programs.rst,
3869         doc/gnat_rm/implementation_of_specific_ada_features.rst,
3870         doc/gnat_rm/interfacing_to_other_languages.rst,
3871         doc/gnat_rm/implementation_defined_aspects.rst,
3872         doc/gnat_rm/intrinsic_subprograms.rst,
3873         doc/gnat_rm/implementation_defined_characteristics.rst,
3874         doc/gnat_rm/implementation_advice.rst,
3875         doc/gnat_rm/implementation_defined_attributes.rst,
3876         doc/gnat_rm/compatibility_and_porting_guide.rst,
3877         doc/gnat_rm/standard_library_routines.rst,
3878         doc/gnat_rm/the_gnat_library.rst,
3879         doc/gnat_rm/implementation_defined_pragmas.rst,
3880         doc/gnat_rm/representation_clauses_and_pragmas.rst,
3881         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3882         doc/gnat_rm/obsolescent_features.rst,
3883         doc/gnat_rm/about_this_guide.rst,
3884         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
3885         doc/gnat_rm/implementation_of_ada_2012_features.rst,
3886         doc/gnat_ugn.rst,
3887         doc/gnat_rm.rst: Update documentation.
3889 2017-09-08  Arnaud Charlet <charlet@adacore.com>
3891         * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
3892         s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
3893         * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
3895 2017-09-08  Bob Duff  <duff@adacore.com>
3897         * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
3898         New routine to read the Tag robustly.
3899         * exp_attr.adb (Input): Change the expansion of 'Input,
3900         in the class-wide case, to call String_Input_Tag instead of
3901         String_Input_Blk_IO.
3903 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3905         * s-rident.ads (Restriction_Id): reorder enum
3906         literals, so that Pure_Barriers is no longer in range of the
3907         Cunit_Boolean_Restrictions subtype.
3909 2017-09-08  Nicolas Roche  <roche@adacore.com>
3911         * a-taster.ads, a-taster.adb: Move to libgnarl
3912         * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
3913         Add support for files in libgnarl.
3915 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3917         * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
3918         accessibility check to an interface conversion, whose purpose
3919         is to perform a pointer adjustment in a dispatching call.
3920         * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
3921         when the actual is a construct that involves a dereference of an
3922         expression that includes a formal of the enclosing subprogram,
3923         In such cases, the accessibility level of the actual is that of
3924         the corresponding formal, which is passed in as an additional
3925         actual in the outer call.
3927 2017-09-08  Bob Duff  <duff@adacore.com>
3929         * exp_intr.adb (Add_Source_Info): Do not decode
3930         file names; they were not encoded in the first place.
3932 2017-09-08  Bob Duff  <duff@adacore.com>
3934         * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
3935         exceptions instead of crashes. Check for absurdly long strings
3936         and empty strings. Empty strings cause trouble because they can
3937         have super-null ranges (e.g. 100..10), which causes Ext_Copy to
3938         be empty, which causes an array index out of bounds.
3939         * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
3940         instead of crashes.
3942 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3944         * sem_util.adb (Is_CCT_Instance): allow use in
3945         the context of protected types.
3947 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3949         * a-tigeli.adb: minor remove extra whitespace.
3951 2017-09-08  Gary Dismukes  <dismukes@adacore.com>
3953         * par-ch4.adb: Reformatting of an error message.
3955 2017-09-08  Javier Miranda  <miranda@adacore.com>
3957         * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
3958         identifiers to ensure their correct decoration of names on
3959         aspect expressions.
3961 2017-09-08  Yannick Moy  <moy@adacore.com>
3963         * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
3964         not skip a loop coming from source which is rewritten into a loop.
3966 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3968         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
3969         wrapper has convention Ada, to prevent spurious warnings on
3970         unconstrained array parameters.
3972 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3974         * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
3975         (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
3977 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3979         * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
3981 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3983         * exp_intr.adb (Append_Entity_Name): Move to ...
3984         * sem_util.ads, sem_util.adb: ... here to share it.
3985         (Subprogram_Name): New subprogram, to compute the name of the enclosing
3986         subprogram/entity.
3987         * errutil.adb (Error_Msg): Fill new field Node.
3988         * erroutc.ads (Subprogram_Name_Ptr): New.
3989         (Error_Msg_Object): New field Node.
3990         * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
3991         * errout.adb (Error_Msg): New variant with node id parameter.
3992         Fill new parameter Node when emitting messages. Revert previous
3993         changes for Include_Subprogram_In_Messages.
3994         * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
3995         generating warning message.
3997 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3999         * par-ch4.adb (P_Iterated_Component_Association): Place construct
4000         under -gnat2020 flag, given that it is a future feature of
4001         the language.
4002         * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
4003         defining identifier as referenced to prevent spurious warnings:
4004         corresponding loop is expanded into one or more loops whose
4005         variable has the same name, and the expression uses those names
4006         and not the original one.
4008 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4010         * sem_elab.adb (Check_A_Call): Do not consider
4011         references to internal variables for SPARK semantics.
4013 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4015         * inline.adb (In_Package_Spec): refine type of
4016         the parameter from Node_Id to Entity_Id.
4018 2017-09-08  Justin Squirek  <squirek@adacore.com>
4020         * exp_ch5.adb (Expand_Formal_Container_Loop):
4021         Reset the scope of the loop parameter after it is reanalyzed.
4023 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4025         * sem_util.ads (Set_Rep_Info): New inline procedure.
4026         * sem_util.adb (Set_Rep_Info): Implement it.
4027         * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
4028         always copy the representation aspects onto the subtype.
4030 2017-09-08  Georges-Alex Jaloyan  <jaloyan@adacore.com>
4032         * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
4033         Correction of the return type from access type to option type.
4034         (Simple_HTable): Moving the Instance_Data to ads file.
4036 2017-09-08  Yannick Moy  <moy@adacore.com>
4038         * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
4040 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4042         * opt.ads (Include_Subprogram_In_Messages): New variable.
4043         * errout.ads (Current_Subprogram_Ptr): New variable.
4044         * errout.adb (Error_Msg): Prepend current subprogram info
4045         in messages if Include_Subprogram_In_Messages is set.
4046         * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
4047         Current_Subprogram.
4048         * gnat1drv.adb (Adjust_Global_Switches): Set
4049         Include_Subprogram_In_Messages when -gnatdJ is set.
4050         * debug.adb: Document and reserve -gnatdJ.
4052 2017-09-08  Georges-Axel Jaloyan  <jaloyan@adacore.com>
4054         * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
4055         functions to iterate over simple hastables.
4056         (Load_Factor_HTable): Remove obsolete and inefficient implementation.
4058 2017-09-08  Javier Miranda  <miranda@adacore.com>
4060         * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
4061         missing checks on the presence of Entity() before checking the
4062         entity attributes.
4064 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4066         * sem_ch6.adb (Analyze_Expression_Function): Reorder some
4067         statements, use local variable and remove unnecessary processing.
4069 2017-09-08  Javier Miranda  <miranda@adacore.com>
4071         * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
4072         subprogram.
4073         (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
4074         (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4075         subprogram.
4076         (Unqual_BIP_Iface_Function_Call): New subprogram.
4077         * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
4078         subprogram containing code that was previously inside
4079         Make_Build_In_Place_Call_In_Object_Declaration since it is also
4080         required for one of the new subprograms.
4081         (Expand_Actuals):
4082         Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
4083         (Expand_N_Extended_Return_Statement): Extend the
4084         cases covered by an assertion on expected BIP object
4085         declarations.
4086         (Make_Build_In_Place_Call_In_Assignment):
4087         Removing unused code; found working on this ticket.
4088         (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
4089         that replaces the internal name of the renaming declaration
4090         into the new subprogram Replace_Renaming_Declaration_Id.
4091         (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
4092         (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
4093         New subprogram.
4094         (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4095         subprogram.
4096         (Unqual_BIP_Iface_Function_Call): New subprogram.
4097         * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
4098         subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
4099         * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
4100         subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4101         * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
4102         subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
4103         (Expand_N_Indexed_Component): Invoke the new subprogram
4104         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4105         (Expand_N_Selected_Component): Invoke the new subprogram
4106         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4107         (Expand_N_Slice): Invoke the new subprogram
4108         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4109         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
4110         Invoke the new subprogram
4111         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4113 2017-09-08  Javier Miranda  <miranda@adacore.com>
4115         * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
4116         access to interface types.  Remove also the accessibility check.
4118 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4120         * sem_ch6.adb (Freeze_Expr_Types): Really freeze
4121         all the types that are referenced by the expression.
4122         (Analyze_Expression_Function): Call Freeze_Expr_Types for
4123         a completion instead of manually freezing the type of the
4124         expression.
4125         (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
4127 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4129         * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
4130         New procedure, auxiliary to Expand_Pragma_Check, to handle
4131         references to the discriminants of a protected type within a
4132         precondition of a protected operation. This is needed because
4133         the original precondition has been analyzed in the context of
4134         the protected declaration, but in the body of the operation
4135         references to the discriminants have been replaved by references
4136         to the discriminants of the target object, and these references
4137         are only created when expanding the protected body.
4139 2017-09-08  Yannick Moy  <moy@adacore.com>
4141         * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
4142         Loop_Variant.
4144 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4146         * exp_attr.adb (Build_Record_VS_Func): If the record is an
4147         unchecked union, do not emit checks for its (non-existent)
4148         discriminants, or for variant parts that depend on them.
4150 2017-09-08  Justin Squirek  <squirek@adacore.com>
4152         * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
4153         Find_Comparison_Type.Try_One_Interp): Add check for generic
4154         instances.
4156 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4158         * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
4159         exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
4160         repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
4161         exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
4162         remaining references to AAMP_On_Target.
4164 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4166         * style.adb: Fix typo.
4168 2017-09-08  Javier Miranda  <miranda@adacore.com>
4170         * einfo.adb (Underlying_Type): Add missing support for class-wide
4171         types that come from the limited view.
4172         * exp_attr.adb (Attribute_Address): Check class-wide type
4173         interfaces using the underlying type to handle limited-withed
4174         types.
4175         (Attribute_Tag): Check class-wide type interfaces using
4176         the underlying type to handle limited-withed types.
4178 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4180         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
4181         over a subtype of a type with a static predicate, taking into
4182         account the predicate function of the parent type and the bounds
4183         given in the loop specification.
4184         * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
4185         a loop specification that is a subtype indication whose type mark
4186         is a type with a static predicate, inherit predicate function,
4187         used to build case statement for rewritten loop.
4189 2017-09-08  Justin Squirek  <squirek@adacore.com>
4191         * lib-load.adb: Modify printing of error message to exclude file
4192         line number.
4194 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4196         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
4197         don't inline subprograms declared in both visible and private
4198         parts of a package.
4199         (In_Package_Spec): previously In_Package_Visible_Spec; now
4200         detects subprograms declared both in visible and private parts
4201         of a package spec.
4203 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4205         * exp_util.adb (Build_Invariant_Procedure_Declaration): If
4206         the type is an anonymous array in an object declaration, whose
4207         component type has an invariant, use the object declaration
4208         as the insertion point for the invariant procedure, given that
4209         there is no explicit type declaration for an anonymous array type.
4211 2017-09-08  Bob Duff  <duff@adacore.com>
4213         * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
4215 2017-09-08  Bob Duff  <duff@adacore.com>
4217         * a-strfix.adb (Trim): Compute Low and High only if needed.
4219 2017-09-08  Justin Squirek  <squirek@adacore.com>
4221         * lib-load.adb (Load_Main_Source): Add error output in the case a
4222         source file is missing.
4224 2017-09-08  Bob Duff  <duff@adacore.com>
4226 PR ada/80888
4227         * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
4228         Default_WCEM by default (i.e. if the encoding is not specified
4229         by the Form string).
4231 2017-09-08  Bob Duff  <duff@adacore.com>
4233         * s-trasym.ads (Hexa_Traceback): If
4234         Suppress_Hex is True, print "..." instead of a hexadecimal
4235         address.
4236         * s-trasym.adb: Ignore No_Hex in this version.
4237         Misc cleanup.
4239 2017-09-08  Bob Duff  <duff@adacore.com>
4241         * debug.adb: Minor reformatting.
4243 2017-09-08  Bob Duff  <duff@adacore.com>
4245         * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
4246         code so it doesn't trigger an "uninit var" warning.
4248 2017-09-08  Nicolas Roche  <roche@adacore.com>
4250         * s-hibaen.ads: Remove obsolete file.
4252 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4254         * a-locale.ads: Add comment explaining the state of this package.
4256 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4258         * sem_util.adb (Is_CCT_Instance): Allow calls in the context
4259         of packages.
4260         * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
4261         allow calls in the context of package spec (for pragma
4262         Initializes) and bodies (for pragma Refined_State).
4264 2017-09-08  Bob Duff  <duff@adacore.com>
4266         * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
4267         new Exp.
4269 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4271         * debug.adb (dA): Adjust comment.
4272         * gnat1drv.adb (Gnat1drv): Likewise.
4273         * opt.ads (List_Representation_Info_Extended): New variable.
4274         * repinfo.adb (List_Record_Info): Split implementation into...
4275         (Compute_Max_Length): ...this.  Recurse on records if requested.
4276         (List_Record_Layout): Likewise.
4277         * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
4278         statement, accept '0' and set List_Representation_Info_Extended
4279         on 'e'.
4280         * usage.adb (Usage): Document new -gnatRe variant.
4282 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4284         * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
4285         Do not save the given entity in the global variable Default_Pool
4286         if the pragma appears within a generic unit.
4288 2017-09-08  Bob Duff  <duff@adacore.com>
4290         * errout.adb (Delete_Warning): Do not
4291         decrement Warnings_Treated_As_Errors. This is called before
4292         Warnings_Treated_As_Errors has been incremented to account for
4293         this warning. Decrementing it here can lead to negative values
4294         of Warnings_Treated_As_Errors, raising Constraint_Error in
4295         checks-on builds, and causing the compiler to return an error
4296         code in checks-off builds.
4298 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4300         * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
4301         entities of named concurrent types as Ref_Id and not of anonymous
4302         concurrent objects (because callers already know when a conversion
4303         is necessary and can easily do it); also, do not expect protected
4304         types or protected objects as Context_Id (because no flow-related
4305         SPARK pragmas are attached there); reflect these changes in a
4306         more precise comment.
4308 2017-09-08  Olivier Hainque  <hainque@adacore.com>
4310         * g-altive.ads: Add documentation.
4312 2017-09-08  Bob Duff  <duff@adacore.com>
4314         * sem_util.ads, debug.adb: Minor comment fix.
4315         * erroutc.ads: Comment fix.
4317 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4319         * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
4320         for compatibility of component types of formal and actual in an
4321         instantiation of a child unit,  when the component type of the
4322         formal is itself a formal of an enclosing generic.
4324 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4326         * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
4327         sem_prag.adb to make it available for GNATprove; for concurrent
4328         types replace custom scope climbing with Scope_Same_Or_Within; for
4329         single concurrent objects add scope climbing (with Scope_Within),
4330         which was not there (that's the primary semantic change of this
4331         commit); also, when comparing a single concurrent object with
4332         its corresponding concurrent type rely on equality of types,
4333         not of objects (because that's simpler to code).
4334         * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
4335         (Analyze_Global_Item): adjust special-casing of references to the
4336         current instance of a concurrent unit in the Global contracts
4337         of task types and single tasks objects; similar for references
4338         in the protected operations and entries of protected types and
4339         single protected objects (in all these cases the current instance
4340         behaves as an implicit parameter and must not be mentioned in
4341         the Global contract).
4343 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4345         * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
4346         function calls returning a record within a subprogram call,
4347         for C generation.
4349 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4351         * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
4352         name that designates the current instance of a child unit in its
4353         own body and appears as the prefix of a reference to an entity
4354         local to the child unit.
4355         * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
4356         Minor reformatting.
4358 2017-09-08  Yannick Moy  <moy@adacore.com>
4360         * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
4361         may be intentional.
4363 2017-09-08  Tristan Gingold  <gingold@adacore.com>
4365         * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
4366         warnings on internal units in configurable run time mode.
4368 2017-09-08  Bob Duff  <duff@adacore.com>
4370         * sem_ch3.adb (Build_Derived_Private_Type): Inherit
4371         representation items from interfaces that the derived type
4372         implements, not just from the parent type.
4373         * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
4374         this to return an empty list when there are no interfaces.
4375         * einfo.ads, sem_ch13.adb: Minor comment fixes.
4376         * sem_attr.adb: Minor comment fix.
4378 2017-09-08  Doug Rupp  <rupp@adacore.com>
4380         * sigtramp-vxworks.c [i386]: Adjust the kernel context for
4381         x86-vx7.
4383 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4385         * exp_ch4.adb (Expand_N_Allocator): Generate a
4386         call to Allocate_Any_Controlled when the allocation does not
4387         require any initialization.
4389 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4391         * sem_util.adb (Copy_Node_With_Replacement):
4392         Update the Renamed_Object field of a replicated object renaming
4393         declaration.
4395 2017-09-08  Patrick Bernardi  <bernardi@adacore.com>
4397         * exp_ch9.adb (Is_Pure_Barrier): Allow type
4398         conversions and components of objects. Simplified the detection
4399         of the Count attribute by identifying the corresponding run-time
4400         calls.
4402 2017-09-08  Yannick Moy  <moy@adacore.com>
4404         * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
4405         sem_type.adb, sinfo.ads: Minor reformatting.
4407 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4409         * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
4410         of Freeze_Profile, used to inhibit the freezing of the profile
4411         of an expression function declared within a nested package, when
4412         some type in the profile depends on a private type declared in
4413         an enclosing package.
4415 2017-09-08  Bob Duff  <duff@adacore.com>
4417         * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
4418         the subunit case. It's still OK to set it in the "missing subunits"
4419         case, because that won't cause the obsolete .ali files that cause
4420         confusion.
4422 2017-09-08  Bob Duff  <duff@adacore.com>
4424         * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
4425         unclear why this didn't cause a warning.
4426         * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
4427         pragmas. It's unclear why this didn't cause an error.
4429 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4431         * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
4432         Reimplemented.
4433         (Expand_SPARK_Potential_Renaming): Code clean up.
4434         * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
4435         the item does not have a proper entity.
4436         (Analyze_Input_Item): Add a guard in case the item does not have a
4437         proper entity.
4438         (Collect_States_And_Objects): Include object renamings in the
4439         items being collected.
4440         (Resolve_State): Update the documentation of this routine.
4441         * sem_util.adb (Entity_Of): Add circuitry to handle
4442         renamings of function results.
4443         (Remove_Entity): New routine.
4444         (Remove_Overloaded_Entity): Take advantage of factorization.
4445         * sem_util.ads (Entity_Of): Update the documentation
4446         of this routine.
4447         (Remove_Entity): New routine.
4448         (Remove_Overloaded_Entity): Update the documentation of this
4449         routine.
4451 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4453         * repinfo.adb (List_Record_Info): During first loop,
4454         do not override the normalized position and first bit
4455         if they have already been set.  Move fallback code
4456         for the packed case to the case where it belongs.
4457         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
4458         Also adjust the normalized position of components.
4459         (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
4461 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4463         * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
4464         the placement of a primitive operation O that renames an operation
4465         R declared in an inner package, and which is thus not a primitive
4466         of the dispatching type of O. In this case O is a new primitive
4467         and does not inherit its dispatch table position from R (which
4468         has none).
4470 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4472         * sem_dim.adb (Analyze_Dimension_If_Expression,
4473         Analyze_Dimension_Case_Expression): new subprograms to verify
4474         the dimensional correctness of Ada2012 conditional expressions,
4475         and set properly the dimensions of the construct.
4476         * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
4477         call Analyze_Dimension.
4479 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4481         * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
4482         loop on an interface declared as a private extension of another
4483         synchronized interface.
4485 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4487         * sem_ch12.adb (Check_Generic_Parent): New procedure within
4488         Analyze_Associations, to handle actual packages that depend on
4489         previous instances.  If a package IAP that is an instantiation is
4490         used as an actual in a subsequent instantiation SI in the same
4491         scope, and IAP has a body, IAP must be frozen before SI. If
4492         the generic parent of IAP is itself declared in a previous
4493         instantiation in the same scope, that instantiation must also
4494         be frozen before SI.
4495         (Install_Body): Prevent double insertion of freeze node for
4496         instance.
4498 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4500         * sem_prag.adb (Resolve_State): Update the
4501         comment on documentation. Generate a reference to the state once
4502         resolution takes place.
4504 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4506         * sem_ch13.adb (Analyze_Aspect_Specifications, case
4507         Linker_Section): If the aspect applies to an object declaration
4508         with explicit initialization, do not delay the freezing of the
4509         object, to prevent access-before-elaboration in the generated
4510         initialization code.
4512 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4514         * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
4515         (Integer_Value (Item)) when the size of the fixed decimal type
4516         is larger than Integer.
4518 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4520         PR ada/82127
4521         * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
4522         in order of increasing position in more cases.
4524 2017-09-07  Yannick Moy  <moy@adacore.com>
4526         * a-exetim-mingw.ads: Add contract Global=>null
4527         on all operations that are modeled as having no read or write
4528         of global variables in SPARK.
4530 2017-09-07  Raphael Amiard  <amiard@adacore.com>
4532         * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
4533         to Hmaps.Generic_Ops.
4534         * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
4535         cursors.
4536         * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
4537         cursors.
4538         * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
4539         position in cursors.
4541 2017-09-07  Javier Miranda  <miranda@adacore.com>
4543         * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
4544         allow disabling the generation of implicit pragma Elaborate_All
4545         on task bodies.
4547 2017-09-07  Javier Miranda  <miranda@adacore.com>
4549         * exp_disp.adb (Make_Tags): Avoid suffix counter
4550         in the external name of the elaboration flag. Required to fix
4551         the regressions introduced by the initial version of this patch.
4553 2017-09-07  Bob Duff  <duff@adacore.com>
4555         * sem_ch6.adb (Analyze_Function_Return): Do not
4556         insert an explicit conversion to force the displacement of the
4557         "this" pointer to reference the secondary dispatch table in the
4558         case where the return statement is returning a raise expression,
4559         as in "return raise ...".
4561 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4563         * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
4564         * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
4565         procedure from sem_disp.adb.
4566         * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
4567         with Unit.
4568         * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
4569         return the instantiation node for subprograms. Update references
4570         to Get_Unit_Instantiation_Node.
4571         * sem_ch7.adb (Install_Parent_Private_Declarations): update
4572         reference to Get_Unit_Instantiation_Node.
4573         * exp_dist.adb (Build_Package_Stubs): update reference to
4574         Get_Unit_Instantiation_Node.
4575         * sem_ch9.adb: minor typo in comment.
4576         * lib-xref-spark_specific.adb
4577         (Traverse_Declaration_Or_Statement): traverse into task type
4578         definition.
4580 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4582         * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
4583         to handle properly various cases of type conversions where the
4584         target type and/or the expression carry dimension information.
4585         (Dimension_System_Root); If a subtype carries dimension
4586         information, obtain the source parent type that carries the
4587         Dimension aspect.
4589 2017-09-07  Dmitriy Anisimkov  <anisimko@adacore.com>
4591         * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
4593 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4595         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
4596         If the prefix is a reference to an object, rewrite it as an
4597         explicit dereference, as required by 3.7.2 (2) and as is done
4598         with most other attributes whose prefix is an access value.
4600 2017-09-07  Bob Duff  <duff@adacore.com>
4602         * par-ch13.adb: Set the Inside_Depends flag if we are inside a
4603         Refined_Depends aspect.
4604         * par-ch2.adb: Set the Inside_Depends flag if we are inside a
4605         Refined_Depends pragma.
4606         * scans.ads: Fix documentation of Inside_Depends flag.
4607         * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
4609 2017-09-07  Hristian Kirtchev  <kirtchev@adacore.com>
4611         * exp_ch7.adb (Insert_Actions_In_Scope_Around):
4612         Account for the case where the are no lists to insert, but the
4613         secondary stack still requires management.
4614         * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
4615         comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
4616         lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
4617         sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
4618         Minor reformatting.
4620 2017-09-07  Vincent Celier  <celier@adacore.com>
4622         * clean.adb: Do not get the target parameters before calling
4623         gprclean.
4625 2017-09-07  Nicolas Roche  <roche@adacore.com>
4627         * s-osinte-solaris-posix.ads: Removed.
4629 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4631         * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
4632         single concurrent objects.
4634 2017-09-07  Javier Miranda  <miranda@adacore.com>
4636         * s-regexp.ads: Fix documentation of the globbing grammar.
4638 2017-09-07  Gary Dismukes  <dismukes@adacore.com>
4640         * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
4642 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4644         * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
4645         in CodePeer mode, to support more legacy code automatically.
4647 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4649         * exp_disp.adb (Replace_Formals): If thr formal is classwide,
4650         and thus not a controlling argument, preserve its type after
4651         rewriting because it may appear in an nested call with a classwide
4652         parameter.
4654 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4656         * comperr.adb (Delete_SCIL_Files): Handle case of
4657         N_Package_Instantiation.
4659 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4661         * sem_ch10.adb (Remove_Private_With_Clause): If a private with
4662         clause for a unit U appears in a context that includes a regular
4663         with_clause on U, rewrite the redundant private clause into a null
4664         statement, rather than removing it altogether from the context,
4665         so that ASIS tools can reconstruct the original source.
4667 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4669         * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
4670         for aspect Small can be of any real type (not only a universal
4671         real literal) as long as it is a static constant.
4673 2017-09-07  Thomas Quinot  <quinot@adacore.com>
4675         * par_sco.adb: Minor reformatting.
4677 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4679         * s-parame-ae653.ads: Removed.
4681 2017-09-07  Nicolas Roche  <roche@adacore.com>
4683         * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
4684         s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
4685         s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
4686         s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
4687         s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
4688         s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
4690 2017-09-07  Yannick Moy  <moy@adacore.com>
4692         * a-ngelfu.ads Add preconditions to all functions
4693         listed in Ada RM A.5.1(19-33) as having constraints on inputs.
4695 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4697         * lib-xref.adb (Generate_Reference): ignore
4698         references to entities which are Part_Of single concurrent
4699         objects.
4701 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4703         * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
4704         comment.
4706 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4708         * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
4709         Null_Task_Id is passed.
4711 2017-09-07  Javier Miranda  <miranda@adacore.com>
4713         * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
4714         attribute. Defined for record types and subtypes.
4715         * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
4716         (Init_Tags_List) to facilitate generating separate code in the
4717         IP routine to initialize the object components and for completing
4718         the elaboration of dispatch tables.
4719         * exp_ch3.adb (Build_Init_Procedure): Improve the code
4720         generated in the IP routines by means of keeping separate
4721         the initialization of the object components from the
4722         initialization of its dispatch tables.  (Init_Secondary_Tags):
4723         Adding new formal (Init_Tags_List) and adjusting calls to
4724         Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
4725         adjusting also calls to Ada.Tags.Register_Interface_Offset
4726         because the type of one of its formals has been changed.
4727         * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
4728         modified. Instead of receiving a pointer to an object this
4729         routine receives now a primary tag.
4730         (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
4731         additional formal: the tag of the primary dispatch table.
4732         * exp_disp.ads (Elab_Flag_Needed): New subprogram.
4733         * exp_disp.adb (Elab_Flag_Needed): New subprogram.
4734         (Make_Tags): Adding the declaration of the elaboration flag (if needed).
4735         * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
4736         formal in calls to Init_Secondary_Tags.
4738 2017-09-07  Javier Miranda  <miranda@adacore.com>
4740         * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
4741         subprogram.
4742         * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
4743         applied to generic subprograms.
4745 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4747         * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
4748         (because it refers to the anonymous concurrent object, not its type);
4749         fix condition for emitting error message about task/protected type,
4751 2017-09-07  Bob Duff  <duff@adacore.com>
4753         * binde.adb (Debug_Flag_Old): If both -do and -dp
4754         are specified, behave as if just -do was specified, rather than
4755         using a mixture.
4757 2017-09-07  Nicolas Roche  <roche@adacore.com>
4759         * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
4760         system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
4762 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4764         * sem_prag.adb (Find_Role): The Global_Seen flag
4765         is now consulted not only for abstract states and variables,
4766         but for all kinds of items.
4767         (Collect_Subprogram_Inputs_Outputs): Do not process formal
4768         generic parameters, because unlike ordinary formal parameters,
4769         generic formals only act as input/ outputs if they are explicitly
4770         mentioned in a Global contract.
4772 2017-09-07  Yannick Moy  <moy@adacore.com>
4774         * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
4775         predicate procedure. Check predicate pragma/aspect with Ghost entity.
4776         * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
4777         reformatting.
4779 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4781         * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
4782         (code cleanup);
4783         * sem_ch3.adb (Build_Derived_Record_Type):i Call
4784         Copy_Dimensions_Of_Components after creating the copy of the
4785         record declaration.
4786         * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
4787         derived recor type, copy the dikensions if any of each component
4788         of the parent record to the corresponding component declarations
4789         of the derived record. These expressions are used among other
4790         things as default values in aggregates with box associations.
4791         * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
4792         repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
4793         Minor reformatting.
4795 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4797         * sem_util.adb: Remove extra space after THEN.
4799 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4801         * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
4802         also mark the renamed subprogram as referenced.
4804 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4806         * par-ch6.adb (P_Subprogram): Improve error message on null
4807         procedure with misplaced aspect specification, which the parser
4808         first attempts to interpret as a malformed expression function.
4810 2017-09-07  Gary Dismukes  <dismukes@adacore.com>
4812         * sem_attr.adb (Analyze_Attribute_Old_Result):
4813         Allow attributes Result and Old in the case of an expression
4814         function.
4816 2017-09-07  Justin Squirek  <squirek@adacore.com>
4818         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
4819         Volatile to subcomponents.
4821 2017-09-07  Bob Duff  <duff@adacore.com>
4823         * exp_ch7.adb (Find_Last_Init): Check for the
4824         case where a build-in-place function call has been replaced by a
4825         'Reference attribute reference.
4827 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4829         * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
4830         nodes.
4832 2017-09-07  Bob Duff  <duff@adacore.com>
4834         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
4835         Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
4836         secondary stack for all functions that return limited tagged
4837         types -- just do it for dispatching calls.  Misc cleanup.
4838         * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
4839         remove qualifications and type conversions. Fix various bugs
4840         where only a single level of qualification or conversion was
4841         removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
4842         instead of "X".
4843         * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
4844         cleanup.
4846 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4848         * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
4849         do not create actual subtypes that may generate further predicate
4850         functions.
4851         * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
4852         of body is a predicate function as well.
4853         (Resolve_Aspect_Expressions, Resolve_Name): For a component
4854         association, only the expression needs resolution, not the name.
4855         (Resolve_Aspect_Expressions, case Predicates): Construct and
4856         analyze the predicate function declaration in the scope of the
4857         type, before making the type and its discriminants visible.
4859 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4861         * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
4862         only if the record type itself comes from source.
4864 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
4866         * sem_ch5.adb: Minor reformatting and a typo fix
4868 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4870         * sinput-l.ads: minor remove extra period at the end of comment
4872 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4874         * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
4875         E_Discriminant.
4876         (Find_Role): remove support for E_Discriminant.
4878 2017-09-06  Javier Miranda  <miranda@adacore.com>
4880         * exp_ch6.adb (Expand_Simple_Function_Return):
4881         Add missing implicit type conversion to force displacement of the
4882         "this" pointer.
4884 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
4886         * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
4888 2017-09-06  Yannick Moy  <moy@adacore.com>
4890         * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
4891         global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
4893 2017-09-06  Bob Duff  <duff@adacore.com>
4895         * sem_ch8.adb: Change Assert to be consistent with
4896         other similar ones.
4898 2017-09-06  Bob Duff  <duff@adacore.com>
4900         * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
4901         requested. Previously, the -do switch meant "run Elab_New and
4902         Elab_Old and use the order chosen by Elab_Old, possibly with
4903         debugging printouts comparing the two orders."  Now it means
4904         "do not run Elab_New." This is of use if there are bugs that
4905         cause Elab_New to crash.
4906         (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
4907         type conversions.
4908         * ali.ads (Elab_Position): Change type to Nat, to avoid various
4909         type conversions.
4911 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4913         * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
4914         reference to SPARK RM.
4916 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4918         * layout.adb: Use SSU short hand consistently throughout the file.
4920 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4922         * freeze.adb (Freeze_Record_Type)
4923         <Sized_Component_Total_Round_RM_Size>: New local variable to
4924         accumulate the rounded RM_Size of components.  Update it for
4925         every component whose RM_Size is statically known.  Add missing
4926         guard to check that bit packing is really required before issuing
4927         the error about packing.  Swap condition for clarity's sake.
4928         * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
4930 2017-09-06  Fedor Rybin  <frybin@adacore.com>
4932         * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
4933         mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
4934         mlib-tgt-specific.adb, mlib-tgt-specific.ads,
4935         mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
4936         mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
4937         mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
4938         mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
4939         mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
4940         prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
4941         prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
4942         prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
4943         prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
4944         prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
4945         prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
4946         prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
4947         project manager sources.
4949 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4951         * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
4952         entity of a mutable type and the right-hand side is a conditional
4953         expression, resolve the alternatives of the conditional using
4954         the base type of the target entity, because the alternatives
4955         may have distinct subtypes. This is particularly relevant if
4956         the alternatives are aggregates.
4958 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4960         * checks.adb (Apply_Predicate_Check): If the expression is an
4961         aggregate that is the RHS of an assignment, apply the check to
4962         the LHS after the assignment, rather than to the aggregate. This
4963         is more efficient than creating a temporary for the aggregate,
4964         and prevents back-end crashes when the aggregate includes a
4965         dynamic "others' association.
4967 2017-09-06  Yannick Moy  <moy@adacore.com>
4969         * sem_ch12.adb (Analyze_Instance_And_Renamings):
4970         Set variable to ignore SPARK_Mode in instance before the analysis
4971         of the generated package declaration.
4973 2017-09-06  Yannick Moy  <moy@adacore.com>
4975         * sem_res.adb (Resolve_Call): Do not issue a
4976         message for calls inside expression function, unless body was
4977         seen and is candidate for inlining.
4979 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4981         * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
4982         * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
4983         body. do not freeze the formals of the generic unit.
4985 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
4987         * errout.adb (Error_Msg): Separate the
4988         treatment for warning vs. style messages in inlinings and
4989         instantiations. Prevents blowups on calls to Warn_Insertion for
4990         style messages, which should not be called in that case because
4991         Warning_Msg_Char is not set.
4993 2017-09-06  Justin Squirek  <squirek@adacore.com>
4995         * sem_prag.adb (Check_VFA_Conflicts): Created
4996         to group all Volatile_Full_Access checks relating to other
4997         representation pragmas (Mark_Component_Or_Object): Created
4998         to centeralize the flagging of attributes for the record type
4999         component case, a pragma applied individually to a component, and
5000         the object case.
5001         (Process_Atomic_Independent_Shared_Volatile):
5002         Add propagation of certain pragmas to record components and move
5003         evaluation of VFA checks
5005 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5007         * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
5008         Do not warn on conditions that are not obeyed for Inline_Always
5009         subprograms, when assertions are not enabled.
5011 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
5013         * sem_util.adb (Unique_Entity): For abstract states return their
5014         non-limited view.
5016 2017-09-06  Bob Duff  <duff@adacore.com>
5018         * sem_ch12.adb (Copy_Generic_Node): When we copy a node
5019         that is a proper body corresponding to a stub, we defer the
5020         adjustment of the sloc until after the correct adjustment has
5021         been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
5022         the adjustment, because it will be outside the range in (the old,
5023         incorrect) S_Adjustment.
5024         * inline.adb: Use named notation for readability and uniformity.
5025         * sinput-l.adb: Minor improvements to debugging output printed
5026         for Debug_Flag_L.
5027         * sinput-l.ads (Create_Instantiation_Source): Minor comment
5028         correction.
5030 2017-09-06  Vincent Celier  <celier@adacore.com>
5032         * make.adb: Do not invoke gprbuild for -bargs -P.
5034 2017-09-06  Sylvain Dailler  <dailler@adacore.com>
5036         * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
5037         case when Op is of kind N_Qualified_Expression. In this case,
5038         the function is called recursively on the subexpression like in
5039         other cases.
5040         * make.adb: Minor reformatting
5042 2017-09-06  Justin Squirek  <squirek@adacore.com>
5044         * einfo.adb (Set_Linker_Section_Pragma): Modify
5045         Set_Linker_Section_Pragma to be consistant with the "getter"
5046         Linker_Section_Pragma.
5047         * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
5048         checking for container loops so that the index cursor is not
5049         directly changable by the user with the use of E_Loop_Parameter.
5050         * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
5051         * sem_warn.adb (Check_References): Revert previous change.
5053 2017-09-06  Bob Duff  <duff@adacore.com>
5055         * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
5056         calls and the like.
5058 2017-09-06  Yannick Moy  <moy@adacore.com>
5060         * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
5061         declarations to only consider valid uses of Global/Depends those on
5062         single concurrent objects.
5064 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5066         * sem_ch13.adb (Check_Record_Representation_Clause): Give an
5067         error as soon as one of the specified components overlaps the
5068         parent field.
5070 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
5072         * sem_prag.ads: minor fix typo in comment.
5074 2017-09-06  Justin Squirek  <squirek@adacore.com>
5076         * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
5077         from source before checking source references.
5078         * sem_warn.adb (Check_References): Add check for internal block
5079         before recursing.
5081 2017-09-06  Vincent Celier  <celier@adacore.com>
5083         * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
5084         make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
5085         gnatname.adb: Remove the Project Manager from the GNAT tools.
5086         * gcc-interface/Makefile.in: ditto.
5088 2017-09-06  Bob Duff  <duff@adacore.com>
5090         * sem_util.ads: Minor comment fix.
5092 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5094         * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
5095         Generate a freeze node for the actual of a formal package, if
5096         the actual is declared in the same unit and has a corresponding
5097         body, to prevent the current instance from being frozen before
5098         the actual is.
5100 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5102         * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
5104 2017-09-06  Yannick Moy  <moy@adacore.com>
5106         * sem_warn.adb: Minor refactoring.
5108 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5110         * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
5111         to retrieve the inherited classwide precondition/postcondition
5112         of a subprogram.
5113         * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
5114         freezing a subprogram, to complete the generation of the
5115         corresponding checking code.
5117 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5119         * exp_util.adb (Is_Controlled_Indexing): New routine.
5120         (Is_Displace_Call): Use routine Strip to remove indirections.
5121         (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
5122         missing case of controlled generalized indexing.
5123         (Is_Source_Object): Use routine Strip to remove indirections.
5124         (Strip): New routine.
5126 2017-09-06  Bob Duff  <duff@adacore.com>
5128         * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
5129         we include the proper header. Otherwise, we just declare the necessary
5130         things from the capabilities library. This is so we can build on
5131         machines without that library, while still enabling that library.
5132         At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
5133         simply return 0 if the library is not present, or not included
5134         in the link.
5136 2017-09-06  Pierre-Marie de Rodat  <derodat@adacore.com>
5138         * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
5139         for renamings that involve function calls in prefix form.
5141 2017-09-06  Bob Duff  <duff@adacore.com>
5143         * sem_ch3.adb (Analyze_Subtype_Declaration):
5144         Set Has_Delayed_Freeze on a subtype of an incomplete type.
5146 2017-09-06  Pierre-Marie de Rodat  <derodat@adacore.com>
5148         * par_sco.adb (Extend_Statement_Sequence): When the accept statement
5149         has no parameter specification and no entry index, use the entry name
5150         as the end of the generated SCO statement.
5152 2017-09-06  Steve Baird  <baird@adacore.com>
5154         * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
5155         uses of 'Image and related attributes as having side effects in
5156         order to avoid replicating such uses.
5157         * pprint.ads (Expression_Image) Add new generic formal flag
5158         Hide_Temp_Derefs.  The flag defaults to False; CodePeer will
5159         (eventually) override the default.
5160         * pprint.adb (Expression_Image) If the new flag is set, then
5161         suppress the ".all" suffix when displaying a dereference whose
5162         prefix is a use of a value-capturing compiler temp of the sort
5163         generated by Expr_Util.Remove_Side_Effects .
5164         * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
5165         sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
5166         Minor reformatting.
5167         * inline.adb: Minor wording change.
5169 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5171         * sem_ch7.adb: Update comment.
5173 2017-09-06  Yannick Moy  <moy@adacore.com>
5175         * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
5176         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
5177         * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
5178         with slight modification from Is_Subp_Or_Entry_Inside_Protected,
5179         so that applies to any entity.
5181 2017-09-06  Yannick Moy  <moy@adacore.com>
5183         * sem_ch3.adb (Derived_Type_Declaration): Use
5184         Incomplete_Or_Partial_View rather than local Find_Partial_View.
5186 2017-09-06  Javier Miranda  <miranda@adacore.com>
5188         * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
5189         following ISO-8861.
5191 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5193         * sem_dim.adb (Analyze_Dimension): In an instance, a type
5194         conversion takes its dimensions from the expression, not from
5195         the context type.
5196         (Dimensions_Of_Operand): Ditto.
5198 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5200         * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
5201         null procedures when GNAT coverage is used, so that their (empty)
5202         bodies are properly covered.
5204 2017-09-06  Bob Duff  <duff@adacore.com>
5206         * sem_ch13.adb (Resolve_Aspect_Expressions): If
5207         the entity is a type with discriminants, make the discriminants
5208         directly visible in aspect clauses.
5210 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5212         * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
5213         Universal_Real and the context is a floating-point type, resolve
5214         both operands to the target type.
5216 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5218         * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
5219         sem_ch3.adb, sem_util.adb: Minor reformatting.
5221 2017-09-06  Yannick Moy  <moy@adacore.com>
5223         * freeze.adb (Check_Inherited_Conditions): Rewriting
5224         of inherited preconditions and postconditions should only occur
5225         in GNATprove mode, that is, when GNATprove_Mode is True, not to
5226         be confused with SPARK_Mode being On.
5228 2017-09-06  Yannick Moy  <moy@adacore.com>
5230         * sem_warn.adb (Check_References): Take into
5231         account possibility of attribute reference as original node.
5233 2017-09-06  Yannick Moy  <moy@adacore.com>
5235         * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
5236         use of attribute.
5238 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5240         * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
5241         on the procedure created to encapsulate the body.
5242         * sem_ch7.adb: Add with clause for GNAT.HTable.
5243         (Entity_Table_Size): New constant.
5244         (Entity_Hash): New function.
5245         (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
5246         (Is_Subprogram_Ref): Rename into...
5247         (Scan_Subprogram_Ref): ...this. Record references to subprograms in
5248         the table instead of bailing out on them. Scan the value of constants
5249         if it is not known at compile time.
5250         (Contains_Subprograms_Refs): Rename into...
5251         (Scan_Subprogram_Refs): ...this.
5252         (Has_Referencer): Scan the body of all inlined subprograms. Reset the
5253         Is_Public flag on subprograms if they are not actually referenced.
5254         (Hide_Public_Entities): Beef up comment on the algorithm.
5255         Reset the table of subprograms on entry.
5257 2017-09-06  Yannick Moy  <moy@adacore.com>
5259         * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
5261 2017-09-06  Javier Miranda  <miranda@adacore.com>
5263         * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
5264         cannot handle a type conversion of an array as an aggregate
5265         component.
5267 2017-09-06  Bob Duff  <duff@adacore.com>
5269         * g-comlin.adb (Try_Help): Remove ".exe" so we
5270         get the same results on windows and unix.
5272 2017-09-06  Justin Squirek  <squirek@adacore.com>
5274         * exp_imgv.adb (Expand_Image_Attribute),
5275         (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
5276         Added case to handle new-style 'Image expansion
5277         (Rewrite_Object_Image): Moved from exp_attr.adb
5278         * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5279         attribute cases so that the relevant subprograms in exp_imgv.adb
5280         handle all expansion.
5281         (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
5282         * sem_attr.adb (Analyze_Attribute): Modified Image attribute
5283         cases to call common function Analyze_Image_Attribute.
5284         (Analyze_Image_Attribute): Created as a common path for all
5285         image attributes (Check_Object_Reference_Image): Removed
5286         * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5287         Removed and refactored into Is_Object_Image (Is_Object_Image):
5288         Created as a replacement for Is_Image_Applied_To_Object
5290 2017-09-06  Yannick Moy  <moy@adacore.com>
5292         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
5293         message for missing input.
5295 2017-09-06  Yannick Moy  <moy@adacore.com>
5297         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
5298         of protected subprograms and entries.
5299         * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
5300         New function to detect when a subprogram of entry is defined
5301         inside a protected object.
5303 2017-09-06  Bob Duff  <duff@adacore.com>
5305         * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
5306         whether the current process has the CAP_SYS_NICE capability.
5307         * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
5308         ceiling priorities if the current process has the CAP_SYS_NICE
5309         capability.
5311 2017-09-06  Bob Duff  <duff@adacore.com>
5313         * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
5314         check back to the body, because SPARK is not yet ready for
5315         "or else raise Constraint_Error".
5317 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5319         * exp_ch6.adb (Expand_Call_Helper): Replace call to null
5320         procedure by a single null statement, after evaluating the
5321         actuals that require it.
5323 2017-09-06  Javier Miranda  <miranda@adacore.com>
5325         * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
5326         Generating C code improve the code that checks the use of nested
5327         aggregates to initialize object declarations.
5329 2017-09-06  Yannick Moy  <moy@adacore.com>
5331         * sem_ch3.adb (Derived_Type_Declaration): Detect
5332         violations of new rule SPARK RM 3.4(1).  Also refactor existing
5333         check to use the new function Find_Partial_View.
5335 2017-09-06  Vincent Celier  <celier@adacore.com>
5337         * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P...  The code
5338         from the Prj hierarchy has been removed from the GNAT driver.
5340 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5342         * sem_type.adb (Interface_Present_In_Ancestor): Within an
5343         expression function, or within a spec expression (default value,
5344         etc) a reference to an incomplete type is legal: legality of
5345         the operation will be checked when some related entity (type,
5346         object or subprogram) is frozen.
5348 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
5350         * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
5351         adjustments and a typo fix.
5353 2017-09-06  Yannick Moy  <moy@adacore.com>
5355         * sem_res.adb (Resolve_Call): Do not issue info
5356         message about inlining of calls to functions in assertions,
5357         for functions whose body has not been seen yet.
5359 2017-09-06  Bob Duff  <duff@adacore.com>
5361         * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
5362         we can use modern Ada in this package.
5363         * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
5364         Move Ada.Command_Line.Response_File to System.Response_File,
5365         and make Ada.Command_Line.Response_File into a rename of
5366         System.Response_File. This is to avoid having gnatbind depend
5367         Ada.Command_Line, which would damage the bootstrap process now
5368         that Ada.Command_Line contains modern Ada (the raise expression).
5369         * gnatbind.adb: Avoid dependence on
5370         Ada.Command_Line. Depend on System.Response_File instead
5371         of Ada.Command_Line.Response_File. Change one call to
5372         Ada.Command_Line.Command_Name to use Fill_Arg.  Change one call
5373         to Ada.Command_Line.Argument_Count to use Arg_Count.
5374         * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
5376 2017-09-06  Bob Duff  <duff@adacore.com>
5378         * frontend.adb (Frontend): Skip -gnatec=gnat.adc
5379         switch, because we've already read gnat.adc by default.
5381 2017-09-06  Bob Duff  <duff@adacore.com>
5383         * exp_ch5.adb (Get_Default_Iterator): Replace
5384         "Assert(False)" with "return Iter", because if an iterable
5385         type is derived from a noniterable one, then we won't find an
5386         overriding or inherited default iterator.
5388 2017-09-06  Yannick Moy  <moy@adacore.com>
5390         * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
5391         literal index used to access a string is null or negative.
5393 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5395         * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
5396         allowed on loop parameters.
5397         (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
5398         on loop parameters.
5399         (Write_Field15_Name): Update the output for
5400         Status_Flag_Or_Transient_Decl.
5401         * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
5402         to loop parameters. Update the documentation of the attribute
5403         and the E_Loop_Parameter entity.
5404         * exp_ch7.adb (Process_Declarations): Remove the bogus guard
5405         which assumes that cursors can never be controlled.
5406         * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
5407         guard which assumes that cursors can never be controlled.
5409 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5411         * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
5412         sem_warn.adb: Minor reformatting.
5414 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5416         * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
5417         fix and preserve older GNAT warning on overlapping actuals that
5418         are not elementary types.
5420 2017-09-06  Justin Squirek  <squirek@adacore.com>
5422         * sem_attr.adb: Comment correction.
5424 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
5426         * sem_util.adb: Minor reformatting.
5428 2017-09-06  Yannick Moy  <moy@adacore.com>
5430         * a-comlin.ads (Argument): Add precondition for analysis.
5432 2017-09-06  Yannick Moy  <moy@adacore.com>
5434         * sem_res.adb (Resolve): Update message for function call as statement.
5436 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5438         * sem_ch6.adb (Check_Returns): Clean up warnings coming from
5439         generated bodies for renamings that are completions, when renamed
5440         procedure is No_Return.
5441         * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5442         rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
5443         with No_Return, the renamed entity must be No_Return as well.
5445 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5447         * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
5448         Minor reformatting.
5450 2017-09-06  Justin Squirek  <squirek@adacore.com>
5452         * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5453         attribute cases (Rewrite_Object_Reference_Image): Created to
5454         aid the rewriting of new-style 'Image attributes.
5455         * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
5456         (Check_Object_Reference_Image): Created to handle verification of
5457         'Image with object-references as prefixes.
5458         * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5459         Create predicate to identify cases where an 'Image attribute's
5460         prefix applies to an object reference.
5462 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5464         * freeze.adb (Freeze_Entity): Do not generate a freeze
5465         node for a generic unit, even if it includes delayed aspect
5466         specifications. Freeze nodes for generic entities must never
5467         appear in the tree that reaches the back-end of the compiler.
5469 2017-09-06  Yannick Moy  <moy@adacore.com>
5471         * treepr.adb (Print_Entity_Info): Do not print empty Elist.
5473 2017-09-06  Yannick Moy  <moy@adacore.com>
5475         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
5476         to subprograms in other units as possibly inlined.
5478 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5480         * freeze.adb (Freeze_Entity): For a derived type that has no
5481         explicit delayed aspects but may inherit delayed aspects from its
5482         parent type, analyze aspect at freeze point for proper capture
5483         of an inherited aspect.
5485 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
5487         * lib-xref.adb (Get_Through_Renamings): Get through subprogram
5488         renamings; also, avoid repeated calls to Renamed_Object when getting
5489         through object renamings.
5491 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5493         * sem_ch3.adb (Array_Type_Declaration): Handle properly an
5494         array type declaration in a private part, when an index is a
5495         subtype indication of a discrete type with a private partial view.
5497 2017-09-06  Javier Miranda  <miranda@adacore.com>
5499         * exp_ch4.adb (Expand_Modular_Op): Force generating
5500         temporary to improve the generated code.
5502 2017-09-06  Tristan Gingold  <gingold@adacore.com>
5504         * s-fatgen.adb: Minor typo fix in comment.
5506 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5508         * exp_ch5.adb (Make_Field_Assign): If the type
5509         of the right-hand side has stored constraint, use its values
5510         (except for those that are renamings of parent discriminants)
5511         to produce additional assignments for the discriminants of the
5512         left-hand side, which are invisible in the righ-hand side and
5513         not retrievable as selected components.
5515 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5517         * sem_util.adb (Needs_One_Formal): The first formal of such a
5518         function must be a controlling formal, so that Obj.F (X, Y)
5519         can have the interpretation F(Obj)(X, Y).
5520         * sem_util.ads: Clarify documentation.
5522 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5524         * table.ads, table.adb: Restore original implementation.
5525         * namet.h (Names_Ptr): Adjust back.
5526         (Name_Chars_Ptr): Likewise.
5527         * uintp.h (Uints_Ptr): Likewise.
5528         (Udigits_Ptr): Likewise.
5529         * g-table.ads: Remove pragma Compiler_Unit_Warning.
5530         * par_sco.adb: Do not with GNAT.Table and use Table consistently.
5531         * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
5532         * spark_xrefs.ads: Likewise.
5533         * scos.h: Undo latest changes.
5535 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5537         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
5538         No_Return flag to instance if pragma applies to generic unit. This
5539         must be done explicitly because the pragma does not appear
5540         directly in the generic declaration (unlike the corresponding
5541         aspect specification).
5543 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5545         * sem_ch7.adb (Has_Referencer): Move up and expand comment
5546         explaining the test used to detect inlining.  Use same test
5547         in second occurrence.
5548         (Analyze_Package_Body_Helper): Minor formatting fixes.
5550 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5552         * exp_ch4.adb (Handle_Changed_Representation): For an untagged
5553         derived type with a mixture of renamed and constrained parent
5554         discriminants, the constraint for the target must obtain the
5555         discriminant values from both the operand and from the stored
5556         constraint for it, given that the constrained discriminants are
5557         not visible in the object.
5558         * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
5559         side may be derived from that of the left-hand side (as in the
5560         case of an assignment with a change of representation) so the
5561         discriminant to be used in the retrieval of the value of the
5562         component must be the entity in the type of the right-hand side.
5564 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5566         * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
5567         sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5568         * exp_util.adb (Is_Source_Object): Account for
5569         the cases where the source object may appear as a dereference
5570         or within a type conversion.
5571         * exp_ch6.adb: Fix missing space in error message.
5573 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5575         * sem_prag.adb: Update description of Eliminate.
5577 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5579         * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
5580         properly an attribute reference 'Loop_Entry that appears in the
5581         list of indices of an indexed expression, to prevent an infinite
5582         loop in the compiler.
5584 2017-09-06  Bob Duff  <duff@adacore.com>
5586         * s-fileio.adb (Name): Do not raise Use_Error for temp files.
5588 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5590         * sem_ch4.adb (Analyze_Set_Membership):  If an alternative
5591         in a set membership is an overloaded enumeration literal, and
5592         the type of the alternative is resolved from a previous one,
5593         replace the entity of the alternative as well as the type,
5594         to prevent inconsistencies between the entity and the type.
5596 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5598         * ali.ads (ALIs_Record): Add No_Component_Reordering component.
5599         (No_Component_Reordering_Specified): New switch.
5600         * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
5601         (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
5602         * bcheck.adb (Check_Consistent_No_Component_Reordering):
5603         New check.
5604         (Check_Configuration_Consistency): Invoke it.
5605         * debug.adb (d.r): Toggle the effect of the switch.
5606         (d.v): Change to no-op.
5607         * einfo.ads (Has_Complex_Representation):
5608         Restrict to record types.
5609         (No_Reordering): New alias for Flag239.
5610         (OK_To_Reorder_Components): Delete.
5611         (No_Reordering): Declare.
5612         (Set_No_Reordering): Likewise.
5613         (OK_To_Reorder_Components): Delete.
5614         (Set_OK_To_Reorder_Components): Likewise.
5615         * einfo.adb (Has_Complex_Representation): Expect record types.
5616         (No_Reordering): New function.
5617         (OK_To_Reorder_Components): Delete.
5618         (Set_Has_Complex_Representation): Expect base record types.
5619         (Set_No_Reordering): New procedure.
5620         (Set_OK_To_Reorder_Components): Delete.
5621         (Write_Entity_Flags): Adjust to above change.
5622         * fe.h (Debug_Flag_Dot_R): New macro and declaration.
5623         * freeze.adb (Freeze_Record_Type): Remove conditional code setting
5624         OK_To_Reorder_Components on record types with convention Ada.
5625         * lib-writ.adb (Write_ALI): Deal with NC marker.
5626         * opt.ads (No_Component_Reordering): New flag.
5627         (No_Component_Reordering_Config): Likewise.
5628         (Config_Switches_Type): Add No_Component_Reordering component.
5629         * opt.adb (Register_Opt_Config_Switches): Copy
5630         No_Component_Reordering onto No_Component_Reordering_Config.
5631         (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
5632         (Save_Opt_Config_Switches): Save No_Component_Reordering.
5633         (Set_Opt_Config_Switches): Set No_Component_Reordering.
5634         * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
5635         * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
5636         No_Reordering flag from the default.
5637         (Build_Derived_Private_Type): Likewise.
5638         (Build_Derived_Record_Type): Likewise.  Then inherit it
5639         for untagged types and clean up handling of similar flags.
5640         (Record_Type_Declaration): Likewise.
5641         * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
5642         remove redundant test on Is_Tagged_Type.
5643         * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
5644         (Sig_Flags): Likewise.
5645         * snames.ads-tmpl (Name_No_Component_Reordering): New name.
5646         (Pragma_Id): Add Pragma_No_Component_Reordering value.
5647         * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
5648         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
5649         Copy the layout of the parent type only if the No_Reordering
5650         settings match.
5651         (components_to_record): Reorder record types with
5652         convention Ada by default unless No_Reordering is set or -gnatd.r
5653         is specified and do not warn if No_Reordering is set in GNAT mode.
5655 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5657         * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
5658         new predicate to reject declarations that can be completions,
5659         when there is a visible prior homograph that is a null procedure.
5660         * sem_ch6.adb (Analyze_Null_Procedure): use it.
5661         * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
5663 2017-09-06  Thomas Quinot  <quinot@adacore.com>
5665         * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
5666         run of 253 characters or more.
5668 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5670         * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
5671         properly incomplete subtypes that may be created by explicit or
5672         implicit declarations.
5673         (Is_Base_Type): Take E_Incomplete_Subtype into account.
5674         (Subtype_Kind): Ditto.
5675         * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
5676         Ekind of a subtype of a discriminated incomplete type.
5677         (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
5678         incomplete types, to preserve error reporting.
5679         (Process_Incomplete_Dependents): Do not create a subtype
5680         declaration for an incomplete subtype that is created internally.
5681         * sem_ch7.adb (Analyze_Package_Specification): Handle properly
5682         incomplete subtypes that do not require a completion, either
5683         because they are limited views, of they are generic actuals.
5685 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5687         * checks.adb (Insert_Valid_Check): Remove the
5688         suspicious manipulation of the Do_Range_Check flag as ths is
5689         no linger needed. Suppress validity check when analysing the
5690         validation variable.
5692 2017-09-06  Philippe Gil  <gil@adacore.com>
5694         * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
5695         GNATCOLL.Memory
5697 2017-09-06  Bob Duff  <duff@adacore.com>
5699         * sem_elim.adb: Minor comment fix.
5701 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5703         * sem_util.adb (Is_Object_Reference): A function call is an
5704         object reference, and thus attribute references for attributes
5705         that are functions (such as Pred and Succ) as well as predefined
5706         operators are legal in contexts that require an object, such as
5707         the prefix of attribute Img and the Ada2020 version of 'Image.
5709 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5711         * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
5712         exp_ch3.adb, xoscons.adb: Minor reformatting.
5714 2017-09-06  Raphael Amiard  <amiard@adacore.com>
5716         * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
5717         Position parameter. If supplied, use it to provide efficient iteration.
5718         * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
5719         a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
5720         iteration.
5722 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5724         * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
5725         designated type is class-wide and the expression is an unchecked
5726         conversion, preserve the conversion when checking the tag of the
5727         designated object, to prevent spurious semantic errors when the
5728         expression in the conversion has an untagged type (for example
5729         an address attribute).
5731 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5733         * sem_res.adb (Resolve_Entry_Call): Check whether a protected
5734         operation is subject to a pragma Eliminate.
5736 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5738         * sem_elim.ads, exp_ch4.adb: Minor reformatting.
5740 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5742         * fe.h (Eliminate_Error_Msg): Remove.
5744 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5746         * gcc-interface/utils.c (make_packable_type): Update call to
5747         mode_for_size_tree.
5749 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5751         * gcc-interface/utils2.c (build_load_modify_store):
5752         Use int_mode_for_size.
5754 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5756         PR ada/62235
5757         * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5758         for Itypes that are E_Record_Subtype with a cloned subtype.
5759         <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
5761 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5763         * gcc-interface/trans.c (convert_with_check): Use a custom base type
5764         if the base type of the expression has a different machine mode.
5765         Rename a couple of parameters and local variable.
5767 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5769         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
5770         conversions around prefixes that are not references.
5772 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5774         * gcc-interface/utils.c (unchecked_convert): When the result type is a
5775         non-biased integral type with size 0, set the result to 0 directly.
5777 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5779         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
5780         (renaming_from_instantiation_p): ...this.
5781         * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
5782         instead of explicit tests on kind of entities.  Adjust for renaming.
5783         (gnat_to_gnu_profile_type): Likewise.
5784         (gnat_to_gnu_subprog_type): Likewise.
5785         * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
5786         (Case_Statement_to_gnu): Likewise.
5787         (gnat_to_gnu): Likewise.
5788         (process_freeze_entity): Likewise.
5789         (process_type): Likewise.
5790         (add_stmt_with_node): Adjust for renaming.
5791         * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
5792         (renaming_from_generic_instantiation_p): Rename to...
5793         (renaming_from_instantiation_p): ...this.  Use inline predicate.
5794         (pad_type_hasher::keep_cache_entry): Fold.
5796 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5798         * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
5799         (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
5800         (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
5801         (N_Slice): Likewise.
5802         (N_Selected_Component): Likewise.  Do not try again to translate it.
5803         (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
5805 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5807         * repinfo.ads: Document new treatment of dynamic values.
5808         (TCode): Bump upper bound to 29.
5809         (Dynamic_Val): New constant set to 29.
5810         * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
5811         (Rep_Value)  <Dynamic_Val>: Likewise.
5812         * repinfo.h (Dynamic_Val): New macro.
5813         * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
5814         DECL_P nodes too.
5815         <INTEGER_CST>: Set TCODE instead of recursing.
5816         <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
5817         <VAR_DECL>: New case.
5818         <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
5819         <BIT_AND_EXPR>: Adjust.
5820         <CALL_EXPR>: Do not fall through.
5822 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5824         * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
5825         there is no target, do not create a temporary for the return value for
5826         an allocator either.
5828 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5830         * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
5831         unconstrained array type.
5833 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5834             Alan Hayward  <alan.hayward@arm.com>
5835             David Sherwood  <david.sherwood@arm.com>
5837         * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
5838         instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
5840 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5841             Alan Hayward  <alan.hayward@arm.com>
5842             David Sherwood  <david.sherwood@arm.com>
5844         * gcc-interface/decl.c (check_ok_for_atomic_type): Use
5845         is_a <scalar_int_mode>.
5846         * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
5847         * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
5849 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5850             Alan Hayward  <alan.hayward@arm.com>
5851             David Sherwood  <david.sherwood@arm.com>
5853         * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
5854         instead of mode_for_size.
5855         (gnat_to_gnu_subprog_type): Likewise.
5856         * gcc-interface/utils.c (make_type_from_size): Likewise.
5858 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5859             Alan Hayward  <alan.hayward@arm.com>
5860             David Sherwood  <david.sherwood@arm.com>
5862         * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
5863         (fp_size_to_prec): Likewise.
5865 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5866             Alan Hayward  <alan.hayward@arm.com>
5867             David Sherwood  <david.sherwood@arm.com>
5869         * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
5870         <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
5872 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5873             Alan Hayward  <alan.hayward@arm.com>
5874             David Sherwood  <david.sherwood@arm.com>
5876         * gcc-interface/decl.c (validate_size): Update use of
5877         GET_MODE_WIDER_MODE, forcing a wider mode to exist.
5879 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5880             Alan Hayward  <alan.hayward@arm.com>
5881             David Sherwood  <david.sherwood@arm.com>
5883         * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
5884         (fp_size_to_prec): Likewise.
5886 2017-08-29  Martin Liska  <mliska@suse.cz>
5888         PR other/39851
5889         * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
5891 2017-08-08  Martin Liska  <mliska@suse.cz>
5893         * gcc-interface/trans.c: Include header files.
5895 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
5897         * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
5898         as new argument to the imported_module_or_decl debug hook.
5900 2017-07-25  Javier Miranda  <miranda@adacore.com>
5902         * checks.adb (Apply_Divide_Checks): Ensure that operands are not
5903         evaluated twice. 
5905 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
5907         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
5908         TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
5909         (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
5911 2017-07-18  Mike Frysinger  <vapier@chromium.org>
5913         * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
5914         (../../gnatlink$(exeext)): Likewise.
5916 2017-07-15  John Paul Adrian Glaubitz  <glaubitz@physik.fu-berlin.de>
5918         PR ada/81446
5919         * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
5920         (Backend_Overflow_Checks): Set to True.
5922 2017-06-23  Jakub Jelinek  <jakub@redhat.com>
5924         * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
5926 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
5928         * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
5929         notice.  New macro.
5930         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
5931         as a definition.
5932         (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
5933         definition.
5934         * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
5935         imported subprograms for the current compilation unit as
5936         definitions.  Disable debug info for references to variables.
5937         * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
5938         * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
5939         not built-in functions to their binding scope.
5940         (create_subprog_decl): Add a DEFINITION parameter.  If it is true, tag
5941         the function as a definition.  Update all callers.
5942         (gnat_write_global_declarations): Emit debug info for imported
5943         functions.  Filter out external variables for which debug info
5944         is disabled.
5946 2017-06-15  Nicolas Boulenguez  <nicolas.boulenguez@free.fr>
5948         PR ada/81105
5949         * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
5950         (i[3456]86-pc-gnu): Likewise.
5951         (x86_64 kfreebsd): Likewise.
5953 2017-06-12  Eric Botcazou  <ebotcazou@adacore.com>
5955         PR bootstrap/80897
5956         * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
5958 2017-06-12  Eric Botcazou  <ebotcazou@adacore.com>
5960         PR ada/81070
5961         * s-interr-hwint.adb: Reinstate.
5962         * gcc-interface/Makefile.in (RTEMS): Use it again.
5964 2017-06-08  Olivier Hainque  <hainque@adacore.com>
5966         * vx_crtbegin_auto.c: Update year in copyright notice.
5967         * vx_crtbegin.c: Likewise.
5968         * vx_crtbegin.inc: Likewise. 
5969         * vx_crtend.c:  Likewise.
5971 2017-06-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5973         * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
5974         * s-tpopsp-rtems.adb: Delete.
5976 2017-06-02  Olivier Hainque  <hainque@adacore.com>
5978         * vx_crtbegin_auto.c: New file.
5979         * vx_crtbegin.c: New file.
5980         * vx_crtbegin.inc: New file.
5981         * vx_crtend.c: New file.
5983 2017-05-25  Jonathan Wakely  <jwakely@redhat.com>
5985         * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
5986         const qualifiers that cause -Wignored-qualifiers warnings.
5988 2017-05-22  Eric Botcazou  <ebotcazou@adacore.com>
5990         * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5991         for Itypes that are E_Access_Subtype.
5992         <E_Access_Subtype>: Use the DECL of the base type directly.
5994 2017-05-22  Ed Schonberg  <schonberg@adacore.com>
5995             Eric Botcazou  <ebotcazou@adacore.com>
5997         * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
5998         limited view may appear in the profile of a function, and a call to
5999         that function in another unit in which the full view is available must
6000         use this full view to spurious type errors at the point of call.
6001         * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
6002         of parent body with a with clause for the main unit.
6003         * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
6004         (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
6005         types declared in external units like types from limited with clauses.
6006         Adjust final processing of defer_limited_with_list accordingly.
6007         * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
6008         again to translate the prefix after the field if it is incomplete.
6010 2017-05-22  Eric Botcazou  <ebotcazou@adacore.com>
6012         * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
6013         alignment for simple volatile fields and remove associated errors.
6015 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6017         * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
6018         * gcc-interface/trans.c (get_elaboration_procedure): Make static.
6020 2017-05-15  Pierre-Marie de Rodat  <derodat@adacore.com>
6022         * gcc-interface/utils.c (can_materialize_object_renaming_p):
6023         Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
6024         process Original_Node instead of expanded names.
6026 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6028         * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
6029         addressability check in the constrained case.
6031 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6033         * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
6034         types not coming from a limited context.
6036 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6038         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
6039         the inlined list that are not public.
6040         * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
6041         there is a pragma Inline_Always on the subprogram.
6043 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6045         * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
6046         <N_Allocator>: Use properly typed constants.
6047         (extract_values): Move around.
6048         (pos_to_constructor): Minor tweaks.
6049         (Sloc_to_locus): Fix formatting.
6050         * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
6051         * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
6052         (Gigi_Equivalent_Type): Adjust head comment.
6053         * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
6055 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6057         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
6058         is a representation clause on an extension, propagate the alignment of
6059         the parent type only if the platform requires strict alignment.
6061 2017-05-12  Eric Botcazou  <ebotcazou@adacore.com>
6063         * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
6064         instead of Word_Size.
6066         Revert
6067         2017-03-28  Andreas Schwab  <schwab@suse.de>
6069         PR ada/80117
6070         * system-linux-aarch64-ilp32.ads: New file.
6071         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6072         from LIBGNAT_TARGET_PAIRS.
6073         (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6074         (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6075         LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6076         or -mabi=ilp32, resp.
6078 2017-05-10  H.J. Lu  <hongjiu.lu@intel.com>
6080         PR ada/80626
6081         * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
6082         instead of Word_Size.
6084 2017-05-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6086         * raise-gcc.c (exception_class_eq): Make ec parameter const.
6088 2017-05-02  Richard Biener  <rguenther@suse.de>
6090         * gcc-interface/misc.c (gnat_post_options): Do not set
6091         -fstrict-overflow.
6093 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6095         * gcc-interface/trans.c (assoc_to_constructor): Make sure
6096         Corresponding_Discriminant is only called on discriminants.
6097         Skip the saving of the result only for them.
6098         (gnat_to_gnu) <N_Selected_Component>: Likewise.
6099         <N_Unchecked_Type_Conversion>: Translate the result type first.
6100         (gigi): Set TREE_NOTHROW on Begin_Handler.
6101         (stmt_list_cannot_raise_p): New predicate.
6102         (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
6103         a cleanup if the statements of the handler cannot raise.
6104         (process_freeze_entity): Use Is_Record_Type.
6105         (process_type): Likewise.
6107 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6109         * einfo.ads (Corresponding_Record_Component): New alias
6110         for Node21 used for E_Component and E_Discriminant.
6111         * einfo.adb (Corresponding_Record_Component): New function.
6112         (Set_Corresponding_Record_Component): New procedure.
6113         (Write_Field21_Name): Handle Corresponding_Record_Component.
6114         * sem_ch3.adb (Inherit_Component): Set
6115         Corresponding_Record_Component for every component in
6116         the untagged case.  Clear it afterwards for non-girder
6117         discriminants.
6118         * gcc-interface/decl.c (gnat_to_gnu_entity)
6119         <E_Record_Type>: For a derived untagged type with discriminants
6120         and constraints, apply the constraints to the layout of the
6121         parent type to deduce the layout.
6122         (field_is_aliased): Delete.
6123         (components_to_record): Test DECL_ALIASED_P directly.
6124         (annotate_rep): Check that fields are present except for
6125         an extension.
6126         (create_field_decl_from): Add DEBUG_INFO_P
6127         parameter and pass it in recursive and other calls.  Add guard
6128         for the manual CSE on the size.
6129         (is_stored_discriminant): New predicate.
6130         (copy_and_substitute_in_layout): Consider only
6131         stored discriminants and check that original fields are present
6132         in the old type.  Deal with derived types.  Adjust call to
6133         create_variant_part_from.
6135 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6137         * exp_ch6.adb (Expand_Call_Helper): When locating the
6138         accessibility entity created for an access parameter, handle
6139         properly a reference to a formal of an enclosing subprogram. if
6140         the reference appears in an inherited class-wide condition, it
6141         is the rewriting of the reference in the ancestor expression,
6142         but the accessibility entity must be that of the current formal.
6144 2017-05-02  Javier Miranda  <miranda@adacore.com>
6146         * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
6147         (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
6148         Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
6149         Call Expand_Non_Binary_Modular_Op.
6151 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6153         * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
6154         has discriminants, do not override the Stored_Constraint list of
6155         the full view of the derived type with that of the derived type.
6157 2017-05-02  Bob Duff  <duff@adacore.com>
6159         * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
6161 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
6163         * s-os_lib.ads: Minor typo fix.
6165 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
6167         * gnatls.adb: Merge and refactor code from Prj.Env and remove
6168         this deprecated dependency.
6170 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6172         * exp_util.ads: minor comment addition.
6174 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6176         * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
6177         pastos in part #3 of the head comment.
6179 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6181         * exp_ch3.adb (Freeze_Type): Do not generate an invariant
6182         procedure body for a local (sub)type declaration within a
6183         predicate function. Invariant checks do not apply to these, and
6184         the expansion of the procedure will happen in the wrong scope,
6185         leading to misplaced freeze nodes.
6187 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6189         * exp_util.adb (Insert_Library_Level_Action): Use proper scope
6190         to analyze generated actions.  If the main unit is a body,
6191         the required scope is that of the corresponding unit declaration.
6193 2017-05-02  Arnaud Charlet  <charlet@adacore.com>
6195         * einfo.adb (Declaration_Node): flip branches of
6196         an IF statement to avoid repeated negations in its condition;
6197         no change in semantics, only to improve readability.
6199 2017-05-02  Arnaud Charlet  <charlet@adacore.com>
6201         * sem_case.adb: Remove extra spaces in parameter declarations.
6203 2017-05-02  Justin Squirek  <squirek@adacore.com>
6205         * usage.adb: Replace space with hyphen ("run time" -> "run-time")
6206         in usage line for new -gnatwE switch.
6208 2017-05-02  Claire Dross  <dross@adacore.com>
6210         * a-cofuve.ads (Remove): Remove unnecessary
6211         conditions in precondition.
6213 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
6215         * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
6216         sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
6218 2017-05-02  Justin Squirek  <squirek@adacore.com>
6220         * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6221         alternative expression.
6222         * sem_res.adb (Resolve_Case_Expression): Ditto.
6224 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6226         * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
6227         Refine predicate for the case where the primitive operation
6228         is a renaming of equality.  An overriding operation that is
6229         a user-defined renaming of predefined equality inherits its
6230         slot from the overridden operation. Otherwise it is treated
6231         as a predefined op and occupies the same predefined slot as
6232         equality. A call to it is transformed into a call to its alias,
6233         which is the predefined equality. A dispatching call thus uses
6234         the proper slot if operation is further inherited and called
6235         with class-wide arguments.
6237 2017-05-02  Justin Squirek  <squirek@adacore.com>
6239         * errout.adb (Set_Msg_Text): Add a case to switch the message
6240         type when the character '[' is detected signifying a warning
6241         about a run-time exception.
6242         * opt.ads Add a new Warning_Mode value for new switch
6243         * switch-b.adb (Scan_Binder_Switches): Add case for the binder
6244         to handle new warning mode
6245         * usage.adb (Usage): Add usage entry for -gnatwE
6246         * warnsw.adb (Set_Warning_Switch): Add case for the new switch
6248 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6250         * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
6251         declaration that operates on some fixed point type.
6253 2017-05-02  Justin Squirek  <squirek@adacore.com>
6255         * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
6257 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6259         * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
6261 2017-05-02  Justin Squirek  <squirek@adacore.com>
6263         * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6264         expression (Analyze_If_Expression): Add check for valid condition
6265         * sem_eval.adb (Eval_Case_Expression): Add check for error posted
6266         on case-expression
6267         * sem_res.adb (Resolve_If_Expression): Add check for valid
6268         condition and then-expression.
6270 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6272         * exp_ch3.adb (Build_Initialization_Call): Generate a null
6273         statement if the initialization call is a null procedure, as
6274         can happen with a controlled type with no explicit Initialize
6275         procedure, or an array of such.
6276         * exp_ch7.adb (Process_Object_Declaration): For a type with
6277         controlled components that has a trivial Initialize procedure,
6278         insert declaration for finalization counter after object
6279         declaration itself.
6280         (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
6281         finalization block and attendant declarations if component has
6282         a trivial Initialize procedure.
6283         (Make_Init_Call): Do not generate a call if controlled type has
6284         a trivial Initialize procedure.
6286 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6288         * g-forstr.ads (Data): Move Format component last.
6289         * g-forstr.adb ("+"): Adjust for above change.
6290         * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
6291         * g-sechas.ads (Context): Move Key last.
6292         * g-socket.ads (Service_Entry_Type): Move Aliases last.
6293         * s-fileio.adb (Temp_File_Record): Move Name last.
6294         * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
6295         * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
6297 2017-05-02  Jerome Lambourg  <lambourg@adacore.com>
6299         * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
6300         switch introduced recently. finally not needed.
6302 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6304         * sem_ch6.adb (Analyze_Null_Procedure): Set the
6305         Corresponding_Body link for a null procedure declaration.
6307 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6309         * atree.h (Flag290): Add missing terminating parenthesis.
6310         * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
6311         (Set_Is_Class_Wide_Clone): Likewise.
6312         * einfo.ads (Is_Class_Wide_Clone): Likewise.
6314 2017-05-02  Gary Dismukes  <dismukes@adacore.com>
6316         * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
6317         parameter Array_Comp to indicate the case of an array object
6318         with null-excluding components.
6319         * checks.adb (Null_Exclusion_Static_Checks):
6320         Call Compile_Time_Constraint_Error instead of
6321         Apply_Compile_Time_Constraint_Error in the component case. Also
6322         call that when Array_Comp is True, with an appropriate warning for
6323         the array component case. Only create an explicit initialization
6324         by null in the case of an object of a null-excluding access type
6325         (and no longer do that in the component case).
6326         * sem_ch3.adb (Check_Component): Add a Boolean parameter
6327         Array_Comp defaulted to False.  Pass Empty for the Comp
6328         actual when calling Null_Exclusion_Static_Checks in the case
6329         where Comp_Decl matches Object_Decl, because we don't have a
6330         component in that case. In the case of an object or component
6331         of an array type, pass True for Array_Comp on the recursive call
6332         to Check_Component.
6334 2017-05-02  Bob Duff  <duff@adacore.com>
6336         * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
6337         compute the linux priority from the Ada priority. Call this everywhere
6338         required. In particular, the previous version was not doing this
6339         computation when setting the ceiling priority in various places. It
6340         was just converting to C.int, which results in a ceiling that is off
6341         by 1.
6343 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6345         * sem_ch3.adb: Comment predicate inheritance.
6347 2017-05-02  Tristan Gingold  <gingold@adacore.com>
6349         * s-trasym.ads: Add comment.
6351 2017-05-02  Bob Duff  <duff@adacore.com>
6353         * sem_elab.adb, sem_elab.ads: Minor comment fixes.
6354         * sem_ch4.adb: Minor reformatting.
6355         * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
6356         * s-taspri-posix-noaltstack.ads: Minor refactoring.
6357         * sinput.ads: Minor typo fix.
6359 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6361         * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
6362         * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
6363         here from exp_ch9, to recognize objects whose creation requires
6364         dynamic allocation, so that the proper warning can be emitted
6365         when restriction No_Implicit_Heap_Allocation is in effect.
6366         * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
6367         to emit proper warning when an object that requires dynamic
6368         allocation is declared.
6370 2017-05-02  Tristan Gingold  <gingold@adacore.com>
6372         * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
6374 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6376         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
6377         visibility rules for equality operators that apply within an
6378         instantiation apply within an inlined body.
6379         * sem_type.adb (Add_One_Interp): ditto.
6381 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6383         * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
6384         procedures.
6386 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6388         * snames.ads-tmpl
6389         (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
6390         Name_No_Tagged_Streams): Move to regular pragmas.  Add
6391         placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
6392         and Secondary_Stack_Size.
6393         (Pragma_Id): Move Pragma_Assume,
6394         Pragma_Attribute_Definition, Pragma_Loop_Optimize and
6395         Pragma_No_Tagged_Streams to second part.
6397 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6399         * exp_attr.adb: Minor reformatting.
6401 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6403         * sem_ch4.adb (Analyze_Selected_Component): Improve error
6404         detection for illegal references to private components or
6405         operations of a protected type in the body of the type.
6407 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6409         * opt.ads: Add missing GNAT markers in comments.
6410         * opt.adb (Set_Opt_Config_Switches): Do not override earlier
6411         settings of Optimize_Alignment at the end.
6413 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6415         * checks.adb (Apply_Constraint_Check): Do not apply
6416         a discriminant check when the associated type is a constrained
6417         subtype created for an unconstrained nominal type.
6418         * exp_attr.adb: Minor reformatting.
6420 2017-05-02  Bob Duff  <duff@adacore.com>
6422         * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
6423         the N_Raise_Expression case.
6424         * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
6425         and add assertions.
6427 2017-05-02  Yannick Moy  <moy@adacore.com>
6429         * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
6430         optimize length comparison in GNATprove mode.
6431         * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
6432         operator /= into negation of operator = when needed.
6433         (Expand_SPARK): Call new
6434         function to expand operator /=.
6436 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6438         * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
6439         Simplify the expression for a fixed-fixed division to remove
6440         divisions by constants whenever possible, as an optimization
6441         for restricted targets.
6443 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6445         * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
6447 2017-05-02  Bob Duff  <duff@adacore.com>
6449         * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
6450         to find primitive ops, instead of using an Identifier that will
6451         later be looked up. This is necessary because these ops are not
6452         necessarily visible at all places where we need to call them.
6453         * exp_util.ads: Minor comment fix.
6455 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6457         * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
6458         references are fully conformant if they are both expansions
6459         of the discriminant of a protected type, within one of the
6460         protected operations. One occurrence may be expanded into a
6461         constant declaration while the other is an input parameter to
6462         the corresponding generated subprogram.
6464 2017-05-02  Justin Squirek  <squirek@adacore.com>
6466         * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
6467         recursivly searching composite-types for null-excluding access
6468         types and verifying them.
6469         (Analyze_Object_Declaration): Add a
6470         call to Check_Null_Excluding_Components for static verification
6471         of non-initialized objects.
6472         * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
6473         a parameter for a composite-type's component and an extra case
6474         for printing component information.
6476 2017-05-02  Yannick Moy  <moy@adacore.com>
6478         * sem_ch10.adb (Analyze_Subunit): Take
6479         configuration pragma into account when restoring appropriate
6480         pragma for analysis of subunit.
6482 2017-05-02  Justin Squirek  <squirek@adacore.com>
6484         * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
6485         s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
6486         g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
6487         clauses from the runtime.
6489 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6491         * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
6492         array components specially.
6494 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6496         * sem_ch8.adb (Premature_Usage): If the premature usage of
6497         an entity is as the expression in its own object decaration,
6498         rewrite the reference as Any_Id to prevent cascaded errors or
6499         compiler loops when such an entity is used in an address clause.
6501 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
6503         * gcc-interface/decl.c (components_to_record): Add missing guard.
6505 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
6507         * gcc-interface/decl.c (components_to_record): Add more comments.
6508         Put back pending fields onto the regular list if the misalignment
6509         happens to cancel itself.
6511 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6513         * sem_ch4.adb (Complete_Object_Operation): When rewriting the
6514         controlling actual in a prefixed call, preserve the original node
6515         information if the prefix itself has been rewritten, for ASIS use.
6517 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6519         * exp_ch6.adb (Insert_Post_Call_Actions):
6520         Code clean up. Insert the post-call actions after an enclosing
6521         procedure call when N denotes a function call and appears as an
6522         actual parameter in the procedure call.
6524 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6526         * freeze.adb (Check_Component_Storage_Order): If there is a clause
6527         for the component, also reject the attribute if the component
6528         doesn't end on a byte boundary and its scalar storage order is
6529         different from that of the enclosing record type.
6531 2017-04-28  Javier Miranda  <miranda@adacore.com>
6533         * atree.ads (Info_Messages): Removed.
6534         (Warning_Info_Messages): New counter.
6535         (Report_Info_Messages): New counter.
6536         * err_vars.ads Update documentation.
6537         * errout.adb (Delete_Warning_And_Continuations): Update
6538         Info_Message occurrences.
6539         (Error_Msg_Internal): Update Info_Message occurrences.
6540         (Delete_Warning): Update Info_Message occurrences.
6541         (Write_Error_Summary): Update Info_Message occurrences.
6542         (Output_Messages): Update Info_Message occurrences.
6543         (To_Be_Removed): Update Info_Message occurrences.
6544         (Reset_Warnings): Update Info_Message occurrences.
6545         * errutil.adb (Error_Msg): Update Info_Message occurrences.
6546         (Finalize): Update Info_Message occurrences.
6547         (Initialize): Update Info_Message occurrences.
6548         * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
6549         (Compilation_Errors): Update Info_Message_Occurences.
6551 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6553         * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
6554         * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
6555         * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
6556         * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
6557         * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
6558         * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
6559         Y_Size.
6560         * sem_eval.adb (Why_Not_Static): Initialize Typ.
6561         * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
6563 2017-04-28  Bob Duff  <duff@adacore.com>
6565         * sem_util.ads, sem_util.adb (Might_Raise): New function
6566         that replaces Is_Exception_Safe, but has the opposite
6567         sense. Is_Exception_Safe was missing various cases -- calls inside
6568         a pragma Debug, calls inside an 'if' or assignment statement,
6569         etc. Might_Raise now walks the entire subtree looking for things
6570         that can raise.
6571         * exp_ch9.adb (Is_Exception_Safe): Remove.
6572         (Build_Protected_Subprogram_Body): Replace call to
6573         Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
6574         constants where possible).
6575         * exp_ch7.adb: Rename Is_Protected_Body -->
6576         Is_Protected_Subp_Body. A protected_body is something different
6577         in the grammar.
6579 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6581         * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
6582         * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
6583         (P_Discrete_Choice_List): Initialize Expr_Node variable.
6584         * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
6585         (P_Protected): Likewise.
6586         * sem_case.adb (Check_Duplicates):
6587         Add pragma Warnings on variable.
6588         * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
6589         * sem_ch4.adb (List_Operand_Interps):  Add pragma Warnings on variable.
6590         * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
6591         (Analyze_Exit_Statement): Initialize Scope_Id variable.
6592         (Analyze_Iterator_Specification): Initialize Bas variable.
6593         * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
6594         Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
6595         (Analyze_Accept_Statement): Initialize Task_Nam.
6597 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6599         * checks.adb (Install_Primitive_Elaboration_Check):
6600         Do not generate an elaboration check if all checks have been
6601         suppressed.
6603 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6605         * sem_ch13.adb (Analyze_Aspect_Specifications, case
6606         Interrupt_Handler and Attach_Handler): Generate reference
6607         to protected operation to prevent spurious warnings about
6608         unreferenced entities. Previous scheme failed with style checks
6609         enabled.
6611 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6613         * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
6614         that follows an expression function must not be relocated to
6615         the generated body, because it applies to the code that follows.
6617 2017-04-28  Gary Dismukes  <dismukes@adacore.com>
6619         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
6620         Relaxed_RM_Semantics to avoid having CodePeer issue errors on
6621         code that might violate the more stringent checking for 'Access
6622         introduced in Ada 2005.
6624 2017-04-28  Arnaud Charlet  <charlet@adacore.com>
6626         * a-cforse.adb: minor style fix in comment.
6628 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6630         * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
6631         initialize Block_Decls variable.
6632         (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
6633         (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
6634         * exp_disp.adb (Expand_Interface_Actuals): Initialize
6635         Formal_DDT and Actual_DDT variables.
6636         (Expand_Interface_Thunk): Initialize Iface_Formal.
6637         (Make_DT): Initialize Size_Comp.
6638         (Make_Select_Specific_Data_Table): Initialize Decls.
6639         * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
6640         Also initialize more RPC_Receiver_* variables.
6641         (Build_To_Any_Function): Initialize Cstr_Formal.
6642         * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
6644 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6646         * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
6647         node between access types, freeze the designated type as well,
6648         so that dispatch table pointers are created in the proper scope,
6649         and not in the constructed body of the expression function.
6651 2017-04-28  Bob Duff  <duff@adacore.com>
6653         * alloc.ads (Nodes_Initial): Go back to previous value. The large
6654         value makes large compilations faster, but small compilations slower.
6656 2017-04-28  Arnaud Charlet  <charlet@adacore.com>
6658         * sem_util.adb: minor typos in Is_Child_Or_Sibling.
6660 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6662         * erroutc.adb (Compilation_Errors): Do not consider info messages
6663         as suitable warnings when warnings must be treated as errors.
6664         * sem_ch7.adb (Analyze_Package_Specification): Do not consider
6665         internally-generated packages when outputting completion
6666         information.
6667         * errout.adb (Output_Messages): Do not consider info messages as
6668         suitable warnings when warnings must be treated as errors.
6669         * errutil.adb (Finalize): Do not consider info messages as
6670         suitable warnings when warnings must be treated as errors.
6672 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6674         * warnsw.ads: Minor fix for incorrect wording in comment.
6676 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6678         * sem_res.adb (In_Instance_Code): New predicate in
6679         Valid_Conversion, to determine whether a type conversion appears
6680         as (or within) an actual for a formal object.  Type conversions
6681         in instances are not rechecked in Valid_Conversion because
6682         visibility changes between generic location andi instance may
6683         lead to spurious errors, but conversions within an actual must be
6684         fully checked, and they are not fully resolved when pre-analyzing
6685         the actuals.
6687 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6689         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
6690         New_Copy_Tree instead of Relocate_Node as any subsequent copies
6691         of the relocated node will have mangled Parent pointers.
6692         * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
6693         tables used in conjunction with entity and itype replication.
6694         (Visit_Entity): Rewrite the restriction on which entities
6695         require duplication.  The restriction now includes all types.
6697 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6699         * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
6700         a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
6701         a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
6702         cleanups.
6704 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6706         * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
6707         gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
6709 2017-04-28  Gary Dismukes  <dismukes@adacore.com>
6711         * exp_util.adb: Minor reformatting.
6713 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6715         * sem_ch4.adb: Fix copy/pasto.
6717 2017-04-27  Tristan Gingold  <gingold@adacore.com>
6719         * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
6720         raise-gcc.c. Fix include search path for raise-gcc.c
6722 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
6724         * fe.h (Warn_On_Questionable_Layout): Declare.
6725         * warnsw.ads (Warn_On_Record_Holes): Move down.
6726         (Warn_On_Questionable_Layout): New boolean variable.
6727         (Warning_Record): Add Warn_On_Questionable_Layout field.
6728         * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
6729         (Restore_Warnings): Likewise.
6730         (Save_Warnings): Likewise.
6731         (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
6732         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
6733         components_to_record.
6734         (gnu_field_to_gnat): New function.
6735         (warn_on_field_placement): Likewise.
6736         (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
6737         parameters.  Rename local variables and adjust recursive call.
6738         Rework final scan of the field list and implement warnings on the
6739         problematic placement of specific sorts of fields.
6741 2017-04-27  Bob Duff  <duff@adacore.com>
6743         * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
6744         * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
6745         * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
6746         * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
6747         * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
6748         * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
6749         For efficiency, cache results of Is_Internal_File_Name and
6750         Is_Predefined_File_Name in the Units table. This avoids a lot
6751         of repeated text processing.
6753 2017-04-27  Emmanuel Briot  <briot@adacore.com>
6755         * g-comlin.adb (Sort_Sections): remove useless test.
6757 2017-04-27  Claire Dross  <dross@adacore.com>
6759         * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
6760         allow the use of regular equality over elements in contracts.
6761         (Formal_Model): Ghost package containing model functions that are
6762         used in subprogram contracts.
6763         (Current_To_Last): Removed, model functions should be used instead.
6764         (First_To_Previous): Removed, model functions should be used instead.
6765         (Strict_Equal): Removed, model functions should be used instead.
6766         (No_Overlap): Removed, model functions should be used instead.
6767         (Equivalent_Keys): Functions over cursors are removed. They were
6768         awkward with explicit container parameters.
6769         * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
6770         allow the use of regular equality over elements in contracts.
6771         (Formal_Model): Ghost package containing model functions that
6772         are used in subprogram contracts.
6773         (Current_To_Last): Removed, model functions should be used instead.
6774         (First_To_Previous): Removed, model functions should be used instead.
6775         (Strict_Equal): Removed, model functions should be used instead.
6776         (No_Overlap): Removed, model functions should be used instead.
6778 2017-04-27  Yannick Moy  <moy@adacore.com>
6780         * gnat1drv.adb: Code cleanup.
6782 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6784         * exp_util.adb (Replace_Entity): The prefix of a 'Result
6785         attribute reference in a post- condition is the subprogram to
6786         which the condition applies. If the condition is inherited
6787         by a type extension, the prefix becomes a reference to the
6788         inherited operation, but there is no need to create a wrapper
6789         for this operation, because 'Result is expanded independently
6790         when elaborating the postconditions.
6792 2017-04-27  Bob Duff  <duff@adacore.com>
6794         * sinput.adb: Minor code cleanup.
6795         * namet.adb (Append): Create faster versions of
6796         Append(String) and Append(Name_Id) by using slice assignment
6797         instead of loops.
6798         * sem_util.adb (In_Instance): Speed this up by removing
6799         unnecessary tests; Is_Generic_Instance is defined for all
6800         entities.
6801         * sem_util.ads, sem_util.adb (In_Parameter_Specification):
6802         Remove unused function.
6803         * alloc.ads (Nodes_Initial): Use a much larger value, because
6804         the compiler was spending a lot of time copying the nodes table
6805         when it grows. This number was chosen in 1996, so is rather out
6806         of date with current memory sizes. Anyway, it's virtual memory.
6807         Get rid of Orig_Nodes_...; use Node_... instead.
6808         * atree.adb (Lock): Do not release the Nodes tables; it's a
6809         waste of time.
6810         Orig_Nodes_ ==> Nodes_
6811         * nlists.adb: Orig_Nodes_ ==> Nodes_
6812         * g-table.adb: Remove unused "with" clause.
6813         * g-table.ads, table.ads: Remove Big_Table_Type, which should
6814         not be used by clients.
6815         * g-dyntab.adb (Last_Allocated): New function
6816         to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
6818 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6820         * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
6821         check.
6822         (Subtypes_Statically_Match): Remove duplicate check.
6823         * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
6825 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6827         * exp_aggr.adb (Replace_Type): Remove the special processing
6828         for selected components.
6829         * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
6830         processing for attributes Fixed_Value and Integer_Value.
6831         * exp_util.adb (Side_Effect_Free): Merge the processing for
6832         qualified expressions, type conversions, and unchecked type
6833         conversions.
6834         * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
6835         and Optional.
6836         * par-ch3.adb (P_Declarative_Items): Merge the processing for
6837         tokens function, not, overriding, and procedure.
6838         * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
6839         for qualified expressions, type conversions, and unchecked
6840         type conversions.
6841         * sem_util.adb (Compile_Time_Constraint_Error): Merge the
6842         processing for Ada 83 and instances.
6843         (Object_Access_Level): Merge the processing for indexed components
6844         and selected components.
6845         * uname.adb (Add_Node_Name): Merge the processing for stubs.
6847 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6849         * checks.adb (Install_Primitive_Elaboration_Check):
6850         Do not generate the check when restriction No_Elaboration_Code
6851         is in effect.
6853 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6855         * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
6856         of Expand_Dispatching_Call. If the denoted subprogram has a
6857         class-wide precondition, this is the only precondition that
6858         applies to the call, rather that the class-wide preconditions
6859         that may apply to the body that is executed. (This is specified
6860         in AI12-0195).
6862 2017-04-27  Yannick Moy  <moy@adacore.com>
6864         * gnat1drv.adb (Adjust_Global_Switches): Issue
6865         a warning in GNATprove mode if the runtime library does not
6866         support IEEE-754 floats.
6868 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6870         * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
6871         is itself inherited it does not carry any contract information,
6872         so examine its parent operation which is its Alias.
6874 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6876         * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
6877         prefix can be an object reference in which case Obj'Image (X)
6878         can only be interpreted as an indexing of the parameterless
6879         version of the attribute.
6880         * par-ch4.adb (P_Name): An attribute reference can be the prefix of
6881         an indexing or a slice operation if the attribute does not require
6882         parameters. In Ada2012 'Image also belongs in this category,
6883         and A'Image (lo .. hi) is legal and must be parsed as a slice.
6885 2017-04-27  Yannick Moy  <moy@adacore.com>
6887         * exp_ch4.adb: Minor reformatting.
6888         * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
6889         disable the CodePeer and C generation modes. Similar to the
6890         opposite actions done in CodePeer mode.
6892 2017-04-27  Yannick Moy  <moy@adacore.com>
6894         * sem_res.adb: Remove duplicate code.
6895         * sem_attr.adb: Delete duplicate code.
6897 2017-04-27  Bob Duff  <duff@adacore.com>
6899         * g-dyntab.adb: Reduce the amount of copying in
6900         Release. No need to copy items past Last.
6902 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6904         * checks.adb Add with and use clauses for Sem_Disp.
6905         (Install_Primitive_Elaboration_Check): New routine.
6906         * checks.ads (Install_Primitive_Elaboration_Check): New routine.
6907         * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
6908         processing of 'Elaborated.
6909         * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
6910         elaboration check.
6912 2017-04-27  Bob Duff  <duff@adacore.com>
6914         * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
6915         If the table grows and then shrinks back to empty, we won't necessarily
6916         point back to the empty array. Code cleanups.
6917         * sinput.ads: Add 'Base to Size clause to match the declared
6918         component subtypes.
6920 2017-04-27  Claire Dross  <dross@adacore.com>
6922         * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
6923         allow the use of regular equality over elements in contracts.
6924         (Formal_Model): Ghost package containing model functions that
6925         are used in subprogram contracts.
6926         (Current_To_Last): Removed, model functions should be used instead.
6927         (First_To_Previous): Removed, model functions should be used instead.
6928         (Strict_Equal): Removed, model functions should be used instead.
6929         (No_Overlap): Removed, model functions should be used instead.
6930         * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
6931         Boolean generic parameter to disable contracts for equivalence
6932         between keys.
6933         (Witness): Create a witness of a key that is used for handling of
6934         equivalence between keys.
6935         (Has_Witness): Check whether a witness is contained in a map.
6936         (W_Get): Get the element associated to a witness.
6937         (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
6938         directly.
6939         * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
6940         Boolean generic parameter to disable contracts for equivalence
6941         between keys.
6942         * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
6943         of equivalence on functional maps.
6944         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
6945         of equivalence on functional maps.
6947 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6949         * exp_ch9.adb (Expand_Entry_Barrier): Code
6950         cleanup. Do not perform the optimization which removes the
6951         declarations of the discriminant and component renamings when
6952         validity checks on operands and attributes are in effect.
6954 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6956         * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
6957         freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
6958         a-cfhama.ads, a-cofove.ads: Minor reformatting.
6960 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6962         * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
6963         pointer dereference.
6964         * g-spipat.adb (Dump): Code clean up. Protect against a possible
6965         null pointer dereference.
6967 2017-04-27  Bob Duff  <duff@adacore.com>
6969         * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
6970         Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
6971         Free renames Init, since they do the same thing.
6972         * g-table.ads: Default for Table_Low_Bound.
6973         * table.ads: Default for Table_Low_Bound, Table_Initial, and
6974         Table_Increment.
6976 2017-04-27  Bob Duff  <duff@adacore.com>
6978         * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
6979         can reallocate.
6980         * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
6981         * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
6982         Reorder code so that above assertions do not fail.
6983         * table.ads: Remove obsolete comment on Locked.
6985 2017-04-27  Claire Dross  <dross@adacore.com>
6987         * a-cfdlli.ads: Code cleanup.
6989 2017-04-27  Yannick Moy  <moy@adacore.com>
6991         * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
6992         when needed for proof.  (Expand_SPARK): Call the new procedure.
6993         * exp_util.ads Fix typo.
6995 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
6997         * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
6998         fixes.
7000 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7002         * sem_elab.adb Add new type Visited_Element
7003         and update the contents of table Elab_Visited.  Various code clean up.
7004         (Check_Elab_Call): Determine whether a prior call to
7005         the same subprogram was already examined within the same context.
7006         (Check_Internal_Call_Continue): Register the subprogram being
7007         called as examined within a particular context. Do not suppress
7008         elaboration warnings.
7010 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7012         * xoscons.adb, osint.ads: Minor reformatting.
7014 2017-04-27  Bob Duff  <duff@adacore.com>
7016         * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
7017         Table_Count_Type --> Table_Last_Type, because the name
7018         was confusing (a "count" usually starts at zero).  Add
7019         functionality supported or needed by other tables packages
7020         (Move, Release_Threshold).
7021         * g-table.ads, g-table.adb: This is now just a thin wrapper
7022         around g-dyntab.ads/g-dyntab.adb.  Add functionality supported
7023         or needed by other tables packages (Save, Restore).
7024         * table.ads, table.adb: This is now just a thin wrapper around
7025         * g-table.ads/g-table.adb.
7026         * namet.h, scos.h, uintp.h: These files are reaching into the
7027         private data of some instances of g-table, whose names changed,
7028         so the above change requires some adjustment here. It now uses
7029         public interfaces.
7031 2017-04-27  Bob Duff  <duff@adacore.com>
7033         * namet.adb, namet.ads: Minor: remove unused procedures.
7035 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
7037         * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
7038         (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
7039         Add pragma Warnings on Rtype variable in nested block.  *
7040         * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
7041         * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
7042         (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
7043         * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
7044         (Process_Component_List_For_Finalize): Initialize Counter_Id.
7045         (Build_Finalize_Statements): Initialize Bod_Stmts.
7046         * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
7048 2017-04-27  Claire Dross  <dross@adacore.com>
7050         * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
7051         allow the use of regular equality over elements in contracts.
7052         (Formal_Model): Ghost package containing model functions that are
7053         used in subprogram contracts.
7054         (Current_To_Last): Removed, model
7055         functions should be used instead.
7056         (First_To_Previous): Removed, model functions should be used instead.
7057         (Strict_Equal): Removed, model functions should be used instead.
7058         (No_Overlap): Removed, model functions should be used instead.
7059         (Equivalent_Keys): Functions over cursors are removed. They were
7060         awkward with explicit container parameters.
7061         * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
7062         (proof only) procedure to help GNATprove when equivalence over
7063         keys is not equality.
7065 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7067         * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
7068         sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
7069         Minor reformatting and code cleanups.
7071 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7073         * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
7074         subsidiary of Check_Inherited_Conditions, to build pragmas for an
7075         operation whose ancestor has classwide pre/postconditions. This
7076         is used both to check the legality of the inheritance in Ada
7077         and in SPARK, and to determine whether a wrapper is needed for
7078         an inherited operation.
7079         * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
7080         Improve placement of error message for inherited classwide
7081         conditions that become illegal on type derivation.
7083 2017-04-27  Yannick Moy  <moy@adacore.com>
7085         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
7086         SPARK_Mode from context on generic package.
7087         * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
7088         useless test.
7090 2017-04-27  Claire Dross  <dross@adacore.com>
7092         * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
7093         overflows in computations.
7094         * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
7095         overflows in computations.
7096         (Insert): Rewrite precondition to avoid overflows in computations.
7097         * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
7098         overflows in computations.
7099         (Insert): Rewrite precondition to avoid overflows in computations.
7101 2017-04-27  Steve Baird  <baird@adacore.com>
7103         * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
7104         flag when it is declared in order to avoid confusing CodePeer about
7105         the possibility of an uninitialized variable read.
7107 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7109         * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
7110         no dimensionality error if the subtype of the expression is
7111         identical to the nominal subtype in the declaration, even though
7112         the expression itself may have been constant-folded and lack a
7113         dimension vector.
7114         * sem_dim.ads: Add comments on setting of dimension vectors and
7115         its interaction with node rewritings and side-effect removal.
7117 2017-04-27  Bob Duff  <duff@adacore.com>
7119         * debug.adb: Minor comment correction.
7120         * sem_dim.ads: Minor reformatting and typo fixes.
7122 2017-04-27  Bob Duff  <duff@adacore.com>
7124         * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
7125         Last of the tables via function calls, rather than relying on layout
7126         of data structures.
7128 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7130         * exp_util.adb: No wrapper in GNATprove mode.
7132 2017-04-27  Yannick Moy  <moy@adacore.com>
7134         * sem_res.adb (Resolve_Comparison_Op): Always
7135         evaluate comparisons between values of universal types.
7137 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7139         * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
7140         an elaboration counter nor a check when in GNATprove mode.
7141         * sem_util.adb (Build_Elaboration_Entity): Do not create an
7142         elaboration counter when in GNATprove mode.
7144 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7146         * freeze.adb: copy-paste typo.
7148 2017-04-27  Yannick Moy  <moy@adacore.com>
7150         * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
7151         Use correct test to detect call in GNATprove mode instead of
7152         compilation.
7154 2017-04-27  Claire Dross  <dross@adacore.com>
7156         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
7157         New property function expressing that the element of a
7158         sequence are contained in the union of two sequences.
7159         (Formal_Model.M_Elements_Included): New property function
7160         expressing that the element of a sequence are another sequence.
7161         (Generic_Sorting): Use new property functions to state that
7162         elements are preserved by Sort and Merge.
7163         * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
7164         allow the use of regular equality over elements in contracts.
7165         (Formal_Model): Ghost package containing model functions
7166         that are used in subprogram contracts.  (Capacity):
7167         On unbounded containers, return the maximal capacity.
7168         (Current_To_Last): Removed, model functions should be used instead.
7169         (First_To_Previous): Removed, model functions should be used instead.
7170         (Append): Default parameter value replaced
7171         by new wrapper to allow more precise contracts.
7172         (Insert): Subprogram restored, it seems it was useful to users even if
7173         it is inefficient.
7174         (Delete): Subprogram restored, it seems it was useful to users even if
7175         it is inefficient.
7176         (Prepend): Subprogram restored, it seems it was useful to users even
7177         if it is inefficient.
7178         (Delete_First): Subprogram restored, it seems it
7179         was useful to users even if it is inefficient.  (Delete_Last):
7180         Default parameter value replaced by new wrapper to allow more
7181         precise contracts.
7182         (Generic_Sorting.Merge): Subprogram restored.
7183         * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
7184         allow the use of regular equality over elements in contracts.
7185         (Formal_Model): Ghost package containing model functions
7186         that are used in subprogram contracts.  (Capacity):
7187         On unbounded containers, return the maximal capacity.
7188         (Current_To_Last): Removed, model functions should be used
7189         instead.
7190         (First_To_Previous): Removed, model functions should be used instead.
7191         (Append): Default parameter value replaced
7192         by new wrapper to allow more precise contracts.
7193         (Insert): Subprogram restored, it seems it was useful to users even if
7194         it is inefficient.
7195         (Delete): Subprogram restored, it seems it was useful to users even if
7196         it is inefficient.
7197         (Prepend): Subprogram restored, it seems it was useful to users even
7198         if it is inefficient.
7199         (Delete_First): Subprogram restored, it seems it
7200         was useful to users even if it is inefficient.  (Delete_Last):
7201         Default parameter value replaced by new wrapper to allow more
7202         precise contracts.
7203         (Generic_Sorting.Merge): Subprogram restored.
7204         (Vector): Do not reuse formal vectors, as it is no longer possible
7205         to supply them with an equality function over elements.
7207 2017-04-27  Bob Duff  <duff@adacore.com>
7209         * g-dyntab.adb (Release): When allocating the new
7210         table, use the correct slice of the old table to initialize it.
7212 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
7214         * einfo.ads: Minor fixes in comments.
7216 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7218         * sem_prag.adb: disable clones in SPARK_Mode.
7220 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7222         * sem_util.ads, contracts.adb: Minor reformatting.
7224 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7226         * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
7227         Build body of subprogram that has a class-wide condition that
7228         contains calls to other primitives.
7229         (Build_Class_Wide_Clone_Call); Build a call to the common
7230         class-wide clone of a subprogram with classwide conditions. The
7231         body of the subprogram becomes a wrapper for a call to the
7232         clone. The inherited operation becomes a similar wrapper to which
7233         modified conditions apply, and the call to the clone includes
7234         the proper conversion in a call the parent operation.
7235         (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
7236         subprogram that has a classwide condition that contains calls to
7237         other primitives, build an internal subprogram that is invoked
7238         through a type-specific wrapper for all inherited subprograms
7239         that may have a modified condition.
7240         * sem_prag.adb (Check_References): If subprogram has a classwide
7241         condition, create entity for corresponding clone, to be invoked
7242         through wrapper subprograns.
7243         (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
7244         message about placement if pragma isi internally generated.
7245         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
7246         a classwide clone, build body of clone as copy of original body,
7247         and rewrite original body as a wrapper as a wrapper for a call to
7248         the clone, so that it incorporates the original pre/postconditions
7249         of the subprogram.
7250         * freeze.adb (Check_Inherited_Conditions): For an inherited
7251         subprogram that inherits a classwide condition, build spec and
7252         body of corresponding wrapper so that call to inherited operation
7253         gets the modified conditions.
7254         * contracts.adb (Analyze_Contracts): If analysis of classwide
7255         condition has created a clone for a primitive operation, analyze
7256         declaration of clone.
7258 2017-04-27  Steve Baird  <baird@adacore.com>
7260         * exp_util.adb (Build_Allocate_Deallocate_Proc):
7261         Add "Suppress => All_Checks" to avoid generating unnecessary
7262         checks.
7264 2017-04-27  Yannick Moy  <moy@adacore.com>
7266         * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
7267         * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
7268         inlining body in GNATprove mode when switch -gnatdm used.
7269         * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
7270         in GNATprove mode when switch -gnatdm used.
7272 2017-04-27  Arnaud Charlet  <charlet@adacore.com>
7274         * sem_ch13.adb (Analyze_Attribute_Definition_Clause
7275         [Attribute_Address]): Call Set_Address_Taken when ignoring rep
7276         clauses, so that we keep an indication of the address clause
7277         before removing it from the tree.
7279 2017-04-27  Yannick Moy  <moy@adacore.com>
7281         * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
7282         of expression being qualified, when not an object name, or else
7283         evaluate the underlying name.
7285 2017-04-27  Jerome Lambourg  <lambourg@adacore.com>
7287         * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
7289 2017-04-27  Justin Squirek  <squirek@adacore.com>
7291         * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
7292         Process_Component_List_For_Finalization as a local variable.
7293         (Process_Component_For_Finalize): Add an extra parameter to avoid
7294         global references.
7295         (Process_Component_List_For_Finalization): Correct calls to
7296         Process_Component_For_Finalize to take Num_Comps as a parameter.
7298 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7300         * sem_ch8.adb (Find_Direct_Name): Account for the case where
7301         a use-visible entity is defined within a nested scope of an
7302         instance when giving priority to entities which were visible in
7303         the original generic.
7304         * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
7306 2017-04-27  Tristan Gingold  <gingold@adacore.com>
7308         * raise-gcc.c: Don't use unwind.h while compiling
7309         for the frontend, but mimic host behavior.
7311 2017-04-27  Javier Miranda  <miranda@adacore.com>
7313         * sem_ch3.adb (Build_Discriminated_Subtype):
7314         Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
7316 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7318         * sem_prag.adb (Analyze_Global_Item):
7319         Do not consider discriminants because they are not "entire
7320         objects". Remove the discriminant-related checks because they are
7321         obsolete.
7322         (Analyze_Input_Output): Do not consider discriminants
7323         because they are not "entire objects".
7325 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7327         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
7328         perform check if the current scope does not come from source,
7329         as is the case for a rewritten task body, because check has
7330         been performed already, and may not be doable because of changed
7331         visibility.
7333 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7335         * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
7336         a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
7337         Minor reformatting.
7339 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7341         * sem_ch4.adb (Analyze_Call): If the return type of a function
7342         is incomplete in an context in which the full view is available,
7343         replace the type of the call by the full view, to prevent spurious
7344         type errors.
7345         * exp_disp.adb (Check_Premature_Freezing): Disable check on an
7346         abstract subprogram so that compiler does not reject a parameter
7347         of a primitive operation of a tagged type being frozen, when
7348         the untagged type of that parameter cannot be frozen.
7350 2017-04-27  Bob Duff  <duff@adacore.com>
7352         * sem_attr.adb (Compute_Type_Key): Don't walk
7353         representation items for irrelevant types, which could be in a
7354         different source file.
7356 2017-04-27  Steve Baird  <baird@adacore.com>
7358         * exp_attr.adb (Expand_N_Attribute_Reference):
7359         Don't expand Image, Wide_Image, Wide_Wide_Image attributes
7360         for CodePeer.
7362 2017-04-27  Yannick Moy  <moy@adacore.com>
7364         * exp_unst.ads: Fix typos in comments.
7366 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7368         * sem_eval.adb (Choice_Matches): Handle properly a real literal
7369         whose type has a defined static predicate.
7371 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7373         * exp_ch4.adb (Insert_Dereference_Action):
7374         Do not adjust the address of a controlled object when the
7375         associated access type is subject to pragma No_Heap_Finalization.
7376         Code reformatting.
7378 2017-04-27  Pierre-Marie de Rodat  <derodat@adacore.com>
7380         * gcc-interface/utils.c (gnat_type_for_size): Set
7381         TYPE_ARTIFICIAL on created types.
7383 2017-04-27  Claire Dross  <dross@adacore.com>
7385         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7386         modifications in functional containers.
7387         * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7388         to improve readablity. Subprograms are separated between basic
7389         operations, constructors and properties. Universally quantified
7390         formulas in contracts are factorized in independant functions
7391         with a name and a comment.  Names of parameters are improved.
7393 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7395         * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7397 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7399         * sem_res.adb (Resolve_Type_Conversion): Do not
7400         install a predicate check here since this is already done during
7401         the expansion phase. Verify whether the operand satisfies the
7402         static predicate (if any) of the target type.
7403         * sem_ch3.adb (Analyze_Object_Declaration): Do
7404         not install a predicate check if the object is initialized by
7405         means of a type conversion because the conversion is subjected
7406         to the same check.
7408 2017-04-27  Tristan Gingold  <gingold@adacore.com>
7410         * raise.c (__gnat_builtin_longjmp): Remove.
7411         (__gnat_bracktrace):
7412         Add a dummy definition for the compiler (__gnat_eh_personality,
7413         __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
7414         __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
7415         __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
7416         * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
7417         * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
7418         and a-except-2005.adb.
7419         * raise-gcc.c: Allow build in compiler, compiled as a C++
7420         file.
7421         (__gnat_Unwind_ForcedUnwind): Adjust prototype.
7422         (db): Constify msg_format.
7423         (get_call_site_action_for): Don't use void arithmetic.
7424         * system.ads (Frontend_Exceptions): Set to False.
7425         (ZCX_By_Default): Set to True.
7426         (GCC_ZC_Support): Set to True.
7427         * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
7428         a-except.ad[sb].
7429         * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
7430         in gnat1 and gnatbind.
7431         * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
7432         s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
7433         * s-excmac.ads, s-excmac.adb: Copy of variants.
7434         * a-except.o: Adjust preequisites.
7435         Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
7437 2017-04-27  Claire Dross  <dross@adacore.com>
7439         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7440         modifications in functional containers.
7441         * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7442         to improve readablity. Subprograms are separated between basic
7443         operations, constructors and properties. Universally quantified
7444         formulas in contracts are factorized in independant functions
7445         with a name and a comment.  Names of parameters are improved.
7447 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7449         * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7451 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7453         * sem_res.adb (Resolve_Type_Conversion): Do not
7454         install a predicate check here since this is already done during
7455         the expansion phase. Verify whether the operand satisfies the
7456         static predicate (if any) of the target type.
7457         * sem_ch3.adb (Analyze_Object_Declaration): Do
7458         not install a predicate check if the object is initialized by
7459         means of a type conversion because the conversion is subjected
7460         to the same check.
7462 2017-04-27  Tristan Gingold  <gingold@adacore.com>
7464         * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
7465         replaced by their variants).
7467 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7469         * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
7470         cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
7471         a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
7473 2017-04-27  Tristan Gingold  <gingold@adacore.com>
7475         * s-excmac-gcc.ads, s-excmac-gcc.adb,
7476         s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
7477         Ada95.
7479 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7481         * exp_ch7.adb (Establish_Transient_Scope): Rewrite
7482         the loop which detects potential enclosing transient scopes. The
7483         loop now terminates much earlier as transient scopes are bounded
7484         by packages and subprograms.
7486 2017-04-27  Claire Dross  <dross@adacore.com>
7488         * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
7489         allow the use of regular equality over elements in contracts.
7490         (Cursor): Type is now public so that it can be used in
7491         model functions.
7492         (Formal_Model): Ghost package containing
7493         model functions that are used in subprogram contracts.
7494         (Current_To_Last): Removed, model functions should be used
7495         instead.
7496         (First_To_Previous): Removed, model functions should
7497         be used instead.
7498         (Strict_Equal): Removed, model functions
7499         should be used instead.
7500         (Append): Default parameter value
7501         replaced by new wrapper to allow more precise contracts.
7502         (Insert): Default parameter value replaced by new wrapper to
7503         allow more precise contracts.
7504         (Delete): Default parameter
7505         value replaced by new wrapper to allow more precise contracts.
7506         (Prepend): Default parameter value replaced by new wrapper to
7507         allow more precise contracts.
7508         (Delete_First): Default parameter
7509         value replaced by new wrapper to allow more precise contracts.
7510         (Delete_Last): Default parameter value replaced by new wrapper
7511         to allow more precise contracts.
7513 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7515         * exp_spark.adb (Expand_SPARK): Perform specialized expansion
7516         for object declarations.
7517         (Expand_SPARK_N_Object_Declaration): New routine.
7518         * sem_elab.adb (Check_A_Call): Include calls to the
7519         Default_Initial_Condition procedure of a type under the SPARK
7520         elaboration checks umbrella.
7522 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7524         * sem.adb (Analyze): Diagnose an illegal iterated component
7525         association.
7526         * sem_util.ads, sem_util.adb
7527         (Diagnose_Iterated_Component_Association): New routine.
7529 2017-04-27  Bob Duff  <duff@adacore.com>
7531         * adaint.c (__gnat_get_current_dir): Return 0 in length if
7532         getcwd fails.
7533         * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
7534         exception if getcwd failed.
7536 2017-04-27  Yannick Moy  <moy@adacore.com>
7538         * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
7539         entities with special prefix.
7541 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7543         * debug.adb Change the documentation of switch -gnatd.s.
7544         * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
7545         to manage the secondary stack when an enclosing scope already
7546         performs this functionality (aka relaxed management). Switch
7547         -gnatd.s may be used to force strict management in which case
7548         the block will manage the secondary stack unconditionally. Add
7549         a guard to stop the traversal when encountering a package or a
7550         subprogram scope.
7552 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7554         * sem_res.adb (Resolve_Call): Refine further the handling of
7555         limited views of return types in function calls. If the function
7556         that returns a limited view appears in the current unit,
7557         we do not replace its type by the non-limited view because
7558         this transformation is performed int the back-end. However,
7559         the type of the call itself must be the non-limited view, to
7560         prevent spurious resolution errors.
7562 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7564         * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
7565         Removed, proposed implementation using generics for class-wide
7566         preconditions proved impractical.
7567         (Class_Wide_Clone): New attribute of subprogram. Designates
7568         subprogram created for primitive operations with class-wide
7569         pre/postconditions that contain calls to other primitives. The
7570         clone holds the body of the original primitive, but the
7571         pre/postonditions do not apply to it. The original body is
7572         rewritten as a wrapper for a call to the clone.
7573         (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
7574         the flag is set, no code for the corresponding pre/postconditions
7575         is inserted into its body.
7577 2017-04-27  Bob Duff  <duff@adacore.com>
7579         * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
7580         Scalar_Storage_Order if -gnatI is given.
7581         * sem_prag.adb (Analyze_Pragma): Ignore
7582         Default_Scalar_Storage_Order if -gnatI is given.
7584 2017-04-27  Claire Dross  <dross@adacore.com>
7586         * a-cofuba.ads (Add): Take as an additional input parameter
7587         the position where the element should be inserted.
7588         (Remove): New function that removes an element from the container.
7589         * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
7590         * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
7591         (Remove): New function that removes an element from a set.
7592         * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
7593         (Remove): New function that removes an element from a sequence.
7594         (Insert): New function that adds anywhere in a sequence.
7596 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7598         * checks.adb (Generate_Range_Check): Revert previous change.
7600 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7602         * sem_util.adb: Minor reformatting/rewording.
7604 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7606         * lib-xref.adb (Generate_Reference): The use
7607         of attribute 'Result is not considered a violation of pragma
7608         Unreferenced.
7610 2017-04-27  Justin Squirek  <squirek@adacore.com>
7612         * cstand.adb (Create_Standard): Correctly set
7613         Directly_Designated_Type for Any_Access.
7614         * sem_type.adb (Covers): Minor grammar fixes.
7616 2017-04-27  Bob Duff  <duff@adacore.com>
7618         * sem_attr.adb: Minor cleanup.
7620 2017-04-27  Claire Dross  <dross@adacore.com>
7622         * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
7623         private child of Ada.Containers used to implement all functional
7624         containers.
7625         * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
7626         child of Ada.Containers. It provides functional indefinite unbounded
7627         maps which can be used as high level models for specification
7628         of data structures.
7629         * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
7630         child of Ada.Containers. It provides functional indefinite unbounded
7631         sets which can be used as high level models for specification
7632         of data structures.
7633         * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
7634         child of Ada.Containers.  It provides functional indefinite unbounded
7635         vectors which can be used as high level models for specification
7636         of data structures.
7637         * Makefile.rtl: Add new packages.
7638         * impunit.adb: Add new packages.
7640 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7642         * sem_ch4.adb: Minor reformatting.
7644 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7646         * sem_ch12.adb (Analyze_Associations): minor reformatting.
7647         (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
7648         point type actual that has user-defined arithmetic primitives,
7649         when there is a previous actual for a formal package that defines
7650         a fixed-point type with the parent user-defined operator.
7652 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7654         * checks.adb (Generate_Range_Check): Reinstate part of previous change.
7655         * sem_attr.adb (Resolve_Attribute): Generate a range check when
7656         the component type allows range checks.
7658 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7660         * sem_aux.adb (Is_Generic_Formal): Use original node to locate
7661         corresponding declaration, because formal derived types are
7662         rewritten as private extensions.
7664 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7666         * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
7667         dimensions of operands if node has been analyzed already, because
7668         previous analysis and dimension checking will have removed the
7669         dimension information from the operands.
7671 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7673         * debug.adb: Document the use of switch -gnatd.s.
7674         * einfo.ads Update the documentation on attribute
7675         Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
7676         the uses of these attributes from certain entities.
7677         * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
7678         which determines whether the block should continue to manage
7679         the secondary stack.
7680         (Manages_Sec_Stack): New routine.
7682 2017-04-27  Bob Duff  <duff@adacore.com>
7684         * atree.ads: Minor edit.
7686 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7688         * sinfo.ads: Update the section on Ghost mode. Add
7689         a section on SPARK mode. Update the placement of section on
7690         expression functions.
7692 2017-04-27  Bob Duff  <duff@adacore.com>
7694         * sinput.adb (Get_Source_File_Index): Don't
7695         assert that S is in the right range in the case where this is
7696         a .dg file under construction.
7698 2017-04-27  Yannick Moy  <moy@adacore.com>
7700         * sem_util.adb (Check_Result_And_Post_State):
7701         Handle more precisely each conjunct in expressions formed by
7702         and'ing sub-expressions.
7704 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7706         * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
7708 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7710         * gnat_rm.texi, gnat_ugn.texi,
7711         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7712         doc/gnat_ugn/platform_specific_information.rst,
7713         doc/gnat_ugn/gnat_and_program_execution.rst,
7714         doc/gnat_ugn/gnat_utility_programs.rst,
7715         doc/gnat_ugn/the_gnat_compilation_model.rst,
7716         doc/gnat_rm/implementation_defined_attributes.rst,
7717         doc/gnat_rm/the_gnat_library.rst,
7718         doc/gnat_rm/implementation_defined_pragmas.rst,
7719         doc/gnat_rm/representation_clauses_and_pragmas.rst,
7720         doc/gnat_rm/implementation_of_specific_ada_features.rst,
7721         doc/gnat_rm/implementation_defined_aspects.rst,
7722         doc/gnat_rm/implementation_defined_characteristics.rst: Update
7723         documentation.
7725 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7727         * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
7728         generating C code on complex case expressions.
7730 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7732         * sem_prag.adb (Analyze_Pragma): Generate a warning instead
7733         of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
7734         * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
7735         Ada_2012 instead of Ada_2005 to be compatible with the above
7736         change.
7737         * bindgen.adb: Silence new warning on pragma Ada_95.
7739 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7741         * checks.adb (Generate_Range_Check): Revert part of previous change.
7743 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7745         * sem_ch4.adb (Try_Container_Indexing): Handle properly a
7746         container indexing operation that appears as a an actual in a
7747         parameter association in a procedure call.
7749 2017-04-25  Olivier Ramonat  <ramonat@adacore.com>
7751         * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
7752         Fix spelling mistakes.
7754 2017-04-25  Bob Duff  <duff@adacore.com>
7756         * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
7757         * sinput-p.adb: Use regular fat pointers, with bounds checking,
7758         for source buffers.  Fix misc obscure bugs.
7759         * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
7760         checking, for source buffers.  Modify representation clause for
7761         Source_File_Record as appropriate.  Move Source_File_Index_Table
7762         from spec to body, because it is not used outside the body.
7763         Move Set_Source_File_Index_Table into the private part, because
7764         it is used only in the body and in children.  Use trickery to
7765         modify the dope in the generic instantiation case.  It's ugly,
7766         but not as ugly as the previous method.  Fix documentation.
7767         Remove obsolete code.
7768         * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
7769         indexing in source buffers.
7770         * fmap.adb: Avoid conversions from one string type to another.
7771         Remove a use of global name buffer.
7772         * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
7773         fixes.
7775 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
7777         * exp_util.adb, exp_ch4.adb: Minor reformatting.
7779 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7781         * checks.adb: Code clean up in various routines.
7782         (Generate_Range_Check): Do not generate a range check when the
7783         expander is not active or when index/range checks are suppressed
7784         on the target type.
7785         (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
7786         Remove variants that include a Supress parameter. These routines
7787         are never used, and were introduced before the current scope-based
7788         check suppression method.
7790 2017-04-25  Vasiliy Fofanov  <fofanov@adacore.com>
7792         * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
7793         code and some subprogram calls that are now noop.
7795 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7797         * exp_ch4.adb (Expand_N_Case_Expression): Take
7798         Minimize_Expression_With_Actions into account when possible.
7800 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7802         * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
7803         (Known_Null): Moved to Sem_Util.
7804         * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
7805         (Known_Null): Moved to Sem_Util.
7806         * sem_util.adb Add new enumeration type Null_Status_Kind.
7807         (Known_Non_Null): Moved from Exp_Util. Most of the logic in
7808         this routine is now carried out by Null_Status.
7809         (Known_Null): Moved from Exp_Util. Most of the logic in this routine
7810         is now carried out by Null_Status.
7811         (Null_Status): New routine.
7812         * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
7813         (Known_Null): Moved from Exp_Util.
7815 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7817         * sem_ch6.adb (Analyze_Expression_Function): Do not report an
7818         error on the return type of an expression function that is a
7819         completion, if the type is derived from a generic formal type.
7821 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7823         * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
7824         conversion are those of the target type.
7826 2017-04-25  Bob Duff  <duff@adacore.com>
7828         * a-clrefi.adb: Minor cleanup.
7830 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
7832         * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
7834 2017-04-25  Bob Duff  <duff@adacore.com>
7836         * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
7837         types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
7838         errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
7839         scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
7840         the Internal_Source buffer. This removes the incorrect call to "="
7841         the customer noticed.
7842         Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
7843         eventually need to eliminate them altogether. Or else get rid
7844         of zero-origin addressing.
7846 2017-04-25  Claire Dross  <dross@adacore.com>
7848         * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
7849         function used in GNATprove to know if an expression contains
7850         non-dispatching calls on primitives of a tagged type.
7852 2017-04-25  Bob Duff  <duff@adacore.com>
7854         * rtsfind.adb (Initialize): Initialize
7855         First_Implicit_With. Building the compiler with Normalize_Scalars
7856         and validity checking finds this being used as an uninitialized
7857         variable.
7859 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7861         * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
7862         Add a warning about SPARK mode management. The routine now
7863         saves and restores both the mode and associated pragma.
7864         (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
7865         SPARK mode management. The routine now saves and restores both
7866         the mode and associated pragma.
7867         (Analyze_Object_Contract):
7868         Add a warning about SPARK mode management. The routine
7869         now saves and restores both the mode and associated pragma.
7870         (Analyze_Package_Body_Contract): Add a warning about SPARK mode
7871         management.  The routine now saves and restores both the mode
7872         and associated pragma.  (Analyze_Package_Contract): Add a warning
7873         about SPARK mode management. The routine now saves and restores
7874         both the mode and associated pragma.
7875         (Analyze_Task_Contract):
7876         Add a warning about SPARK mode management. The routine now saves
7877         and restores both the mode and associated pragma.
7878         * expander.adb (Expand): Change the way the Ghost mode is saved
7879         and restored.
7880         * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
7881         saved and restored.
7882         * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
7883         and restored.
7884         * exp_util.adb (Build_DIC_Procedure_Body):
7885         Change the way the Ghost mode is saved and restored.
7886         (Build_DIC_Procedure_Declaration): Change the way the Ghost
7887         mode is saved and restored.
7888         (Build_Invariant_Procedure_Body):
7889         Change the way the Ghost mode is saved and restored.
7890         (Build_Invariant_Procedure_Declaration): Change the way the Ghost
7891         mode is saved and restored.
7892         (Make_Predicate_Call): Change the
7893         way the Ghost mode is saved and restored.
7894         * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
7895         saved and restored.
7896         * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7897         and its assignment.
7898         (Mark_And_Set_Ghost_Body): Remove parameter
7899         Mode and its assignment.
7900         (Mark_And_Set_Ghost_Completion):
7901         Remove parameter Mode and its assignment.
7902         (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
7903         assignment.
7904         (Mark_And_Set_Ghost_Instantiation): Remove parameter
7905         Mode and its assignment.
7906         (Mark_And_Set_Ghost_Procedure_Call):
7907         Remove parameter Mode and its assignment.
7908         (Set_Ghost_Mode):
7909         Remove parameter Mode and its assignment.
7910         * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7911         and update the comment on usage.
7912         (Mark_And_Set_Ghost_Body):
7913         Remove parameter Mode and update the comment on usage.
7914         (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
7915         update the comment on usage.
7916         (Mark_And_Set_Ghost_Declaration):
7917         Remove parameter Mode and update the comment on usage.
7918         (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
7919         update the comment on usage.
7920         (Mark_And_Set_Ghost_Procedure_Call):
7921         Remove parameter Mode and update the comment on usage.
7922         (Set_Ghost_Mode): Remove parameter Mode and update the comment
7923         on usage.
7924         * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
7925         types.
7926         * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
7927         of obsolete field SPARK_Mode_Pragma.
7928         (Load_Main_Source): Remove
7929         the assignment of obsolete field SPARK_Mode_Pragma.
7930         (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
7931         * lib-writ.adb (Add_Preprocessing_Dependency): Remove
7932         the assignment of obsolete field SPARK_Mode_Pragma.
7933         (Ensure_System_Dependency): Remove the assignment of obsolete
7934         field SPARK_Mode_Pragma.
7935         * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
7936         mode management. Change the way Ghost and SPARK modes are saved
7937         and restored.
7938         * sem.adb (Analyze): Change the way the Ghost mode is saved
7939         and restored.
7940         * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
7941         Ghost mode is saved and restored.
7942         (Process_Full_View): Change
7943         the way the Ghost mode is saved and restored.
7944         * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
7945         mode is saved and restored.
7946         * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
7947         mode is saved and restored.
7948         (Analyze_Subprogram_Body_Helper):
7949         Change the way the Ghost mode is saved and restored.
7950         * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
7951         Ghost mode is saved and restored.
7952         * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
7953         management. Save the SPARK mode-related data prior to any changes
7954         to the scope stack and contexts. The mode is then reinstalled
7955         before the subunit is analyzed in order to restore the original
7956         view of the subunit.
7957         * sem_ch12.adb (Analyze_Package_Instantiation): Update the
7958         warning on region management.  Change the way the Ghost and
7959         SPARK modes are saved and restored.
7960         (Inline_Instance_Body):
7961         Add a warning about SPARK mode management. Code clean up.
7962         (Analyze_Subprogram_Instantiation): Update the warning on region
7963         management.  Change the way the Ghost and SPARK modes are saved
7964         and restored.
7965         (Instantiate_Package_Body): Update the warning
7966         on region management. Change the way the Ghost and SPARK modes
7967         are saved and restored.
7968         (Instantiate_Subprogram_Body): Update
7969         the warning on region management. Change the way the Ghost and
7970         SPARK modes are saved and restored.
7971         (Set_Instance_Env): Add a
7972         warning about SPARK mode management. Change the way SPARK mode
7973         is saved and restored.
7974         * sem_ch13.adb (Build_Predicate_Functions):
7975         Change the way the Ghost mode is saved and restored.
7976         (Build_Predicate_Function_Declaration): Change the way the Ghost
7977         mode is saved and restored.
7978         * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
7979         mode management. Change the way SPARK mode is saved and restored.
7980         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
7981         Change the way the Ghost mode is saved and restored.
7982         (Analyze_Initial_Condition_In_Decl_Part): Change the way
7983         the Ghost mode is saved and restored.
7984         (Analyze_Pragma):
7985         Change the way the Ghost mode is saved and restored.
7986         (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
7987         Ghost mode is saved and restored.
7988         * sem_util.adb (Install_SPARK_Mode): New routine.
7989         (Restore_SPARK_Mode): New routine.
7990         (Save_SPARK_Mode_And_Set): Removed.
7991         (Set_SPARK_Mode): New routine.
7992         * sem_util.ads (Install_SPARK_Mode): New routine.
7993         (Restore_SPARK_Mode): New routine.
7994         (Save_SPARK_Mode_And_Set): Removed.
7995         (Set_SPARK_Mode): New routine.
7997 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7999         * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
8000         to determine whether a type is declared in a local package that
8001         has not yet been frozen.
8002         * freeze.adb (Freeze_Before): Use new predicate to determine
8003         whether a local package must be installed on the scope stack
8004         in order to evaluate in the proper scope actions generated by
8005         aspect specifications, such as Predicate
8006         * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
8007         using new predicate.
8009 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8011         * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
8012         comparisons between non- scalar expressions expressions because
8013         their values cannot be invalidated.
8014         * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
8015         comment on usage.
8017 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8019         * par_sco.adb: Minor reformatting.
8021 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8023         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
8024         is a type from an unfrozen local package, install package to
8025         complete the analysis of delayed aspects of the type.
8027 2017-04-25  Tristan Gingold  <gingold@adacore.com>
8029         * bingen.adb (System_Version_Control_Used): New variable.
8030         (Resolve_Binder_Options): Set the above variable.
8031         (Gen_Output_File_Ada): Conditionally call Gen_Versions.
8032         (Gen_Elab_Order): Emit blank line before.
8034 2017-04-25  Justin Squirek  <squirek@adacore.com>
8036         * sem_cat.adb (Validate_RT_RAT_Component): Added
8037         an extra check to ignore incomplete types.
8039 2017-04-25  Thomas Quinot  <quinot@adacore.com>
8041         * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
8042         bogus circuitry for the case where Name is Predicate.
8044 2017-04-25  Thomas Quinot  <quinot@adacore.com>
8046         * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
8047         Create SCOs for Predicate aspects in disabled
8048         state initially, to be enabled later on by...
8049         * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
8050         SCO for predicate as enabled.
8052 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8054         * comperr.adb (Compiler_Abort): Remove now obsolete pair of
8055         pragmas Warnings Off / On.
8056         * namet.adb (Finalize): Remove now obsolete pair of pragmas
8057         Warnings Off / On.
8058         * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
8059         * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
8060         consider comparisons between static expressions because their
8061         values cannot be invalidated.
8062         * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
8063         Warnings Off / On.
8064         (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
8065         * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
8067 2017-04-25  Bob Duff  <duff@adacore.com>
8069         * sem_elab.adb (In_Task_Activation): Trace internal calls in
8070         task bodies.
8072 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8074         * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
8075         typo fixes.
8077 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8079         * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
8080         On/Off to defend against a spurious warning in conditional
8081         compilation.
8082         * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
8083         * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
8084         defend against a spurious warning in conditional compilation.
8085         * output.adb Add a pair of pragma Warnings On/Off to defend
8086         against a spurious warning in conditional compilation.
8087         * sem_eval.adb (Eval_Relational_Op): Major code clean up.
8088         (Fold_General_Op): New routine.
8089         (Fold_Static_Real_Op): New routine.
8090         (Test_Comparison): New routine.
8091         * sem_eval.ads (Test_Comparison): New routine.
8092         * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
8093         (Warn_On_Constant_Valid_Condition): New routine.
8094         (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
8095         to detect a specific case.
8096         * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
8097         * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
8098         to defend against a spurious warning in conditional compilation.
8099         (Tree_Write): Add a pair of pragma Warnings On/Off to defend
8100         against a spurious warning in conditional compilation.
8101         * usage.adb Add a pair of pragma Warnings On/Off to defend
8102         against a spurious warning in conditional compilation.
8104 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
8106         * sinfo.ads, sem_ch13.adb: Update comment.
8108 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8110         * sem_util.adb (Is_Post_State): A reference to a
8111         generic in out parameter is considered a change in the post-state
8112         of a subprogram.
8114 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8116         * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
8117         declaration of a subprogram instance within its wrapper package,
8118         skip over null statements that may result from the rewriting of
8119         ignored pragmas.
8121 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8123         * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
8124         If the type is an unchecked_union, replace the attribute with
8125         a Raise_Program_Error (rather than inserting such before the
8126         attribute reference) to handle properly the case where we are
8127         processing a component of a larger record, and we need to prevent
8128         further expansion for the unchecked union.
8129         (Expand_Attribute_Reference, case 'Write): If the type is
8130         an unchecked_union, check whether enclosing scope is a Write
8131         subprogram. Replace attribute with a Raise_Program_Error if the
8132         discriminants of the unchecked_union type have not default values
8133         because such a use is erroneous..
8135 2017-04-25  Tristan Gingold  <gingold@adacore.com>
8137         * exp_ch9.adb (Expand_N_Task_Type_Declaration):
8138         Add relative_deadline to task record on edf profile.
8139         (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
8140         (Make_Task_Create_Call): Pass relative_deadline value.
8141         * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
8142         * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
8143         (Profile_Info): Add info for GNAT_Ravenscar_EDF.
8144         * sem_prag.adb (Set_Ravenscar_Profile): Handle
8145         GNAT_Ravenscar_EDF (set scheduling policy).
8146         (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
8147         pragma.
8148         (Sig_Flags): Add choice for Pragma_Deadline_Floor.
8149         * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
8150         New names.
8151         (Pragma_Deadline_Floor): New pragma.
8152         * targparm.adb (Get_Target_Parameters): Recognize
8153         GNAT_Ravenscar_EDF profile.
8155 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
8157         * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
8159 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8161         * sem_aux.adb (Nearest_Ancestor): Use original node of type
8162         declaration to locate nearest ancestor, because derived
8163         type declarations for record types are rewritten as record
8164         declarations.
8165         * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
8166         properly derivations that are completions of private types.
8167         (Add_Predicates): If type is private, examine rep. items of full
8168         view, which may include inherited predicates.
8169         (Build_Predicate_Functions): Ditto.
8171 2017-04-25  Javier Miranda  <miranda@adacore.com>
8173         * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
8174         to generate new entities for subtype declarations located in
8175         Expression_With_Action nodes.
8177 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8179         * sem_elab.adb (Check_A_Call): Remove
8180         local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
8181         need for Elaborate_All when SPARK elaboration checks are
8182         required. Update the checks for instances, variables, and calls
8183         to Default_Initial_Condition procedures.
8185 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8187         * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
8188         into a boolean aspect, in analogy with the Ada aspect No_Return.
8190 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8192         * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
8194 2017-04-25  Bob Duff  <duff@adacore.com>
8196         * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
8197         Is_True_Constant for an array variable that is passed to a
8198         foreign function as an 'in' parameter.
8199         * debug.adb: Document -gnatd.q.
8201 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8203         * sem_ch6.adb (Analyze_Expression_Function): If expression function
8204         is completion and return type is an access type do not freeze
8205         designated type: this will be done in the process of freezing
8206         the expression if needed.
8207         (Freeze_Expr_Types): Check whether type is complete before
8208         creating freeze node, to provide a better error message if
8209         reference is premature.
8210         * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
8211         functions created by type derivations.
8213 2017-04-25  Pascal Obry  <obry@adacore.com>
8215         * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
8217 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8219         * sem_res.adb (Resolve_Type_Conversion):
8220         When resolving against any fixed type, set the type of the
8221         operand as universal real when the operand is a multiplication
8222         or a division where both operands are of any fixed type.
8223         (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
8224         placement of an error message by pointing to the operand of a
8225         type conversion rather than the conversion itself.
8227 2017-04-25  Thomas Quinot  <quinot@adacore.com>
8229         * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
8230         Needs_Debug_Info when producing SCOs.
8232 2017-04-25  Thomas Quinot  <quinot@adacore.com>
8234         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
8235         Always pass a null finalization master for a library level named access
8236         type to which a pragme No_Heap_Finalization applies.
8238 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
8240         PR ada/78845
8242         * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
8243         set to A'First(2) and vice versa.
8245 2017-04-25  Yannick Moy  <moy@adacore.com>
8247         * freeze.adb (Freeze_Record_Type): Remove obsolete
8248         rule on volatile tagged record restriction on SPARK code.
8250 2017-04-25  Yannick Moy  <moy@adacore.com>
8252         * sem_prag.adb (minor) Fix SPARK RM reference.
8254 2017-04-25  Yannick Moy  <moy@adacore.com>
8256         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
8257         comment to reflect which entity is chosen as unique entity.
8258         (Unique_Entity): Return full view instead of private spec for
8259         protected type or task type. Fix possible incorrect access when
8260         called on entry.
8262 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8264         * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
8265         array types only instead of all packed array types.
8267 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8269         * sem_ch6.adb (Conforming_Types): If type of formal as a specified
8270         dimension system, verify that dimensions of both match.
8271         (Check_Conformance): Add error message in case of dimension
8272         mismatch.
8273         * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
8274         predicate.
8276 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
8278         * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
8279         confusing.
8281 2017-04-25  Yannick Moy  <moy@adacore.com>
8283         * sem_util.adb: Minor refactoring.
8284         * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
8286 2017-04-25  Claire Dross  <dross@adacore.com>
8288         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
8289         ultimate alias when accessing overridden operation. Indeed, if the
8290         overridden operation is itself inherited, it won't have any explicit
8291         contract.
8293 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8295         * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
8296         overlap if the two formals have different types, because formally
8297         the corresponding actuals cannot designate the same objects.
8299 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8301         * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
8302         dimensions are present from context, use them.  b) If operand is
8303         a static constant rewritten as a literal, obtain the dimensions
8304         from the original declaration, otherwise use dimensions of type
8305         established from context.
8307 2017-04-25  Yannick Moy  <moy@adacore.com>
8309         * sem_util.adb (Is_Effectively_Volatile): Protect against base type
8310         of array that is private.
8312 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8314         * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
8315         reformatting.
8317 2017-04-25  Yannick Moy  <moy@adacore.com>
8319         * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
8320         on body.
8322 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8324         * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
8325         the check that recognizes a call to a private overridding and
8326         replaces the called subprogram with its alias.
8328 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8330         * exp_util.adb: Minor reformatting.
8332 2017-04-25  Justin Squirek  <squirek@adacore.com>
8334         * exp_ch3.adb (Freeze_Type): Add condition to always treat
8335         interface types as a partial view of a private type for the
8336         generation of invariant procedure bodies.
8337         * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
8338         Add a condition to get the Corresponding_Record_Type for
8339         concurrent types, add condition to return in the absence of a
8340         class in the pragma, remove call to Replace_Type_References,
8341         and add call to Replace_References.
8342         (Add_Interface_Invariatns),
8343         (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
8344         to including the working type T.
8345         (Add_Own_Invariants): Remove
8346         legacy condition for separate units, remove dispatching for ASIS
8347         and save a copy of the expression in the pragma expression.
8348         (Build_Invariant_Procedure_Body): Default initalize vars,
8349         remove return condition on interfaces, always use the
8350         private type for interfaces, and move the processing of types
8351         until after the processing of invariants for the full view.
8352         (Build_Invariant_Procedure_Declaration): Remove condition
8353         to return if an interface type is encountered and add
8354         condition to convert the formal parameter to its class-wide
8355         counterpart if Work_Typ is abstract.
8356         (Replace_Type): Add call to Remove_Controlling_Arguments.
8357         (Replace_Type_Ref): Remove class-wide dispatching for the current
8358         instance of the type.
8359         (Replace_Type_References): Remove parameter "Derived"
8360         (Remove_Controlling_Arguments): Created in order to removing
8361         the controlliong argument from calls to primitives in the case
8362         of the formal parameter being an class-wide abstract type.
8363         * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
8364         to the change made to Freeze_Type in exp_ch3. Add a condition
8365         to treat interface types as a partial view.
8366         * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
8367         to Build_Invariant_Procedure_Declaration to properly generate a
8368         "partial" invariant procedure when Typ is an interface.
8370 2017-04-25  Bob Duff  <duff@adacore.com>
8372         * a-numeri.ads: Go back to using brackets encoding for the Greek
8373         letter pi.
8375 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8377         * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
8378         (10-15): if derived type T with progenitors is abstract,
8379         and primitive P of this type inherits non-trivial classwide
8380         preconditions from both a parent operation and from an interface
8381         operation, then the inherited operation is abstract if the parent
8382         operation is not null.
8383         * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
8384         with Covered_Interface_Op to yield the actual interface operation
8385         that is implemented by a given inherited operation.
8387 2017-04-25  Javier Miranda  <miranda@adacore.com>
8389         * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
8390         and right operands after performing the validity checks. Required
8391         because validity checks may remove side effects from the operands.
8393 2017-04-25  Javier Miranda  <miranda@adacore.com>
8395         * exp_attr.adb (Attribute_Unrestricted_Access):
8396         Do not disable implicit type conversion.  Required to generate
8397         code that displaces the pointer to reference the secondary
8398         dispatch table.
8400 2017-04-25  Pascal Obry  <obry@adacore.com>
8402         * prj-attr.adb, snames.ads-tmpl: Add package Install's
8403         Required_Artifacts attribute.
8405 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8407         * sem_util.adb (Same_Value): String literals are compile-time
8408         values, and comparing them must use Expr_Value_S.
8410 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8412         * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
8413         dereference is introduced for the object, and the object is
8414         overloaded, do not check whether it is aliased, because it may
8415         include an implicit dereference.
8416         * sem_type.adb (Disambiguate): If two interpretations are access
8417         attribute types with the same designated type keep either of
8418         them and do not report an ambiguity.  A true ambiguity will be
8419         reported elsewhere.
8421 2017-04-25  Bob Duff  <duff@adacore.com>
8423         * a-numeri.ads: Change the encoding of Greek letter Pi from
8424         brackets encoding to UTF-8.  Use pragma Wide_Character_Encoding
8425         to indicate the encoding. We considered using a byte order mark
8426         (BOM), but that causes various trouble (misc software eats the
8427         BOM, if you have a patch with a BOM, then it's not at the start
8428         of the patch, so it's not a BOM, the BOM affects with-ing files,
8429         etc.).
8430         * scng.adb, s-wchcnv.adb: Minor.
8432 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8434         * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
8435 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8437         * sem_ch3.adb (Add_Internal_Interface_Entities): Move
8438         Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
8439         Improve error message on operations that inherit non-conforming
8440         classwide preconditions from ancestor and progenitor.
8441         * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
8442         moved here from sem_ch3.
8443         * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
8444         check given in RM 6.1.1 (17) concerning renamings of overriding
8445         operations that inherits class-wide preconditions from ancestor
8446         or progenitor.
8448 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8450         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
8451         (Build_Adjust_Statements): Code cleanup.
8452         (Build_Finalizer): Update the initialization of
8453         Exceptions_OK.
8454         (Build_Finalize_Statements): Code cleanup.
8455         (Build_Initialize_Statements): Code cleanup.
8456         (Make_Deep_Array_Body): Update the initialization of
8457         Exceptions_OK.
8458         (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
8459         (Process_Object_Declaration): Generate a null exception handler only
8460         when exceptions are allowed.
8461         (Process_Transients_In_Scope): Update the initialization of
8462         Exceptions_OK.
8463         * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
8464         routine.
8465         * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
8466         restrictions when the handler is internally generated and the
8467         mode is warnings.
8469 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8471         * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
8472         enforce legality rule on classwide preconditions inherited from
8473         both an ancestor and a progenitor (RM 6.1.1 (10-13).
8474         * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
8475         subprogram need not be dispatching if it appears in a precondition
8476         for an abstract or null subprogram.
8478 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8480         * sem_ch10.adb: Minor typo fix.
8482 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
8484         * gcc-interface/Makefile.in: Cleanup VxWorks targets.
8486 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8488         * fname.adb (Is_Internal_File_Name): Arrange for the slices to
8489         have a length which is a power of 2.
8490         (Is_Predefined_File_Name): Likewise. Adjust comment.
8492 2017-04-25  Bob Duff  <duff@adacore.com>
8494         * exp_aggr.adb (Component_Count): Protect the
8495         arithmetic from attempting to convert a value >= 2**31 to Int,
8496         which would otherwise raise Constraint_Error.
8498 2017-04-25  Bob Duff  <duff@adacore.com>
8500         * opt.ads (Locking_Policy): Fix incorrect documentation. The
8501         first character of the policy name is not unique.
8503 2017-04-25  Bob Duff  <duff@adacore.com>
8505         * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
8506         * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
8507         about this flag not being used. It was already used, and it is
8508         now used more.
8510 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8512         * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
8513         (Ignore_SPARK_Mode_Pragmas): New routine.
8514         (Set_Ignore_SPARK_Mode_Pragmas): New routine.
8515         (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
8516         * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
8517         related entities.
8518         (Ignore_SPARK_Mode_Pragmas): New routine
8519         along with pragma Inline.
8520         (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
8521         * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
8522         Ignore_SPARK_Mode_Pragmas_In_Instance.
8523         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8524         Save and restore the value of global flag
8525         Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
8526         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
8527         the corresponding spec or the body must ignore all SPARK_Mode
8528         pragmas found within.
8529         (Analyze_Subprogram_Declaration): Mark
8530         the spec when it needs to ignore all SPARK_Mode pragmas found
8531         within to allow the body to infer this property in case it is
8532         instantiated or inlined later.
8533         * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
8534         value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8535         the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8536         when the corresponding spec also ignored all SPARK_Mode pragmas
8537         found within.
8538         (Analyze_Package_Declaration): Mark the spec when
8539         it needs to ignore all SPARK_Mode pragmas found within to allow
8540         the body to infer this property in case it is instantiated or
8541         inlined later.
8542         * sem_ch12.adb (Analyze_Formal_Package_Declaration):
8543         Save and restore the value of flag
8544         Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8545         formal spec when it needs to ignore all SPARK_Mode
8546         pragmas found within to allow the body to infer this
8547         property in case it is instantiated or inlined later.
8548         (Analyze_Package_Instantiation): Save and restore the value
8549         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
8550         the instance spec when it needs to ignore all SPARK_Mode
8551         pragmas found within to allow the body to infer this
8552         property in case it is instantiated or inlined later.
8553         (Analyze_Subprogram_Instantiation): Save and restore the value
8554         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8555         instance spec and anonymous package when they need to ignore
8556         all SPARK_Mode pragmas found within to allow the body to infer
8557         this property in case it is instantiated or inlined later.
8558         (Instantiate_Package_Body): Save and restore the value of global
8559         flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
8560         global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
8561         corresponding instance spec also ignored all SPARK_Mode pragmas
8562         found within.
8563         (Instantiate_Subprogram_Body): Save and restore the
8564         value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8565         the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8566         when the corresponding instance spec also ignored all SPARK_Mode
8567         pragmas found within.
8568         * sem_prag.adb (Analyze_Pragma): Update the reference to
8569         Ignore_Pragma_SPARK_Mode.
8570         * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
8571         all SPARK_Mode pragmas defined within yields mode "off".
8573 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8575         * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
8577 2017-04-25  Bob Duff  <duff@adacore.com>
8579         * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
8580         All_Checks" to avoid generating unnecessary checks.
8581         * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
8582         All_Checks".
8583         * sem.ads: Fix comment.
8584         * expander.ads: Fix comment.
8585         * exp_atag.ads: Fix comment: "Index = 0" should be
8586         "Index >= 0".
8588 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8590         * s-taprop-linux.adb: Minor editorial fixes.
8592 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8594         * sem_util.adb (New_Copy_Tree): Put back the declarations of the
8595         hash tables at library level.  Reinstate the NCT_Hash_Tables_Used
8596         variable and set it to True whenever the main hash table is
8597         populated.  Short- circuit the Assoc function if it is false
8598         and add associated guards.
8600 2017-04-25  Olivier Hainque  <hainque@adacore.com>
8602         * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
8603         specs without elaboration code that have an elaboration counter
8604         nevertheless, e.g.  when compiled with -fpreserve-control-flow.
8605         * sem_ch10.adb (Analyze_Compilation_Unit):
8606         Set_Elaboration_Entity_Required when requested to preserve
8607         control flow, to ensure the unit elaboration is materialized at
8608         bind time, resulting in the inclusion of the unit object file
8609         in the executable closure at link time.
8611 2017-04-25  Pierre-Marie de Rodat  <derodat@adacore.com>
8613         * exp_dbug.adb: In Debug_Renaming_Declaration,
8614         when dealing with indexed component, accept to produce a renaming
8615         symbol when the index is an IN parameter or when it is a name
8616         defined in an outer scope.
8618 2017-04-25  Yannick Moy  <moy@adacore.com>
8620         * errout.adb (Error_Msg): Adapt continuation
8621         message in instantiations and inlined bodies for info messages.
8623 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8625         * fname.adb (Has_Internal_Extension): Add pragma Inline.
8626         Use direct 4-character slice comparisons.
8627         (Has_Prefix): Add
8628         pragma Inline.  (Has_Suffix): Delete.
8629         (Is_Internal_File_Name):
8630         Test Is_Predefined_File_Name first.
8631         (Is_Predefined_File_Name):
8632         Use direct slice comparisons as much as possible and limit all
8633         comparisons to at most 8 characters.
8635 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8637         * checks.adb (Insert_Valid_Check): Code cleanup.
8638         * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
8639         (Expand_Actuals): Generate proper copy-back for a validation
8640         variable when it acts as the argument of a type conversion.
8641         * sem_util.adb (Is_Validation_Variable_Reference): Augment the
8642         predicate to operate on type qualifications.
8644 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8646         * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
8647         Minor reformatting.
8649 2017-04-25  Bob Duff  <duff@adacore.com>
8651         * sem_prag.adb (No_Return): Give an error if the pragma applies
8652         to a body. Specialize the error for the specless body case,
8653         as is done for (e.g.) pragma Convention.
8654         * debug.adb: Add switch -gnatd.J to disable the above legality
8655         checks. This is mainly for use in our test suite, to avoid
8656         rewriting a lot of illegal (but working) code.  It might also
8657         be useful to customers. Under this switch, if a pragma No_Return
8658         applies to a body, and the procedure raises an exception (as it
8659         should), the pragma has no effect. If the procedure does return,
8660         execution is erroneous.
8662 2017-04-25  Bob Duff  <duff@adacore.com>
8664         * exp_ch6.adb (Expand_Actuals): This is the
8665         root of the problem. It took N as an 'in out' parameter, and in
8666         some cases, rewrote N, but then set N to Original_Node(N). So
8667         the node returned in N had no Parent. The caller continued
8668         processing of this orphaned node. In some cases that caused a
8669         crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
8670         and trips over the Empty Parent). The solution is to make N an
8671         'in' parameter.  Instead of rewriting it, return the list of
8672         post-call actions, so the caller can do the rewriting later,
8673         after N has been fully processed.
8674         (Expand_Call_Helper): Move most of Expand_Call here. It has
8675         too many premature 'return' statements, and we want to do the
8676         rewriting on return.
8677         (Insert_Post_Call_Actions): New procedure to insert the post-call
8678         actions in the appropriate place. In the problematic case,
8679         that involves rewriting N as an Expression_With_Actions.
8680         (Expand_Call): Call the new procedures Expand_Call_Helper and
8681         Insert_Post_Call_Actions.
8683 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8685         * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
8686         properly type derived from generic formal types, to handle
8687         properly modified version of ACATS 4.1B B611017.
8689 2017-04-25  Javier Miranda  <miranda@adacore.com>
8691         * exp_unst.adb (Subp_Index): Adding missing
8692         support for renamings and functions that return a constrained
8693         array type (i.e. functions for which the frontend built a
8694         procedure with an extra out parameter).
8696 2017-04-25  Pascal Obry  <obry@adacore.com>
8698         * s-string.adb: Minor code clean-up.
8700 2017-04-25  Bob Duff  <duff@adacore.com>
8702         * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
8703         procedure.
8704         * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
8705         function for Non_Blocking_Wait_Process.
8707 2017-04-25  Bob Duff  <duff@adacore.com>
8709         * prep.adb (Preprocess): Remove incorrect
8710         Assert. Current character can be ASCII.CR.
8712 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8714         * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
8715         convention Stdcall, which has a number of exceptions. Convention
8716         is legal on a component declaration whose type is an anonymous
8717         access to subprogram.
8719 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8721         * sem_ch4.adb: sem_ch4.adb Various reformattings.
8722         (Try_One_Prefix_Interpretation): Use the base type when dealing
8723         with a subtype created for purposes of constraining a private
8724         type with discriminants.
8726 2017-04-25  Javier Miranda  <miranda@adacore.com>
8728         * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
8729         * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
8730         dispatching primitives (Restore_Warnings): Restore warning on
8731         late dispatching primitives (Save_Warnings): Save warning on late
8732         dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
8733         to enable/disable this warning.
8734         (WA_Warnings): Set warning on late dispatching primitives.
8735         * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
8736         that its parent type has a private extension.
8737         * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
8738         New subprogram.
8739         * usage.adb: Document -gnatw.j and -gnatw.J.
8741 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8743         * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
8744         reformatting.
8746 2017-04-25  Bob Duff  <duff@adacore.com>
8748         * binde.adb (Validate): Do not pass dynamic strings
8749         to pragma Assert, because older compilers do not support that.
8751 2017-04-25  Bob Duff  <duff@adacore.com>
8753         * s-fileio.adb (Close): When a temp file is
8754         closed, delete it and clean up its Temp_File_Record immediately,
8755         rather than waiting until later.
8756         (Temp_File_Record): Add File
8757         component, so Close can know which Temp_File_Record corresponds
8758         to the file being closed.
8759         (Delete): Don't delete temp files,
8760         because they are deleted by Close.
8761         (Open): Set the File component
8762         of Temp_File_Record. This requires moving the creation of the
8763         Temp_File_Record to the end, after the AFCB has been created.
8765 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8767         * checks.adb (Insert_Valid_Check): Do not generate
8768         a validity check when inside a generic.
8770 2017-04-25  Yannick Moy  <moy@adacore.com>
8772         * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
8774 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
8776         * snames.ads-tmpl (Snames): More names for detecting predefined
8777         potentially blocking subprograms.
8779 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8781         * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
8782         concerning inheritance of class-wide preconditions do not apply
8783         to postconditions.
8785 2017-04-25  Bob Duff  <duff@adacore.com>
8787         * s-ficobl.ads: Minor comment fix.
8789 2017-04-25  Yannick Moy  <moy@adacore.com>
8791         * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
8792         conversions from float to integer in GNATprove mode.
8793         (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
8794         to call Apply_Type_Conversion_Checks, so that range checks
8795         are properly positioned when needed on conversions, including
8796         when converting from float to integer.  (Determine_Range): In
8797         GNATprove mode, take into account the possibility of conversion
8798         from float to integer.
8799         * sem_res.adb (Resolve_Type_Conversion): Only enforce range
8800         check on conversions from fixed-point to integer, not anymore
8801         on conversions from floating-point to integer, when in GNATprove
8802         mode.
8804 2017-04-25  Yannick Moy  <moy@adacore.com>
8806         * checks.adb (Determine_Range_R): Special case type conversions
8807         from integer to float in order to get bounds in that case too.
8808         * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
8809         mode, for computations involved in interval checking.
8811 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8813         * checks.adb (Insert_Valid_Check): Partially reimplement validity
8814         checks.
8815         * einfo.adb Node36 is now used as Validated_Object.
8816         (Validated_Object): New routine.
8817         (Set_Validated_Object): New routine.
8818         (Write_Field36_Name): Add an entry for Validated_Object.
8819         * einfo.ads Add new attribute Validated_Object along with
8820         usage in entities.
8821         (Validated_Object): New routine along with pragma Inline.
8822         (Set_Validated_Object): New routine along with pragma Inline.
8823         * exp_attr.adb (Make_Range_Test): Add processing for validation
8824         variables to avoid extra reads and copies of the prefix.
8825         * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
8826         variables in order to reflect any changes done in the variable
8827         back into the original object.
8828         * sem_util.adb (Is_Validation_Variable_Reference): New routine.
8829         * sem_util.ads (Is_Validation_Variable_Reference): New routine.
8831 2017-04-25  Steve Baird  <baird@adacore.com>
8833         * exp_ch7.adb (Build_Array_Deep_Procs,
8834         Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
8835         generate Finalize_Address routines for CodePeer.
8837 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8839         * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
8840         Analyze_Pre_Post_Condition, to implement the legality checks
8841         mandated by AI12-0131: Pre'Class shall not be specified for an
8842         overriding primitive subprogram of a tagged type T unless the
8843         Pre'Class aspect is specified for the corresponding primitive
8844         subprogram of some ancestor of T.
8846 2017-04-25  Bob Duff  <duff@adacore.com>
8848         * sem_ch8.adb (Use_One_Type): If a use_type_clause
8849         is redundant, set its Used_Operations to empty. This is only
8850         necessary for use clauses that appear in the parent of a generic
8851         child unit, because those use clauses get reanalyzed when we
8852         instantiate the generic, and we don't want the Used_Operations
8853         carried over from the original context (where it was probably
8854         not redundant).
8856 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8858         * exp_ch6.adb: Minor reformatting.
8860 2017-04-25  Bob Duff  <duff@adacore.com>
8862         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
8863         Use Source_Index (Current_Sem_Unit) to find the correct casing.
8864         * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
8865         (Current_Sem_Unit) to find the correct casing.
8866         * par.adb (Par): Null out Current_Source_File, to ensure that
8867         the above bugs won't rear their ugly heads again.
8869 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8871         * sem_ch8.adb (Find_Type): For an attribute reference
8872         'Class, if prefix type is synchronized and previous errors
8873         have suppressed the creation of the corresponding record type,
8874         create a spurious class-wide for the synchonized type itself,
8875         to catch other misuses of the attribute
8877 2017-04-25  Steve Baird  <baird@adacore.com>
8879         * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
8880         is True, then don't generate the accessibility check for the
8881         tag of a tagged result.
8882         * exp_intr.adb (Expand_Dispatching_Constructor_Call):
8883         if CodePeer_Mode is True, then don't generate the
8884         tag checks for the result of call to an instance of
8885         Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
8886         descendant of" check and the accessibility check).
8888 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8890         * sem_ch13.adb: Code cleanups.
8891         * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
8892         * sem_ch8.ads: Minor comment fix.
8894 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8896         * exp_ch4.adb (Library_Level_Target): New function.
8897         (Expand_Concatenate): When optimization is enabled, also expand
8898         the operation out-of-line if the concatenation is present within
8899         the expression of the declaration of a library-level object and
8900         not only if it is the expression of the declaration.
8902 2017-04-25  Bob Duff  <duff@adacore.com>
8904         * freeze.adb (Freeze_Object_Declaration): Do
8905         not Remove_Side_Effects if there is a pragma Linker_Section,
8906         because in that case we want static initialization in the
8907         appropriate section.
8909 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8911         * exp_dbug.adb: Minor rewording and reformatting.
8913 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8915         * sem_attr.adb (Statically_Denotes_Object): New predicate, to
8916         handle the proposed changes to rules concerning potentially
8917         unevaluated expressions, to include selected components that
8918         do not depend on discriminants, and indexed components with
8919         static indices.
8920         * sem_util.adb (Is_Potentially_Unevaluated): Add check for
8921         predicate in quantified expression, and fix bugs in the handling
8922         of case expressions and membership test.
8923         (Analyze_Attribute_Old_Result): use new predicate.
8924         (Analyze_Attribute, case Loop_Entry): ditto.
8926 2017-04-25  Bob Duff  <duff@adacore.com>
8928         * s-secsta.adb (SS_Info): Add a comment
8929         explaining why we don't need to walk all the chunks in order to
8930         compute the total size.
8932 2017-04-25  Bob Duff  <duff@adacore.com>
8934         * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
8935         of the global name buffer to 4*Max_Line_Length.
8937 2017-04-25  Javier Miranda  <miranda@adacore.com>
8939         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
8940         renaming entity for debug information, mark the entity as needing debug
8941         info if it comes from sources.
8943 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8945         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
8946         restriction converning the use of 'Address where the prefix is
8947         of a controlled type.
8949 2017-04-25  Pierre-Marie de Rodat  <derodat@adacore.com>
8951         * exp_dbug.adb: In Debug_Renaming_Declaration,
8952         skip slices that are made redundant by an indexed component
8953         access.
8954         * atree.h: New definition for Original_Node.
8956 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8958         * sem_prag.adb, sem_prag.ads: Minor reformatting.
8960 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8962         * sem_ch3.adb (Check_Entry_Contract): Call
8963         Preanalyze_Spec_Expression so that resolution takes place as well.
8964         * sem_util.adb (Check_Internal_Protected_Use): Reject properly
8965         internal calls that appear in preconditions of protected
8966         operations, in default values for same, and in contract guards
8967         for contract cases in SPARK.
8969 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8971         * a-numaux.ads: Fix description of a-numaux-darwin
8972         and a-numaux-x86.
8973         (Double): Define to Long_Float.
8974         * a-numaux-vxworks.ads (Double): Likewise.
8975         * a-numaux-darwin.ads
8976         (Double): Likewise.
8977         * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
8978         * a-numaux-x86.ads: Fix package description.
8979         * a-numaux-x86.adb (Is_Nan): Minor tweak.
8980         (Reduce): Adjust and complete description. Call Is_Nan instead of
8981         testing manually. Use an integer temporary to hold rounded value.
8982         * a-numaux-darwin.adb (Reduce): Likewise.
8983         (Is_Nan): New function.
8985 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8987         * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
8988         on analysis of prefix whose type is a current instance of a
8989         synchronized type, but where the prefix itself is an entity that
8990         is an object.
8992 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8994         * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
8995         the identity of callable entities therein, because they have been
8996         properly resolved, and prefixed calls may have been rewritten
8997         as normal calls.
8999 2017-04-25  Patrick Bernardi  <bernardi@adacore.com>
9001         * exp_ch3.adb (Build_Init_Statements): Convert
9002         the expression of the pragma/aspect Secondary_Stack_Size to
9003         internal type System.Parameters.Size_Type before assigning
9004         it to the Secondary_Stack_Size component of the task type's
9005         corresponding record.
9007 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
9009         * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
9010         (etc) optimizations when the type is modular and the offsets
9011         are equal.
9013 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
9015         * s-osinte-freebsd.ads: Minor comment tweaks
9017 2017-04-25  Javier Miranda  <miranda@adacore.com>
9019         * urealp.adb (UR_Write): Reverse previous patch
9020         adding documentation on why we generate multiplications instead
9021         of divisions (needed to avoid expressions whose computation with
9022         large numbers may cause division by 0).
9024 2017-04-25  Bob Duff  <duff@adacore.com>
9026         * erroutc.adb (Set_Specific_Warning_Off,
9027         Set_Warnings_Mode_Off): Use the correct source file for
9028         Stop. Was using Current_Source_File, which is only valid during
9029         parsing. Current_Source_File will have a leftover value from
9030         whatever file happened to be parsed last, because of a with_clause
9031         or something.
9033 2017-04-25  Bob Duff  <duff@adacore.com>
9035         * lib.ads, lib.adb (In_Internal_Unit): New functions similar
9036         to In_Predefined_Unit, but including GNAT units.
9037         * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
9038         with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
9039         because Should_Ignore_Pragma was not working reliably outside
9040         the parser, because Current_Source_File is not valid.
9041         * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
9042         * par-prag.adb: Call Should_Ignore_Pragma_Par.
9044 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
9046         * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
9047         codepeer mode.
9049 2017-04-25  Javier Miranda  <miranda@adacore.com>
9051         * urealp.adb (UR_Write): Fix output of constants with a base other
9052         that 10.
9054 2017-04-25  Justin Squirek  <squirek@adacore.com>
9056         * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
9057         * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
9058         Add extra parameter for Process_Interface_Name.
9059         (Process_Interface_Name): Add parameter for pragma to analyze
9060         corresponding aspect.
9061         * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
9062         from sem_ch13.adb
9064 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
9066         * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
9067         correction.
9069 2017-04-25  Yannick Moy  <moy@adacore.com>
9071         * sem_res.adb (Resolve_Comparison_Op): Do not
9072         attempt evaluation of relational operations inside assertions.
9074 2017-04-25  Justin Squirek  <squirek@adacore.com>
9076         * exp_util.adb (Add_Interface_Invariants):
9077         Restored, code moved back from Build_Invariant_Procedure_Body.
9078         (Add_Parent_Invariants): Restored, code moved back from
9079         Build_Invariant_Procedure_Body.
9080         (Build_Invariant_Procedure_Body):
9081         Remove refactored calls and integrated code from
9082         Add_Parent_Invariants and Add_Interface_Invariants.
9084 2017-04-25  Johannes Kanig  <kanig@adacore.com>
9086         * errout.adb (Output_Messages): Adjust computation of total
9087         errors
9088         * erroutc.adb (Error_Msg): In statistics counts, deal
9089         correctly with informational messages that are not warnings.
9090         * errutil.adb (Finalize): adjust computation of total errors.
9092 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
9094         * terminals.c (__gnat_terminate_pid): New.
9095         * g-exptty.ads (Terminate_Process): New. Update comments.
9097 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
9099         * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
9101 2017-04-25  Justin Squirek  <squirek@adacore.com>
9103         * sem_ch3.adb (Analyze_Declarations): Minor
9104         correction to comments, move out large conditional and scope
9105         traversal into a predicate.
9106         (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
9107         logic.
9109 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9111         * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
9112         of prefix whose type is a current instance of a synchronized
9113         type. If the prefix is an object this is an external call (or
9114         requeue) that can only access public operations of the object. The
9115         previous predicate was too restrictive, and did not allow public
9116         protected operations, only task entries.
9118 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9120         * sem_ch5.adb, fname.adb: Minor reformatting.
9122 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9124         * einfo.adb (Is_Anonymous_Access_Type): New routine.
9125         * einfo.ads Update the placement of
9126         E_Anonymous_Access_Subprogram_Type along with all subtypes that
9127         mention the ekind.
9128         (Is_Anonymous_Access_Type): New routine.
9129         * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
9130         master for an access type subject to pragma No_Heap_Finalization.
9131         * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
9132         allocated or deallocated does not finalization actions if the
9133         associated access type is subject to pragma No_Heap_Finalization.
9134         * opt.ads Add new global variable No_Heap_Finalization_Pragma.
9135         * par-prag.adb Pragma No_Heap_Finalization does not need special
9136         processing from the parser.
9137         * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
9138         ??? comments. Use the new predicate Is_Anonymous_Access_Type.
9139         * sem_prag.adb Add an entry in table Sig_Flags for pragma
9140         No_Heap_Finalization.
9141         (Analyze_Pragma): Add processing for
9142         pragma No_Heap_Finalization. Update various error messages to
9143         use Duplication_Error.
9144         * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
9145         * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
9146         and corresponding pragma id.
9148 2017-04-25  Bob Duff  <duff@adacore.com>
9150         * freeze.adb (Freeze_Record_Type): Use the
9151         underlying type of the component type to determine whether it's
9152         elementary. For representation clause purposes, a private type
9153         should behave the same as its full type.
9154         * fname.ads, fname.adb (Is_Predefined_File_Name):
9155         Make sure things like "system.ali" are recognized as predefined.
9157 2017-04-25  Javier Miranda  <miranda@adacore.com>
9159         * debug.adb: Update documentation of -gnatd.6.
9161 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9163         * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
9164         element iterator when the name is an overloaded function call,
9165         one of whose interpretations yields an array.
9167 2017-04-25  Bob Duff  <duff@adacore.com>
9169         * uname.ads, uname.adb (Is_Predefined_Unit_Name,
9170         Is_Internal_Unit_Name): New functions for operating on unit
9171         names, as opposed to file names. There's some duplicated code
9172         with fname.adb, which is unfortunate, but it seems like we don't
9173         want to add dependencies here.
9174         * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
9175         to Is_Predefined_Unit_Name; the former was wrong, because Uname
9176         is not a file name at all.
9177         * fname.ads, fname.adb: Document the fact that
9178         Is_Predefined_File_Name and Is_Internal_File_Name can be called
9179         for ALI files, and fix the code so it works properly for ALI
9180         files. E.g. these should return True for "system.ali".
9182 2017-04-25  Justin Squirek  <squirek@adacore.com>
9184         * exp_util.adb (Add_Invariant): Removed,
9185         code moved to Add_Invariant_Check, Add_Inherited_Invariant,
9186         and Add_Own_Invariant.  (Add_Invariant_Check): Used
9187         for adding runtime checks from any kind of invariant.
9188         (Add_Inherited_Invariant): Generates invariant checks for
9189         class-wide invariants (Add_Interface_Invariants): Removed, code
9190         moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
9191         Create a types own invariant procedure (Add_Parent_Invariants):
9192         Removed, code moved to Build_Invariant_Procedure_Body
9193         (Build_Invariant_Procedure_Body): Add refactored calls
9194         and integrated code from Add_Parent_Invariants and
9195         Add_Interface_Invariants.
9196         (Process_Type): Removed, the
9197         relavant code was inlined into both Add_Own_Invariant and
9198         Add_Inherited_Invariant.
9200 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9202         * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
9203         scn.adb, osint.adb, fname.adb: Minor reformatting.
9205 2017-04-25  Pascal Obry  <obry@adacore.com>
9207         * s-taprop-mingw.adb: Do not check for CloseHandle in
9208         Finalize_TCB.
9210 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9212         * sem_util.adb (Check_Part_Of_Reference):
9213         Continue to examine the context if the reference appears within
9214         an expression function.
9216 2017-04-25  Justin Squirek  <squirek@adacore.com>
9218         * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
9219         and Build_Invariant_Procedure_Declaration.
9220         * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
9221         and Build_Invariant_Procedure_Declaration from exp_ch7
9222         and break-out Is_Untagged_Private_Derivation from
9223         Build_Invariant_Procedure_Body.
9224         (Replace_Type_References):
9225         Append an extra parameter to allow for dispatching replacements
9226         and add the corrasponding logic.
9227         (Type_Invariant): Remove
9228         Replace_Typ_Refs and replace its references with calls to
9229         Replace_Type_References.
9230         * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
9232 2017-04-25  Bob Duff  <duff@adacore.com>
9234         * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
9235         that returns True when appropriate.
9236         * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
9237         when compiling predefined files.
9238         * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
9239         "gnat.adc" should not be considered a predefined file name.
9240         That required (or at least encouraged) a lot of cleanup of global
9241         variable usage. We shouldn't be communicating information via
9242         the global name buffer.
9243         * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
9244         * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
9245         required by the above-mentioned cleanup.
9247 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9249         * osint.adb (Find_File): Handle properly a request for a
9250         configuration file whose name is a directory.
9252 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9254         * sem_attr.adb, sem_ch5.adb: Minor reformatting.
9256 2017-04-25  Bob Duff  <duff@adacore.com>
9258         * types.ads: Minor: Fix '???' comment.
9259         * sem_ch8.adb: Minor comment fix.
9261 2017-04-25  Bob Duff  <duff@adacore.com>
9263         * sem_prag.adb: Remove suspicious uses of Name_Buf.
9264         * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
9265         Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
9266         Add String_To_Name with no side effects.
9268 2017-04-25  Justin Squirek  <squirek@adacore.com>
9270         * sem_ch3.adb (Analyze_Declarations): Add
9271         additional condition for edge case.
9273 2017-04-25  Bob Duff  <duff@adacore.com>
9275         * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
9276         reserved words inside pragmas. This is necessary to allow the
9277         pragma name Interface to be used in pragma Ignore_Pragma.
9278         * par.adb: Minor comment fix.
9280 2017-04-25  Javier Miranda  <miranda@adacore.com>
9282         * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
9283         * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
9284         * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
9285         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
9286         occurrences of RE_Type_Is_Abstract
9288 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9290         * exp_util.adb (Build_Chain): Account for ancestor
9291         subtypes while traversing the derivation chain.
9293 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9295         * sem_attr.adb: minor reformatting.
9297 2017-04-25  Doug Rupp  <rupp@adacore.com>
9299         * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
9301 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9303         * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
9304         the first pass over an assignment statement with target names,
9305         to prevent the generation of subtypes (such as discriminated
9306         record components)that may carry the target name outside of the
9307         tree for the assignment. The subtypes will be generated when
9308         the assignment is reanalyzed in full.
9309         (Analyze_Target_Name): Handle properly class-wide types.
9311 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9313         * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
9314         * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9315         the purposes of freezing.
9316         * exp_util.adb Update the documentation and structure of the
9317         type map used in class-wide semantics of assertion expressions.
9318         (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9319         and resolve the triaged expression because all substitutions
9320         refer to the proper entities.  Update the replacement of
9321         references.
9322         (Build_DIC_Procedure_Body): Add formal parameter
9323         For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9324         are now only processed when freezing occurs.  Build a body only
9325         when one is needed.
9326         (Entity_Hash): Removed.
9327         (Map_Types): New routine.
9328         (Replace_Object_And_Primitive_References): Removed.
9329         (Replace_References): New routine.
9330         (Replace_Type_References): Moved to the library level of Exp_Util.
9331         (Type_Map_Hash): New routine.
9332         (Update_Primitives_Mapping): Update the mapping call.
9333         (Update_Primitives_Mapping_Of_Types): Removed.
9334         * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9335         parameter For_Freeze and update the comment on usage.
9336         (Map_Types): New routine.
9337         (Replace_References): New routine.
9338         (Replace_Type_References): Moved to the library level of Exp_Util.
9339         (Update_Primitives_Mapping_Of_Types): Removed.
9340         * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9341         properties of the private type to the full view in case the full
9342         view derives from a parent type and inherits a DIC pragma.
9343         * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9344         DIC pragma is placed at the top of a declarative region.
9346 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
9348         * a-tasatt.adb: Complete previous change and use an unsigned
9349         int to avoid overflow checks.
9351 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9353         * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
9354         the error message when the attribute reference is an actual in
9355         a call to a subprogram inherited from a generic formal type with
9356         unknown discriminants, which makes the subprogram and its formal
9357         parameters intrinsic (see RM 6.3.1 (8) and (13)).
9359 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9361         * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
9362         sem_prag.adb: Minor reformatting.
9364 2017-04-25  Bob Duff  <duff@adacore.com>
9366         * sem_attr.adb (Type_Key): Add code in the
9367         recursive Compute_Type_Key to protect against fetching the source
9368         code for Standard, in case a component of the type is declared
9369         in Standard. There was already code to do this for the original
9370         type, but not for its components.
9372 2017-04-25  Javier Miranda  <miranda@adacore.com>
9374         * exp_ch3.adb (Build_Initialization_Call): Handle
9375         subtypes of private types when searching for the underlying full
9376         view of a private type.
9378 2017-04-25  Javier Miranda  <miranda@adacore.com>
9380         * sem_res.adb (Set_Mixed_Mode_Operand): A universal
9381         real conditional expression can appear in a fixed-type context
9382         and must be resolved with that context to facilitate the code
9383         generation to the backend.
9385 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9387         * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
9388         to indicate whether during inline processing, when some unit U1
9389         appears in the context of a unit U2 compiled for instantiation
9390         or inlining purposes, the body of U1 needs to be compiled as well.
9391         * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
9392         context is a package declaration.
9393         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
9394         Analyze_Generic_Package_Declaration): ditto.
9395         * inline.adb (Analyze_Inlined_Bodies): Check
9396         Body_Needed_For_Inlining.
9398 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9400         * par.adb (Current_Assign_Node): Global variable use to record
9401         the presence of a target_name in the right hand side of the
9402         assignment being parsed.
9403         * par-ch4.adb (P_Name): If the name is a target_name, mark the
9404         enclosing assignment node accordingly.
9405         * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
9406         appropriately.
9407         * sem_ch5.adb (Analyze_Assignment): Disable expansion before
9408         analyzing RHS if the statement has target_names.
9409         * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
9410         properly choices that are subtype marks.
9411         * exp_ch5.adb: Code cleanup.
9413 2017-04-25  Bob Duff  <duff@adacore.com>
9415         * s-memory.adb: Add a comment regarding efficiency.
9416         * atree.adb: Fix the assertion, and combine 2 assertions into one,
9417         "the source has an extension if and only if the destination does."
9418         * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
9420 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
9422         * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
9423         conversion.
9425 2017-04-25  Doug Rupp  <rupp@adacore.com>
9427         * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
9428         handling for ppc64-vx7.
9429         * sigtramp-vxworks-target.inc
9430         [SIGTRAMP_BODY]: Add section for ppc64-vx7.
9432 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
9434         * ada_get_targ.adb: New file.
9436 2017-04-25  Bob Duff  <duff@adacore.com>
9438         * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
9439         Direct_Val (Right), instead of the incorrect Direct_Val (Left).
9440         (UI_GCD): Remove ??? comment involving possible efficiency
9441         improvements. This just isn't important after all these years.
9442         Also minor cleanup.
9443         * uintp.ads: Minor cleanup.
9445 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9447         * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
9448         Revert previous changes.
9449         * scng.adb: Minor reformatting.
9450         * s-stratt.ads: Fix unbalanced parens in comment.
9452 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9454         * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
9455         Minor reformatting.
9457 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9459         * scng.adb (Scan): Handle '@' appropriately.
9460         * sem_ch5.adb: Code cleanup.
9462 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9464         * freeze.adb (Check_Expression_Function): Do not check for the
9465         use of deferred constants if the freezing of the expression
9466         function is triggered by its generated body, rather than a
9467         premature use.
9469 2017-04-25  Javier Miranda  <miranda@adacore.com>
9471         * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
9472         subtypes of private types when performing the view conversion.
9474 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9476         * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9477         the purposes of freezing.
9478         * exp_util.adb Update the documentation and structure of the
9479         type map used in class-wide semantics of assertion expressions.
9480         (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9481         and resolve the triaged expression because all substitutions
9482         refer to the proper entities.  Update the replacement of
9483         references.
9484         (Build_DIC_Procedure_Body): Add formal parameter
9485         For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9486         are now only processed when freezing occurs.  Build a body only
9487         when one is needed.
9488         (Entity_Hash): Removed.
9489         (Map_Types): New routine.
9490         (Replace_Object_And_Primitive_References): Removed.
9491         (Replace_References): New routine.
9492         (Replace_Type_References): Moved to the library level of Exp_Util.
9493         (Type_Map_Hash): New routine.
9494         (Update_Primitives_Mapping): Update the mapping call.
9495         (Update_Primitives_Mapping_Of_Types): Removed.
9496         * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9497         parameter For_Freeze and update the comment on usage.
9498         (Map_Types): New routine.
9499         (Replace_References): New routine.
9500         (Replace_Type_References): Moved to the library level of Exp_Util.
9501         (Update_Primitives_Mapping_Of_Types): Removed.
9502         * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9503         properties of the private type to the full view in case the full
9504         view derives from a parent type and inherits a DIC pragma.
9505         * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9506         DIC pragma is placed at the top of a declarative region.
9508 2017-04-25  Tristan Gingold  <gingold@adacore.com>
9510         * s-mmap.ads (Data): Add pragma Inline.
9512 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9514         * checks.adb (Insert_Valid_Check): Do not use
9515         a renaming to alias a volatile name because this will lead to
9516         multiple evaluations of the volatile name. Use a constant to
9517         capture the value instead.
9519 2017-04-25  Doug Rupp  <rupp@adacore.com>
9521         * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
9523 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9525         * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
9526         Add out parameter to indicate to caller that a wrapper must
9527         be constructed for an inherited primitive whose inherited
9528         pre/postcondition has called to overridden primitives.
9529         * freeze.adb (Check_Inherited_Conditions): Build wrapper body
9530         for inherited primitive that requires it.
9531         * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
9532         legal primitive operations and belong to the list of bodies
9533         generated after the freeze point of a type.
9534         * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
9535         of Build_Class_Wide_Expression.
9536         * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
9537         to construct the specification of the wrapper subprogram created
9538         for an inherited operation.
9540 2017-04-25  Bob Duff  <duff@adacore.com>
9542         * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
9543         pthread_mutexattr_setprioceiling): Add new interfaces for these
9544         pthread operations.
9545         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
9546         protocols as appropriate for Locking_Policy 'C' and 'I'.
9547         * s-taprop-posix.adb: Minor reformatting to make it more similar
9548         to s-taprop-linux.adb.
9550 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9552         * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
9553         Handle properly a multi- level derivation involving both renamed
9554         and constrained parent discriminants, when the type to be
9555         constrained has fewer discriminants that the ultimate ancestor.
9557 2017-04-25  Bob Duff  <duff@adacore.com>
9559         * sem_util.adb (Is_Object_Reference): In the
9560         case of N_Explicit_Dereference, return False if it came from a
9561         conditional expression.
9563 2017-04-25  Bob Duff  <duff@adacore.com>
9565         * par-ch4.adb (P_Case_Expression): If a semicolon
9566         is followed by "when", assume that ";" was meant to be ",".
9568 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
9570         * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
9571         fixes.
9573 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
9575         * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
9576         loading of an entity.
9577         * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
9578         previously repeated in the analysis.
9579         * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
9580         procedure SPARK_Implicit_Load.  (Analyze_Task_Type_Declaration):
9581         use new procedure SPARK_Implicit_Load.
9582         * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
9583         SPARK_Implicit_Load.
9585 2017-04-25  Javier Miranda  <miranda@adacore.com>
9587         * sem_util.adb (New_Copy_Tree): By default
9588         copying of defining identifiers is prohibited because
9589         this would introduce an entirely new entity into the
9590         tree. This patch introduces an exception to this general
9591         rule: the declaration of constants and variables located in
9592         Expression_With_Action nodes.
9593         (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
9594         (In_Map): New subprogram.
9595         (Visit_Entity): New subprogram.
9596         (Visit_Node): Handle EWA_Level,
9597         EWA_Inner_Scope_Level, and take care of defining entities defined
9598         in Expression_With_Action nodes.
9600 2017-04-25  Thomas Quinot  <quinot@adacore.com>
9602         * exp_ch6.adb: minor comment edit.
9603         * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
9604         procedure specifications that come from source.
9605         * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
9606         Null_Statement attribute.
9607         * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
9608         procedure, generate statement SCO for the generated NULL statement.
9609         * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
9610         parser, if available.
9612 2017-04-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9614         * system-linux-s390.ads: Use Long_Integer'Size to define
9615         Memory_Size.
9617 2017-04-04  Eric Botcazou  <ebotcazou@adacore.com>
9619         * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
9621 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
9623         * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
9624         * g-socket.adb (To_Host_Entry): Fix typo in comment.
9625         * gnat_ugn.texi: Fix typo.
9626         * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
9627         * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
9628         * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
9629         * sem_util.adb (Mark_Coextensions): Likewise.
9630         * sem_util.ads (Available_Full_View_Of_Component): Likewise.
9632 2017-03-28  Andreas Schwab  <schwab@suse.de>
9634         PR ada/80117
9635         * system-linux-aarch64-ilp32.ads: New file.
9636         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
9637         from LIBGNAT_TARGET_PAIRS.
9638         (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
9639         (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
9640         LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
9641         or -mabi=ilp32, resp.
9643 2017-03-14  James Cowgill  <James.Cowgill@imgtec.com>
9645         * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
9647 2017-03-08  Thanassis Tsiodras  <ttsiodras@gmail.com>
9649         PR ada/79903
9650         * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
9652 2017-03-08  Eric Botcazou  <ebotcazou@adacore.com>
9654         PR ada/79945
9655         * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
9657         * system-linux-arm.ads (Default_Bit_Order): Likewise.
9658         * system-linux-mips.ads (Default_Bit_Order): Likewise.
9659         * system-linux-armeb.ads: Delete.
9660         * system-linux-mipsel.ads: Likewise.
9661         * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
9662         (ARM/Linux): Likewise.
9664 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
9666         PR c/79677
9667         * gcc-interface/misc.c (gnat_handle_option): Pass true to
9668         handle_generated_option GENERATED_P.
9670 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9672         * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
9673         around a justified modular type if it doesn't have the same scalar
9674         storage order as the enclosing record type.
9676 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9678         * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
9679         of boolean rvalues to function calls.
9681 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9683         * gcc-interface/utils.c (fold_bit_position): New function.
9684         (rest_of_record_type_compilation): Call it instead of bit_position to
9685         compute the field position and remove the call to remove_conversions.
9686         (compute_related_constant): Factor out the multiplication in both
9687         operands, if any, and streamline the final test.
9689 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9691         * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
9693 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9695         * gcc-interface/decl.c: Include demangle.h.
9696         (is_cplusplus_method): Return again true for a primitive operation
9697         only if it is dispatching.  For a subprogram with an interface name,
9698         call the demangler to get the number of C++ parameters and compare it
9699         with the number of Ada parameters.
9701 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9703         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
9704         there is no end label, put the location of the At_End procedure on
9705         the call to the procedure.
9707 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9709         * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
9710         value for array types with TYPE_INDEX_TYPE set on their domain type.
9711         * gcc-interface/utils.c (max_size): For operations and expressions, do
9712         not build a new node if the operands have not changed or are missing.
9714 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9716         * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
9717         argument when recursing on TRUTH_NOT_EXPR.
9719 2017-02-12  John Marino  <gnugcc@marino.st>
9721         * system-freebsd-x86.ads: Rename into...
9722         * system-freebsd.ads: ...this.
9723         (Default_Bit_Order): Define using Standard'Default_Bit_Order.
9724         * gcc-interface/Makefile.in: Support aarch64-freebsd.
9725         (x86-64/FreeBSD): Adjust to above renaming.
9726         (i386/FreeBSD): Likewise.
9728 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
9730         * comperr.adb: Update FSF bug reporting URL.
9732 2017-02-01  Eric Botcazou  <ebotcazou@adacore.com>
9733             Jakub Jelinek  <jakub@redhat.com>
9735         PR ada/79309
9736         * adaint.c (__gnat_killprocesstree): Fix broken string handling.
9738 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
9740         PR lto/79061
9741         * gcc-interface/utils.c (get_global_context): Pass main_input_filename
9742         to build_translation_unit_decl.
9744 2017-01-23  Javier Miranda  <miranda@adacore.com>
9746         * sem_util.adb (New_Copy_Tree): Code cleanup:
9747         removal of the internal map (ie. variable Actual_Map, its
9748         associated local variables, and all the code handling it).
9749         * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
9750         force loading of the System package when processing a task type.
9751         (Analyze_Protected_Type_Declaration): in GNATprove mode force
9752         loading of the System package when processing a protected type.
9753         * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
9754         force loading of the System package when processing compilation
9755         unit with a main-like subprogram.
9756         * frontend.adb (Frontend): remove forced loading of the System
9757         package.
9759 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9761         * sem_prag.adb (Default_Initial_Condition): If the desired type
9762         declaration is a derived type declaration with discriminants,
9763         it is rewritten as a private type declaration.
9764         * sem_ch13.adb (Replace_Type_References_Generic,
9765         Visible_Component): A discriminated private type with descriminnts
9766         has components that must be rewritten as selected components
9767         if they appear as identifiers in an aspect expression such as
9768         a Default_Initial_Condition.
9769         * sem_util.adb (Defining_Entity): support N_Iterator_Specification
9770         nodes.
9772 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9774         * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
9775         * gnat1drv.adb Generate an empty object file for an ignored
9776         Ghost compilation unit.
9777         * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
9779 2017-01-23  Yannick Moy  <moy@adacore.com>
9781         * sem_ch4.adb (Analyze_Indexed_Component_Form):
9782         Adapt to inlined prefix with string literal subtype.
9783         * inline.adb (Expand_Inlined_Call): Keep unchecked
9784         conversion inside inlined call when formal type is constrained.
9786 2017-01-23  Javier Miranda  <miranda@adacore.com>
9788         * sem_util.adb (New_Copy_Tree): Code cleanup:
9789         removal of global variables. All the global variables, global
9790         functions and tables of this subprogram are now declared locally.
9792 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
9794         * exp_strm.ads: Minor reformatting and typo fixes.
9796 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9798         * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
9799         exp_aggr.adb: Minor reformatting.
9800         * g-diopit.adb: minor grammar/punctuation fix in comment.
9801         * g-byorma.ads: minor fix of unbalanced parens in comment.
9803 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9805         * par.adb: Update the documentation of component Labl.
9806         * par-ch6.adb (P_Return_Statement): Set the expected label of
9807         an extended return statement to Error.
9809 2017-01-23  Tristan Gingold  <gingold@adacore.com>
9811         * s-boustr.ads, s-boustr.adb (Is_Full): New function.
9813 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9815         * expander.adb: Handle N_Delta_Aggregate.
9817 2017-01-23  Javier Miranda  <miranda@adacore.com>
9819         * exp_ch6.adb (Expand_Call): Improve the code that
9820         checks if some formal of the called subprogram is a class-wide
9821         interface, to handle subtypes of class-wide interfaces.
9823 2017-01-23  Javier Miranda  <miranda@adacore.com>
9825         * checks.adb (Apply_Parameter_Aliasing_Checks):
9826         Remove side effects of the actuals before generating the overlap
9827         check.
9829 2017-01-23  Justin Squirek  <squirek@adacore.com>
9831         * exp_strm.ads, exp_strm.ads
9832         (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
9833         as to avoid getting the underlying type by default.
9834         * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
9835         underlying type in the Iiput and output attribute cases when
9836         building their respective functions.
9838 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
9840         * scng.adb: Minor reformatting of error message.
9842 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9844         * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
9845         to freeze the return type of an expression funxtion that is a
9846         completion, if the type is a limited view and the non-limited
9847         view is available.
9849 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9851         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
9852         aggregate construct.
9853         (P_Record_Or_Array_Component_Association): An array aggregate
9854         can start with an Iterated_Component_Association.
9855         * scng.adb: Modify error message on improper use of @ in earlier
9856         versions of the language.
9857         * sinfo.ads: New node kind N_Delta_Aggregate.
9858         * sinfo.adb: An N_Delta_Aggregate has component associations and
9859         an expression.
9860         * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
9861         * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
9862         Create a new index for each one of the choices in the association,
9863         to prevent spurious homonyms in the scope.
9864         (Resolve_Delta_Aggregate): New.
9865         * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
9866         * exp_util.adb (Insert_Actions): Take into account
9867         N_Delta_Aggregate.
9868         * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
9869         * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
9870         and local procedures Expand_Delta_Array_Aggregate and
9871         expand_Delta_Record_Aggregate.
9872         * sprint.adb: Handle N_Delta_Aggregate.
9874 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9876         * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
9877         empty name when the exception declaration is subject to pragma
9878         Discard_Names.
9879         (Null_String): New routine.
9881 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9883         * par-ch9.adb (P_Protected_Definition): Parse
9884         any optional and potentially illegal pragmas which appear in
9885         a protected operation declaration list.
9886         (P_Task_Items): Parse
9887         any optional and potentially illegal pragmas which appear in a
9888         task item list.
9890 2017-01-23  Pascal Obry  <obry@adacore.com>
9892         * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
9893         is needed when a foreign thread call a Win32 API using a thread handle
9894         like GetThreadTimes() for example.
9896 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9898         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9899         allow an 'Address clause to be specified on a prefix of a
9900         class-wide type.
9902 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9904         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9905         attribute 'Valid is a renaming of the original expression when
9906         the expression denotes a name. For all other kinds of expression,
9907         use a constant to capture the value.
9908         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9909         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9911 2017-01-23  Justin Squirek  <squirek@adacore.com>
9913         * sem_eval.adb (Eval_Integer_Literal): Add special
9914         case to avoid optimizing out check if the literal appears in
9915         an if-expression.
9917 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9919         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9920         allow an 'Address clause to be specified on a prefix of a
9921         class-wide type.
9923 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9925         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9926         attribute 'Valid is a renaming of the original expression when
9927         the expression denotes a name. For all other kinds of expression,
9928         use a constant to capture the value.
9929         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9930         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9932 2017-01-23  Justin Squirek  <squirek@adacore.com>
9934         * sem_eval.adb (Eval_Integer_Literal): Add special
9935         case to avoid optimizing out check if the literal appears in
9936         an if-expression.
9938 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9940         * sem_ch4.adb (Try_Primitive_Operations,
9941         Is_Valid_First_Argument_Of): argument is valid if it is a derived
9942         type with unknown discriminants that matches its underlying
9943         record view.
9944         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
9945         expression if its type is derived from a limited type with
9946         unknown discriminants, because the expansion (which is a call)
9947         must be expanded in the enclosing context to add the proper build-
9948         in-place parameters to the call.
9949         * lib.ads, exp_ch9.adb: Minor fixes in comments.
9951 2017-01-23  Yannick Moy  <moy@adacore.com>
9953         * frontend.adb (Frontend): Do not load runtime
9954         unit for GNATprove when parsing failed.
9955         * exp_ch9.adb: minor removal of extra whitespace
9956         * exp_ch6.adb: minor typo in comment
9957         * sem_util.adb: Code cleanup.
9958         * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
9959         * a-ngcefu.adb: minor style fix in whitespace
9961 2017-01-23  Thomas Quinot  <quinot@adacore.com>
9963         * scos.ads: Document usage of 'd' as default SCO kind for
9964         declarations.
9965         * par_sco.adb (Traverse_Declarations_Or_Statements.
9966         Traverse_Degenerate_Subprogram): New supporting routine for expression
9967         functions and null procedures.
9968         (Traverse_Declarations_Or_Statements.Traverse_One): Add
9969         N_Expression_Function to the subprogram case; add required
9970         support for null procedures and expression functions.
9972 2017-01-23  Bob Duff  <duff@adacore.com>
9974         * namet.ads (Bounded_String): Decrease the size of type
9975         Bounded_String to avoid running out of stack space.
9976         * namet.ads (Append): Don't ignore buffer overflow; raise
9977         Program_Error instead.
9979 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9981         * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
9982         sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
9983         reformatting.
9984         * exp_ch9.adb: minor style fix in comment.
9986 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9988         * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
9989         for a limited record extension with unknown discriminants whose
9990         full view has no discriminants.
9992 2017-01-23  Yannick Moy  <moy@adacore.com>
9994         * exp_spark.adb: Alphabetize with clauses.
9996 2017-01-23  Yannick Moy  <moy@adacore.com>
9998         * sem_util.adb (Has_Enabled_Property): Treat
9999         protected objects and variables differently from other variables.
10001 2017-01-23  Thomas Quinot  <quinot@adacore.com>
10003         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
10004         Split original Ada 95 part off into new subprogram
10005         below. Call that subprogram (instead of proceeding with
10006         AI95-0133 behaviour) if debug switch -gnatd.p is in use.
10007         (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
10008         * debug.adb Document new switch -gnatd.p
10009         * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
10010         record for reverse bit order if an error has already been posted
10011         on the record type.  This avoids generating extraneous "info:"
10012         messages for illegal code.
10014 2017-01-23  Justin Squirek  <squirek@adacore.com>
10016         * sem_ch3.adb (Analyze_Declarations): Correct comments
10017         * freeze.adb (Find_Constant): Add detection of deferred constants
10018         so they are not incorrectly flagged as premature.
10020 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
10022         * scans.ads: New token At_Sign. Remove '@' from list of illegal
10023         characters for future version of the language. '@' is legal name.
10024         * scng.ads, scng.adb (Scan):  Handle '@' appropriately.
10025         * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
10026         denotes a Target_Name.
10027         * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
10028         * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
10029         (Has_Target_Names): New flag on N_Assignment_Statement, to
10030         indicate that RHS has occurrences of N_Target_Name.
10031         * sem.adb: Call Analyze_Target_Name.
10032         * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
10033         (urrent_LHS): Global variable that denotes LHS of assignment,
10034         used in the analysis of Target_Name nodes.
10035         * sem_res.adb (Resolve_Target_Name): New procedure.
10036         * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
10037         N is an assignment statement whose RHS contains occurences of @
10038         that designate the value of the LHS of the assignment. If the
10039         LHS is side-effect free the target names can be replaced with
10040         a copy of the LHS; otherwise the semantics of the assignment
10041         is described in terms of a procedure with an in-out parameter,
10042         and expanded as such.
10043         (Expand_N_Assignment_Statement): Call
10044         Expand_Assign_With_Target_Names when needed.
10045         * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
10046         * sprint.adb: Handle N_Target_Name.
10048 2017-01-23  Eric Botcazou  <ebotcazou@adacore.com>
10050         * checks.adb: Minor fix in comment.
10052 2017-01-23  Philippe Gil  <gil@adacore.com>
10054         * g-debpoo.adb (Do_Report) remove freed chunks from chunks
10055         count in Sort = Memory_Usage or Allocations_Count
10057 2017-01-23  Justin Squirek  <squirek@adacore.com>
10059         * sem_ch3.adb: Code cleanup.
10061 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
10063         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
10064         variables to the local variable section. Update the profile
10065         of various nested routine that previously had visibility
10066         of those globals. One the matching phase has completed,
10067         remove certain classes of clauses which are considered noise.
10068         (Check_Dependency_Clause): Properly detect a match between two
10069         'Result attributes. Update the various post-match cases to use
10070         Is_Already_Matched as this routine now automatically recognizes
10071         a previously matched 'Result attribute.
10072         (Is_Already_Matched): New routine.
10073         (Remove_Extra_Clauses): New routine.
10074         (Report_Extra_Clauses): Remove the detection of ... => null
10075         clauses as this is now done in Remove_Extra_Clauses.
10077 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
10079         * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
10080         report on spurious overlaps between values involving a subtype
10081         with a static predicate, because the expansion of such a subtype
10082         into individual ranges in inhibited in ASIS mode.
10084 2017-01-23  Justin Squirek  <squirek@adacore.com>
10086         * sem_ch3.adb (Analyze_Declarations): Add detection
10087         of an edge case and delay freezing if it is present.
10089 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
10091         * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
10092         sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
10094 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
10096         * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
10097         access-to-subprogram types inherit the convention of the
10098         associated subprogram.  (Set_Profile_Convention): New routine.
10099         * sem_ch6.adb (Check_Conformance): Do not compare the conventions
10100         of the two entities directly, use Conventions_Match to account
10101         for anonymous access-to-subprogram and subprogram types.
10102         (Conventions_Match): New routine.
10104 2017-01-23  Claire Dross  <dross@adacore.com>
10106         * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
10107         which return Universal_Integer, force the overflow check flag for
10108         Length and Range_Length for types as big as Long_Long_Integer.
10110 2017-01-23  Claire Dross  <dross@adacore.com>
10112         * exp_spark.adb (Expand_SPARK_Attribute_Reference):  For
10113         attributes which return Universal_Integer, introduce a conversion
10114         to the expected type with the appropriate check flags set.
10115         * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
10116         base type if the range is null. It may still be invalid if it
10117         is higher than the lower bound. This is checked later in the
10118         context in which the range appears.
10120 2017-01-23  Pierre-Marie de Rodat  <derodat@adacore.com>
10122         * scos.ads: Introduce a constant to represent ignored
10123         dependencies in SCO_Unit_Table_Entry.
10125 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
10127         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
10128         spaces from error messages.
10130 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
10132         * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
10133         subsidiary to Expand_N_Object_ Declaration, to compute a guard on
10134         an object declaration for an array type with a modular index type
10135         with the size of Long_Long_Integer. Special processing is needed
10136         in this case to compute reliably the size of the object, and
10137         eventually  to raise Storage_Error, when wrap-around arithmetic
10138         might compute a meangingless size for the object.
10140 2017-01-23  Justin Squirek  <squirek@adacore.com>
10142         * a-wtenau.adb, par-endh.adb, sem_prag.adb,
10143         sem_type.adb: Code cleanups.
10145 2017-01-23  Bob Duff  <duff@adacore.com>
10147         * sem_res.adb (Resolve_Call): In the part of the code where
10148         it is deciding whether to turn the call into an indexed
10149         component, avoid doing so if the call is to an instance of
10150         Unchecked_Conversion. Otherwise, the compiler turns it into an
10151         indexed component, and resolution of that turns it back into a
10152         function call, and so on, resulting in infinite recursion.
10153         * sem_util.adb (Needs_One_Actual): If the first formal has a
10154         default, then return False.
10156 2017-01-21  Eric Botcazou  <ebotcazou@adacore.com>
10158         * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
10159         optimizations when the type is modular and the offsets are equal.
10161 2017-01-20  Thomas Quinot  <quinot@adacore.com>
10163         * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
10164         message.
10166 2017-01-20  Nicolas Roche  <roche@adacore.com>
10168         * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
10170 2017-01-20  Bob Duff  <duff@adacore.com>
10172         * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
10173         (etc) optimizations when the type is modular.
10175 2017-01-20  Yannick Moy  <moy@adacore.com>
10177         * sem_ch6.adb (Move_Pragmas): move some pragmas,
10178         but copy the SPARK_Mode pragma instead of moving it.
10179         (Build_Subprogram_Declaration): Ensure that the generated spec
10180         and original body share the same SPARK_Pragma aspect/pragma.
10181         * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
10182         procedure to copy SPARK_Mode aspect.
10184 2017-01-20  Bob Duff  <duff@adacore.com>
10186         * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
10187         even in ASIS mode.
10188         * sem_ch13.adb (Resolve_Name): Enable setting the entity to
10189         Empty even in ASIS mode.
10191 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10193         * exp_ch9.adb: minor style fixes in comments.
10194         * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
10195         relative statement introduces an implicit dependency on
10196         Ada.Real_Time.Clock_Time.
10197         * sem_util.adb: Minor reformatting.
10199 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10201         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
10202         must be treated as delayed aspect even if the expression is
10203         a literal, because the aspect affects the freezing and the
10204         elaboration of the object to which it applies.
10206 2017-01-20  Tristan Gingold  <gingold@adacore.com>
10208         * s-osinte-vxworks.ads (Interrup_Range): New subtype.
10210 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10212         * lib-xref.adb (Generate_Reference): Do not warn about the
10213         presence of a pragma Unreferenced if the entity appears as the
10214         actual in a procedure call that does not come from source.
10216 2017-01-20  Pascal Obry  <obry@adacore.com>
10218         * expect.c, terminals.c: Fix some warnings about unused variables.
10219         * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
10220         of the runtime.
10222 2017-01-20  Bob Duff  <duff@adacore.com>
10224         * exp_attr.adb (Constrained): Apply an access check (check that
10225         the prefix is not null) when the prefix denotes an object of an
10226         access type; that is, when there is an implicit dereference.
10228 2017-01-20  Gary Dismukes  <dismukes@adacore.com>
10230         * s-rident.ads (constant Profile_Info): Remove
10231         No_Calendar from GNAT_Extended_Ravenscar restrictions.
10233 2017-01-20  Tristan Gingold  <gingold@adacore.com>
10235         *  s-maccod.ads: Add pragma No_Elaboration_Code_All
10237 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10239         * ghost.adb (Mark_Ghost_Clause): New routine.
10240         (Prune_Node): Do not prune compilation unit nodes.
10241         (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
10242         This does not touch the node itself, but does prune all its fields.
10243         * ghost.ads (Mark_Ghost_Clause): New routine.
10244         * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
10245         package clause mentions Ghost and non-Ghost packages. Mark a
10246         use package clause as Ghost when it mentions a Ghost package.
10247         (Analyze_Use_Type): Emit an error when a use type clause mentions
10248         Ghost and non-Ghost types. Mark a use type clause as Ghost when
10249         it mentions a Ghost type.
10250         * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
10251         Ghost when it withs a Ghost unit.
10253 2017-01-20  Javier Miranda  <miranda@adacore.com>
10255         * sem_res.adb (Resolve_Call): If a function call
10256         returns a limited view of a type and at the point of the call the
10257         function is not declared in the extended main unit then replace
10258         it with the non-limited view, which must be available. If the
10259         called function is in the extended main unit then no action is
10260         needed since the back-end handles this case.
10262 2017-01-20  Eric Botcazou  <ebotcazou@adacore.com>
10264         * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
10265         (Contains_Subprograms_Refs): ...this.  Adjust comment
10266         for constants.  (Is_Subp_Or_Const_Ref): Rename into...
10267         (Is_Subprogram_Ref): ...this.
10268         (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
10269         Has_Non_Subprograms_Referencer and adjust comment.  Remove
10270         incorrect shortcut for package declarations and bodies.
10272 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10274         * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
10275         base type differs from that of the completion and the private
10276         subtype is an itype (created for a constraint on an access
10277         type e.g.), set Delayed_Freeze on both to prevent out-of-scope
10278         anomalies in gigi.
10280 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10282         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10283         When inheriting the SPARK_Mode of a prior expression function,
10284         look at the properly resolved entity rather than the initial
10285         candidate which may denote a homonym.
10287 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10289         * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
10290         Precondition or Postcondition, and the context is pragma
10291         Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
10292         and suggest the standard names Assertion_Policy /Pre /Post
10293         instead.
10295 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10297         * sem_ch10.adb, sem_cat.adb: Minor reformatting.
10299 2017-01-20  Javier Miranda  <miranda@adacore.com>
10301         * sem_ch3.adb (Access_Type_Declaration): Protect access to the
10302         Entity attribute.
10303         * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
10304         * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
10305         malformed trees.
10307 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10309         * sem_ch13.adb (Analyze_Aspect_Specification, case
10310         Dynamic_Predicate): If the entity E is a subtype that inherits
10311         a static predicate for its parent P,, the inherited and the
10312         new predicate combine in the generated predicate function,
10313         and E only has a dynamic predicate.
10315 2017-01-20  Tristan Gingold  <gingold@adacore.com>
10317         * s-boustr.ads, s-boustr.adb: New package.
10318         * Makefile.rtl: Add s-boustr.
10320 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10322         * inline.adb (Process_Formals): Qualify the
10323         expression of a return statement when it yields a universal type.
10325 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10327         * freeze.adb (Freeze_All): Freeze the default
10328         expressions of all eligible formal parameters that appear in
10329         entries, entry families, and protected subprograms.
10331 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10333         * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
10334         for illegal inherited Implicit_Dereference aspects with renamed
10335         discriminants.
10337 2017-01-20  Javier Miranda  <miranda@adacore.com>
10339         * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
10340         * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
10341         * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
10342         (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
10343         Set_Prev, Tree_Read): Adding assertion.
10344         * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
10345         * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
10346         (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
10347         Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
10348         Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
10349         Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
10350         Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
10351         Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
10352         Set_ListN_With_Parent): Adding assertion.
10354 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10356         * sem_prag.adb (Process_Convention): Diagnose properly a pragma
10357         import that applies to several homograph subprograms. when one
10358         of them is declared by a subprogram body.
10360 2017-01-20  Justin Squirek  <squirek@adacore.com>
10362         * exp_ch6.adb (Expand_Call): Remove optimization
10363         that nulls out calls to null procedures.
10365 2017-01-20  Yannick Moy  <moy@adacore.com>
10367         * inline.adb (Expand_Inlined_Call): Keep more
10368         precise type of actual for inlining whenever possible. In
10369         particular, do not switch to the formal type in GNATprove mode in
10370         some case where the GNAT backend might require it for visibility.
10372 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10374         * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
10375         aspect Implicit_Dereference can be inherited by a full view if
10376         the partial view has no discriminants, because there is no way
10377         to apply the aspect to the partial view.
10378         (Build_Derived_Record_Type): If derived type renames discriminants
10379         of the parent, the new discriminant inherits the aspect from
10380         the old one.
10381         * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
10382         call through an access discriminant designating a subprogram.
10383         * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
10384         properly a parameterless call through an access discriminant on
10385         the left-hand side of an assignment.
10386         * sem_res.adb (resolve): If an interpreation involves a
10387         discriminant with an implicit dereference and the expression is an
10388         entity, resolution takes place later in the appropriate routine.
10389         * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
10390         access discriminants that designate a subprogram type.
10392 2017-01-20  Pascal Obry  <obry@adacore.com>
10394         * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
10396 2017-01-20  Yannick Moy  <moy@adacore.com>
10398         * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
10399         on implicitly with'ed units in GNATprove mode.
10400         * sinfo.ads (Implicit_With): Document use of flag for implicitly
10401         with'ed units in GNATprove mode.
10403 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10405         * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
10406         unit Do not report an error on a non-static entity that appears
10407         in the context of a spec expression, such as an aspect expression.
10409 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10411         * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
10412         (Is_Underlying_Full_View): New routine.
10413         (Set_Is_Underlying_Full_View): New routine.
10414         (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
10415         * einfo.ads Add new attribute Is_Underlying_Full_View.
10416         (Is_Underlying_Full_View): New routine along with pragma Inline.
10417         (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
10418         * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
10419         class-wide types and underlying full views. The first subtype
10420         is used as the working type for all Itypes, not just array base types.
10421         (Build_DIC_Procedure_Declaration): Do not consider
10422         class-wide types and underlying full views. The first subtype
10423         is used as the working type for all Itypes, not just array
10424         base types.
10425         * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
10426         view or an underlying full view without clobbering the attributes
10427         of a previous freeze node.
10428         (Inherit_Freeze_Node): New routine.
10429         * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
10430         full view as such.
10431         (Build_Underlying_Full_View): Mark an underlying full view as such.
10432         * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
10433         full view as such.
10435 2017-01-20  Yannick Moy  <moy@adacore.com>
10437         * sinfo.ads: Document lack of Do_Division_Check flag
10438         on float exponentiation.
10440 2017-01-19  Javier Miranda  <miranda@adacore.com>
10442         * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
10443         identifier attribute of a block-statement node. Required to avoid
10444         assertion failure when building the new containers library.
10446 2017-01-19  Bob Duff  <duff@adacore.com>
10448         * exp_ch3.adb: Update comment.
10450 2017-01-19  Vincent Celier  <celier@adacore.com>
10452         * gprep.adb (Gnatprep): Parse the definition file without
10453         "replace in comments" even when switch -C is used.
10455 2017-01-19  Justin Squirek  <squirek@adacore.com>
10457         * exp_ch9.adb (Is_Pure_Barrier): Create function
10458         Is_Count_Attribute to identify an expansion of the 'Count
10459         attribute.
10461 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10463         * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
10464         statements within an element iterator loop are only analyzed
10465         agter the loop is rewritten. Within a generic the analysis must
10466         be performed in any case to complete name capture.
10468 2017-01-19  Bob Duff  <duff@adacore.com>
10470         * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
10471         before checking for unrecognized pragmas.
10472         Initialize Pname on its declarations; that's always good style.
10474 2017-01-19  Claire Dross  <dross@adacore.com>
10476         * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
10477         body into the tree for GNATprove by setting its Parent field. The
10478         components invariants of composite types are not checked by
10479         the composite type's invariant procedure in GNATprove mode.
10480         (Build_Invariant_Procedure_Declaration): Semi-insert the
10481         declaration into the tree for GNATprove by setting its Parent
10482         field.
10483         * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
10484         the component invariants to the array type  invariant procedure
10485         so that the procedure can be used to  check the array type
10486         invariants if any.
10487         (Freeze_Record_Type): In GNATprove mode, do
10488         not add the component invariants to the record type  invariant
10489         procedure so that the procedure can be used to  check the record
10490         type invariants if any.
10492 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10494         * lib-xref-spark_specific.adb: Minor reformatting.
10495         * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
10497 2017-01-19  Javier Miranda  <miranda@adacore.com>
10499         * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
10500         Build_Back_End_Aggregate.
10501         (Generate_Aggregate_For_Derived_Type): Code cleanup.
10502         (Prepend_Stored_Values): Code cleanup.
10504 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10506         * sem_ch6.adb (Analyze_Expression_Function): Check for an
10507         incomplete return type after attempting to freeze it, so that
10508         other freeze actiona are generated in the proper order.
10510 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10512         * sem_aggr.adb (Resolve_Aggregate): If the type is a string
10513         type, ie. a type whose component is a character type, and the
10514         aggregate is positional, do not convert into a string literal
10515         if the index type is not an integer type, because the original
10516         type may be required in an enclosing operation.
10518 2017-01-19  Bob Duff  <duff@adacore.com>
10520         * binde.adb, debug.adb: Enable new elaboration order algorithm
10521         by default. -dp switch reverts to the old algorithm.
10523 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10525         * sem_ch3.adb Add with and use clauses for Exp_Ch7.
10526         (Analyze_Declarations): Create the DIC and Invariant
10527         procedure bodies s after all freezing has taken place.
10528         (Build_Assertion_Bodies): New routine.
10529         * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
10530         and Exp_Util.
10531         (Analyze_Package_Specification): Remove the
10532         generation of the DIC and Invariant procedure bodies. This is
10533         now done by Analyze_Declarations.
10534         * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
10535         procedures are never treated as primitives.
10537 2017-01-19  Yannick Moy  <moy@adacore.com>
10539         * frontend.adb: Analyze inlined bodies and check elaboration
10540         rules in GNATprove mode too.
10541         * sem_elab.adb (Delay_Element): Add Boolean component to save
10542         indication that call is in SPARK code.  (Check_Elab_Calls):
10543         Check elaboration rules in GNATprove mode, and correctly set
10544         the current value of SPARK_Mode.
10545         * lib-xref-spark_specific.adb
10546         (Add_SPARK_Xrefs): Simplify iteration over dereferences.
10548 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10550         * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
10551         checks on the expression for the high bound of concatenation
10552         when checks are disabled, to suppress warnings about potential
10553         constraint errors in restricted runtimes.
10555 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10557         * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
10558         representation-to-position function as inlined.
10559         * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
10560         the purity of an internally generated entity if it has been
10561         explicitly marked as pure for optimization purposes.
10562         * exp_aggr.adb: Minor reformatting.
10564 2017-01-19  Javier Miranda  <miranda@adacore.com>
10566         * exp_ch6.adb (Expand_Call): Remove side effects on
10567         actuals that are allocators with qualified expression since the
10568         initialization of the object is performed by means of individual
10569         statements (and hence it must be done before the call).
10571 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10573         * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
10574         (Build_Derived_Enumeration_Type): If the derived type inherits a
10575         dynamic predicate from its parent, the bounds of the type must
10576         freeze because an explicit constraint is constructed for the
10577         type and the corresponding range is elaborated now.
10579 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
10581         * sem_attr.ads: minor fix of inconsistent casing in comment
10582         * lib-writ.ads: minor align comments in columns
10583         * sem_ch3.adb: Minor reformatting.
10584         * spark_xrefs.ads: minor fix typo in SPARK-related comment
10585         * table.ads: minor style fix in comment
10586         * lib-xref-spark_specific.adb
10587         (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
10588         * sem_ch12.adb: minor whitespace fix
10589         * freeze.adb: Add comment.
10590         * sem_util.adb (Unique_Name): for instances of
10591         generic subprograms ignore the name of the wrapper package.
10593 2017-01-19  Javier Miranda  <miranda@adacore.com>
10595         * exp_aggr.adb (Resolve_Record_Aggregate):
10596         Factorize code needed for aggregates of limited and unlimited
10597         types in a new routine.
10598         (Pass_Aggregate_To_Back_End): New subprogram.
10600 2017-01-19  Yannick Moy  <moy@adacore.com>
10602         * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
10604 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10606         * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
10607         public, for use elsewhere.
10608         * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
10609         an Inlined_body, recognize a call that uses object notation
10610         and has not been rewritten as a regular call because regular
10611         expansion has not taken place.
10613 2017-01-19  Bob Duff  <duff@adacore.com>
10615         * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
10616         in case of generic formal discrete types, because it causes crashes in
10617         the compiler when built with assertions on.
10619 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10621         * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
10622         sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
10624 2017-01-19  Bob Duff  <duff@adacore.com>
10626         * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
10627         Increment Warnings_Detected.  It was decrementing, which is
10628         wrong since we just issued a warning message.
10629         * binderr.ads (Errors_Detected, Warnings_Detected): Declare
10630         these variables to be of subtype Nat instead of Int, because
10631         they should never be negative.
10633 2017-01-19  Javier Miranda  <miranda@adacore.com>
10635         * contracts.adb (Build_Postconditions_Procedure): Replace
10636         Generate_C_Code by Modify_Tree_For_C.
10637         * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
10638         Replace Generate_C_Code by Modify_Tree_For_C.
10639         * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
10640         Modify_Tree_For_C.
10641         * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
10642         Generate_C_Code by Modify_Tree_For_C.
10643         * exp_ch4.adb (Expand_Allocator_Expression): Replace
10644         Generate_C_Code by Modify_Tree_For_C.
10645         * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
10646         by Modify_Tree_For_C.
10647         * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
10648         Generate_C_Code by Modify_Tree_For_C.
10649         * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
10650         by Modify_Tree_For_C.
10651         * sinfo.ads (Modify_Tree_For_C): Adding documentation.
10653 2017-01-19  Javier Miranda  <miranda@adacore.com>
10655         * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
10656         subprogram.
10657         (Is_Inlinable_Expression_Function): New subprogram.
10658         * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
10659         to Sem_Util.
10660         (Is_Inlinable_Expression_Function): Moved to Sem_Util.
10662 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10664         * sem_ch4.adb (Diagnose_Call): Improve error message when a
10665         selected component has a prefix that might be interpreted
10666         as a parameterless function call, but none of the candidate
10667         interpretations is parameterless, and there is a hidden homonym
10668         of the prefix that is a package.
10669         * sem_ch8.adb (Find_Selected_Component): If the prefix might be
10670         interpreted as a parameterless function call and its analysis
10671         fails, do not call Analyze_Selected_Component.
10673 2017-01-19  Steve Baird  <baird@adacore.com>
10675         * sem_util.ads: Add new Use_Full_View Boolean parameter to
10676         Get_Index_Bounds.
10677         * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
10678         calls to a newly-defined Scalar_Range_Of_Right_View function.
10680 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
10682         * gnat1drv.adb: minor fix of unbalanced parens in comment
10683         * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
10684         to visible part of the package to allow re-use in GNATprove.
10685         * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
10686         from repeated code of Traverse_Compilation_Unit.
10687         (Traverse_Declaration_Or_Statement): fixed detection of
10688         generic subprograms and packages; also, iteration over case
10689         statement alternatives rewritten to avoid testing if the first
10690         alternative is present (since it must be present due to Ada
10691         syntax restrictions).
10693 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10695         * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
10696         returning by reference not just for subprogram body stubs,
10697         but for all subprogram cases.
10698         * sem_util.adb: Code reformatting.
10699         (Requires_Transient_Scope): Update the call to Results_Differ.
10700         (Results_Differ): Update the parameter profile and the associated
10701         comment on usage.
10703 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10705         * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
10706         identifier nodes that do not come from source, to handle properly
10707         dimensionality check within an inlined body which inclddes both
10708         original operands and rewritten operands. This removes spurious
10709         dimensionality errors in the presence of front-end inlining,
10710         as well as in SPARK mode.
10712 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
10714         PR driver/49726
10715         * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
10717 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10719         * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
10721 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
10723         * doc/gnat_ugn/getting_started_with_gnat.rst,
10724         doc/gnat_ugn/inline_assembler.rst,
10725         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
10726         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
10727         doc/gnat_ugn/about_this_guide.rst,
10728         doc/gnat_ugn/platform_specific_information.rst,
10729         doc/gnat_ugn/example_of_binder_output.rst,
10730         doc/gnat_ugn/gnat_and_program_execution.rst,
10731         doc/gnat_ugn/gnat_utility_programs.rst,
10732         doc/gnat_ugn/the_gnat_compilation_model.rst,
10733         doc/gnat_rm/implementation_defined_attributes.rst,
10734         doc/gnat_rm/compatibility_and_porting_guide.rst,
10735         doc/gnat_rm/standard_library_routines.rst,
10736         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
10737         doc/gnat_rm/implementation_defined_pragmas.rst,
10738         doc/gnat_rm/the_gnat_library.rst,
10739         doc/gnat_rm/obsolescent_features.rst,
10740         doc/gnat_rm/about_this_guide.rst,
10741         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
10742         doc/gnat_rm/implementation_of_ada_2012_features.rst,
10743         doc/gnat_rm/interfacing_to_other_languages.rst,
10744         doc/gnat_rm/implementation_defined_aspects.rst,
10745         doc/gnat_rm.rst: Update documentation.
10746         * gnat_rm.texi, gnat_ugn.texi: Regenerated.
10748 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10750         * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
10751         * scil_ll.adb: Minor style fix in comment.
10752         * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
10753         even if entity is already set, because the node may be renalyzed
10754         after inlining transformations.
10756 2017-01-13  Javier Miranda  <miranda@adacore.com>
10758         * sem_res.adb (Resolve_Call): Do not establish a transient scope
10759         for a call to inlinable expression function (since the call will
10760         be replaced by its returned object).
10761         * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
10762         * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
10763         (Expand_Call): For inlinable expression function call replace the
10764         call by its returned object.
10765         (Is_Inlinable_Expression_Function): New subprogram.
10767 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10769         * checks.adb: Minor typo fix and reformatting.
10771 2017-01-13  Javier Miranda  <miranda@adacore.com>
10773         * contracts.adb (Contract_Only_Subprograms): Remove formal.
10774         (Copy_Original_Specification): Removed.
10775         (Skip_Contract_Only_Subprogram): Move here checks previously
10776         located in the caller of this routine (to leave the code more clean).
10777         (Build_Contract_Only_Subprogram): Code cleanup.
10778         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
10779         (Get_Contract_Only_Missing_Body_Name): Removed.
10781 2017-01-13  Javier Miranda  <miranda@adacore.com>
10783         * sem_ch6.adb (Cloned_Expression): New subprogram.
10784         (Freeze_Expr_Types): Complete previous patch since the expression
10785         of an expression-function may have iterators and loops with
10786         defining identifiers which, as part of the preanalysis of the
10787         expression, may be left decorated with itypes that will not be
10788         available in the tree passed to the backend.
10790 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10792         * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
10793         conversion to Integer of an expression that is an attribute
10794         reference 'Pos on an enumeration type.
10796 2017-01-13  Bob Duff  <duff@adacore.com>
10798         * atree.ads: Minor comment fix.
10800 2017-01-13  Justin Squirek  <squirek@adacore.com>
10802         * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
10803         calls in accessibility check on return statement.
10805 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10807         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10808         Ensure that the input body is a subprogram body before trying to
10809         determine whether it denoted an expression function.  Note that
10810         subprogram body stubs cannot denote expression functions.
10812 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10814         * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
10815         and typo fixes.
10817 2017-01-13  Javier Miranda  <miranda@adacore.com>
10819         * einfo.ads (Component_Bit_Offset): Fix documentation.
10820         * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
10821         on record holes for components with unknown compile-time offsets.
10823 2017-01-13  Bob Duff  <duff@adacore.com>
10825         * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
10826         * g-locfil.ads: Minor comment fix.
10828 2017-01-13  Bob Duff  <duff@adacore.com>
10830         * binde.adb (Elab_New): New elaboration order algorithm
10831         that is expected to cause fewer ABE issues. This is a work in
10832         progress. The new algorithm is currently disabled, and can be
10833         enable by the -dp switch, or by modifying the Do_Old and Do_New
10834         etc. flags and rebuilding. Experimental code is included to
10835         compare the results of the old and new algorithms.
10836         * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
10837         can have multiple of these tables, so the old and new algorithms
10838         can coexist.
10839         * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
10840         parameter of type array. This avoids the global variable, and
10841         allows bounds checking (which is normally defeated by the tables
10842         packages). It also ensures that the Elab_Order is read-only
10843         to Bindgen.
10844         * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
10845         subprograms that need it, as above.
10846         * debug.adb: Document new -dp switch. Modify doc of old -do
10847         switch.
10848         * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
10849         and Bindgen.  Move writing of closure (-R and -Ra switches)
10850         to Binde; that's more convenient.
10852 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10854         * sem_ch6.adb (Analyze_Expression_Function): If the expression
10855         function is a completion, all entities referenced in the
10856         expression are frozen. As a consequence, a reference to an
10857         uncompleted private type from an enclosing scope is illegal.
10859 2017-01-13  Javier Miranda  <miranda@adacore.com>
10861         * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
10862         (Analyze_Subprogram_Body_Helper): At the occurrence of an
10863         expression function declaration that is a completion, its
10864         expression causes freezing (AI12-0103).
10866 2017-01-13  Vadim Godunko  <godunko@adacore.com>
10868         * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
10869         Reference functions of Ada.Containers.Indefinite_Holders.
10871 2017-01-13  Bob Duff  <duff@adacore.com>
10873         * s-os_lib.ads: Minor comment fixes.
10875 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10877         * exp_ch3.adb (Default_Initialize_Object): Do not default
10878         initialize an object when it is of a task type and restriction
10879         No_Tasking is in effect because the initialization is obsolete.
10880         * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
10881         restriction No_Tasking is in effect.
10882         (Build_Master_Renaming): Do not rename a master when restriction
10883         No_Tasking is in effect.
10885 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10887         * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
10888         the legality of An others clause applies as well to a choice in
10889         an Iterated_component_ association.
10890         (Resolve_Iterated_Component_Association): An others choice
10891         is legal.
10892         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
10893         Iterated_Component_Association is not static.
10895 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10897         * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
10898         control is passed to the expresion handler before the new mode
10899         is set.
10900         * sem_ch12.adb (Analyze_Package_Instantiation,
10901         Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
10902         in case control is passed to the expresion handler before the
10903         new mode is set.
10905 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10907         * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
10908         exp_aggr.adb: Minor reformatting.
10910 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10912         * inline.adb: Minor reformatting and typo fix.
10914 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10916         * sem_util.ads, sem_util.adb (Choice_List): Move function here
10917         from sem_aggr.adb, for use elsewhere.
10918         * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
10919         * sem_aggr.adb (Resolve_Array_Aggregate): Remove
10920         Iterated_Component_Present.
10921         * exp_aggr.adb: Use Choice_List throughout, to handle
10922         Iterated_Component_Associations.
10923         (Gen_Loop): Generate proper loop for an
10924         Iterated_Component_Association: loop variable has the identifier
10925         of the original association. Generate a loop even for a single
10926         component choice, in order to make loop parameter visible in
10927         expression.
10928         (Flatten): An Iterated_Component_Association is not static.
10930 2017-01-13  Yannick Moy  <moy@adacore.com>
10932         * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
10933         float exponentiation for statically known small negative values
10934         is the reciprocal of the exponentiation for the opposite value
10935         of the exponent.
10936         * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
10937         Ensure that the value of float exponentiation for negative values
10938         is the reciprocal of the exponentiation for the opposite value
10939         of the exponent.
10940         * inline.adb (Expand_Inlined_Call): Fix the count
10941         for the number of generated gotos.
10943 2017-01-13  Yannick Moy  <moy@adacore.com>
10945         * inline.adb: Code cleanup.
10946         * sem_util.adb (Is_OK_Volatile_Context): Add
10947         expression in delay statement as OK for volatile context.
10949 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10951         * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
10952         mode a choice that is a subtype with a static predicate is
10953         replaced by the values it covers. This transformation must not
10954         be performed in ASIS mode, to preserve the source for analysis.
10956 2017-01-13  Justin Squirek  <squirek@adacore.com>
10958         * nlists.ads: Correct minor typo.
10960 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10962         * sem_ch13.adb: Minor reformatting and typo fix.
10964 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10966         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
10967         Iterated_Component_Association is a named association in an
10968         array aggregate.
10969         * sem_aggr.adb (Resolve_Iterated_Component_Association): New
10970         procedure, subsidiary of Resolve_Array_Aggregate, to analyze
10971         and resolve the discrete choices and the expression of the
10972         new construct.
10973         * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
10974         Loop_Actions and Box_Present are attributes of
10975         N_Iterated_Component_Association nodes. Box_Present is always
10976         False in this case.
10977         * sprint.adb (Sprint_Node): An Iterated_Component_Association
10978         has a Discrete_Choices list, as specified in the RM. A
10979         Component_Association for aggregate uses instead a Choices list.
10980         We have to live with this small inconsistency because the new
10981         construct also has a defining identifier, and there is no way
10982         to merge the two node structures.
10984 2017-01-13  Yannick Moy  <moy@adacore.com>
10986         * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
10987         list of pragmas to remove.  Remove pragmas from the list of
10988         statements in the body to inline.
10989         * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
10991 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10993         * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
10994         Analyze_Declarations, to analyze and resolve the expressions of
10995         aspect specifications in the current declarative list, so that
10996         the expressions have proper entity and type info.  This is needed
10997         for ASIS when there is no subsequent expansion to generate this
10998         semantic information.
10999         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
11000         original expression, to suppress cascaded errors when expression
11001         has been constant-folded.
11002         (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
11003         ASIS mode, because there is no subsequent expansion to decorate
11004         the tree.
11006 2017-01-13  Yannick Moy  <moy@adacore.com>
11008         * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
11009         New function to detect when a call may be inlined or not in
11010         GNATprove mode.
11011         (Expand_Inlined_Call): Ensure that a temporary
11012         is always created in the cases where a type conversion may be
11013         needed on an input parameter in GNATprove mode, so that GNATprove
11014         sees the check to perform.
11015         * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
11016         when not applicable due to actual requiring type conversion
11017         with possible check but no temporary value can be copied for
11018         GNATprove to see the check.
11020 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11022         * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
11023         exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
11024         layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
11025         exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
11026         exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
11027         g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
11028         sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
11029         prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
11030         a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
11031         get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
11032         g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
11033         sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
11034         s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
11035         contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
11036         g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
11037         g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
11038         a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
11039         ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
11040         get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
11041         prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
11042         exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
11043         s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
11044         a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
11045         a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
11046         g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
11047         par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
11048         uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
11049         a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
11050         statements to reflect the new style for case alternatives. Various
11051         code clean up and reformatting.
11053 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
11055         * exp_util.adb: Minor reformatting.
11057 2017-01-13  Yannick Moy  <moy@adacore.com>
11059         * exp_spark.adb: Code cleanup.
11060         * sem_ch9.adb (Analyze_Delay_Until): Resolve
11061         expression so that calls are identified as such inside delay
11062         until.
11064 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
11066         * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
11067         * par-ch3.adb (P_Discrete_Choice_List): An
11068         Iterated_Component_Association is an array aggregate component.
11069         * par-ch4.adb (P_Iterated_Component_Association): New procedure.
11070         (Is_Quantified_Expression): New function that performs a lookahead
11071         to distinguish quantified expressions from iterated component
11072         associations.
11073         (P_Aggregate_Or_Paren_Expr): Recognize iterated component
11074         associations.
11075         (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
11076         * sem.adb (Analyze): Handle Iterated_Component_Association.
11077         * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
11078         component associations.
11079         * sinfo.ads, sinfo.adb: Entries for for
11080         N_Iterated_Component_Association and its fields.
11081         * sprint.adb (Sprint_Node_Actual): Handle
11082         N_Iterated_Component_Association.
11084 2017-01-13  Justin Squirek  <squirek@adacore.com>
11086         * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
11087         of the style check until after preanalysis of acutals.
11089 2017-01-13  Yannick Moy  <moy@adacore.com>
11091         * sem_ch13.adb: Minor reformatting.
11092         * par-ch11.adb: minor style fix in whitespace
11093         * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
11094         reduced to Add_Artificial_ALI_File; style fix in declaration of
11095         Text; grammar fix in comment.
11096         * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
11097         * freeze.adb: Cleanup to pass pragma instead of
11098         expression to call.
11099         * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
11100         replace System'To_Address by equivalent call.
11102 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
11104         * bindusg.adb: Improve usage output for -f switch.
11106 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11108         * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
11109         Minor reformatting.
11111 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
11113         * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
11114         treat comparisons on strings as legal in a Static_Predicate.
11115         (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
11116         a function call that is the expansion of a string comparison.The
11117         function call is built when compiling the corresponding predicate
11118         function, but the expression has been found legal as a static
11119         predicate during earlier analysis.
11120         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
11121         properly a function call that is the expansion of a string
11122         comparison operation, in order to recover the Static_Predicate
11123         expression and apply it to a static argument when needed.
11125 2017-01-13  Tristan Gingold  <gingold@adacore.com>
11127         * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
11128         (Open_Read): Re-implement using Open_Read_No_Exception.
11129         (Open_Write): Raise exception in case of error.
11130         * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
11131         * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
11132         reaise exception.
11133         * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
11135 2017-01-13  Yannick Moy  <moy@adacore.com>
11137         * checks.adb: Code cleanup.
11139 2017-01-13  Yannick Moy  <moy@adacore.com>
11141         * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
11142         expression instead of unanalyzed aspect expression for checking
11143         the validity of inheriting an operation. Also copy the expression
11144         being passing it to Build_Class_Wide_Expression, as this call
11145         modifies its argument.
11146         * sem_util.ads Fix comment to reference correct function name
11147         New_Copy_Tree.
11149 2017-01-13  Javier Miranda  <miranda@adacore.com>
11151         * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
11152         when we propagate information about the indexes back to the original
11153         indexing mode and the prefix of the index is a function call, do not
11154         remove any parameter from such call.
11156 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
11158         * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
11159         * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
11160         a build-in-place function whose result type is tagged.
11162 2017-01-13  Yannick Moy  <moy@adacore.com>
11164         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11165         Do not generate a wrapper when the only candidate is a class-wide
11166         subprogram.
11167         (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
11168         inside a generic context.
11170 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11172         * exp_util.adb (Add_Inherited_Tagged_DIC):
11173         Pass the object parameters of both the parent and the derived
11174         type DIC procedure to the reference replacement circuitry.
11175         (Find_DIC_Type): Modify the circuitry to present the partial
11176         view of a private type in case the private type defines its own
11177         DIC pragma.
11178         (Replace_Object_And_Primitive_References): Add two
11179         optional formal parameters.  Update the comment on usage. Update
11180         the replacement of references to object parameters.
11182 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
11184         * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
11186 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
11188         * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
11189         an out parameter that is a type conversion, independently of th
11190         range check that may apply to the expression of the conversion,
11191         for use in GNATProve.
11193 2017-01-13  Yannick Moy  <moy@adacore.com>
11195         * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
11196         GNATprove_Mode here to Frontend.
11197         * frontend.adb (Frontend): Move the implicit with for System
11198         in GNATprove_Mode here as it ismore correct this way; the old
11199         place only worked by chance, since there were no overloaded names.
11200         * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
11201         * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
11202         four attributes identified in SRM 9(18), add an implicit with
11203         to Ada.Task_Identification.
11204         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11205         Deal specially with the wrapper introduced for AI05-0071 in GNATprove
11206         mode.
11207         * checks.adb (Apply_Discriminant_Check,
11208         Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
11209         In GNATprove mode, we do not apply the checks, but we still
11210         analyze the expression to possibly issue errors on SPARK
11211         code when a run-time error can be detected at compile time.
11212         (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
11213         in GNATprove mode.
11215 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11217         * expander.adb (Expand): Add a warning about using return
11218         statements in Ghost management code.
11219         * exp_ch3.adb (Freeze_Type): Add a warning about using return
11220         statements in Ghost management code.
11221         * exp_ch7.adb (Build_Invariant_Procedure_Body,
11222         Build_Invariant_Procedure_Declaration): Add a warning about
11223         using return statements in Ghost management code.
11224         * exp_disp.adb (Make_DT): Add a warning about using return
11225         statements in Ghost management code.
11226         * exp_util.adb (Build_DIC_Procedure_Body,
11227         Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
11228         warning about using return statements in Ghost management code.
11229         * freeze.adb (Freeze_Entity): Add a warning about using return
11230         statements in Ghost management code.
11231         * sem.adb (Analyze, Do_Analyze): Add a warning about using return
11232         statements in Ghost management code.
11233         * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
11234         a warning about using return statements in Ghost management code.
11235         * sem_ch5.adb (Analyze_Assignment): Add a warning about using
11236         return statements in Ghost management code.
11237         * sem_ch6.adb (Analyze_Procedure_Call,
11238         Analyze_Subprogram_Body_Helper): Add a warning about using return
11239         statements in Ghost management code.
11240         * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
11241         using return statements in Ghost management code.
11242         * sem_ch12.adb (Analyze_Package_Instantiation,
11243         Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
11244         Instantiate_Subprogram_Body): Add a warning about using return
11245         statements in Ghost management code.
11246         * sem_ch13.adb (Build_Predicate_Functions,
11247         Build_Predicate_Function_Declarations): Add a warning about
11248         using return statements in Ghost management code.
11249         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
11250         Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
11251         Analyze_Pre_Post_Condition_In_Decl_Part):  Add a warning about
11252         using return statements in Ghost management code.
11254 2017-01-13  Tristan Gingold  <gingold@adacore.com>
11256         * s-mmosin-mingw.adb: Fix pragma import.
11258 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
11260         * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
11261         codepeer mode.
11263 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11265         * atree.adb (Allocate_Initialize_Node): A newly created node is
11266         no longer marked as Ghost at this level.
11267         (Mark_New_Ghost_Node): New routine.
11268         (New_Copy): Mark the copy as Ghost.
11269         (New_Entity): Mark the entity as Ghost.
11270         (New_Node): Mark the node as Ghost.
11271         * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
11272         apply to unanalyzed entities.
11273         (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
11274         entities.
11275         (Set_Is_Checked_Ghost_Entity): This attribute now
11276         applies to all entities as well as unanalyzed entities.
11277         (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
11278         all entities as well as unanalyzed entities.
11279         * expander.adb Add with and use clauses for Ghost.
11280         (Expand): Install and revert the Ghost region associated with the node
11281         being expanded.
11282         * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
11283         (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
11284         (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
11285         (Expand_Freeze_Record_Type): Remove all Ghost-related code.
11286         (Freeze_Type): Install and revert the Ghost region associated
11287         with the type being frozen.
11288         * exp_ch5.adb Remove with and use clauses for Ghost.
11289         (Expand_N_Assignment_Statement): Remove all Ghost-related code.
11290         * exp_ch6.adb Remove with and use clauses for Ghost.
11291         (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
11292         (Expand_N_Subprogram_Body): Remove all Ghost-related code.
11293         * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
11294         Ghost region of the working type.
11295         (Build_Invariant_Procedure_Declaration): Install and revert
11296         the Ghost region of the working type.
11297         (Expand_N_Package_Body): Remove all Ghost-related code.
11298         * exp_ch8.adb Remove with and use clauses for Ghost.
11299         (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
11300         code.
11301         (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
11302         (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
11303         (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
11304         code.
11305         * exp_ch13.adb Remove with and use clauses for Ghost.
11306         (Expand_N_Freeze_Entity): Remove all Ghost-related code.
11307         * exp_disp.adb (Make_DT): Install and revert the Ghost region of
11308         the tagged type. Move the generation of various entities within
11309         the Ghost region of the type.
11310         * exp_prag.adb Remove with and use clauses for Ghost.
11311         (Expand_Pragma_Check): Remove all Ghost-related code.
11312         (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
11313         (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
11314         (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
11315         * exp_util.adb (Build_DIC_Procedure_Body): Install
11316         and revert the Ghost region of the working types.
11317         (Build_DIC_Procedure_Declaration): Install and revert the
11318         Ghost region of the working type.
11319         (Make_Invariant_Call): Install and revert the Ghost region of the
11320         associated type.
11321         (Make_Predicate_Call): Reimplemented. Install and revert the
11322         Ghost region of the associated type.
11323         * freeze.adb (Freeze_Entity): Install and revert the Ghost region
11324         of the entity being frozen.
11325         (New_Freeze_Node): Removed.
11326         * ghost.adb Remove with and use clauses for Opt.
11327         (Check_Ghost_Completion): Update the parameter profile
11328         and all references to formal parameters.
11329         (Ghost_Entity): Update the comment on usage.
11330         (Install_Ghost_Mode): New routines.
11331         (Is_Ghost_Assignment): New routine.
11332         (Is_Ghost_Declaration): New routine.
11333         (Is_Ghost_Pragma): New routine.
11334         (Is_Ghost_Procedure_Call): New routine.
11335         (Is_Ghost_Renaming): Removed.
11336         (Is_OK_Declaration): Reimplemented.
11337         (Is_OK_Pragma): Reimplemented.
11338         (Is_OK_Statement): Reimplemented.
11339         (Is_Subject_To_Ghost): Update the comment on usage.
11340         (Mark_And_Set_Ghost_Assignment): New routine.
11341         (Mark_And_Set_Ghost_Body): New routine.
11342         (Mark_And_Set_Ghost_Completion): New routine.
11343         (Mark_And_Set_Ghost_Declaration): New routine.
11344         (Mark_And_Set_Ghost_Instantiation): New routine.
11345         (Mark_And_Set_Ghost_Procedure_Call): New routine.
11346         (Mark_Full_View_As_Ghost): Removed.
11347         (Mark_Ghost_Declaration_Or_Body): New routine.
11348         (Mark_Ghost_Pragma): New routine.
11349         (Mark_Ghost_Renaming): New routine.
11350         (Mark_Pragma_As_Ghost): Removed.
11351         (Mark_Renaming_As_Ghost): Removed.
11352         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
11353         (Prune_Node): Freeze nodes no longer need special pruning, they
11354         are processed by the general ignored Ghost code mechanism.
11355         (Restore_Ghost_Mode): New routine.
11356         (Set_Ghost_Mode): Reimplemented.
11357         (Set_Ghost_Mode_From_Entity): Removed.
11358         * ghost.ads Add with and use clauses for Ghost.
11359         (Check_Ghost_Completion): Update the parameter profile
11360         along with the comment on usage.
11361         (Install_Ghost_Mode): New routine.
11362         (Is_Ghost_Assignment): New routine.
11363         (Is_Ghost_Declaration): New routine.
11364         (Is_Ghost_Pragma): New routine.
11365         (Is_Ghost_Procedure_Call): New routine.
11366         (Mark_And_Set_Ghost_Assignment): New routine.
11367         (Mark_And_Set_Ghost_Body): New routine.
11368         (Mark_And_Set_Ghost_Completion): New routine.
11369         (Mark_And_Set_Ghost_Declaration): New routine.
11370         (Mark_And_Set_Ghost_Instantiation): New routine.
11371         (Mark_And_Set_Ghost_Procedure_Call): New routine.
11372         (Mark_Full_View_As_Ghost): Removed.
11373         (Mark_Ghost_Pragma): New routine.
11374         (Mark_Ghost_Renaming): New routine.
11375         (Mark_Pragma_As_Ghost): Removed.
11376         (Mark_Renaming_As_Ghost): Removed.
11377         (Restore_Ghost_Mode): New routine.
11378         (Set_Ghost_Mode): Redefined.
11379         (Set_Ghost_Mode_From_Entity): Removed.
11380         * sem.adb (Analyze): Install and revert the Ghost region of the
11381         node being analyzed.
11382         (Do_Analyze): Change the way a clean Ghost
11383         region is installed and reverted.
11384         * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
11385         all Ghost-related code.
11386         (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
11387         (Analyze_Number_Declaration): Remove all Ghost-related code.
11388         (Analyze_Object_Declaration): Install and revert the Ghost region of
11389         a deferred object declaration's completion.
11390         (Array_Type_Declaration): Remove all Ghost-related code.
11391         (Build_Derived_Type): Update the comment on
11392         the propagation of Ghost attributes from a parent to a derived type.
11393         (Derive_Subprogram): Remove all Ghost-related code.
11394         (Make_Class_Wide_Type): Remove all Ghost-related code.
11395         (Make_Implicit_Base): Remove all Ghost-related code.
11396         (Process_Full_View): Install and revert the Ghost region of
11397         the partial view.  There is no longer need to check the Ghost
11398         completion here.
11399         * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
11400         region of the left hand side.
11401         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
11402         all Ghost-related code.
11403         (Analyze_Expression_Function): Remove all Ghost-related code.
11404         (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
11405         (Analyze_Procedure_Call): Install and revert the Ghost region of
11406         the procedure being called.
11407         (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
11408         region of the spec or body.
11409         (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
11410         (Build_Subprogram_Declaration): Remove all Ghost-related code.
11411         (Find_Corresponding_Spec): Remove all Ghost-related code.
11412         (Process_Formals): Remove all Ghost-related code.
11413         * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
11414         the Ghost region of the spec.
11415         (Analyze_Package_Declaration): Remove all Ghost-related code.
11416         * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
11417         Ghost when it aliases a Ghost entity.
11418         (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
11419         a Ghost entity.
11420         (Analyze_Object_Renaming): Mark a renaming as Ghost when
11421         it aliases a Ghost entity.
11422         (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
11423         a Ghost entity.
11424         (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
11425         aliases a Ghost entity.
11426         * sem_ch11.adb Remove with and use clauses for Ghost.
11427         (Analyze_Exception_Declaration): Remove all Ghost-related code.
11428         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
11429         Ghost-related code.
11430         (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
11431         code.
11432         (Analyze_Package_Instantiation): Install and revert the Ghost region
11433         of the package instantiation.
11434         (Analyze_Subprogram_Instantiation): Install
11435         and revert the Ghost region of the subprogram instantiation.
11436         (Instantiate_Package_Body): Code clean up. Install and revert the
11437         Ghost region of the package body.
11438         (Instantiate_Subprogram_Body): Code clean up. Install and revert the
11439         Ghost region of the subprogram body.
11440         * sem_ch13.adb (Build_Predicate_Functions): Install
11441         and revert the Ghost region of the related type.
11442         (Build_Predicate_Function_Declaration): Code clean up. Install
11443         and rever the Ghost region of the related type.
11444         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
11445         Install and revert the Ghost region of the pragma.
11446         (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
11447         Ghost region of the pragma.
11448         (Analyze_Pragma): Install and revert the Ghost region of various
11449         pragmas.  Mark a pragma as Ghost when it is related to a Ghost entity
11450         or encloses a Ghost entity.
11451         (Analyze_Pre_Post_Condition): Install and revert the Ghost
11452         region of the pragma.
11453         (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
11454         Ghost region of the pragma.
11455         * sem_res.adb (Resolve): Remove all Ghost-related code.
11456         * sem_util.adb (Is_Declaration): Reimplemented.
11457         (Is_Declaration_Other_Than_Renaming): New routine.
11458         * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
11459         * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
11460         (Is_Ghost_Pragma): Removed.
11461         (Is_Ignored_Ghost_Pragma): New routine.
11462         (Set_Is_Checked_Ghost_Pragma): New routine.
11463         (Set_Is_Ghost_Pragma): Removed.
11464         (Set_Is_Ignored_Ghost_Pragma): New routine.
11465         * sinfo.ads: Update the documentation on Ghost mode and
11466         Ghost regions.  New attributes Is_Checked_Ghost_Pragma
11467         and Is_Ignored_Ghost_Pragma along with usages in nodes.
11468         Remove attribute Is_Ghost_Pragma along with usages in nodes.
11469         (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11470         (Is_Ghost_Pragma): Removed along with pragma Inline.
11471         (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11472         (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11473         (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
11474         (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11476 2017-01-12  Tristan Gingold  <gingold@adacore.com>
11478         * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
11479         s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
11481 2017-01-12  Yannick Moy  <moy@adacore.com>
11483         * errout.adb, errout.ads (Initialize): Factor common treatment
11484         in Reset_Warnings.
11485         (Reset_Warnings): New procedure to reset counts related to warnings.
11486         (Record_Compilation_Errors): New variable to store the presence of an
11487         error, used in gnat2why to allow changing the Warning_Mode.
11488         (Compilation_Errors): Use new variable Record_Compilation_Errors to
11489         store the presence of an error.
11491 2017-01-12  Javier Miranda  <miranda@adacore.com>
11493         * sem_ch13.adb (Analyze_Aspect_Specifications):
11494         For Interrupt_Handler and Attach_ Handler aspects, decorate the
11495         internally built reference to the protected procedure as coming
11496         from sources and force its analysis.
11498 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11500         * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
11501         inherit predicates if any from the first_subtype of the parent,
11502         not from the anonymous parent type.
11503         * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
11504         predicate is not a static subtype.
11506 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11508         * freeze.adb (Check_Suspicious_Convention): New procedure
11509         performing a warning check on discriminated record types with
11510         convention C or C++. Factored out of procedure Freeze_Record_Type,
11511         and changed to only apply to base types (to avoid spurious
11512         warnings on subtypes). Minor improvement of warning messages
11513         to refer to discriminated rather than variant record types.
11514         (Freeze_Record_Type): Remove code for performing a suspicious
11515         convention check.
11516         (Freeze_Entity): Only call Freeze_Record_Type
11517         on types that aren't declared within any enclosing generic units
11518         (rather than just excluding the type when the innermost scope
11519         is generic). Call Check_Suspicious_Convention whether or not
11520         the type is declared within a generic unit.
11521         * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
11522         * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
11523         from Sem_Ch8).
11525 2017-01-12  Tristan Gingold  <gingold@adacore.com>
11527         * sysdep.c, adaint.c, rtinit.c, ming32.h:
11528         (__gnat_current_codepage): Renamed from CurrentCodePage
11529         (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
11531 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11533         * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
11534         quantified expressions, following AI12-050: the loop parameters
11535         of two quantified expressions are conformant if they have the
11536         same identifier.
11538 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
11540         * gcc-interface/Makefile.in: Clean up VxWorks targets.
11542 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11544         * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
11545         Hnadle properly the attribute reference when it appears as part
11546         of an expression in another loop aspect.
11548 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11550         * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
11551         subsidiary of Build_Initialization_Call, to complete generation
11552         of predicate checks on discriminants whose (sub)types have
11553         predicates, and to add checks on variants that do not have an
11554         others clause.
11555         * sem_util.adb (Gather_Components): A missing Others alternative is
11556         not an error when the type of the discriminant is a static predicate
11557         (and coverage has been checked when analyzing the case statement). A
11558         runtime check is generated to verify that a given discriminant
11559         satisfies the predicate (RM 3.8.1. (21.1/2)).
11561 2017-01-12  Yannick Moy  <moy@adacore.com>
11563         * gnat1drv.adb (Adjust_Global_Switches): Only
11564         perform checking of exception mechanism when generating code.
11566 2017-01-12  Justin Squirek  <squirek@adacore.com>
11568         * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
11569         Remove handling of access component with invariant.
11570         (Build_Invariant_Procedure_Declaration): Remove return on class
11571         wide type.
11572         * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
11573         conditional exception for component or array so Has_Own_Invariants
11574         flag is not falsly set.
11575         * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
11576         wide type to have no invariant flags.
11578 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11580         * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
11581         sem_ch13.adb: Minor reformatting.
11583 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11585         * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
11586         adjustment primitive when the ancestor type was not properly frozen.
11587         (Gen_Assign): Guard against a missing initialization
11588         primitive when the component type was not properly frozen.
11589         (Initialize_Array_Component): Guard against a missing adjustment
11590         primitive when the component type was not properly frozen.
11591         (Initialize_Record_Component): Guard against a missing adjustment
11592         primitive when the component type was not properly frozen.
11593         (Process_Transient_Component_Completion): The transient object may
11594         not be finalized when its associated type was not properly frozen.
11595         * exp_ch3.adb (Build_Assignment): Guard against a missing
11596         adjustment primitive when the component type was not properly frozen.
11597         (Build_Initialization_Call): Guard against a missing
11598         initialization primitive when the associated type was not properly
11599         frozen.
11600         (Expand_N_Object_Declaration): Guard against a missing
11601         adjustment primitive when the base type was not properly frozen.
11602         (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
11603         body when there is no adjustment primitive available. Create an
11604         empty Deep_Finalize body when there is no finalization primitive
11605         available.
11606         * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
11607         missing finalization primitive when the designated type was
11608         not properly frozen.
11609         (Expand_N_Allocator): Guard against a missing initialization primitive
11610         when the designated type was not properly frozen.
11611         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
11612         only when the corresponding adjustment primitive is available.
11613         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
11614         adjustment/finalization statements only when there is an available
11615         primitive to carry out the action.
11616         (Build_Initialize_Statements): Generate the initialization/finalization
11617         statements only when there is an available primitive to carry out the
11618         action.
11619         (Make_Adjust_Call): Do not generate a call when the underlying
11620         type is not present due to a possible missing full view.
11621         (Make_Final_Call): Do not generate a call when the underlying
11622         type is not present due to a possible missing full view.
11623         (Make_Finalize_Address_Stmts): Generate an empty body when the
11624         designated type lacks a finalization primitive.
11625         (Make_Init_Call): Do not generate a call when the underlying type is
11626         not present due to a possible missing full view.
11627         (Process_Component_For_Adjust): Add the adjustment call only when the
11628         corresponding adjustment primitive is available.
11629         (Process_Component_For_Finalize): Add the finalization call only when
11630         the corresponding finalization primitive is available.
11631         (Process_Object_Declaration): Use a null statement to emulate a
11632         missing call to the finalization primitive of the object type.
11633         * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
11634         (Make_Final_Call): Update the comment on usage.
11635         (Make_Init_Call): Update the comment on usage.
11636         * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
11638 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
11640         * einfo.ads: Update documentation of Address_Taken.
11641         * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
11642         [Access_Attribute]): Only consider 'Access/'Unchecked_Access
11643         for subprograms when setting Address_Taken flag.
11645 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
11647         * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
11648         Configurable_Run_Time_Mode off when analysing with'ed predefined
11649         libraries.
11651 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11653         * sem_prag.adb: Minor reformatting.
11654         * sem_util.adb (Unique_Entity): fix result for
11655         bodies of entry families.
11657 2017-01-12  Justin Squirek  <squirek@adacore.com>
11659         * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
11660         Resolve_Suppressible in the pragma Assertion_Policy case.
11661         (Resolve_Suppressible): Created this function to factor out
11662         common code used to resolve Suppress to either Ignore or Check
11663         * snames.ads-tmpl: Add name for Suppressible.
11665 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11667         * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
11668         reformatting.
11669         * debug.adb: Minor comment fixes.
11671 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
11673         * sem_util.adb (Unique_Entity): For concurrent
11674         bodies that are defined with stubs and complete a declaration
11675         of a single concurrent object return the entity of an implicit
11676         concurrent type, not the entity of the anonymous concurrent
11677         object.
11678         * debug.adb: -gnatd.J is no longer used.
11679         * make.adb (Globalize): Removed, no longer used.
11680         * sem_ch9.adb: minor typo in comment for entry index
11682 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
11684         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11685         * exp_ch3.adb (Build_Init_Statements): As part of initialising
11686         the value record of a task, set its _Secondary_Stack_Size field
11687         if present.
11688         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11689         a _Secondary_Stack_Size field in the value record of
11690         the task if a Secondary_Stack_Size rep item is present.
11691         (Make_Task_Create_Call): Include secondary stack size
11692         parameter. If No_Secondary_Stack restriction is in place, passes
11693         stack size of 0.
11694         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11695         Secondary_Stack_Size.
11696         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11697         function to define the overhead of the secondary stack.
11698         * s-tarest.adb (Create_Restricted_Task,
11699         Create_Restricted_Task_Sequential): Functions now include
11700         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11701         * s-tarest.adb (Create_Restricted_Task,
11702         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
11703         include Secondary_Stack_Size parameter.
11704         (Task_Wrapper): Secondary stack now allocated to the size specified by
11705         the Secondary_Stack_Size parameter in the task's ATCB.
11706         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
11707         Secondary_Stack_Size component.
11708         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
11709         Create_Restricted_Task_Sequential): Function now include
11710         Secondary_Stack_Size parameter.
11711         (Task_Wrapper): Secondary stack now allocated to the size
11712         specified by the Secondary_Stack_Size parameter in the task's
11713         ATCB.
11714         * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
11715         to include Secondary_Stack_Size parameter.
11716         * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
11717         Secondary_Stack_Size aspect, turning the aspect into its corresponding
11718         internal attribute.
11719         (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
11720         * snames.adb-tmpl, snames.ads-tmpl: Added names
11721         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
11722         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
11724 2017-01-12  Yannick Moy  <moy@adacore.com>
11726         * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
11727         subtree.
11729 2017-01-12  Justin Squirek  <squirek@adacore.com>
11731         * exp_attr.adb (Expand_N_Attribute_Reference):
11732         Fix Finalization_Size case by properly resolving the type after
11733         rewritting the node.
11735 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11737         * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
11738         the tree.
11739         (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
11740         * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
11741         exp_sel.ads: Minor reformatting.
11743 2017-01-12  Justin Squirek  <squirek@adacore.com>
11745         * exp_ch6.adb (Expand_Call): Add guard to prevent
11746         invariant checks from being created for internally generated
11747         subprograms.
11749 2017-01-12  Bob Duff  <duff@adacore.com>
11751         * lib-writ.ads: Remove incorrect comment.
11753 2017-01-12  Javier Miranda  <miranda@adacore.com>
11755         * debug.adb (-gnatd.K): Enable generation of contract-only
11756         procedures in CodePeer mode.
11757         * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
11758         New subprogram.
11759         (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
11760         set.
11761         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
11762         subprogram.
11763         (Get_Contract_Only_Missing_Body_Name): New subprogram.
11764         (Get_Contract_Only_Body): New subprogram.
11765         (Set_Contract_Only_Body): New subprogram.
11766         (Is_Contract_Only_Body): New subprogram.
11767         (Set_Is_Contract_Only_Body): New subprogram.
11768         (SCIL_Nodes): Replace table by hash-table.
11770 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11772         * exp_ch6.adb: Minor reformatting.
11773         * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
11775 2017-01-12  Bob Duff  <duff@adacore.com>
11777         * binde.adb (Forced): New reason for a dependence.
11778         (Force_Elab_Order): Implementation of the new switch.
11779         * binde.ads: Minor comment fixes.
11780         * bindusg.adb: Add -f switch. Apparently, there was an -f switch
11781         long ago that is no longer supported; removed comment about that.
11782         * opt.ads (Force_Elab_Order_File): Name of file specified for
11783         -f switch.
11784         * switch-b.adb: Parse -f switch.
11786 2017-01-12  Justin Squirek  <squirek@adacore.com>
11788         * exp_ch6.adb (Check_View_Conversion): Created this function
11789         to properly chain calls to check type invariants that may be
11790         present in a subprogram call after the subprogram.
11791         (Expand_Call): Add a conditional to identify when a view conversion
11792         needs to be checked.
11793         * nlists.adb, nlists.ads (Prepend_New): New routine.
11794         (Prepend_New_To): New routine.
11796 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11798         * sinfo.ads: Minor reformatting.
11800 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11802         * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
11803         reformatting.
11805 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11807         * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
11808         variable Definite. Create a local object and pass its 'Access to the
11809         BIP function when the result type is either definite or it does not
11810         require any finalization or secondary stack management.
11812 2017-01-12  Bob Duff  <duff@adacore.com>
11814         * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
11815         exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
11816         frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
11817         par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
11818         sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
11819         sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
11820         sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
11821         sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
11822         Change name to Pragma_Name_Unmapped.
11823         (Pragma_Name_Mapped): Change name to Pragma_Name.
11824         This is because the "mapped" version should be the usual case.
11826 2017-01-09  Hristian Kirtchev  <kirtchev@adacore.com>
11828         * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
11829         Is_Default_Init_Cond_Procedure, and
11830         Has_Inherited_Default_Init_Cond.  Add uses of flags
11831         Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
11832         (Default_Init_Cond_Procedure): Removed.
11833         (DIC_Procedure): New routine.
11834         (Has_Default_Init_Cond): Removed.
11835         (Has_DIC): New routine.
11836         (Has_Inheritable_Invariants): The attribute applies to the base type.
11837         (Has_Inherited_Default_Init_Cond): Removed.
11838         (Has_Inherited_DIC): New routine.
11839         (Has_Inherited_Invariants): The attribute applies to the base type.
11840         (Has_Own_DIC): New routine.
11841         (Has_Own_Invariants): The attribute applies to the base type.
11842         (Is_Default_Init_Cond_Procedure): Removed.
11843         (Is_DIC_Procedure): New routine.
11844         (Set_Default_Init_Cond_Procedure): Removed.
11845         (Set_DIC_Procedure): New routine.
11846         (Set_Has_Default_Init_Cond): Removed.
11847         (Set_Has_Inheritable_Invariants): The attribute applies
11848         to the base type.
11849         (Set_Has_Inherited_Default_Init_Cond): Removed.
11850         (Set_Has_Inherited_DIC): New routine.
11851         (Set_Has_Inherited_Invariants): The attribute applies to the base type.
11852         (Set_Has_Own_DIC): New routine.
11853         (Set_Has_Own_Invariants): The attribute applies to the base type.
11854         (Set_Is_Default_Init_Cond_Procedure): Removed.
11855         (Set_Is_DIC_Procedure): New routine.
11856         (Write_Entity_Flags): Update the output of all flags related to
11857         default initial condition.
11858         * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
11859         of the call to the DIC procedure.
11860         (Freeze_Type): Generate the body of the DIC procedure.
11861         * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
11862         all occurrences of Create_Append with Append_New_To. Do
11863         not generate an invariant procedure for a class-wide type.
11864         The generated body acts as a freeze action of the working type.
11865         (Build_Invariant_Procedure_Declaration): Do not generate an
11866         invariant procedure for a class-wide type.
11867         (Create_Append): Removed.
11868         * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
11869         sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
11870         class-wide pre/postcondition description and data structures from
11871         Sem_Prag.
11872         (Build_Class_Wide_Expression): Moved from Sem_Prag.
11873         (Build_DIC_Call): New routine.
11874         (Build_DIC_Procedure_Body): New routine.
11875         (Build_DIC_Procedure_Declaration): New routine.
11876         (Entity_Hash): Moved from Sem_Prag.
11877         (Find_DIC_Type): New routine.
11878         (Update_Primitives_Mapping): Reimplemented.
11879         (Update_Primitives_Mapping_Of_Types): New routine.
11880         * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
11881         (Build_DIC_Call): New routine.
11882         (Build_DIC_Procedure_Body): New routine.
11883         (Build_DIC_Procedure_Declaration): New routine.
11884         (Update_Primitives_Mapping): Moved from Sem_Prag.
11885         (Update_Primitives_Mapping_Of_Types): New routine.
11886         * nlists.adb (Append_New): New routine.
11887         (Append_New_To): New routine.
11888         * nlists.ads (Append_New): New routine.
11889         (Append_New_To): New routine.
11890         * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
11891         of DIC procedures here. This is now done at the end of the
11892         visible declarations, private declarations, and at the freeze
11893         point of a type.
11894         (Analyze_Private_Extension_Declaration):
11895         A private extension inherits the DIC pragma of a parent type.
11896         (Analyze_Subtype_Declaration): No need to propagate invariant
11897         attributes to a subtype as those apply to the base type.
11898         (Build_Derived_Record_Type): No need to inherit invariants here
11899         as this is now done in Build_Derived_Type.
11900         (Build_Derived_Type): Inherit both the DIC pragma and invariants from
11901         a parent type.
11902         (Process_Full_View): Update the propagation of DIC attributes.
11903         (Propagate_Default_Init_Cond_Attributes): Removed.
11904         * sem_ch7.adb Add with and use clauses for Exp_Util.
11905         (Analyze_Package_Specification): Create the body of the DIC
11906         procedure at the end of the visible and private declarations.
11907         (Preserve_Full_Attributes): Propagate DIC attributes.
11908         * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
11909         DIC attributes.
11910         (Analyze_Task_Type_Declaration): Propagate DIC attributes.
11911         * sem_elab.adb (Check_A_Call): Update the call to
11912         Is_Nontrivial_Default_Init_Cond_Procedure.
11913         * sem_prag.adb Remove the with and use clauses for
11914         GNAT.HTable. Move the handling of class- wide pre/postcondition
11915         description and data structures to Exp_Util.
11916         (Analyze_Pragma): Create the declaration of the DIC procedure. There
11917         is no need to propagate invariant-related attributes at this point
11918         as this is done in Build_Invariant_Procedure_Declaration.
11919         (Build_Class_Wide_Expression): Moved to Exp_Util.
11920         (Entity_Hash): Moved to Exp_Util.
11921         (Update_Primitives_Mapping): Moved to Exp_Util.
11922         * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
11923         (Update_Primitives_Mapping): Moved to Exp_Util.
11924         * sem_util.adb: Remove with and use clauses for Ghost
11925         and Sem_Ch13.
11926         (Build_Default_Init_Cond_Call): Removed.
11927         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11928         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11929         (Get_Views): Reimplemented.
11930         (Has_Full_Default_Initialization): Reimplement the section on DIC.
11931         (Inherit_Default_Init_Cond_Procedure): Removed.
11932         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11933         (Is_Nontrivial_DIC_Procedure): New routine.
11934         (Is_Verifiable_DIC_Pragma): New routine.
11935         (Propagate_DIC_Attributes): New routine.
11936         * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
11937         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11938         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11939         (Inherit_Default_Init_Cond_Procedure): Removed.
11940         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11941         (Is_Nontrivial_DIC_Procedure): New routine.
11942         (Is_Verifiable_DIC_Pragma): New routine.
11943         (Propagate_DIC_Attributes): New routine.
11944         * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
11945         on DIC.
11946         * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
11947         usage in nodes.
11948         (Expression_Copy): New routine along with pragma Inline.
11949         (Set_Expression_Copy): New routine along with pragma Inline.
11951 2017-01-06  Bob Duff  <duff@adacore.com>
11953         * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
11954         "Bind_Main_Program" to "not Bind_For_Library", because otherwise
11955         we won't generate the call to s_stalib_adafinal when the main
11956         is not written in Ada.
11958 2017-01-06  Bob Duff  <duff@adacore.com>
11960         * sem_prag.adb: Minor: remove pragma Warnings.
11962 2017-01-06  Tristan Gingold  <gingold@adacore.com>
11964         * Makefile.rtl: Do not compile s-stchop by default.
11966 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
11968         * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
11969         sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
11970         snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
11971         s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
11972         Reverted previous change for now.
11974 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
11976         * exp_ch3.adb (Build_Initialization_Call): Apply predicate
11977         check to default discriminant value if checks are enabled.
11978         (Build_Assignment): If type of component has static predicate,
11979         apply check to its default value, if any.
11981 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
11983         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11984         * exp_ch3.adb (Build_Init_Statements): As part of initialising
11985         the value record of a task, set its _Secondary_Stack_Size field
11986         if present.
11987         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11988         a _Secondary_Stack_Size field in the value record of
11989         the task if a Secondary_Stack_Size rep item is present.
11990         (Make_Task_Create_Call): Include secondary stack size
11991         parameter. If No_Secondary_Stack restriction is in place, passes
11992         stack size of 0.
11993         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11994         Secondary_Stack_Size.
11995         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11996         function to define the overhead of the secondary stack.
11997         * s-tarest.adb (Create_Restricted_Task,
11998         Create_Restricted_Task_Sequential): Functions now include
11999         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
12000         * s-tarest.adb (Create_Restricted_Task,
12001         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
12002         now include Secondary_Stack_Size parameter.
12003         (Task_Wrapper):
12004         Secondary stack now allocated to the size specified by the
12005         Secondary_Stack_Size parameter in the task's ATCB.
12006         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
12007         Secondary_Stack_Size component.
12008         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
12009         Create_Restricted_Task_Sequential): Function now include
12010         Secondary_Stack_Size parameter.
12011         (Task_Wrapper): Secondary stack
12012         now allocated to the size specified by the Secondary_Stack_Size
12013         parameter in the task's ATCB.
12014         * sem_ch13.adb (Analyze_Aspect_Specification): Add support
12015         for Secondary_Stack_Size aspect, turning the aspect into its
12016         corresponding internal attribute.
12017         (Analyze_Attribute_Definition):
12018         Process Secondary_Stack_Size attribute.
12019         * snames.adb-tmpl, snames.ads-tmpl: Added names
12020         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
12021         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
12023 2017-01-06  Pascal Obry  <obry@adacore.com>
12025         * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
12026         Sequential_IO and Direct_IO.
12028 2017-01-06  Bob Duff  <duff@adacore.com>
12030         * snames.ads-tmpl (Renamed): New name for the pragma argument.
12031         * par-ch2.adb: Allow the new pragma (with analysis deferred
12032         to Sem_Prag).
12033         * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
12034         Keep a mapping from new pragma names to old names.
12035         * sem_prag.adb: Check legality of pragma Rename_Pragma, and
12036         implement it by calling Map_Pragma_Name.
12037         * checks.adb, contracts.adb, einfo.adb, errout.adb,
12038         * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
12039         * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
12040         * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
12041         * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
12042         * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
12043         * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
12044         as appropriate.
12046 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12048         * exp_ch9.adb: Minor reformatting.
12050 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12052         * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
12053         * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
12054         (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
12055         (unused).
12056         * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
12057         Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
12058         * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
12059         Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
12061 2017-01-06  Bob Duff  <duff@adacore.com>
12063         * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
12064         dummy implementation of Map_Pragma_Name.
12066 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12068         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
12069         entry_body variable constant.
12070         * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
12071         * s-tpoben.ads (Protected_Entry_Body_Access): Now access
12072         to constant.
12073         * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
12074         now access to constant.
12076 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
12078         * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
12079         reformatting and typo fixes.
12081 2017-01-06  Bob Duff  <duff@adacore.com>
12083         * snames.ads-tmpl: New names for pragma renaming.
12084         * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
12085         * par-prag.adb: Add new pragma name to case statement.
12086         * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
12087         of the pragma.
12088         * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
12089         Dummy implementation of Pragma_Name_Mapped.
12091 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12093         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
12094         better detect call within an entry_wrapper.
12095         * sem_res.adb (Resolve_Call): A protected call within an
12096         entity_wrapper is analyzed in the context of the protected
12097         object but corresponds to a pre-analysis and is not an access
12098         before elaboration.
12099         * sem_attr.adb: Minor reformatting.
12101 2017-01-06  Justin Squirek  <squirek@adacore.com>
12103         * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
12104         Finalization_Size to allow a prefix of any non-class-wide type.
12105         * sem_attr.ads Modify comment for Finalization_Size to include
12106         definite type use case.
12108 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12110         * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
12111         on procedures that are wrappers created for entries that have
12112         preconditions.
12113         * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
12114         body is an entry_wrapper, compile it in the context of the
12115         synchronized type, because a precondition may refer to funtions
12116         of the type.
12117         * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
12118         body entity.
12119         * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
12120         within an Entry_Wrapper this is an external call whose target
12121         is the synchronized object that is the actual in the call to
12122         the wrapper.
12124 2017-01-06  Yannick Moy  <moy@adacore.com>
12126         * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
12127         in tree, which means not analyzing the previous prefix if the node has
12128         been rewritten into its prefix.
12130 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
12132         * s-tpobop.adb: Minor reformatting.
12134 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12136         * checks.adb (Ensure_Valid): Do not generate a validity check
12137         within a generated predicate function, validity checks will have
12138         been applied earlier when required.
12140 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12142         * s-tpoben.ads (Protection_Entries): Add comment and reorder
12143         components for performances.
12144         * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
12145         semantic.
12147 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12149         * sem_eval.adb (Check_Expression_Against_Static_Predicate):
12150         If expression is compile-time known and obeys a static predicate
12151         it must be labelled as static, to prevent spurious warnings and
12152         run-time errors, e.g. in case statements. This is relevant when
12153         the expression is the result of constant-folding a type conversion
12154         whose expression is a variable with a known static value.
12156 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12158         * exp_attr.adb, sem_attr.ads: Minor reformatting.
12160 2017-01-06  Justin Squirek  <squirek@adacore.com>
12162         * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
12163         expansion of Finalization_Size attribute.
12164         * sem_attr.adb (Analyze_Attribute): Add entry to check the
12165         semantics of Finalization_Size.
12166         (Eval_Attribute): Add null entry for Finalization_Size.
12167         * sem_attr.ads: Add Finalization_Size to the implementation
12168         dependent attribute list.
12169         * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
12171 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12173         * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
12174         iterator specification with a serious syntactic error, transform
12175         construct into an infinite loop in order to continue analysis
12176         and prevent a compiler abort.
12178 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12180         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
12181         max_queue_lengths_array if unused.
12183 2017-01-06  Bob Duff  <duff@adacore.com>
12185         * errout.adb (Set_Msg_Text): Protect against out-of-bounds
12186         array access, in case "\" is at the end of Text.
12187         * stylesw.adb (Set_Style_Check_Options): Don't include input
12188         characters in the error message template, because they could
12189         be control characters such as "\", which Errout will try to
12190         interpret.
12192 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12194         * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
12195         For a private type examine the visible declarations that follow
12196         the partial view, not just the private declarations that follow
12197         the full view.
12199 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12201         * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
12202         code cleanup.
12204 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12206         * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
12207         alias of the inherited op is the parent iterator, no need to
12208         examine dispatch table positions which might not be established
12209         yet if type is not frozen.
12210         * sem_disp.adb (Check_Controlling_Formals): The formal of a
12211         predicate function may be a subtype of a tagged type.
12212         * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
12213         of representation items for the completion of a type extension
12214         where a predicate applies to the partial view.
12215         * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
12216         parameter that designates function whose actual receives a
12217         predicate check, to improve warning message when the check will
12218         lead to infinite recursion.
12219         * sem_res.adb (Resolve_Actuals): Pass additional parameter to
12220         Apply_Predicate_Check.
12222 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12224         * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
12225         Gnat_Extended_Ravenscar.
12226         * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
12228 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
12230         * sem_util.ads: Minor typo fix and reformatting.
12232 2017-01-06  Yannick Moy  <moy@adacore.com>
12234         * ghost.adb Minor fixing of references to SPARK RM.
12235         (Check_Ghost_Context): Check whether reference is to a lvalue
12236         before issuing an error about violation of SPARK RM 6.9(13)
12237         when declaration has Ghost policy Check and reference has Ghost
12238         policy Ignore.
12239         * sem_util.adb Minor indentation.
12240         * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
12241         Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
12242         * sem_util.ads (Unique_Defining_Entity): Document the result
12243         for package body stubs.
12245 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12247         * raise-gcc.c (abort): Macro to call Abort_Propagation.
12248         * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
12249         constant.
12250         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12251         Do not generate the Entry_Max_Queue_Lengths_Array if all default
12252         values.
12253         * exp_util.adb (Corresponding_Runtime_Package): Consider
12254         Max_Queue_Length pragma.
12256 2017-01-06  Justin Squirek  <squirek@adacore.com>
12258         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12259         Remove declaration generation in the case of
12260         System_Tasking_Protected_Objects_Single_Entry being used,
12261         and add a warning message when this is detected to occur.
12262         (Make_Initialize_Protection): Remove reference pass in the case
12263         of System_Tasking_Protected_Objects_Single_Entry.
12264         * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
12265         * s-tposen.adb (Initialize_Protection_Entry): Remove
12266         Entry_Queue_Max parameter.
12267         * s-tposen.ads: Remove the types use to store the entry queue
12268         maximum.
12269         * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
12271 2017-01-06  Yannick Moy  <moy@adacore.com>
12273         * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
12274         behavior of function, to also accept out of range positions
12275         and raise Constraint_Error in such case, and to copy sloc from
12276         literal if No_Location passed as location.
12277         * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
12278         of functions to raise Constraint_Error in case of value not in
12279         appropriate range.
12281 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12283         * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
12284         Invalidate_Stack_Cache.
12286 2017-01-06  Eric Botcazou  <ebotcazou@adacore.com>
12288         * s-os_lib.adb: Minor fix to the signature of Readlink.
12290 2017-01-06  Javier Miranda  <miranda@adacore.com>
12292         * sem_ch6.adb (Conforming_Types): Handle another
12293         confusion between views in a nested instance with an actual
12294         private type whose full view is not in scope.
12296 2017-01-06  Arnaud Charlet  <charlet@adacore.com>
12298         * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
12299         mark a rewritten if statement as explicit (Comes_From_Source).
12301 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
12303         * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
12305 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12307         * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
12309 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12311         * sem_case.adb: Minor reformatting.
12313 2017-01-06  Thomas Quinot  <quinot@adacore.com>
12315         * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
12317 2017-01-06  Justin Squirek  <squirek@adacore.com>
12319         * aspects.adb: Register aspect in Canonical_Aspect.
12320         * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
12321         into respective tables.
12322         * einfo.ads, einfo.adb: Add a new attribute for
12323         handling the parameters for Pragma_Max_Entry_Queue
12324         (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
12325         for accessing and setting were added as well.
12326         * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
12327         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
12328         declaration for pramga arguments and store them in the protected
12329         type node.
12330         (Make_Initialize_Protection): Pass a reference to
12331         the Entry_Max_Queue_Lengths_Array in the protected type node to
12332         the runtime.
12333         * rtsfind.adb: Minor grammar fix.
12334         * rtsfind.ads: Register new types taken from the
12335         runtime libraries RE_Protected_Entry_Queue_Max and
12336         RE_Protected_Entry_Queue_Max_Array
12337         * s-tposen.adb, s-tpoben.adb
12338         (Initialize_Protection_Entry/Initialize_Protection_Entries):
12339         Add extra parameter and add assignment to local object.
12340         * s-tposen.ads, s-tpoben.ads: Add new types to
12341         store entry queue maximums and a field to the entry object record.
12342         * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
12343         for Aspect_Max_Queue_Length.
12344         (Check_Aspect_At_Freeze_Point):
12345         Add aspect to list of aspects that don't require delayed analysis.
12346         * sem_prag.adb (Analyze_Pragma): Add case statement for
12347         Pragma_Max_Queue_Length, check semantics, and register arugments
12348         in the respective entry nodes.
12349         * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
12350         and Has_Max_Queue_Length
12351         * snames.ads-tmpl: Add constant for the new aspect-name
12352         Name_Max_Queue_Length and corrasponding pragma.
12354 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12356         * exp_util.adb (Is_Controlled_Function_Call):
12357         Reimplemented. Consider any node which has an entity as the
12358         function call may appear in various ways.
12360 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12362         * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
12363         an unchecked type conversion when performing a view conversion
12364         to/from a private type. In all other cases use a regular type
12365         conversion to ensure that any relevant checks are properly
12366         installed.
12368 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12370         * sem_prag.adb, sem_ch8.adb: Minor reformatting.
12372 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12374         * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
12375         error on case expression that is an entity, when coverage is
12376         incomplete and entity has a static value obtained by local
12377         propagation.
12378         (Handle_Static_Predicate): New procedure, subsidiary of
12379         Check_Choices, to handle case alternatives that are either
12380         subtype names or subtype indications involving subtypes that
12381         have static predicates.
12383 2017-01-06  Thomas Quinot  <quinot@adacore.com>
12385         * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
12386         (GNAT.Socket): Add support for Busy_Polling and Generic_Option
12388 2017-01-06  Bob Duff  <duff@adacore.com>
12390         * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
12391         Elaborate_All(P) to P itself. That could happen in obscure cases,
12392         and always introduced a cycle (P body must be elaborated before
12393         P body).
12394         * lib-writ.ads: Comment clarification.
12395         * ali-util.ads: Minor comment fix.
12396         * ali.adb: Minor reformatting.
12398 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12400         * a-exexpr-gcc.adb: Improve comment.
12402 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
12404         * s-linux-mips.ads: Use correct signal and errno constants.
12405         (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
12407 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
12409         * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
12410         * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
12411         sections.
12413 2017-01-01  Eric Botcazou  <ebotcazou@adacore.com>
12415         * gnatvsn.ads: Bump copyright year.
12417 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
12419         * gnat_ugn.texi: Bump @copying's copyright year.
12420         * gnat_rm.texi: Likewise.
12422 Copyright (C) 2017 Free Software Foundation, Inc.
12424 Copying and distribution of this file, with or without modification,
12425 are permitted in any medium without royalty provided the copyright
12426 notice and this notice are preserved.