* gcc-interface/Makefile.in: Generalize support for symbolic traces.
[official-gcc.git] / gcc / ada / ChangeLog
blob1b46154c8fd59d745d6ec3deea91d8931655948e
1 2017-12-14  Eric Botcazou  <ebotcazou@adacore.com>
3         * gcc-interface/Makefile.in: Generalize support for symbolic traces.
5 2017-12-14  Eric Botcazou  <ebotcazou@adacore.com>
7         * gcc-interface/misc.c (default_pass_by_ref): Minor tweak.
9 2017-12-14  Eric Botcazou  <ebotcazou@adacore.com>
11         * gcc-interface/trans.c (Call_to_gnu): Set DECL_DISREGARD_INLINE_LIMITS
12         to 0 on the callee if the call is recursive.
14 2017-12-14  Eric Botcazou  <ebotcazou@adacore.com>
16         * gcc-interface/decl.c (gnat_to_gnu_field): Do not set the alignment
17         of the enclosing record type if it is not already set.
19 2017-12-14  Eric Botcazou  <ebotcazou@adacore.com>
21         * gcc-interface/gigi.h (pad_type_has_rm_size): Declare.
22         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
23         a padding type for the alignment before validating the size.
24         Flip conditional construct and add a comment.
25         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Make sure to
26         apply the exception for padded objects to the type of the object.
27         * gcc-interface/utils.c (hash_pad_type): New static function.
28         (lookup_and_insert_pad_type): Rename into...
29         (canonicalize_pad_type): ...this.  Call hash_pad_type, do only one
30         lookup with insertion and always return the canonical type.
31         (maybe_pad_type): Adjust to above changes.  Set debug type later.
32         (pad_type_has_rm_size): New predicate.
33         (set_reverse_storage_order_on_pad_type): Adjust to above changes.
35 2017-12-13  Eric Botcazou  <ebotcazou@adacore.com>
37         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Initialize locus.
39 2017-12-13  Eric Botcazou  <ebotcazou@adacore.com>
41         * gcc-interface/trans.c (process_freeze_entity): Be prepared for a
42         package without body.
44 2017-12-13  Eric Botcazou  <ebotcazou@adacore.com>
46         * gcc-interface/decl.c (gnat_to_gnu_entity): Robustify test for types
47         descendant of System.Address.
48         (gnat_to_gnu_subprog_type): Likewise.
50 2017-12-08  Jakub Jelinek  <jakub@redhat.com>
52         * gcc-interface/utils.c (gnat_internal_attribute_table): Add
53         exclusions to the comment.
55 2017-12-07  Martin Sebor  <msebor@redhat.com>
57         PR c/81544
58         * gcc-interface/utils.c (gnat_internal_attribute_table): Initialize
59         new member of struct attribute_spec.
61 2017-12-06  Simon Wright  <simon@pushface.org>
63         PR ada/66205
64         * bindgen.adb (Gen_AdaFinal): If the restriction No_Task_Termination is
65         set, generate a null body.
67 2017-12-05  Piotr Trojanek  <trojanek@adacore.com>
69         * sem_util.adb (Contains_Refined_State): Remove.
71 2017-12-05  Ed Schonberg  <schonberg@adacore.com>
73         * sem_ch13.adb (Analyze_Aspect_Specifications, case Predicate): A
74         predicate cannot apply to a formal type.
76 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
78         * exp_unst.ads: Fix typos.
80 2017-12-05  Jerome Lambourg  <lambourg@adacore.com>
82         * libgnarl/s-taprop__qnx.adb: Better detect priority ceiling bug in
83         QNX.  At startup, the first mutex created has a non-zero ceiling
84         priority whatever its actual policy. This makes some tests fail
85         (c940013 for example).
87 2017-12-05  Bob Duff  <duff@adacore.com>
89         * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Call
90         Expand_Cleanup_Actions for N_Extended_Return_Statement.
91         * exp_ch7.adb (Expand_Cleanup_Actions): Handle
92         N_Extended_Return_Statement by transforming the statements into a
93         block, and (indirectly) calling Expand_Cleanup_Actions on the block.
94         It's too hard for Expand_Cleanup_Actions to operate directly on the
95         N_Extended_Return_Statement, because it has a different structure than
96         the other node kinds that Expand_Cleanup_Actions.
97         * exp_util.adb (Requires_Cleanup_Actions): Add support for
98         N_Extended_Return_Statement.  Change "when others => return False;" to
99         "when others => raise ...;" so it's clear what nodes this function
100         handles.  Use named notation where appropriate.
101         * exp_util.ads: Mark incorrect comment with ???.
103 2017-12-05  Javier Miranda  <miranda@adacore.com>
105         * exp_ch9.adb (Install_Private_Data_Declarations): Add missing
106         Debug_Info_Needed decoration of internally generated discriminal
107         renaming declaration.
109 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
111         * exp_unst.adb (Unnest_Subprogram): Add handling of 'Access on
112         nested subprograms.
114 2017-12-05  Sergey Rybin  <rybin@adacore.com>
116         * doc/gnat_ugn/gnat_utility_programs.rst: Add description of '--ignore'
117         option for gnatmetric, gnatpp, gnat2xml, and gnattest.
119 2017-12-05  Piotr Trojanek  <trojanek@adacore.com>
121         * sem_util.adb (Contains_Refined_State): Remove.
123 2017-12-05  Piotr Trojanek  <trojanek@adacore.com>
125         * rtsfind.ads: Add new enumeration literals: RE_Clock_Time (for
126         Ada.Real_Time.Clock_Time) and RO_CA_Clock_Time (for
127         Ada.Calendar.Clock_Time).
129 2017-12-05  Ed Schonberg  <schonberg@adacore.com>
131         * sem_ch4.adb (Is_Private_Overriding): If the candidate private
132         subprogram is overloaded, scan the list of homonyms in the same
133         scope, to find the inherited operation that may be overridden
134         by the candidate.
135         * exp_ch11.adb, exp_ch7.adb: Minor reformatting.
137 2017-12-05  Bob Duff  <duff@adacore.com>
139         * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
140         Init_Assignment is rewritten, we need to set Assignment_OK on the new
141         node.  Otherwise, we will get spurious errors when initializing via
142         assignment statement.
144 2017-12-05  Hristian Kirtchev  <kirtchev@adacore.com>
146         * sem_elab.adb: Update the terminology and switch sections.
147         (Check_SPARK_Model_In_Effect): New routine.
148         (Check_SPARK_Scenario): Verify the model in effect for SPARK.
149         (Process_Conditional_ABE_Call_SPARK): Verify the model in effect for
150         SPARK.
151         (Process_Conditional_ABE_Instantiation_SPARK): Verify the model in
152         effect for SPARK.
153         (Process_Conditional_ABE_Variable_Assignment_SPARK): Verify the model
154         in effect for SPARK.
156 2017-12-05  Nicolas Setton  <setton@adacore.com>
158         * terminals.c (__gnat_setup_child_communication): As documented,
159         __gnat_setup_child_communication should not terminate - it is intended
160         to be used as the child process of a call to fork().  However, execvp
161         might actually return in some cases, for instance when attempting to
162         run a 32-bit binary on a 64-bit Linux distribution when the
163         compatibility packages are not installed. In these cases, exit the
164         program to conform to the documentation.
166 2017-12-05  Olivier Hainque  <hainque@adacore.com>
168         * libgnat/s-tsmona.adb: Fix for oversight in the tsmona interface
169         update.
171 2017-12-05  Gary Dismukes  <dismukes@adacore.com>
173         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Minor typo fix
174         and reformatting.
175         * gnat_ugn.texi: Regenerate.
177 2017-12-05  Olivier Hainque  <hainque@adacore.com>
179         * sem_util.adb (Set_Convention): Always clear Can_Use_Internal_Rep
180         on access to subprogram types with foreign convention.
182 2017-12-05  Yannick Moy  <moy@adacore.com>
184         * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix User's
185         Guide description of default settings of warnings.
187 2017-12-05  Olivier Hainque  <hainque@adacore.com>
189         * s-dwalin.adb (Read_And_Execute_Isn): Adjust test checking for the end
190         of section. Add comments explaining the rationale of the computation.
192 2017-12-05  Bob Duff  <duff@adacore.com>
194         * exp_ch11.adb: Minor refactoring.
196 2017-12-05  Hristian Kirtchev  <kirtchev@adacore.com>
198         * debug.adb: Add debug switches d_a, d_e, and d_p, along with
199         documentation.
200         (Set_Underscored_Debug_Flag): New routine.
201         * debug.ads: Add the flags for all underscore switches.
202         (Set_Underscored_Debug_Flag): New routine.
203         * einfo.adb: Flag303 is now Suppress_Elaboration_Warnings.
204         (Suppress_Elaboration_Warnings): New routine.
205         (Set_Suppress_Elaboration_Warnings): New routine.
206         (Write_Entity_Flags): Add output for Suppress_Elaboration_Warnings.
207         * einfo.ads: Add new flag Suppress_Elaboration_Warnings.
208         (Suppress_Elaboration_Warnings): New routine along with pragma Inline.
209         (Set_Suppress_Elaboration_Warnings): New routine along with pragma
210         Inline.
211         * exp_ch3.adb (Build_Init_Procedure): Restore the behavior of the
212         legacy elaboration model.
213         (Default_Initialize_Object): Restore the behavior of the legacy
214         elaboration model.
215         * exp_ch9.adb: Add with and use clause for Sem_Elab.
216         (Build_Task_Activation_Call): Restore the behavior of the legacy
217         elaboration model.
218         * frontend.adb (Frontend): Restore the behavior of the legacy
219         elaboration model.
220         * opt.ads: Add new flags Legacy_Elaboration_Checks and
221         Relaxed_Elaboration_Checks, along with documentation.
222         * sem_attr.adb (Analyze_Access_Attribute): Restore the behavior of the
223         legacy elaboration model.
224         * sem_ch5.adb (Analyze_Assignment): Restore the behavior of the legacy
225         elaboration model.
226         * sem_ch7.adb (Analyze_Package_Declaration): Restore the behavior of
227         the legacy elaboration model.
228         * sem_ch8.adb (Attribute_Renaming): Restore the behavior of the legacy
229         elaboration model.
230         * sem_ch12.adb (Analyze_Instance_And_Renamings): Restore the behavior
231         of the legacy elaboration model.
232         (Analyze_Package_Instantiation): Restore the behavior of the legacy
233         elaboration model.
234         (Analyze_Subprogram_Instantiation): Restore the behavior of the legacy
235         elaboration model.
236         * sem_elab.adb: Update the documentation of the Processing phase.
237         Update the documentation on elaboration-related compilation
238         switches.  Update the documentation on adding a new target.  Add
239         Processing_Attributes which represent the state of the Processing
240         phase.  Resurrect the previous elaboration model as "legacy elaboration
241         model".
242         (Build_Call_Marker): This routine does not function when the legacy
243         elaboration model is in effect. Do not consider entry calls and requeue
244         statements when debug flag d_e is in effect. Do not consider calls to
245         subprograms which verify the runtime semantics of certain assertion
246         pragmas when debug flag d_p is in effect.
247         (Build_Variable_Reference_Marker): This routine does not function when
248         the legacy elaboration model is in effect.
249         (Check_Elaboration_Scenarios): This routine does not function when the
250         legacy elaboration model is in effect.
251         (Ensure_Prior_Elaboration): The various flags have now been replaced
252         with a state. Do not generate implicit Elaborate[_All] pragmas when
253         their creation has been suppressed.
254         (Ensure_Prior_Elaboration_Static): The with clause is marked based on
255         the requested pragma, not on the nature of the scenario.
256         (In_External_Context): Removed.
257         (Is_Assertion_Pragma_Target): New routine.
258         (Is_Potential_Scenario): Stop the traversal of a task body when
259         reaching an accept or select statement, and debug switch d_a is in
260         effect.
261         (Kill_Elaboration_Scenario): This routine does not function when the
262         legacy elaboration model is in effect.
263         (Process_Activation_Generic): The various flags have now been replaced
264         with a state.
265         (Process_Conditional_ABE): The various flags have now been replaced
266         with a state.
267         (Process_Conditional_ABE_Access): The various flags have now been
268         replaced with a state.
269         (Process_Conditional_ABE_Activation_Impl): The various flags have now
270         been replaced with a state. Do not process an activation call which
271         activates a task whose type is defined in an external instance, and
272         debug switch dL is in effect. Suppress the generation of implicit
273         Elaborate[_All] pragmas once a conditional ABE check has been
274         installed.
275         (Process_Conditional_ABE_Call): The various flags have now been
276         replaced with a state. Do not process a call which invokes a subprogram
277         defined in an external instance, and debug switch dL is in effect.
278         (Process_Conditional_ABE_Call_Ada): The various flags have now been
279         replaced with a state. Suppress the generation of implicit
280         Elaborate[_All] pragmas once a conditional ABE check has been
281         installed.
282         (Process_Conditional_ABE_Call_SPARK): The various flags have now been
283         replaced with a state.
284         (Process_Conditional_ABE_Instantiation): The various flags have now
285         been replaced with a state.
286         (Process_Conditional_ABE_Instantiation_Ada): The various flags have now
287         been replaced with a state. Suppress the generation of implicit
288         Elaborate[_All] pragmas once a conditional ABE check has been
289         installed.
290         (Process_Conditional_ABE_Instantiation_SPARK): The various flags have
291         now been replaced with a state.
292         (Process_Guaranteed_ABE_Activation_Impl): The various flags have now
293         been replaced with a state.
294         (Process_Single_Activation): The various flags have now been replaced
295         with a state.
296         (Record_Elaboration_Scenario): This routine does not function when the
297         legacy elaboration model is in effect.
298         (Traverse_Body): The various flags have now been replaced with a state.
299         * sem_elab.ads: Resurrect the pre-18.x elaboration model as "legacy
300         elaboration model".
301         * sem_prag.adb (Analyze_Pragma): Restore the behavior of the legacy
302         elaboration model.
303         * sem_res.adb (Resolve_Call): Restore the behavior of the legacy
304         elaboration model.
305         (Resolve_Entity_Name): Restore the behavior of the legacy elaboration
306         model.
307         * sem_util.adb (Mark_Elaboration_Attributes): This routine does not
308         function when the legacy elaboration model is in effect.
309         * sinfo.adb (Is_Known_Guaranteed_ABE): Update the assertion check.
310         (No_Elaboration_Check): New routine.
311         (Set_Is_Known_Guaranteed_ABE): Update the assertion check.
312         (Set_No_Elaboration_Check): New routine.
313         * sinfo.ads: Update the documentation of flag Is_Known_Guaranteed_ABE
314         along with occurrences in nodes.  Add new flag No_Elaboration_Check
315         along with occurrences in nodes.
316         * switch-c.adb (Scan_Front_End_Switches): Add processing for debug
317         switches with underscores.  Add processing for switches -gnatH and
318         -gnatJ.
319         * usage.adb (Usage): Add output for switches -gnatH and -gnatJ.
320         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
321         documentation to include the legacy and relaxed elaboration models.
322         * gnat_ugn.texi: Regenerate.
324 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
326         * doc/gnat_ugn/platform_specific_information.rst: Minor edit.
327         Improve doc on required packages for linux 32bits.
329 2017-12-05  Doug Rupp  <rupp@adacore.com>
331         * tracebak.c (ppc64-vx7): USE_GCC_UNWINDER for 64bit.
333 2017-12-05  Javier Miranda  <miranda@adacore.com>
335         * checks.adb (Generate_Range_Check): Force evaluation of the node in
336         more cases.  This patch was written to improve the code generated by
337         the CCG compiler but it is enabled for all targets since double
338         evaluation is always a potential source of inefficiency.
340 2017-12-05  Gary Dismukes  <dismukes@adacore.com>
342         * doc/gnat_ugn/gnat_utility_programs.rst: Remove reference to obsolete
343         -fdump-xref switch.
345 2017-12-05  Eric Botcazou  <ebotcazou@adacore.com>
347         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use the SLOC of the
348         iteration scheme throughout, except for the new loop statement(s).
350 2017-12-05  Ed Schonberg  <schonberg@adacore.com>
352         * exp_aggr.adb (Gen_Assign): Do not analyze the expressionn of the
353         assignment if it is part of an Iterated_Component_Association: the
354         analysis needs to take place once the loop structure is analyzed and
355         the loop parameter made visible, because references to it typically
356         appear in the corresponding expression.  This is necessary if the
357         expression is an aggregate, because previous pre-analysis of the
358         expression does not handle nested aggregates properly.
360 2017-12-05  Bob Duff  <duff@adacore.com>
362         * sem_res.adb (Resolve_Allocator): Avoid coextension processing for an
363         allocator that is the expansion of a build-in-place function call.
365 2017-12-05  Olivier Hainque  <hainque@adacore.com>
367 libgnat/
368         * s-trasym__dwarf.adb (spec of Module_Name.Get): Instead of
369         possibly adjusting the lookup address by a load address, expect
370         a extra argument through which the load address can be conveyed
371         separately.
372         (Multi_Module_Symbolic_Traceback): Adjust accordingly. Pass the
373         retrieved load address to Init_Module.
374         * s-tsmona__linux.adb (Get): Honor the new interface.
375         * s-tsmona__mingw.adb (Get): Likewise.
376         * s-dwalin.ads: Adjust comments to be explicit about which
377         addresses are from module info and which are run-time addresses,
378         offsetted by the module load address.
379         * s-dwalin.adb (Set_Load_Address): Simply set C.Load_Slide.
380         Do not alter the module Low and High (relative) addresses.
381         (Is_Inside): Improve documentation regarding the kinds of addresses
382         at hand and correct the test.
383         (Symbolic_Traceback): Use separate variables with explicit names
384         for the address in traceback (run-time value) and the address to
385         lookup within the shared object (module-relative). Adjust the
386         computation of address passed to Symbolic_Address for symbolization.
388 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
390         * opt.ads (Expand_Nonbinary_Modular_Ops): New flag.
391         * exp_ch4.adb (Expand_Nonbinary_Modular_Op): Use
392         Expand_Nonbinary_Modular_Ops instead of Modify_Tree_For_C, so that
393         other back-ends can also benefit from the front-end expansion. Remove
394         test for Modify_Tree_For_C in all callers to better share code.
395         * gnat1drv.adb (Adjust_Global_Switches): Set
396         Expand_Nonbinary_Modular_Ops when generating C code.
398 2017-12-05  Ed Schonberg  <schonberg@adacore.com>
400         * exp_ch5.adb (Expand_Formal_Container_Loop): Ensure that the loop
401         parameter becomes invisible after analyzing the loop, which has been
402         rewritten as a while-loop.
404 2017-12-05  Doug Rupp  <rupp@adacore.com>
406         * vxaddr2line.adb: Revise and enhance for new ports, remove dead ports,
407         and update for 64bit ports.
409 2017-12-05  Bob Duff  <duff@adacore.com>
411         * exp_ch6.adb (Build_In_Place_Formal): Search for the formal by suffix
412         instead of the full name.
413         * sem_ch6.adb (Create_Extra_Formals): Make sure there are extra formals
414         in the case of an instance of a generic.
416 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
418         (Adjust_Global_Switches): Create an alias GNAT_Annotate to map to
419         pragma Annotate.
421 2017-12-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
423         * gcc-interface/Makefile.in (RTEMS): Define EH_MECHANISM.
425 2017-12-04  Sebastian Huber  <sebastian.huber@embedded-brains.de>
427         * gcc-interface/Makefile.in (RTEMS): Use s-osprim__rtems.adb.
428         * libgnat/s-osprim__rtems.adb: New file.
429         * libgnarl/s-osinte__rtems.adb (pthread_cond_t): Fix alignment.
430         (pthread_mutexattr_t): Likewise.
431         (pthread_rwlockattr_t): Likewise.
432         (pthread_rwlock_t): Likewise.
433         (time_t): Use 64-bit integer.
435 2017-12-01  Sebastian Huber  <sebastian.huber@embedded-brains.de>
437         * libgnarl/s-osinte__rtems.ads (pthread_cond_t): Use correct size and
438         alignment.
439         (pthread_mutex_t): Likewise.
440         (pthread_rwlock_t): Likewise.
442 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
444         * gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR
445         using build2 instead of build3.
447 2017-11-23  Eric Botcazou  <ebotcazou@adacore.com>
449         PR ada/83091
450         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not build a variant
451         type for the implementation type of a packed array.
453 2017-11-23  Mike Stump  <mikestump@comcast.net>
454             Eric Botcazou  <ebotcazou@adacore.com>
456         * gcc-interface/trans.c (gnat_gimplify_stmt) <LOOP_STMT>: Pass 3rd
457         operand to ANNOTATE_EXPR and also pass unrolling hints.
459 2017-11-20  Eric Botcazou  <ebotcazou@adacore.com>
461         PR ada/83016
462         * gnatlink.adb (Process_Args): Accept multiple switches for --LINK.
463         (Usage): Adjust.
464         * gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES).
465         (common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in
466         the invocations of $(GNATLINK).
467         (../../gnatdll$(exeext)): Likewise.
468         (../../vxaddr2line$(exeext)): Likewise.
469         (gnatmake-re): Likewise.
470         (gnatlink-re): Likewise.
472 2017-11-16  Doug Rupp  <rupp@adacore.com>
474         * gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
476 2017-11-16  Steve Baird  <baird@adacore.com>
478         * debug.adb: Update another comment to indicate gnat2scil's use of the
479         -gnatd.7 switch.
481 2017-11-16  Bob Duff  <duff@adacore.com>
483         * exp_ch6.adb (Expand_Call_Helper): Avoid creating a transient scope in
484         the case of nested build-in-place calls.
486 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
488         * doc/gnat_ugn/gnat_utility_programs.rst: Document the switches
489         available in gnatsymbolize.
491 2017-11-16  Steve Baird  <baird@adacore.com>
493         * debug.adb: Update comment to indicate gnat2scil's use of the -gnatd.7
494         switch.
496 2017-11-16  Gary Dismukes  <dismukes@adacore.com>
498         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, sem_ch6.adb,
499         sem_elab.adb: Minor editorial corrections.
500         * gnat_ugn.texi: Regenerate.
502 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
504         * doc/gnat_ugn/gnat_utility_programs.rst (GNAT UGN): Add
505         gnatsymbolize documentation.
506         * gnat_ugn.texi: Regenerate.
508 2017-11-16  Steve Baird  <baird@adacore.com>
510         * sem_ch3.adb (Build_Derived_Record_Type): Replace all uses of
511         "Scope (Parent_Type)" with "Scope (Parent_Base)".
513 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
515         * opt.ads: Elaboration warnings are now on by default. Add a comment
516         explaining why this is needed.
517         * sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration
518         warnings.
519         * sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of
520         elaboration warnings.
521         (Analyze_Subprogram_Instantiation): Preserve the status of elaboration
522         warnings.
523         * sem_elab.adb: Update the structure of Call_Attributes and
524         Instantiation_Attributes.
525         (Build_Call_Marker): Propagate the status of elaboration warnings from
526         the call to the marker.
527         (Extract_Call_Attributes): Extract the status of elaboration warnings.
528         (Extract_Instantiation_Attributes): Extract the status of elaboration
529         warnings.
530         (Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are
531         now dependent on the status of elaboration warnings.
532         (Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now
533         dependent on the status of elaboration warnings.
534         (Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics
535         are now dependent on the status of elaboration warnings.
536         (Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced
537         for formal Call_Attrs. Elaboration diagnostics are now dependent on the
538         status of elaboration warnings.
539         (Process_Guaranteed_ABE_Call): Elaboration diagnostics are now
540         dependent on the status of elaboration warnings.
541         (Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now
542         dependent on the status of elaboration warnings.
543         * sem_prag.adb (Analyze_Pragma): Remove the unjustified warning
544         concerning pragma Elaborate.
545         * sem_res.adb (Resolve_Call): Preserve the status of elaboration
546         warnings.
547         (Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node
548         from the procedure call to the entry call.
549         * sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter
550         Warnings.
551         (Mark_Elaboration_Attributes_Node): Preserve the status of elaboration
552         warnings
553         * sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter
554         Warnings. Update the comment on usage.
555         * sinfo.adb (Is_Dispatching_Call): Update to use Flag6.
556         (Is_Elaboration_Warnings_OK_Node): New routine.
557         (Set_Is_Dispatching_Call): Update to use Flag6.
558         (Set_Is_Elaboration_Warnings_OK_Node): New routine.
559         * sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new
560         attribute Is_Elaboration_Warnings_OK_Node along with occurrences
561         in nodes.
562         (Is_Elaboration_Warnings_OK_Node): New routine along with pragma
563         Inline.
564         (Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma
565         Inline.
566         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various
567         sections to indicate how to suppress elaboration warnings.  Document
568         switches -gnatwl and -gnatwL.
569         * gnat_ugn.texi: Regenerate.
571 2017-11-16  Sylvain Dailler  <dailler@adacore.com>
573         * sem_util.adb (Get_Enum_Lit_From_Pos): Add a condition for Pos
574         lower than 0.
576 2017-11-16  Bob Duff  <duff@adacore.com>
578         * sem_ch13.adb (Check_Expr_Constants): Avoid error message in case of
579         System'To_Address.
581 2017-11-16  Yannick Moy  <moy@adacore.com>
583         * sem_elab.adb (Include): Fix mode of parameter Curr to out.
585 2017-11-16  Piotr Trojanek  <trojanek@adacore.com>
587         * sem_util.ads, sem_util.adb (Is_CCT_Instance): Allow calls where
588         Context_Id denotes a record type.
590 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
592         * sem_ch8.adb (Check_SPARK_Primitive_Operation): Enable the check in
593         instantiations.
595 2017-11-16  Doug Rupp  <rupp@adacore.com>
597         Initial gnat port to aarch64-wrs-vxworks7
598         * libgnarl/s-vxwork__aarch64.ads,
599         libgnat/system-vxworks7-aarch64-rtp-smp.ads,
600         libgnat/system-vxworks7-aarch64.ads: New files
601         * sigtramp-vxworks-target.inc (aarch64): New section.
602         * tracebak.c (USE_ARM_UNWINDING): Disable for ARMARCH8A.
604 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
606         * sem_elab.adb (Include): Including a node which is also a compilation
607         unit terminates the search because there are no more lists to examine.
609 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
611         * sem_ch8.adb (Analyze_Subprogram_Renaming): Ensure that a renaming
612         declaration does not define a primitive operation of a tagged type for
613         SPARK.
614         (Check_SPARK_Primitive_Operation): New routine.
616 2017-11-16  Arnaud Charlet  <charlet@adacore.com>
618         * libgnat/a-elchha.adb (Last_Chance_Handler): Display Argv (0) in
619         message when using -E binder switch.
621 2017-11-16  Piotr Trojanek  <trojanek@adacore.com>
623         * errout.ads: Fix minor typo in comment.
625 2017-11-16  Ed Schonberg  <schonberg@adacore.com>
627         * sem_ch3.adb (Process_Subtype): If the subtype indication does not
628         syntactically denote a type, return Any_Type to prevent subsequent
629         compiler crashes or infinite loops.
631 2017-11-16  Steve Baird  <baird@adacore.com>
633         * lib-writ.adb: Fix bug which causes Program_Error to be raised in some
634         cases when writing out a .ali file when a Rename_Pragma pragma is in
635         effect.
636         * lib-writ.adb (Write_Unit_Information): Replace call to
637         Pragma_Name_Unmapped with call to Pragma_Name.
639 2017-11-16  Gary Dismukes  <dismukes@adacore.com>
641         * sem_elab.adb: Minor typo fixes.
643 2017-11-16  Justin Squirek  <squirek@adacore.com>
645         * sem_res.adb (Resolve_Allocator): Correct warning messages and make
646         them more explicit.
648 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
650         * atree.ads (Nkind_In): Add 10 and 11 parameter versions.
651         * checks.adb (Install_Primitive_Elaboration_Check): Mark the setting of
652         the elaboration flag as elaboration code.
653         * einfo.adb (Contract): Update the comments.
654         (Ignore_SPARK_Mode_Pragmas): Update the comments.
655         (SPARK_Aux_Pragma): Update the comments.
656         (SPARK_Aux_Pragma_Inherited): Update the comments.
657         (SPARK_Pragma): Update the comments. The attribute now applies
658         to all types and abstract states.
659         (SPARK_Pragma_Inherited): Update the comments. The attribute now
660         applies to all types and abstract states.
661         (Set_Contract): Update the comments.
662         (Set_Ignore_SPARK_Mode_Pragmas): Update the comments.
663         (Set_SPARK_Aux_Pragma): Update the comments.
664         (Set_SPARK_Aux_Pragma_Inherited): Update the comments.
665         (Set_SPARK_Pragma): Update the comments. The attribute now applies to
666         all types and abstract states.
667         (Set_SPARK_Pragma_Inherited): Update the comments. The attribute now
668         applies to all types and abstract states.
669         (Write_Field40_Name): Add output for SPARK_Pragma when it appears on a
670         type and abstract states.
671         * einfo.ads: Update the documentation of attributes SPARK_Pragma and
672         SPARK_Pragma_Inherited.  Both of them now apply to all types and
673         abstract states.
674         * exp_util.adb (Set_Elaboration_Flag): Mark the setting of the
675         elaboration flag as elaboration code.
676         * sem_ch3.adb: Add with and use clauses for Sem_Elab.
677         (Analyze_Full_Type_Declaration): Set the SPARK_Mode of the type. Record
678         a derived type for later processing by the ABE mechanism.
679         (Analyze_Incomplete_Type_Decl): Set the SPARK_Mode of the type.
680         (Analyze_Private_Extension_Declaration): Set the SPARK_Mode of the
681         type.
682         * sem_ch7.adb (Analyze_Private_Type_Declaration): Set the SPARK_Mode of
683         the type.
684         * sem_elab.adb: Define the term "early call region".  Update the
685         terminology for "scenario" and "target".  Update the architecture of
686         the ABE mechanism.  Update the steps which must be taken when adding a
687         new scenario.  Update the section on debugging ABE issues.  Add new
688         hash tables Early_Call_Regions and Recorded_SPARK_Scenarios.  Add new
689         table SPARK_Scenarios.  Hash table Elaboration_Context is now
690         Elaboration_Statuses.  The majority of Process_xxx routines have been
691         updated to better reflect their role.
692         (Add_Unit): Reimplemented.
693         (Check_Elaboration_Constituent): New routine.
694         (Check_Elaboration_Scenarios): Verify previously recorded scenarios for
695         conditional ABE issues. Verify previously recorded SPARK scenarios.
696         (Check_SPARK_Derived_Type): New routine.
697         (Check_SPARK_Instantiation): New routine.
698         (Check_SPARK_Scenario): New routine.
699         (Check_SPARK_Refined_State_Pragma): New routine.
700         (Early_Call_Region): New routine.
701         (Elaboration_Status): New routine.
702         (Ensure_Prior_Elaboration): Add new formal parameter Prag_Nam. The
703         implicit Elabotate[_All] pragma is now specified via Prag_Nam.
704         (Find_Early_Call_Region): New routine.
705         (Info_Scenario): Add output for refinement constituents.
706         (Is_Recorded_SPARK_Scenario): New routine.
707         (Is_Suitable_SPARK_Derived_Type): New routine.
708         (Is_Suitable_SPARK_Instantiation): New routine.
709         (Is_Suitable_SPARK_Refined_State_Pragma): New routine.
710         (Is_Visited_Body): New routine.
711         (Kill_Elaboration_Scenario): Reimplemented.
712         (Output_Active_Scenarios): Add output for pragma Refined_State.
713         (Output_SPARK_Refined_State_Pragma): New routine.
714         (Process_Conditional_ABE_Call): Remove the use of -gnatd.v. The effect
715         is now achieved by different means.
716         (Process_Conditional_ABE_Call_SPARK): Verify that a call which precedes
717         the subprogram body appears within the early call region of the body.
718         Either ensure the prior elaboration of external subprograms or verify
719         that the context meets the suitable elaboration requirement.
720         (Process_Conditional_ABE_Instantiation_SPARK): New routine.
721         (Record_Elaboration_Scenario): Reimplement the portion which enforces
722         the level restrictions of the static model. Add support for SPARK
723         scenarios.
724         (Record_SPARK_Elaboration_Scenario): New routine.
725         (Reset_Visited_Bodies): New routine.
726         (Set_Early_Call_Region): New routine.
727         (Set_Elaboration_Status): New routine.
728         (Set_Is_Recorded_SPARK_Scenario): New routine.
729         (Update_Elaboration_Scenario): Reimplemented.
730         * sem_elab.ads: Add new subtype Library_Or_Instantiation_Level.
731         * sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Save the pragma
732         for examination by the ABE Processing phase.
733         (Create_Abstract_State): Save the SPARK_Mode from the context.
734         * sem_util.adb (Is_Non_Preelaborable_Construct): New routine.
735         * sem_util.ads (Is_Non_Preelaborable_Construct): New routine.
736         * sinfo.adb (Is_Elaboration_Code): New routine.
737         (Set_Is_Elaboration_Code): New routine.
738         (Nkind_In): Add 10 and 11 parameter versions.
739         * sinfo.ads: Add new attribute Is_Elaboration_Code along with
740         occurrences in nodes.
741         (Is_Elaboration_Code): New routine along with pragma Inline.
742         (Set_Is_Elaboration_Code): New routine along with pragma Inline.
743         (Nkind_In): Add 10 and 11 parameter versions.
745 2017-11-16  Justin Squirek  <squirek@adacore.com>
747         * sem.adb (Analyze): Remove requirement that the original node of N be
748         an operator in the case that analysis on the node yields the relevant
749         operator - so prefer it instead.
751 2017-11-16  Bob Duff  <duff@adacore.com>
753         * sem_ch6.adb (Create_Extra_Formals): The type of the BIP_Object_Access
754         formal must not have a designated type that is the full view coming
755         from a limited-with'ed package.
756         * sem_util.adb,sem_util.ads (Incomplete_View_From_Limited_With): New
757         function called from sem_ch6.
758         * sem_ch5.adb (Analyze_Assignment): Treat user-defined concatenation
759         specially for b-i-p cases.
761 2017-11-10  Martin Sebor  <msebor@redhat.com>
763         PR c/81117
764         * adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
765         * argv.c (__gnat_fill_arg, __gnat_fill_env): Likewise.
767 2017-11-10  Eric Botcazou  <ebotcazou@adacore.com>
769         * gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
770         not fall through to the next case.
771         <ARRAY_TYPE>: Deal specially with a dereference from another array
772         type with the same element type.
774 2017-11-09  Gary Dismukes  <dismukes@adacore.com>
776         * exp_util.adb, freeze.adb: Minor reformatting.
778 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
780         * gcc-interface/Makefile.in: Add rules to build aarch64-qnx runtimes.
782 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
784         * gcc-interface/trans.c (gnat_to_gnu): Add processing for
785         N_Variable_Reference_Marker nodes.
787 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
789         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
790         the pragma Compile_Time_Error when it appears in a generic package
791         declaration and uses an expanded name to denote the current unit.
793 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
795         * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
796         * tracebak.c: Add support for tracebacks in QNX.
798 2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
800         * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
802 2017-11-09  Yannick Moy  <moy@adacore.com>
804         * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
805         justification.
807 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
809         * doc/gnat_ugn/platform_specific_information.rst: Document packages
810         needed on GNU/Linux by GNAT.
811         * gnat_ugn.texi: Regenerate.
813 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
815         * contracts.adb (Analyze_Contracts): Remove the three parameter
816         version. This routine now only analyzes contracts and does not perform
817         any freezing actions.
818         (Analyze_Previous_Contracts): Removed.
819         (Freeze_Previous_Contracts): New routine.
820         * contracts.ads (Analyze_Previous_Contracts): Removed.
821         (Freeze_Previous_Contracts): New routine.
822         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
823         enclosing package spec regardless of whether the list denotes the
824         visible or private declarations.  Fix the removal of partial state
825         refinements when the context is a package spec.
826         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
827         contracts.
828         * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
829         * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
830         (Analyze_Protected_Body): Freeze previous contracts.
831         (Analyze_Task_Body): Freeze previous contracts.
832         * sem_prag.adb: Comment reformatting.
834 2017-11-09  Bob Duff  <duff@adacore.com>
836         * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
837         Export this so users can use it without importing
838         System.Tasking.Utilities.
839         * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
840         that fails when Make_Independent is called on a user task.
841         * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
842         capitalization style ((style) bad casing of "Master_of_Task").
844 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
846         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
847         uninitialized variable uncovered by Codepeer.
849 2017-11-09  Arnaud Charlet  <charlet@adacore.com>
851         * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
853 2017-11-09  Javier Miranda  <miranda@adacore.com>
855         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
856         (Static_Dispatch_Tables): Minor rewording.
857         * gnat_rm.texi: Regenerate.
859 2017-11-09  Justin Squirek  <squirek@adacore.com>
861         * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
862         use_clauses within instances.
863         (Use_One_Package): Add condition to check for "hidden" open scopes to
864         avoid skipping over packages that have not been properly installed even
865         though they are visible.
867 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
869         * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
870         private operation of a protected type, when the type has no visible
871         operations.
873 2017-11-09  Javier Miranda  <miranda@adacore.com>
875         * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
876         * exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
877         if available.
879 2017-11-09  Bob Duff  <duff@adacore.com>
881         * exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
882         sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
883         sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
884         variables.
886 2017-11-09  Yannick Moy  <moy@adacore.com>
888         * exp_disp.adb (Make_DT): Default initialize Ifaces_List and
889         Ifaces_Comp_List.
891 2017-11-09  Pascal Obry  <obry@adacore.com>
893         * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
894         only for foreign threads.  We initialize the thread handle only if not
895         yet initialized. This happens in Enter_Task for foreign threads only.
896         But for native threads (Ada tasking) we do want to keep the real
897         handle (from Create_Task) to be able to free the corresponding
898         resources in Finalize_TCB (CloseHandle).
900 2017-11-09  Yannick Moy  <moy@adacore.com>
902         * sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
903         P_Base_Type.
904         (Error_Attr_P): Fix name in pragma No_Return.
905         (Unexpected_Argument): Add pragma No_Return.
906         (Placement_Error): Add pragma No_Return.
908 2017-11-09  Javier Miranda  <miranda@adacore.com>
910         * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
911         dispatch table is statically built.
912         (Make_DT): Declare constant the Interface_Table object associated with
913         an statically built dispatch table. For this purpose the Offset_To_Top
914         value of each interface is computed using the dummy object.
915         * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
916         the Offset_To_Top field of secondary dispatch tables when the dispatch
917         table is statically built.
918         (Initialize_Tag): Do not generate calls to Register_Interface_Offset
919         when the dispatch table is statically built.
920         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
921         Document the new GNAT restriction Static_Dispatch_Tables.
922         * gnat_rm.texi: Regenerate.
924 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
926         * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
927         to avoid a dormant bug.
929 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
931         * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
932         as such capability is not available on the OS.
933         * link.c: Make sure linker options for QNX are correct.
934         * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
935         * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
936         in particular a workaround with locks priority ceiling where a higher
937         priority task is allowed to lock a lower ceiling priority lock. This
938         also fixes the scheduling of FIFO tasks when the priority of a task is
939         lowered.
940         * libgnat/system-qnx-aarch64.ads: Fix priority ranges.
942 2017-11-09  Yannick Moy  <moy@adacore.com>
944         * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
945         message.
946         * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
947         condition.
948         * namet.adb (Copy_One_Character): Add assumption for static analysis,
949         as knowledge that Hex(2) is in the range 0..255 is too complex for
950         CodePeer.
951         (Finalize): Add assumption for static analysis, as the fact that there
952         are symbols in the table depends on a global invariant at this point in
953         the program.
954         * set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
955         * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
956         true.
958 2017-11-09  Javier Miranda  <miranda@adacore.com>
960         * libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
961         * exp_disp.adb (Building_Static_DT): Check restriction.
962         (Building_Static_Secondary_DT): Check restriction.
963         (Make_DT): Initialize the HT_Link to No_Tag.
964         * opt.ads (Static_Dispatch_Tables): Rename flag...
965         (Building_Static_Dispatch_Tables): ... into this.  This will avoid
966         conflict with the restriction name.
967         * gnat1drv.adb: Update.
968         * exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
969         * exp_ch3.adb (Expand_N_Object_Declaration): Update.
971 2017-11-09  Pascal Obry  <obry@adacore.com>
973         * libgnarl/s-taprop__mingw.adb: Minor code clean-up.  Better using a
974         named number.
976 2017-11-09  Yannick Moy  <moy@adacore.com>
978         * binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
979         * checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
980         use.  Default initialize Hi, Lo.
981         (Selected_Range_Checks): Retype Num_Checks more precisely.
982         (Determine_Range, Determine_Range_R): Default initialize Hi_Right,
983         Lo_Right.
984         * contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
985         Unmodified.
986         (Process_Postconditions): Mark parameter Stmts as Unmodified.
987         * exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
988         * exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
989         (Expand_Concatenate): Default initialize High_Bound.
990         (Optimize_Length_Comparison): Default initialize Ent, Index.
991         * exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
992         L_Lo.
993         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
994         Return_Stmt.
995         * exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
996         remove pragma Warnings(Off).
997         * exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
998         * exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
999         * freeze.adb (Check_Component_Storage_Order): Default initialize
1000         Comp_Byte_Aligned rather than silencing messages with pragma
1001         Warnings(Off), which does not work for CodePeer initialization
1002         messages, and given that here the possible read of an unitialized value
1003         depends on a proper use of parameters by the caller.
1004         * inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
1005         * sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
1006         * sem_ch3.adb (Build_Derived_Array_Type): Default initialize
1007         Implicit_Base.
1008         * sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
1009         pragma Warnings(Off).
1010         (Analyze_Case_Expression): Rescope checking block within branch where
1011         Others_Present is set by the call to Check_Choices.
1012         * sem_ch5.adb (Analyze_Assignment): Default initialize
1013         Save_Full_Analysis.
1014         * sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
1015         and restructure code to defend against previous errors, so that, in
1016         that case, control does not flow to the elsif condition which read an
1017         uninitialized Obj_Decl.
1018         * sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
1019         (Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
1020         which seem to be left uninitialized and possibly read in some cases.
1021         * sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
1022         precisely.  This requires to exchange the test for exiting in case of
1023         too many positions and the increment to Position, inside the loop.
1024         * sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
1025         which cannot be read uninitialized, but the reasons for that are quite
1026         subtle.
1027         * sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
1028         * sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
1029         Spec_Id.
1030         * sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
1031         and test for presence of non-null Opnd_Type before testing its scope,
1032         in a test which would read its value uninitialized, and is very rarely
1033         exercized (it depends on the presence of an extension of System).
1034         * sem_spark.ads: Update comment to fix name of main analysis procedure.
1035         * sem_warn.adb (Warn_On_Known_Condition): Default initialize
1036         Test_Result.
1037         * set_targ.adb (FailN): Mark procedure with No_Return.
1038         * stylesw.adb (Save_Style_Check_Options): Delete useless code to
1039         initialize all array Options to white space, as there is already code
1040         doing the same for the remaining positions in Options at the end of the
1041         procedure.
1043 2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
1045         * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
1046         generic instantiations either.
1048 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1050         * sem_prag.adb (Analyze_Part_Of): Reword error message.
1051         (Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
1052         SPARK_Mode appears with an illegal mode, treat this as a non-existent
1053         mode.
1055 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
1057         * sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
1058         a limited view of a type T declared in unit U1, when the function is
1059         declared in another unit U2 and the call appears in a procedure within
1060         another unit.
1062 2017-11-09  Justin Squirek  <squirek@adacore.com>
1064         * sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
1065         when processing generic instances.
1067 2017-11-09  Bob Duff  <duff@adacore.com>
1069         * namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
1070         Error_Name and No_Name.  Use this (versus Name_Id) to indicate which
1071         objects can have those special values. Valid_Name_Id could usefully be
1072         used all over the compiler front end, but that's too much trouble for
1073         now. If we did that, we might want to rename:
1074         Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
1075         For parameters of type Valid_Name_Id, remove some redundant tests,
1076         including the ones found by CodePeer.  Use Is_Valid_Name instead of
1077         membership test when appropriate.
1078         (Error_Name_Or_No_Name): Delete this; it's no longer needed.
1079         * sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
1080         "in Error_Name_Or_No_Name".
1081         (Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
1082         Error_Name_Or_No_Name".
1084 2017-11-09  Arnaud Charlet  <charlet@adacore.com>
1086         * gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
1087         mode here unless -gnateC is specified.
1088         * switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
1089         -gnatC here.
1091 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1093         * lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
1094         part of the ALI writing; they are now processed directly from memory
1095         when requested by the backend.
1096         * lib-xref.ads (Collect_SPARK_Xrefs): Remove.
1097         (Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
1098         * lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
1099         (Add_SPARK_File): Remove.
1100         (Add_SPARK_Xref): Refactored from removed code; filters xref entries
1101         that are trivially uninteresting to the SPARK backend.
1102         * spark_xrefs.ads: Remove code that is no longer needed.
1103         * spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
1105 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
1107         * sem_elab.adb: Update the documentation on adding a new elaboration
1108         schenario. Add new hash table Recorded_Top_Level_Scenarios.
1109         (Is_Check_Emitting_Scenario): Removed.
1110         (Is_Recorded_Top_Level_Scenario): New routine.
1111         (Kill_Elaboration_Scenario): Reimplemented.
1112         (Record_Elaboration_Scenario): Mark the scenario as recorded.
1113         (Set_Is_Recorded_Top_Level_Scenario): New routine.
1114         (Update_Elaboration_Scenario): Reimplemented.
1115         * sinfo.adb (Is_Recorded_Scenario): Removed.
1116         (Set_Is_Recorded_Scenario): Removed.
1117         * sinfo.ads: Remove attribute Is_Recorded_Scenario along with
1118         occurrences in nodes.
1119         (Is_Recorded_Scenario): Removed along with pragma Inline.
1120         (Set_Is_Recorded_Scenario): Removed along with pragma Inline.
1122 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1124         * sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
1125         error message.
1127 2017-11-09  Justin Squirek  <squirek@adacore.com>
1129         * sem_res.adb (Resolve_Allocator): Add warning messages corresponding
1130         to the allocation of an anonymous access-to-controlled object.
1132 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
1134         * sigtramp-qnx.c: Fix obvious typo.
1136 2017-11-09  Doug Rupp  <rupp@adacore.com>
1138         * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
1140 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
1142         * sem_res.adb (Resolve): If expression is an entity whose type has
1143         implicit dereference, generate reference to it, because no reference is
1144         generated for an overloaded entity during analysis, given that its
1145         identity may not be known.
1147 2017-11-09  Javier Miranda  <miranda@adacore.com>
1149         * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
1150         offset-to-top field by addition.
1151         (Make_Secondary_DT): Initialize the offset-to-top field with a negative
1152         offset.
1153         * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
1154         return a negative offset-to-top value.
1155         (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
1156         Set_Static_Offset_To_Top passing a negative offet-to-top value;
1157         initialize also the offset-to-top field with a negative offset.
1158         * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
1159         an addition since the offset-to-top field is now a negative value.
1160         (Displace): Displace the pointer to the object means of a substraction
1161         since it is now a negative value.
1162         (Set_Dynamic_Offset_to_top): Displace the pointer to the object by
1163         means of a substraction since it is now a negative value.
1165 2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
1167         * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
1168         before Errout.Output_Messages also in the case of compilation errors.
1170 2017-11-09  Javier Miranda  <miranda@adacore.com>
1172         * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
1173         the Class Level): Fix error interfacing with C strings.
1174         * gnat_ugn.texi: Regenerate.
1176 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
1178         * system-qnx-aarch64.ads: Fix the priority constants.
1179         * s-osinte__qnx.ads: Fix constants for handling the locking protocols
1180         and scheduling.
1181         * s-osinte__qnx.adb: New file , prevents the use of priority 0 that
1182         corresponds to an idle priority on QNX.
1184 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1186         * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
1187         comments.
1189 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1191         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
1192         in expression funtions that are expanded into variables.
1194 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1196         * sem_util.adb: Minor whitespace cleanup.
1198 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
1200         * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
1201         s-taprop version rather than a custom one.
1202         * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
1204 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1206         * lib-xref.ads, lib-xref-spark_specific.adb
1207         (Traverse_Compilation_Unit): Move declaration to package body.
1209 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1211         * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
1212         the type of the renaming from its defining entity, rather then the
1213         subtype mark as there may not be a subtype mark.
1215 2017-11-08  Jerome Lambourg  <lambourg@adacore.com>
1217         * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
1218         libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
1219         libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
1220         libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
1221         terminals.c: Initial port of GNAT for aarch64-qnx
1223 2017-11-08  Elisa Barboni  <barboni@adacore.com>
1225         * exp_util.adb (Find_DIC_Type): Move...
1226         * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
1228 2017-11-08  Justin Squirek  <squirek@adacore.com>
1230         * sem_res.adb (Resolve_Allocator): Add info messages corresponding to
1231         the owner and corresponding coextension.
1233 2017-11-08  Ed Schonberg  <schonberg@adacore.com>
1235         * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
1236         following separate procedures.
1237         (Resolve_Delta_Array_Aggregate): Previous code form
1238         Resolve_Delta_Aggregate.
1239         (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
1240         ARG decisions on the legality rules for delta aggregates for records:
1241         in the case of a variant record, components from different variants
1242         cannot be specified in the delta aggregate, and this must be checked
1243         statically.
1245 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1247         * spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
1248         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1249         removed component.
1251 2017-11-08  Gary Dismukes  <dismukes@adacore.com>
1253         * sem_ch4.adb: Minor typo fix.
1255 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1257         * spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
1258         Spec_Scope_Num components.
1259         * spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
1260         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1261         removed components.
1262         (Collect_SPARK_Xrefs): Skip setting proper values of removed
1263         components.
1265 2017-11-08  Gary Dismukes  <dismukes@adacore.com>
1267         * exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
1268         name is a discriminant in check for unconditional accessibility
1269         violation within instances.
1271 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1273         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
1274         for constants (with variable input).
1275         (Is_Constant_Object_Without_Variable_Input): Remove.
1277 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1279         * exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
1281 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1283         * spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
1284         cross-references.
1285         (dspark): Remove hardcoded table bound.
1287 2017-11-08  Ed Schonberg  <schonberg@adacore.com>
1289         * sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
1290         the type of the base of the construct to determine the type (or
1291         candidate interpretations) of the delta aggregate. This allows the
1292         construct to appear in a context that expects a private extension.
1293         * sem_res.adb (Resolve): Handle properly a delta aggregate with an
1294         overloaded base.
1296 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1298         * spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
1299         with Entity_Id of the reference.
1300         * spark_xrefs.adb (dspark): Adapt pretty-printing routine.
1301         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
1302         reference, not the file and scope indices.
1304 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1306         * errout.ads (Current_Node): New.
1307         * errout.adb (Error_Msg): Use Current_Node.
1308         * par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
1309         when relevant.
1310         * style.adb: Call Error_Msg_N when possible.
1312 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1314         * spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
1315         Entity.
1316         * lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
1317         the Scope_Id record component.
1319 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1321         * spark_xrefs.ads (SPARK_File_Record): Remove string components.
1322         * spark_xrefs.adb (dspark): Remove pretty-printing of removed
1323         SPARK_File_Record components.
1324         * lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
1325         representation of files/units.
1327 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1329         * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
1330         Remove Inside_Stubs parameter.
1332 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1334         * spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
1335         represented by Entity_Id.
1336         (SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
1337         represented by Entity_Id; this information is not repeated as
1338         Scope_Entity.
1339         (Heap): Moved from lib-xref-spark_specific.adb, to reside next to
1340         Name_Of_Heap_Variable.
1341         * spark_xrefs.adb (dspark): Adapt debug routine to above changes in
1342         data types.
1343         * lib-xref-spark_specific.adb: Adapt routines for populating SPARK
1344         scope and xrefs tables to above changes in data types.
1346 2017-11-08  Justin Squirek  <squirek@adacore.com>
1348         * sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
1349         primitives of generic actuals.
1350         (Mark_Use_Type): Add recursive call to properly mark class-wide type's
1351         base type clauses as per ARM 8.4 (8.2/3).
1353 2017-11-08  Ed Schonberg  <schonberg@adacore.com>
1355         * sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
1356         categorization dependency of the body, as is done for non-generic
1357         units.
1358         (New_Overloaded_Entity, Visible_Part_Type): Remove linear search
1359         through declarations (Simple optimization, no behavior change).
1361 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1363         * spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
1364         (SPARK_Scope_Record): Remove inessential components.
1365         * spark_xrefs.adb (dspark): Remove pretty-printing of removed record
1366         components.
1367         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
1368         removed record components.
1369         (Add_SPARK_Xrefs): Remove setting of removed record components.
1371 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1373         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
1374         empty entities.
1376 2017-11-08  Javier Miranda  <miranda@adacore.com>
1378         * sem_disp.adb (Is_Inherited_Public_Operation): Extend the
1379         functionality of this routine to handle multiple levels of derivations.
1381 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1383         * einfo.adb: Elist36 is now used as Nested_Scenarios.
1384         (Nested_Scenarios): New routine.
1385         (Set_Nested_Scenarios): New routine.
1386         (Write_Field36_Name): New routine.
1387         * einfo.ads: Add new attribute Nested_Scenarios along with occurrences
1388         in entities.
1389         (Nested_Scenarios): New routine along with pragma Inline.
1390         (Set_Nested_Scenarios): New routine along with pragma Inline.
1391         * sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
1392         (Process_Nested_Scenarios): New routine.
1393         (Traverse_Body): When a subprogram body is traversed for the first
1394         time, find, save, and process all suitable scenarios found within.
1395         Subsequent traversals of the same subprogram body utilize the saved
1396         scenarios.
1398 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1400         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
1401         protected operations.
1402         (Add_SPARK_Xrefs): Simplify detection of empty entities.
1403         * get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
1404         put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
1405         reading and testing SPARK cross-references stored in the ALI files.
1406         * lib-xref.ads (Output_SPARK_Xrefs): Remove.
1407         * lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
1408         ALI file.
1409         * spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
1410         with description of the SPARK xrefs ALI format.
1411         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
1412         and put_spark_refs.o.
1414 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1416         * exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
1417         when the associated access type is subject to pragma
1418         No_Heap_Finalization.
1419         * exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
1420         designated type in case it comes from a limited withed unit.
1422 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1424         * exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
1425         SPARK-related flags.  Add ??? comment.
1426         * exp_util.adb (Insert_Actions): Add an entry for node
1427         N_Variable_Reference_Marker.
1428         * sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
1429         * sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
1430         and record a variable reference marker for the current name.
1431         (Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
1432         a variable reference marker for the current name.
1433         * sem_elab.adb (Build_Variable_Reference_Marker): New routine.
1434         (Extract_Variable_Reference_Attributes): Reimplemented.
1435         (Info_Scenario): Add output for variable references and remove output
1436         for variable reads.
1437         (Info_Variable_Read): Removed.
1438         (Info_Variable_Reference): New routine.
1439         (Is_Suitable_Scenario): Variable references are now suitable scenarios
1440         while variable reads are not.
1441         (Output_Active_Scenarios): Add output for variable references and
1442         remove output for variable reads.
1443         (Output_Variable_Read): Removed.
1444         (Output_Variable_Reference): New routine.
1445         (Process_Variable_Read): Removed.
1446         (Process_Variable_Reference): New routine.
1447         (Process_Variable_Reference_Read): New routine.
1448         * sem_elab.ads (Build_Variable_Reference_Marker): New routine.
1449         * sem_res.adb (Resolve_Actuals): Build and record a variable reference
1450         marker for the current actual.
1451         * sem_spark.adb (Check_Node): Add an entry for node
1452         N_Variable_Reference_Marker.
1453         * sem_util.adb (Within_Subprogram_Call): Moved to the library level.
1454         * sem_util.ads (Within_Subprogram_Call): Moved to the library level.
1455         * sinfo.adb (Is_Read): New routine.
1456         (Is_Write): New routine.
1457         (Target): Updated to handle variable reference markers.
1458         (Set_Is_Read): New routine.
1459         (Set_Is_Write): New routine.
1460         (Set_Target): Updated to handle variable reference markers.
1461         * sinfo.ads: Add new attributes Is_Read and Is_Write along with
1462         occurrences in nodes. Update attribute Target. Add new node
1463         kind N_Variable_Reference_Marker.
1464         (Is_Read): New routine along with pragma Inline.
1465         (Is_Write): New routine along with pragma Inline.
1466         (Set_Is_Read): New routine along with pragma Inline.
1467         (Set_Is_Write): New routine along with pragma Inline.
1468         * sprint.adb (Sprint_Node_Actual): Add an entry for node
1469         N_Variable_Reference_Marker.
1471 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1473         * sem_util.adb (Subprogram_Name): Append suffix for overloaded
1474         subprograms.
1476 2017-11-08  Yannick Moy  <moy@adacore.com>
1478         * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
1479         about unused use-type or use-package clauses inside inlined bodies.
1481 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1483         * sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
1484         In_Partial_Fin along with a comment on its usage. Do not guarantee the
1485         prior elaboration of a unit when the need came from a partial
1486         finalization context.
1487         (In_Initialization_Context): Relocated to Process_Call.
1488         (Is_Partial_Finalization_Proc): New routine.
1489         (Process_Access): Add new parameter In_Partial_Fin along with a comment
1490         on its usage.
1491         (Process_Activation_Call): Add new parameter In_Partial_Fin along with
1492         a comment on its usage.
1493         (Process_Activation_Conditional_ABE_Impl): Add new parameter
1494         In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1495         diagnostics when the activation occurs in a partial finalization
1496         context.
1497         (Process_Activation_Guaranteed_ABE_Impl): Add new parameter
1498         In_Partial_Fin along with a comment on its usage.
1499         (Process_Call): Add new parameter In_Partial_Fin along with a comment
1500         on its usage. A call is within a partial finalization context when it
1501         targets a finalizer or primitive [Deep_]Finalize, and the call appears
1502         in initialization actions. Pass this information down to the recursive
1503         steps of the Processing phase.
1504         (Process_Call_Ada): Add new parameter In_Partial_Fin along with a
1505         comment on its usage. Remove the guard which suppresses the generation
1506         of implicit Elaborate[_All] pragmas. This is now done in
1507         Ensure_Prior_Elaboration.
1508         (Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
1509         with a comment on its usage. Do not emit any ABE diagnostics when the
1510         call occurs in a partial finalization context.
1511         (Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
1512         comment on its usage.
1513         (Process_Instantiation): Add new parameter In_Partial_Fin along with a
1514         comment on its usage.
1515         (Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
1516         with a comment on its usage.
1517         (Process_Instantiation_Conditional_ABE): Add new parameter
1518         In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1519         diagnostics when the instantiation occurs in a partial finalization
1520         context.
1521         (Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
1522         with a comment on its usage.
1523         (Process_Scenario): Add new parameter In_Partial_Fin along  with a
1524         comment on its usage.
1525         (Process_Single_Activation): Add new parameter In_Partial_Fin along
1526         with a comment on its usage.
1527         (Traverse_Body): Add new parameter In_Partial_Fin along with a comment
1528         on its usage.
1530 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1532         * sem_ch13.adb: Add optional parameter to Error_Msg.
1534 2017-11-08  Jerome Lambourg  <lambourg@adacore.com>
1536         * fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
1537         for the Interfaces.* hierarchy as longer unit names are now allowed.
1539 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1541         * sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
1542         subprogram as well.  Support more cases of entities.
1543         (Append_Entity_Name): Add some defensive code.
1545 2017-11-06  Eric Botcazou  <ebotcazou@adacore.com>
1547         * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
1549 2017-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1551         PR ada/82785
1552         * gcc-interface/Makefile.in (m68k/Linux): Fix typo.
1554 2017-10-21  Eric Botcazou  <ebotcazou@adacore.com>
1556         * gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
1558 2017-10-21  Eric Botcazou  <ebotcazou@adacore.com>
1560         * gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
1561         (convert): Do not use an unchecked conversion for converting from a
1562         type to another type padding it.
1564 2017-10-20  Doug Rupp  <rupp@adacore.com>
1566         * libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
1567         needed for using monotonic clock.
1568         * libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
1569         changes.
1570         * libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
1571         out monotonic clock related functions body.
1572         (Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
1573         Compute_Deadline): Move to...
1574         * libgnarl/s-tpopmo.adb: ... here. New separate package body.
1576 2017-10-20  Ed Schonberg  <schonberg@adacore.com>
1578         * sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
1579         case where the controlling formal is an anonymous access to interface
1580         type.
1581         * exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
1582         access type, handle properly the the constructed dereference that
1583         designates the object used in the rewritten synchronized call.
1584         (Parameter_Block_Pack): If the type of the actual is by-copy, its
1585         generated declaration in the parameter block does not need an
1586         initialization even if the type is a null-excluding access type,
1587         because it will be initialized with the value of the actual later on.
1588         (Parameter_Block_Pack): Do not add controlling actual to parameter
1589         block when its type is by-copy.
1591 2017-10-20  Justin Squirek  <squirek@adacore.com>
1593         * sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
1594         scope stack traversal into the context clause.
1596 2017-10-20  Bob Duff  <duff@adacore.com>
1598         * sinfo.ads: Fix a comment typo.
1600 2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1602         * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
1603         warning against usage in conjunction with -gnatn.
1604         (-fdump-xref): Delete entry.
1605         * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
1606         -fdump-xref switch.
1607         * gnat_ugn.texi: Regenerate.
1609 2017-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
1611         * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
1612         Minor reformatting.
1614 2017-10-20  Yannick Moy  <moy@adacore.com>
1616         * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
1617         compare a dimensioned expression with a literal.
1618         (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
1619         special value zero.
1620         * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
1621         dimensionality system in GNAT.
1622         * gnat_ugn.texi: Regenerate.
1624 2017-10-20  Yannick Moy  <moy@adacore.com>
1626         * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
1627         inadequate silencing of errors.
1628         * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
1629         checking the subprogram body generated from an expression function,
1630         when this is done as part of the preanalysis done on expression
1631         functions, as the subprogram body may not yet be attached in the AST.
1632         The error if any will be issued later during the analysis of the body.
1633         (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
1635 2017-10-20  Arnaud Charlet  <charlet@adacore.com>
1637         * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
1638         warning on ineffective use clause.
1640 2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1642         * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
1643         * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
1644         to issue the warning on the absence of local raise.
1645         (Possible_Local_Raise): Do not issue the warning for Call_Markers.
1646         (Warn_If_No_Local_Raise): New procedure to issue the warning on the
1647         absence of local raise.
1648         * sem_elab.adb: Add with and use clauses for Exp_Ch11.
1649         (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
1650         where a scenario could give rise to raising Program_Error.
1651         * sem_elab.adb: Typo fixes.
1652         * fe.h (Warn_If_No_Local_Raise): Declare.
1653         * gcc-interface/gigi.h (get_exception_label): Change return type.
1654         * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
1655         simple vector of Entity_Id.
1656         (gnu_storage_error_label_stack): Likewise.
1657         (gnu_program_error_label_stack): Likewise.
1658         (gigi): Adjust to above changes.
1659         (Raise_Error_to_gnu): Likewise.
1660         (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
1661         (N_Push_Constraint_Error_Label): Push the label onto the stack.
1662         (N_Push_Storage_Error_Label): Likewise.
1663         (N_Push_Program_Error_Label): Likewise.
1664         (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
1665         a warning on the absence of local raise.
1666         (N_Pop_Storage_Error_Label): Likewise.
1667         (N_Pop_Program_Error_Label): Likewise.
1668         (push_exception_label_stack): Delete.
1669         (get_exception_label): Change return type to Entity_Id and adjust.
1670         * gcc-interface/utils2.c (build_goto_raise): Change type of first
1671         parameter to Entity_Id and adjust.  Set TREE_USED on the label.
1672         (build_call_raise): Adjust calls to get_exception_label and also
1673         build_goto_raise.
1674         (build_call_raise_column): Likewise.
1675         (build_call_raise_range): Likewise.
1676         * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
1677         Document actual default behavior.
1679 2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
1681         * einfo.ads: Minor consistent punctuation in comment.  All numbered
1682         items in the comment of Is_Internal are now terminated with a period.
1684 2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
1686         * exp_util.adb (Build_Temporary): Mark created temporary entity as
1687         internal.
1689 2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
1691         * sem_type.adb (In_Generic_Actual): Simplified.
1693 2017-10-20  Justin Squirek  <squirek@adacore.com>
1695         * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
1696         verify a renaming exists for a generic formal before comparing it to
1697         the actual as defaulted formals will not have a renamed_object.
1699 2017-10-20  Javier Miranda  <miranda@adacore.com>
1701         * exp_ch6.adb (Replace_Returns): Fix wrong management of
1702         N_Block_Statement nodes.
1704 2017-10-20  Bob Duff  <duff@adacore.com>
1706         * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
1707         component of an array aggregate if it is initialized by a
1708         build-in-place function call.
1709         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
1710         bip for nonlimited types.
1711         * debug.adb: Document -gnatd.9.
1713 2017-10-20  Bob Duff  <duff@adacore.com>
1715         * sem_ch12.adb: Remove redundant setting of Parent.
1717 2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1719         * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
1720         of the operands is a string literal.
1722 2017-10-20  Bob Duff  <duff@adacore.com>
1724         * einfo.ads: Comment fix.
1726 2017-10-20  Clement Fumex  <fumex@adacore.com>
1728         * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
1730 2017-10-20  Ed Schonberg  <schonberg@adacore.com>
1732         * sem_dim.adb (Extract_Power): Accept dimension values that are not
1733         non-negative integers when the dimensioned base type is an Integer
1734         type.
1736 2017-10-20  Bob Duff  <duff@adacore.com>
1738         * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
1739         that an allocator came from a b-i-p return statement.
1740         * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
1741         object of a nonlimited build-in-place function call.
1742         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
1743         Alloc_For_BIP_Return flag on generated allocators.
1744         * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
1745         If the N_Assignment_Statement has been transformed into something else,
1746         then Should_Transform_BIP_Assignment won't work.
1747         * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
1748         "Remove Adjust if we're building the return object of an extended
1749         return statement in place." Back out that part of the change, because
1750         the Alloc_For_BIP_Return flag is now used for that.
1752 2017-10-19  Bob Duff  <duff@adacore.com>
1754         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
1755         should be "T".  Handle case of a subtype of a class-wide type.
1757 2017-10-19  Bob Duff  <duff@adacore.com>
1759         * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
1760         which node kinds can legitimately be ignored, and raise Program_Error
1761         for others.
1763 2017-10-19  Hristian Kirtchev  <kirtchev@adacore.com>
1765         * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
1766         instantiation that acts as a compilation unit.
1767         (Find_Code_Unit): Reimplemented.
1768         (Find_Top_Unit): Reimplemented.
1769         (Find_Unit_Entity): New routine.
1770         (Process_Instantiation_SPARK): Correct the elaboration requirement a
1771         package instantiation imposes on a unit.
1773 2017-10-19  Bob Duff  <duff@adacore.com>
1775         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
1776         for a narrow set of controlled types.
1778 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
1780         * sinput.ads (Line_Start): Add pragma Inline.
1781         * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
1783 2017-10-19  Bob Duff  <duff@adacore.com>
1785         * exp_attr.adb (Expand_N_Attribute_Reference): Disable
1786         Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
1787         build-in-place function call so that the temp is declared in the right
1788         place.
1790 2017-10-18  Eric Botcazou  <ebotcazou@adacore.com>
1792         * gcc-interface/misc.c (gnat_tree_size): Move around.
1794         * gcc-interface/utils.c (max_size): Deal with SSA names.
1796 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
1798         * gcc-interface/misc.c (gnat_tree_size): New function.
1799         (LANG_HOOKS_TREE_SIZE): Redefine.
1801 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1803         * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
1804         Remote_Call_Interface is not a suitable preelaboratd context when the
1805         call appears in the package body.
1807 2017-10-14  Eric Botcazou  <ebotcazou@adacore.com>
1809         * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
1810         * layout.adb (Set_Elem_Alignment): Likewise.  Use M name as maximum
1811         alignment for consistency.  If Align is non-zero, use the minimum of
1812         Align and M for the alignment.
1813         * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
1814         setting the alignment directly.
1816 2017-10-14  Ed Schonberg  <schonberg@adacore.com>
1818         * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
1819         optional string in an Assert pragma until the expansion of the pragma
1820         has rewritten it as a conditional statement, so that the string
1821         argument is only evaluaed if the assertion fails. This is mandated by
1822         RM 11.4.2.
1824 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1826         * debug.adb: Switch -gnatd.v and associated flag are now used to
1827         enforce the SPARK rules for elaboration in SPARK code.
1828         * sem_elab.adb: Describe switch -gnatd.v.
1829         (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
1830         (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
1831         in effect.
1832         (Process_Variable_Assignment): Clarify why variable assignments are
1833         processed reglardless of whether -gnatd.v is in effect.
1834         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
1835         sections on elaboration code and compilation switches.
1836         * gnat_ugn.texi: Regenerate.
1838 2017-10-14  Gary Dismukes  <dismukes@adacore.com>
1840         * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
1841         sem_warn.adb: Minor reformattings.
1843 2017-10-14  Ed Schonberg  <schonberg@adacore.com>
1845         * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
1846         for reverse iteration over formal containers.
1847         * gnat_rm.texi: Regenerate.
1849 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1851         * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
1852         Ensure_Prior_Elaboration_Dynamic for consistency reasons.
1853         (Ensure_Static_Prior_Elaboration): Renamed to
1854         Ensure_Prior_Elaboration_Static for consistency reasons.
1855         (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
1856         reflect its new purpose.
1857         (Is_Initialized): New routine.
1858         (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
1859         in order to reflect its new purpose.
1860         (Is_Variable_Read): New routine.
1861         (Output_Variable_Reference): Renamed to Output_Variable_Read in order
1862         to reflect its new purpose.
1863         (Process_Variable_Assignment): This routine now acts as a top level
1864         dispatcher for variable assignments.
1865         (Process_Variable_Assignment_Ada): New routine.
1866         (Process_Variable_Assignment_SPARK): New routine.
1867         (Process_Variable_Reference): Renamed to Process_Variable_Read in order
1868         to reflects its new purpose. A reference to a variable is now suitable
1869         for ABE processing only when it is a read. The logic in the routine now
1870         reflects the latest SPARK elaboration rules.
1872 2017-10-14  Justin Squirek  <squirek@adacore.com>
1874         * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
1875         triggers marking on formal subprograms.
1877 2017-10-14  Javier Miranda  <miranda@adacore.com>
1879         * checks.adb (Ensure_Valid): Do not skip adding the validity check on
1880         renamings of objects that come from the sources.
1882 2017-10-14  Eric Botcazou  <ebotcazou@adacore.com>
1884         * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
1885         parameter and set the alignment of the type to Align.
1886         (Copy_Float_Type): Adjust call to Build_Float_Type.
1887         (Register_Float_Type): Add pragma Unreferenced for Precision.  Adjust
1888         call to Build_Float_Type and do not set RM_Size and Alignment.
1890 2017-10-14  Patrick Bernardi  <bernardi@adacore.com>
1892         * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
1893         GNATRTL_NONTASKING_OBJ.
1895 2017-10-14  Bob Duff  <duff@adacore.com>
1897         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
1898         enabling b-i-p for nonlimited controlled types (but disabled).
1900 2017-10-14  Justin Squirek  <squirek@adacore.com>
1902         * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
1903         Has_Warnings_Off with Warnings_Off.
1905 2017-10-14  Piotr Trojanek  <trojanek@adacore.com>
1907         * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
1909 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1911         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
1912         enclosing package at the end of the visible declarations.
1913         * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
1914         an initialization item which is undefined due to some illegality.
1916 2017-10-14  Patrick Bernardi  <bernardi@adacore.com>
1918         * ali.adb: Add new ALI line 'T' to read the number of tasks contain
1919         within each unit that require a default-sized primary and secondary
1920         stack to be generated by the binder.
1921         (Scan_ALI): Scan new 'T' lines.
1922         * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
1923         * bindgen.adb (Gen_Output_File): Count the number of default-sized
1924         stacks within the closure that are to be created by the binder.
1925         (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
1926         stacks and record these in System.Secodnary_Stack.
1927         (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
1928         closure of the program being bound.
1929         * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
1930         * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
1931         (Expand_N_Object_Declaration): Count the number of default-sized stacks
1932         used by task objects contained within the object whose declaration is
1933         being expanded.  Only performed when either the restrictions
1934         No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
1935         effect.
1936         * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
1937         (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
1938         the expansion of a task type if the size of the stack is known at
1939         run-time and the restrictions No_Implicit_Heap_Allocations or
1940         No_Implicit_Task_Allocations are in effect.
1941         (Make_Task_Create_Call): If using a restricted profile provide
1942         secondary stack parameter: either the statically created stack or null.
1943         * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
1944         Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
1945         Unit_Record initialization expressions.
1946         * lib-writ.adb (Add_Preprocessing_Dependency,
1947         Ensure_System_Dependency): Include Primary_Stack_Count and
1948         Sec_Stack_Count in Unit_Record initialization expression.
1949         (Write_ALI): Write T lines.
1950         (Write_Unit_Information): Do not output 'T' lines if there are no
1951         stacks for the binder to generate.
1952         * lib-writ.ads: Updated library information documentation to include
1953         new T line entry.
1954         * lib.adb (Increment_Primary_Stack_Count): New routine.
1955         (Increment_Sec_Stack_Count): New routine.
1956         (Primary_Stack_Count): New routine.
1957         (Sec_Stack_Count): New routine.
1958         * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
1959         Unit_Record and updated documentation.
1960         (Increment_Primary_Stack_Count): New routine along with pragma Inline.
1961         (Increment_Sec_Stack_Count): New routine along with pragma Inline.
1962         (Primary_Stack_Count): New routine along with pragma Inline.
1963         (Sec_Stack_Count): New routine along with pragma Inline.
1964         * opt.ads: New constant No_Stack_Size.  Flag Default_Stack_Size
1965         redefined.  New flag Default_Sec_Stack_Size and
1966         Quantity_Of_Default_Size_Sec_Stacks.
1967         * rtfinal.c Fixed erroneous comment.
1968         * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
1969         System.Secondary_Stack to System.Parameters.  Add RE_SS_Stack.
1970         * sem_util.adb (Number_Of_Elements_In_Array): New routine.
1971         * sem_util.ads (Number_Of_Elements_In_Array): New routine.
1972         * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
1973         * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
1974         (Set_Sec_Stack_Addr): Removed routine.
1975         (Get_Sec_Stack): New routine.
1976         (Set_Sec_Stack): New routine.
1977         (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
1978         reflect new procedure and global names.
1979         * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
1980         libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
1981         libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
1982         parameter profile to allow the secondary stack size to be specified.
1983         * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
1984         profile to include Sec_Stack_Address.  Update Tasking.Initialize_ATCB
1985         call to remove Secondary_Stack_Size reference.  Add secondary stack
1986         address and size to SSL.Create_TSD call.
1987         (Task_Wrapper): Remove secondary stack creation.
1988         * libgnarl/s-tarest.ads (Create_Restricted_Task,
1989         Create_Restricted_Task_Sequential): Update parameter profile to include
1990         Sec_Stack_Address and clarify the Size parameter.
1991         * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
1992         from profile and body.
1993         (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
1994         * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
1995         Common_ATCB.
1996         (Initialize_ATCB): Update the parameter profile to remove
1997         Secondary_Stack_Size.
1998         * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
1999         call to Initialize_ATCB.  Add secondary stack address and size to
2000         SSL.Create_TSD call, and catch any storage exception from the call.
2001         (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
2002         new subprogram and component names.
2003         (Task_Wrapper): Remove secondary stack creation.
2004         (Vulnerable_Complete_Master): Update to reflect TSD changes.
2005         * libgnarl/s-tassta.ads: Reformat comments.
2006         (Create_Task): Update parameter profile.
2007         * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
2008         profile to include secondary stack size. Remove secondary size
2009         parameter from Initialize_ATCB call and add it to Create_TSD call.
2010         * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
2011         libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
2012         * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
2013         libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
2014         Percentage.  Remove constants Dynamic, Sec_Stack_Percentage and
2015         Sec_Stack_Dynamic.  Add constant Runtime_Default_Sec_Stack_Size and
2016         Sec_Stack_Dynamic.
2017         (Default_Sec_Stack_Size): New routine.
2018         * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
2019         now Preelaborate.
2020         * libgnat/s-soflin.adb: Removed unused with-clauses.  With
2021         System.Soft_Links.Initialize to initialize non-tasking TSD.
2022         (Create_TSD): Update parameter profile. Initialize the TSD and
2023         unconditionally call SS_Init.
2024         (Destroy_TSD): Update SST.SS_Free call.
2025         (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
2026         Set_Sec_Stack_Addr_Soft): Remove routines.
2027         (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
2028         Set_Sec_Stack_Soft): Add routines.
2029         (NT_TSD): Move to private part of package specification.
2030         * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
2031         with suppressed access checks.  Renamed *_Sec_Stack_Addr_* routines and
2032         objects to *_Sec_Stack_*.  TSD: removed warning suppression and
2033         component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
2034         (Create_TSD): Update parameter profile.
2035         (NT_TSD): Move to private section from body.
2036         * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
2037         * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
2038         * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
2039         Remove routine.
2040         (Get_Sec_Stack, Set_Sec_Stack): Add routine.
2041         (Thread_Body_Enter): Update parameter profile and body to adapt to new
2042         System.Secondary_Stack.
2043         (Init_RTS): Update body for new System.Soft_Links names.
2044         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
2045         s-soliin.o.
2047 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
2049         * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
2050         operating on trees as wide_ints.
2052 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2054         * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
2055         as a scoping construct when it is byproduct of exception handling.
2057 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2059         * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
2060         semantic field Target of node N_Call_Marker.
2062 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2064         * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
2065         attempts to copy a limited value, when the allocator is the expression
2066         in an expression function.
2068 2017-10-09  Joel Brobecker  <brobecker@adacore.com>
2070         * doc/share/conf.py: Tell the style checker that this is a Python
2071         fragment, and therefore that pyflakes should not be run to validate
2072         this file.
2074 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
2076         * einfo.ads (Is_Boolean_Type): Add pragma Inline.
2077         (Is_Entity_Name): Likewise.
2078         (Is_String_Type): Likewise.
2079         * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
2080         and remove useless comparisons on the base types.
2081         (Covers): Use simple tests for Standard_Void_Type.  Move up cheap tests
2082         on T2.  Always test Is_Private_Type before Full_View_Covers.
2084 2017-10-09  Bob Duff  <duff@adacore.com>
2086         * exp_ch4.adb: Minor refactoring.
2088 2017-10-09  Javier Miranda  <miranda@adacore.com>
2090         * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
2091         not components.
2093 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2095         * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
2096         are verified only in the static model.
2098 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2100         * sem_ch5.adb (Analyze_Iterator_Specification,
2101         Check_Reverse_Iteration): Check that the domain of iteration supports
2102         reverse iteration when it is a formal container.  This requires the
2103         presence of a Previous primitive in the Iterable aspect.
2104         * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
2105         primitives Last and Previous to support reverse iteration over formal
2106         containers.
2107         (Validate_Iterable_Aspect): Add check for reverse iteration operations.
2108         * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
2109         for reverse iteration using primitives Last and Previous in generated
2110         loop.
2112 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2114         * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
2115         of the Defining_Program_Unit_Name, which is an identifier, in order to
2116         construct the string for the fully qualified name.
2118 2017-10-09  Justin Squirek  <squirek@adacore.com>
2120         * sem_ch3.adb: Rename Uses_Unseen_Priv into
2121         Contains_Lib_Incomplete_Type.
2123 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2125         * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
2126         sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
2127         exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
2128         prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
2129         sem_ch10.adb, par-ch8.adb: Minor reformatting.
2131 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2133         * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
2134         in the static model.
2135         (Is_Suitable_Variable_Assignment): This scenario is now only relevant
2136         in the static model.
2137         (Is_Suitable_Variable_Reference): This scenario is now only relevant in
2138         the static model.
2140 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2142         * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
2143         expressions when the enclosing scope is a subprogram body and the next
2144         declaration is a body that freezes entities previously declared in the
2145         scope.
2147 2017-10-09  Justin Squirek  <squirek@adacore.com>
2149         * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
2150         ghost packages and living packages in use clauses.
2151         (Use_One_Type, Note_Redundant_Use): Correct warning messages
2153 2017-10-09  Justin Squirek  <squirek@adacore.com>
2155         * osint.ads: Document new parameter FD for Read_Source_File.
2157 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2159         * exp_util.adb (Make_Predicate_Call): If the type of the expression to
2160         which the predicate check applies is tagged, convert the expression to
2161         that type. This is in most cases a no-op, but is relevant if the
2162         expression is clas-swide, because the predicate function being invoked
2163         is not a primitive of the type and cannot take a class-wide actual.
2165 2017-10-09  Gary Dismukes  <dismukes@adacore.com>
2167         * exp_disp.adb: Minor reformatting.
2169 2017-10-09  Arnaud Charlet  <charlet@adacore.com>
2171         * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
2173 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2175         * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
2176         GNATprove.
2177         (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
2179 2017-10-09  Bob Duff  <duff@adacore.com>
2181         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
2182         immediately if the call has already been processed (by a previous call
2183         to Make_Build_In_Place_Call_In_Anonymous_Context).
2184         * sem_elab.adb: Minor typo fixes.
2186 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2188         * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
2189         predicate, do not replace an identifier that matches the type if the
2190         identifier is a selector in a selected component, because this
2191         indicates a reference to some homograph of the type itself, and  not to
2192         the current occurence in the predicate.
2194 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
2196         * repinfo.adb (List_Record_Layout): Tweak formatting.
2197         (Write_Val): Remove superfluous spaces in back-end layout mode.
2199 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
2201         * sem_res.adb (Property_Error): Remove.
2202         (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
2203         current wording of the rule.
2205 2017-10-09  Justin Squirek  <squirek@adacore.com>
2207         * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
2208         before analyzing a given scope due to an expression function.
2209         (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
2211 2017-10-09  Bob Duff  <duff@adacore.com>
2213         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
2214         Defining_Identifier (Obj_Decl) in two places, because it might have
2215         changed.
2216         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
2217         involving 'Input on (not visibly) derived types.
2219 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2221         * atree.adb: Add new soft link Rewriting_Proc.
2222         (Rewrite): Invoke the subprogram attached to the rewriting soft link.
2223         (Set_Rewriting_Proc): New routine.
2224         * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
2225         (Set_Rewriting_Proc): New routine.
2226         * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
2227         for *E*laboration flag to maintain consistency with other elaboration
2228         flag generating subprograms.
2229         * debug.adb: Document the new usage of flag -gnatdL.
2230         * einfo.adb: Node19 is now used as Receiving_Entry.  Node39 is now used
2231         as Protected_Subprogram.  Flag148 is now used as
2232         Is_Elaboration_Checks_OK_Id.  Flag302 is now used as
2233         Is_Initial_Condition_Procedure.
2234         (Is_Elaboration_Checks_OK_Id): New routine.
2235         (Is_Initial_Condition_Procedure): New routine.
2236         (Protected_Subprogram): New routine.
2237         (Receiving_Entry): New routine.
2238         (SPARK_Pragma): Update assertion.
2239         (SPARK_Pragma_Inherited): Update assertion.
2240         (Suppress_Elaboration_Warnings): Removed.
2241         (Set_Is_Elaboration_Checks_OK_Id): New routine.
2242         (Set_Is_Initial_Condition_Procedure): New routine.
2243         (Set_Protected_Subprogram): New routine.
2244         (Set_Receiving_Entry): New routine.
2245         (Set_SPARK_Pragma): Update assertion.
2246         (Set_SPARK_Pragma_Inherited): Update assertion.
2247         (Write_Entity_Flags): Update the output for Flag148 and Flag302.
2248         (Write_Field19_Name): Add output for Receiving_Entry.
2249         (Write_Field39_Name): Add output for Protected_Subprogram.
2250         (Write_Field40_Name): Update the output for SPARK_Pragma.
2251         * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
2252         Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
2253         Remove attribute Suppress_Elaboration_Warnings.  Update the stricture
2254         of various entities.
2255         (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
2256         (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
2257         (Protected_Subprogram): New routine along with pragma Inline.
2258         (Receiving_Entry): New routine along with pragma Inline.
2259         (Suppress_Elaboration_Warnings): Removed.
2260         (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
2261         Inline.
2262         (Set_Is_Initial_Condition_Procedure): New routine along with pragma
2263         Inline.
2264         (Set_Protected_Subprogram): New routine along with pragma Inline.
2265         (Set_Receiving_Entry): New routine along with pragma Inline.
2266         (Set_Suppress_Elaboration_Warnings): Removed.
2267         * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
2268         consistency with other finalizer generating subprograms.
2269         (Default_Initialize_Object): Mark the block which wraps the call to
2270         finalize as being part of initialization.
2271         * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
2272         Initial_Condition.
2273         (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
2274         (Next_Suitable_Statement): Update the comment on usage. Skip over call
2275         markers generated by the ABE mechanism.
2276         * exp_ch9.adb (Activation_Call_Loc): New routine.
2277         (Add_Accept): Link the accept procedure to the original entry.
2278         (Build_Protected_Sub_Specification): Link the protected or unprotected
2279         version to the original subprogram.
2280         (Build_Task_Activation_Call): Code cleanup. Use a source location which
2281         is very close to the "begin" or "end" keywords when generating the
2282         activation call.
2283         * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
2284         * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
2285         process loops.
2286         (Expand_SPARK_N_Loop_Statement): New routine.
2287         (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
2288         call to the Default_Initial_Condition procedure.
2289         (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
2290         * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
2291         effect.
2292         (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
2293         (Insert_Actions): Add processing for N_Call_Marker.
2294         (Kill_Dead_Code): Explicitly kill an elaboration scenario.
2295         * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
2296         * frontend.adb: Initialize Sem_Elab. Process all saved top level
2297         elaboration scenarios for ABE issues.
2298         * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
2299         nodes.
2300         * lib.adb (Earlier_In_Extended_Unit): New variant.
2301         * sem.adb (Analyze): Ignore N_Call_Marker nodes.
2302         (Preanalysis_Active): New routine.
2303         * sem.ads (Preanalysis_Active): New routine.
2304         * sem_attr.adb (Analyze_Access_Attribute): Save certain
2305         elaboration-related attributes. Save the scenario for ABE processing.
2306         * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
2307         effect. Save certain elaboration-related attributes.
2308         * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
2309         attributes. Save the scenario for ABE processing.
2310         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
2311         mode in effect. Save certain elaboration-related attributes.
2312         (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
2313         locating the first real statement.
2314         (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
2315         certain elaboration-related attributes.
2316         * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
2317         elaboration warnings.
2318         * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
2319         generated for purposes of wrapping an attribute used as a generic
2320         actual.
2321         (Find_Direct_Name): Save certain elaboration-related attributes. Save
2322         the scenario for ABE processing.
2323         (Find_Expanded_Name): Save certain elaboration-related attributes. Save
2324         the scenario for ABE processing.
2325         * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
2326         elaboration-related attributes.
2327         (Analyze_Requeue): Save certain elaboration-related attributes. Save
2328         the scenario for ABE processing.
2329         (Analyze_Single_Task_Declaration): Save certain elaboration-related
2330         attributes.
2331         (Analyze_Task_Type_Declaration): Save certain elaboration-related
2332         attributes.
2333         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
2334         elaboration-related attributes.
2335         (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
2336         effect. Save certain elaboration-related attributes.
2337         (Analyze_Package_Instantiation): Save certain elaboration-related
2338         attributes.  Save the scenario for ABE processing. Create completing
2339         bodies in case the instantiation results in a guaranteed ABE.
2340         (Analyze_Subprogram_Instantiation): Save certain elaboration-related
2341         attributes Save the scenario for ABE processing. Create a completing
2342         body in case the instantiation results in a guaranteed ABE.
2343         (Provide_Completing_Bodies): New routine.
2344         * sem_elab.ads: Brand new implementation.
2345         * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
2346         Elaborate_Body): Do not suppress elaboration warnings.
2347         * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
2348         operator.
2349         (Resolve_Call): Save certain elaboration-related attributes. Save the
2350         scenario for ABE processing.
2351         (Resolve_Entity_Name): Do not perform any ABE processing here.
2352         (Resolve_Entry_Call): Inherit certain attributes from the original call.
2353         * sem_util.adb (Begin_Keyword_Location): New routine.
2354         (Defining_Entity): Update the parameter profile. Add processing for
2355         concurrent subunits that are rewritten as null statements.
2356         (End_Keyword_Location): New routine.
2357         (Find_Enclosing_Scope): New routine.
2358         (In_Instance_Visible_Part): Code cleanup.
2359         (In_Subtree): Update the parameter profile. Add new version.
2360         (Is_Preelaborable_Aggregate): New routine.
2361         (Is_Preelaborable_Construct): New routine.
2362         (Mark_Elaboration_Attributes): New routine.
2363         (Scope_Within): Update the parameter profile.
2364         (Scope_Within_Or_Same): Update the parameter profile.
2365         * sem_util.ads (Begin_Keyword_Location): New routine.
2366         (Defining_Entity): Update the parameter profile and the comment on
2367         usage.
2368         (End_Keyword_Location): New routine.
2369         (Find_Enclosing_Scope): New routine.
2370         (In_Instance_Visible_Part): Update the parameter profile.
2371         (In_Subtree): Update the parameter profile. Add new version.
2372         (Is_Preelaborable_Aggregate): New routine.
2373         (Is_Preelaborable_Construct): New routine.
2374         (Mark_Elaboration_Attributes): New routine.
2375         (Scope_Within): Update the parameter profile and the comment on usage.
2376         (Scope_Within_Or_Same): Update the parameter profile and the comment on
2377         usage.
2378         * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
2379         to determine whether a loop has meaningful condition actions.
2380         (Has_Condition_Actions): New routine.
2381         * sinfo.adb (ABE_Is_Certain): Removed.
2382         (Is_Declaration_Level_Node): New routine.
2383         (Is_Dispatching_Call): New routine.
2384         (Is_Elaboration_Checks_OK_Node): New routine.
2385         (Is_Initialization_Block): New routine.
2386         (Is_Known_Guaranteed_ABE): New routine.
2387         (Is_Recorded_Scenario): New routine.
2388         (Is_Source_Call): New routine.
2389         (Is_SPARK_Mode_On_Node): New routine.
2390         (No_Elaboration_Check): Removed.
2391         (Target): New routine.
2392         (Was_Attribute_Reference): New routine.
2393         (Set_ABE_Is_Certain): Removed.
2394         (Set_Is_Declaration_Level_Node): New routine.
2395         (Set_Is_Dispatching_Call): New routine.
2396         (Set_Is_Elaboration_Checks_OK_Node): New routine.
2397         (Set_Is_Initialization_Block): New routine.
2398         (Set_Is_Known_Guaranteed_ABE): New routine.
2399         (Set_Is_Recorded_Scenario): New routine.
2400         (Set_Is_Source_Call): New routine.
2401         (Set_Is_SPARK_Mode_On_Node): New routine.
2402         (Set_No_Elaboration_Check): Removed.
2403         (Set_Target): New routine.
2404         (Set_Was_Attribute_Reference): New routine.
2405         * sinfo.ads: Remove attribute ABE_Is_Certain.  Attribute
2406         Do_Discriminant_Check now utilizes Flag3.  Attribute
2407         No_Side_Effect_Removal now utilizes Flag17.  Add new node
2408         N_Call_Marker.  Update the structure of various nodes.
2409         (ABE_Is_Certain): Removed along with pragma Inline.
2410         (Is_Declaration_Level_Node): New routine along with pragma Inline.
2411         (Is_Dispatching_Call): New routine along with pragma Inline.
2412         (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
2413         (Is_Initialization_Block): New routine along with pragma Inline.
2414         (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2415         (Is_Recorded_Scenario): New routine along with pragma Inline.
2416         (Is_Source_Call): New routine along with pragma Inline.
2417         (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2418         (No_Elaboration_Check): Removed along with pragma Inline.
2419         (Target): New routine along with pragma Inline.
2420         (Was_Attribute_Reference): New routine along with pragma Inline.
2421         (Set_ABE_Is_Certain): Removed along with pragma Inline.
2422         (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
2423         (Set_Is_Dispatching_Call): New routine along with pragma Inline.
2424         (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
2425         Inline.
2426         (Set_Is_Initialization_Block): New routine along with pragma Inline.
2427         (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2428         (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
2429         (Set_Is_Source_Call): New routine along with pragma Inline.
2430         (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2431         (Set_No_Elaboration_Check): Removed along with pragma Inline.
2432         (Set_Target): New routine along with pragma Inline.
2433         (Set_Was_Attribute_Reference): New routine along with pragma Inline.
2434         * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
2436 2017-10-09  Bob Duff  <duff@adacore.com>
2438         * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
2440 2017-10-09  Bob Duff  <duff@adacore.com>
2442         * freeze.ads: Minor comment fixed.
2444 2017-10-09  Bob Duff  <duff@adacore.com>
2446         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
2447         care of unchecked conversions in addition to regular conversions. This
2448         takes care of a case where a type is derived from a private untagged
2449         type that is completed by a tagged controlled type.
2451 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2453         * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
2454         rewriting a class-wide condition, handle properly the case where the
2455         controlling argument of the operation to which the condition applies is
2456         an access to a tagged type, and the condition includes a dispatching
2457         call with an implicit dereference.
2459 2017-10-09  Bob Duff  <duff@adacore.com>
2461         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
2462         the code at the end of this procedure that was setting the type of a
2463         class-wide object to the specific type returned by a function call.
2464         Treat this case as indefinite instead.
2466 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2468         * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
2469         Suppress spurious ambiguity error when two traversals of the homonym
2470         chain (first directly, and then through an examination of relevant
2471         interfaces) retrieve the same operation, when other irrelevant homonyms
2472         of the operatioh are also present.
2474 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2476         * sem_util.adb (Object_Access_Level): If the object is the return
2477         statement of an expression function, return the level of the function.
2478         This is relevant when the object involves an implicit conversion
2479         between access types and the expression function is a completion, which
2480         forces the analysis of the expression before rewriting it as a body, so
2481         that freeze nodes can appear in the proper scope.
2483 2017-10-09  Bob Duff  <duff@adacore.com>
2485         * atree.adb: Make nnd apply to everything "interesting", including
2486         Rewrite.  Remove rrd.
2488 2017-10-09  Javier Miranda  <miranda@adacore.com>
2490         * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
2491         processing the declaration of the dummy object internally created by
2492         Make_DT to compute the offset to the top of components referencing
2493         secondary dispatch tables.
2494         (Initialize_Tag): Do not initialize the offset-to-top field if it has
2495         been initialized initialized.
2496         * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
2497         * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
2498         (Make_DT): Create a dummy constant object if we can statically build
2499         secondary dispatch tables.
2500         (Make_Secondary_DT): For statically allocated secondary dispatch tables
2501         use the dummy object to compute the offset-to-top field value by means
2502         of the attribute 'Position.
2504 2017-10-09  Bob Duff  <duff@adacore.com>
2506         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
2507         code so if BIPAlloc is not passed in, it will likely raise
2508         Program_Error instead of cause miscellaneous chaos.
2509         (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
2510         as for the other Is_B-I-P... functions.
2511         * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
2512         aggregate whose ancestor part is a build-in-place call returning a
2513         nonlimited type, transform the assignment to the ancestor part to use a
2514         temp.
2515         * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
2516         creating an Itype for a library unit entity.
2517         (Check_Initialization): Avoid spurious error message on
2518         internally-generated call.
2519         * sem_ch5.adb (Analyze_Assignment): Handle the case where the
2520         right-hand side is a build-in-place call. This didn't happen when b-i-p
2521         was only for limited types.
2522         * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
2523         implies >= Ada 2005.
2524         * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
2525         repeatedly.
2526         * sem_util.adb (Next_Actual): Handle case of build-in-place call.
2528 2017-10-09  Arnaud Charlet  <charlet@adacore.com>
2530         * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
2532 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
2534         * libgnarl/s-taprob.adb: Minor whitespace fix.
2536 2017-10-09  Bob Duff  <duff@adacore.com>
2538         * namet.ads: Minor comment fix.
2540 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
2542         * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
2543         just like other program units listed in Ada RM 10.1(1).
2545 2017-10-09  Justin Squirek  <squirek@adacore.com>
2547         * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
2549 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2551         * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
2552         actual for a formal package is an instantiation of a child unit, create
2553         a freeze node for the instance of the parent if it appears in the same
2554         scope and is not frozen yet.
2556 2017-10-09  Pierre-Marie de Rodat  <derodat@adacore.com>
2558         * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
2559         in-source documentation for tagged types's Offset_To_Top.
2561 2017-10-09  Bob Duff  <duff@adacore.com>
2563         * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
2564         confusing.  Same for N_Loc.  Remove assumption that b-i-p implies
2565         limited.  This is for the case of a function call that occurs as the
2566         default for a record component.
2567         (Expand_N_Object_Declaration): Deal with the case where expansion has
2568         created an object declaration initialized with something like
2569         F(...)'Reference.
2570         * exp_ch3.adb: Minor reformatting.
2572 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2574         * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
2575         the attribute is an object, but it may appear within a conversion. The
2576         object itself must be retrieved when generating the range test that
2577         implements the validity check on a scalar type.
2579 2017-10-05  Eric Botcazou  <ebotcazou@adacore.com>
2581         PR ada/82393
2582         * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
2583         * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
2585 2017-10-02  Eric Botcazou  <ebotcazou@adacore.com>
2586             Pierre-Marie de Rodat  <derodat@adacore.com>
2588         PR ada/82384
2589         * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
2590         (time_t): Change from derived type to subtype.
2591         (timeval): Use suseconds_t for tv_usec.
2592         * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
2594 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
2596         * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
2597         handling the form (plus/mult (convert @0) @1).
2599 2017-09-29  Bob Duff  <duff@adacore.com>
2601         * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
2602         what we had before.
2603         (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
2604         change. Set the Etype in the class-wide case. This fixes a regression
2605         in the libadalang test suite.
2607 2017-09-29  Joel Brobecker  <brobecker@adacore.com>
2609         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2610         doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
2611         in comment markup.
2612         * gnat_ugn.texi: Regenerate.
2614 2017-09-29  Justin Squirek  <squirek@adacore.com>
2616         * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
2617         fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
2618         gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
2619         sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
2620         for checking source file status and error message and/or call to
2621         Read_Source_File.
2622         * libgnat/s-os_lib.ads: Add new potential value constant for
2623         uninitialized file descriptors.
2624         * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
2625         return result of IO to encompass a read access failure in addition to a
2626         file-not-found error.
2628 2017-09-29  Bob Duff  <duff@adacore.com>
2630         * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
2631         functions returning nonlimited types. Allow for qualified expressions
2632         and type conversions.
2633         (Expand_N_Extended_Return_Statement): Correct the computation of
2634         Func_Bod to allow for child units.
2635         (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
2636         limited (initialization of In_Place_Expansion), and implies >= Ada
2637         2005.
2638         (Is_Build_In_Place_Result_Type): New function to accompany
2639         Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
2640         sometimes we just have the type on our hands, not the function.  For
2641         now, does the same thing as the old version, so build-in-place is
2642         disabled for nonlimited types, except that you can use -gnatd.9 to
2643         enable it.
2644         * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
2645         accompany Is_Build_In_Place_Function and
2646         Is_Build_In_Place_Function_Call, because sometimes we just have the
2647         type on our hands, not the function.
2648         (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
2649         cases.
2650         (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
2651         questionable code at the end that was setting the Etype.
2652         * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
2653         determine whether "return (...agg...);" is returning from a
2654         build-in-place function.
2655         (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
2656         Remove assumption that b-i-p implies limited (initialization of
2657         In_Place_Expansion).
2658         (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
2659         an unchecked conversion.  Add assertions.
2660         (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
2661         secondary stack here, just because the type needs finalization.  That
2662         code is obsolete.
2663         (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
2664         For "return (...agg...);" don't assume b-i-p implies limited.
2665         Needs_Finalization does not imply secondary stack.
2666         (Expand_Array_Aggregate): Named notation.  Reverse the sense of
2667         Component_OK_For_Backend -- more readability with fewer double
2668         negatives.
2669         * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
2670         b-i-p implies >= Ada 2005.
2671         * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
2672         b-i-p implies >= Ada 2005.  Remove Adjust if we're building the return
2673         object of an extended return statement in place.
2674         * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
2675         Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
2676         b-i-p implies >= Ada 2005.
2677         * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
2678         b-i-p implies >= Ada 2005.
2679         * exp_ch7.adb: Comment fix.
2680         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
2681         assumptions that b-i-p implies >= Ada 2005.
2682         * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
2683         b-i-p implies >= Ada 2005.
2684         * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
2685         (Expr), in case Pool_Id is not set.
2686         (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
2687         qualified or converted.
2688         (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
2689         (Param)) = N_Identifier; that's all it could be.
2690         * sinfo.ads: Comment fixes.
2691         * snames.ads-tmpl: Comment fixes.
2692         * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
2694 2017-09-29  Justin Squirek  <squirek@adacore.com>
2696         * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
2697         all cases related to marking entity identifiers.
2699 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
2701         * adaint.c (win32_wait): Properly handle error and take into account
2702         the WIN32 limitation on the number of simultaneous wait objects.
2704 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
2706         * cal.c: Minor proofreading.
2708 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
2710         * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
2711         * gnat_ugn.texi: Regenerate.
2713 2017-09-29  Bob Duff  <duff@adacore.com>
2715         * lib-xref.ads: Comment fix.
2717 2017-09-29  Bob Duff  <duff@adacore.com>
2719         * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
2720         Discriminants can't need finalization.
2722 2017-09-29  Ed Schonberg  <schonberg@adacore.com>
2724         * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
2725         for types in expression if the function is within a generic unit.
2726         * sem_res.adb (Resolve): In a generic context do not freeze an
2727         expression, unless it is an entity. This exception is solely for the
2728         purpose of detecting illegal uses of deferred constants in generic
2729         units.
2730         * sem_res.adb: Minor reformatting.
2732 2017-09-29  Justin Squirek  <squirek@adacore.com>
2734         * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
2735         redundant warnings.
2737 2017-09-29  Yannick Moy  <moy@adacore.com>
2739         * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
2741 2017-09-29  Eric Botcazou  <ebotcazou@adacore.com>
2743         * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
2744         * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
2745         Document the effect of pragma Optimize_Alignment (Space) on non-packed
2746         record types.
2747         * gnat_rm.texi: Regenerate.
2749 2017-09-25  Justin Squirek  <squirek@adacore.com>
2751         * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
2752         exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
2753         gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
2754         gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
2755         libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
2756         libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
2757         libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
2758         libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
2759         libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
2760         libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
2761         put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
2762         sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
2763         Removal of ineffective use-clauses.
2764         * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
2765         constant folded barriers.
2766         * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
2767         Subtype_Marks and Names list in use-clause nodes to their new singular
2768         counterparts (e.g. Subtype_Mark, Name).
2769         * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
2770         Prev_Ids and More_Ids in use-clause nodes.
2771         (P_Use_Clause): Modify to take a list as a parameter.
2772         (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
2773         subtype_marks within an aggregate use-clauses into individual clauses.
2774         * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
2775         P_Use_Clause to match its new behavior.
2776         * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
2777         * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
2778         errors.
2779         * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
2780         Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
2781         the declarative region.
2782         * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
2783         after analysis (Analyze_Package_Specification): Update use clause chain
2784         when there is no body.
2785         * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
2786         parameter to determine weither the installation of scopes should also
2787         propagate on the use-clause "chain".
2788         (Mark_Use_Clauses): Created to traverse use-clause chains and determine
2789         what constitutes a valid "use" of a clause.
2790         (Update_Use_Clause_Chain): Created to aggregate common machinary used
2791         to clean up use-clause chains (and warn on ineffectiveness) at the end
2792         of declaritive regions.
2793         * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
2794         package name from a use-package clause.
2795         (Analyze_Package_Name_List): Created to perform analysis on a list of
2796         package names (similar to Analyze_Package_Name).
2797         (Find_Most_Prev): Created to traverse to the beginning of a given
2798         use-clause chain.
2799         (Most_Decendant_Use_Clause): Create to identify which clause from a
2800         given set is highest in scope (not always the most prev).
2801         (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
2802         handle the new chaining algorithm, also many changes related to
2803         redundant clauses. A new parameter has also been added to force
2804         installation to handle certain cases.
2805         * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
2806         Analyze_Task_Body): Mark use clauses on relevant entities.
2807         * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
2808         Install_Parents): Add parameter to determine weither the installation
2809         of scopes should also propagate on the use-clause "chain".
2810         * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
2811         Install_Context to avoid redundant chaining of use-clauses.
2812         * sem_ch13.adb: Minor reformatting.
2813         * sem_res.adb (Resolve): Mark use clauses on operators.
2814         (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
2815         entities.
2816         * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
2817         Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
2818         represent any given clause's usage/reference/necessity.
2819         (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
2820         nodes to allow loose chaining of redundant clauses.
2821         (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
2822         Set_More_Ids, Set_Name): Modify set procedure calls to reflect
2823         reorganization in node fields.
2824         * types.ads (Source_File_Index): Adjust index bounds.
2825         (No_Access_To_Source_File): New constant.
2827 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2829         * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
2830         the expression to be used in the generated attribute specification
2831         (rather than relocating it) to avoid resolving a potentially malformed
2832         tree when the expression is resolved through an ASIS-specific call to
2833         Resolve_Aspect_Expressions.  This manifests itself as a crash on a
2834         function with parameter associations.
2836 2017-09-25  Yannick Moy  <moy@adacore.com>
2838         * exp_spark.adb (Expand_SPARK_Indexed_Component,
2839         Expand_SPARK_Selected_Component): New procedures to insert explicit
2840         dereference if required.
2841         (Expand_SPARK): Call the new procedures.
2843 2017-09-25  Patrick Bernardi  <bernardi@adacore.com>
2845         * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
2846         libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
2847         libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
2848         libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
2849         libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
2851 2017-09-25  Vasiliy Fofanov  <fofanov@adacore.com>
2853         * adaint.c (win32_wait): Properly handle error and take into account
2854         the WIN32 limitation on the number of simultaneous wait objects.
2856 2017-09-25  Yannick Moy  <moy@adacore.com>
2858         * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
2859         invariant procedure in GNATprove mode.
2860         * sem_ch5.adb (Analyze_Assignment): Likewise.
2862 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
2864         * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
2865         "back-end" in comments.
2867 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2869         * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
2870         call that appears in a classwide precondition and that mentions an
2871         access formal of the subprogram, must use the accessibility level of
2872         the actual in the call. This is one case in which a reference to a
2873         formal parameter appears outside of the body of the subprogram.
2875 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2877         * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
2878         for GNATprove.
2879         (Resolve_Entry): Clean up predicate
2881 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2883         * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
2884         than Program_Error because U_E is more in line with respect to the
2885         intended behavior.
2887 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2889         * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
2890         Storage_Size does not freeze, and thus can include references to
2891         deferred constants.
2893 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2895         * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
2896         reference when it appears within a pragma of no significance to SPARK.
2897         (In_Insignificant_Pragma): New routine.
2898         * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
2900 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2902         * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
2903         actual is a renaming, indicate that it is the renamed package that must
2904         be frozen before the instantiation.
2906 2017-09-25  Yannick Moy  <moy@adacore.com>
2908         * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
2909         of dimensionality system in GNAT UG.
2910         * gnat_ugn.texi: Regenerate.
2912 2017-09-25  Yannick Moy  <moy@adacore.com>
2914         * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
2915         GNATprove_Mode when switch -gnatdF used.
2917 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
2919         * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
2920         the backend.
2922 2017-09-25  Javier Miranda  <miranda@adacore.com>
2924         * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
2925         expansion of user-defined enumeration types when the generation of
2926         names for enumeration literals is suppressed.
2928 2017-09-25  Gary Dismukes  <dismukes@adacore.com>
2930         * libgnarl/s-taprop__linux.adb: Minor reformatting.
2932 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2934         * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
2935         that appear as selector names of parameter associations, as these are
2936         never resolved by visibility.
2938 2017-09-25  Justin Squirek  <squirek@adacore.com>
2940         * sem_res.adb (Resolve_Entry): Generate reference for index entities.
2942 2017-09-25  Doug Rupp  <rupp@adacore.com>
2944         * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
2946 2017-09-25  Javier Miranda  <miranda@adacore.com>
2948         * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
2949         (Expand_User_Defined_Enumeration_Image): New subprogram.
2950         (Expand_Image_Attribute): Enable speed-optimized expansion of
2951         user-defined enumeration types when we are compiling with optimizations
2952         enabled.
2954 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
2956         * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
2957         routine is already provided by Einfo.
2958         * einfo.adb (Has_Null_Abstract_State): Replace with the body from
2959         Sem_Util, which had better comments and avoided double calls to
2960         Abstract_State.
2962 2017-09-25  Bob Duff  <duff@adacore.com>
2964         * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
2966 2017-09-25  Doug Rupp  <rupp@adacore.com>
2968         * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
2969         (Compute_Base_Monotonic_Clock): New function.
2970         (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
2971         (Timed_Delay): Likewise.
2972         (Monotonic_Clock): Likewise.
2973         * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
2975 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2977         * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
2978         previous change.
2980 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2982         * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
2983         Minor reformatting.
2985 2017-09-20  Alexandre Oliva <aoliva@redhat.com>
2987         * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
2989 2017-09-18  Bob Duff  <duff@adacore.com>
2991         * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
2992         reference types in the access-to-access case.
2994 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
2996         * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
2997         of the "aliased" keyword on the prefix from here to...
2998         (Resolve_Attribute) <Attribute_Access>: ...here.  Remove useless call
2999         to Check_No_Implicit_Aliasing.
3000         * sinfo.ads (Non_Aliased_Prefix): Delete.
3001         (Set_Non_Aliased_Prefix): Likewise.
3002         * sinfo.adb (Non_Aliased_Prefix): Delete.
3003         (Set_Non_Aliased_Prefix): Likewise.
3005 2017-09-18  Bob Duff  <duff@adacore.com>
3007         * exp_ch5.adb (Build_Formal_Container_Iteration,
3008         Expand_Formal_Container_Element_Loop): Convert the container to the
3009         root type before passing it to the iteration operations, so it will be
3010         of the right type.
3012 2017-09-18  Bob Duff  <duff@adacore.com>
3014         * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
3016 2017-09-18  Bob Duff  <duff@adacore.com>
3018         * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
3019         and it's a bit-packed array, pass False to the Consider_IS parameter of
3020         Needs_Simple_Initialization.
3022 2017-09-18  Hristian Kirtchev  <kirtchev@adacore.com>
3024         * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
3025         the preexisting body.
3026         * sem_prag.adb (Check_Inline_Always_Placement): New routine.
3027         (Process_Inline): Verify the placement of pragma Inline_Always. The
3028         pragma must now appear on the initial declaration of the related
3029         subprogram.
3031 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
3033         * sem_ch3.adb (Analyze_Declarations): In ASIS mode,  At the end of the
3034         declarative list in a subprogram body, analyze aspext specifications to
3035         provide basic semantic information, because otherwise the aspect
3036         specifications might only be snalyzed during expansion, when related
3037         subprograms are generated.
3039 2017-09-18  Bob Duff  <duff@adacore.com>
3041         * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
3042         validity checks have rewritten the tree.
3044 2017-09-18  Bob Duff  <duff@adacore.com>
3046         * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
3048 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
3050         * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
3051         qualified exxpression for an aggregate in a generic unit, verify that
3052         the scope of the type is itself visible and not hidden, so that the
3053         qualified expression is correctly resolved in any instance.
3055 2017-09-18  Bob Duff  <duff@adacore.com>
3057         * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
3058         mark refers to the current instance. Set the type to Any_Type in that
3059         case, to avoid later crashes.
3061 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
3063         * exp_ch3.adb (Replace_Discriminant_References): New procedure,
3064         subsidiary of Build_Assignment, used to handle the initialization code
3065         for a mutable record component whose default value is an aggregate that
3066         sets the values of the discriminants of the components.
3068 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
3070         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
3071         the entity as being volatile for an overlay that toggles the scalar
3072         storage order.
3074 2017-09-18  Fedor Rybin  <frybin@adacore.com>
3076         * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
3077         options -U main and --harness-only are not compatible.
3079 2017-09-18  Hristian Kirtchev  <kirtchev@adacore.com>
3081         * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
3083 2017-09-18  Piotr Trojanek  <trojanek@adacore.com>
3085         * einfo.ads (Is_Imported): Update comment, as this
3086         routine also applies to constants.
3088 2017-09-18  Yannick Moy  <moy@adacore.com>
3090         * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
3091         holding state.
3093 2017-09-18  Justin Squirek  <squirek@adacore.com>
3095         * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
3096         constant indication for Pragma_Linker_Section.
3098 2017-09-18  Bob Duff  <duff@adacore.com>
3100         Alternate fix for PR ada/71358
3101         * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
3102         Instead, make a local copy of Config, and if it's null, allocate an
3103         empty Command_Line_Configuration_Record, so we won't crash on null
3104         pointer dereference.
3106 2017-09-16  Eric Botcazou  <ebotcazou@adacore.com>
3108         * libgnarl/a-intnam__rtems.ads: Update copyright date.
3109         * libgnarl/s-interr__hwint.adb: Likewise.
3110         * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
3111         * libgnarl/s-osinte__rtems.adb: Likewise.
3112         * libgnarl/s-osinte__rtems.ads: Likewise.
3114 2017-09-13  Nicolas Roche  <roche@adacore.com>
3116         * Make-lang.in: In the fallback mechanim, parse the associated .ali
3117         file and try to guess the locations of dependencies.
3119 2017-09-13  Eric Botcazou  <ebotcazou@adacore.com>
3121         * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
3122         the suppression status of Alignment_Check on the current scope.
3123         (Alignment_Checks_Suppressed): New function to use the saved instead of
3124         the current suppression status of Alignment_Check.
3125         (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
3126         (Analyze_Attribute_Definition_Clause): Instead of manually appending to
3127         the table, call Register_Address_Clause_Check.
3128         (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
3129         recorded address clause instead of its entity.
3131 2017-09-13  Jerome Guitton  <guitton@adacore.com>
3133         * libgnarl/s-tpopsp__vxworks-tls.adb,
3134         libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
3135         (Self): Register thread if task id is null.
3137 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
3139         * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
3141 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
3143         * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
3144         from an entity to only scope index, as a mapping from an entity to the
3145         same entity was useless.
3146         (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
3147         to E.
3148         (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
3149         to E.
3150         (Is_Constant_Object_Without_Variable_Input): remove local "Result"
3151         variable, just use return statements.
3153 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
3155         * libgnarl/s-vxwext__kernel-smp.adb,
3156         libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
3157         New file.
3159 2017-09-13  Hristian Kirtchev  <kirtchev@adacore.com>
3161         * einfo.adb: Flag42 is now Is_Controlled_Active.
3162         (Is_Controlled): This attribute is now synthesized.
3163         (Is_Controlled_Active): This attribute is now an explicit flag rather
3164         than a synthesized attribute.   (Set_Is_Controlled): Removed.
3165         (Set_Is_Controlled_Active): New routine.
3166         (Write_Entity_Flags): Update the output for Flag42.
3167         * einfo.ads: Update the documentation of the following attributes:
3168         Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
3169         and Is_Controlled_Active have swapped their functionality.
3170         (Is_Controlled): Renamed to Is_Controlled_Active.
3171         (Is_Controlled_Active): Renamed to Is_Controlled.
3172         (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
3173         * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
3174         Is_Controlled.
3175         * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
3176         (Needs_Finalization): Code clean up. Remove the tests for
3177         Disable_Controlled because a) they were incorrect as they would reject
3178         a type which is sublect to the aspect, but may contain controlled
3179         components, and b) they are no longer necessary.
3180         * exp_util.ads (Needs_Finalization): Update comment on documentation.
3181         * freeze.adb (Freeze_Array_Type): Restore the original use of
3182         Is_Controlled.
3183         (Freeze_Record_Type): Restore the original use of Is_Controlled.
3184         * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
3185         Is_Controlled.
3186         (Array_Type_Declaration): Restore the original use of Is_Controlled.
3187         (Build_Derived_Private_Type): Restore the original use of
3188         Is_Controlled.
3189         (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
3190         type derived from Ada.Finalization.[Limited_]Controlled.
3191         (Build_Derived_Type): Restore the original use of Is_Controlled.
3192         (Record_Type_Definition): Restore the original use of Is_Controlled.
3193         * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
3194         Is_Controlled.
3195         * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
3196         (Analyze_Aspect_Specifications): Use routine
3197         Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
3199 2017-09-13  Vincent Celier  <celier@adacore.com>
3201         * clean.adb (Gnatclean): Fix error when looking for target
3202         of <target>-gnatclean
3204 2017-09-13  Javier Miranda  <miranda@adacore.com>
3205             Ed Schonberg  <schonberg@adacore.com>
3207         * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
3208         expanded name that designates the current instance of a child unit in
3209         its own body and appears as the prefix of a reference to an entity
3210         local to the child unit.
3212 2017-09-12  Bob Duff  <duff@adacore.com>
3214         * sem_warn.adb: Minor comment.
3216 2017-09-12  Bob Duff  <duff@adacore.com>
3218         * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
3219         libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
3220         be Default_Initialized_Item, and apply pragma Unmodified to it,
3221         to suppress the warning.
3223 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
3225         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
3226         for access types.
3228 2017-09-12  Yannick Moy  <moy@adacore.com>
3230         * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
3231         together with Global when ignoring one in CodePeer mode.
3233 2017-09-12  Javier Miranda  <miranda@adacore.com>
3235         * sem_ch3.adb (Analyze_Declarations): In nested
3236         package declarations that have a private part enable missing check
3237         of the RM rule 13.1.1(11/3): usage names in aspect definitions are
3238         resolved at the end of the immediately enclosing declaration list.
3240 2017-09-12  Bob Duff  <duff@adacore.com>
3242         * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
3243         Empty.
3245 2017-09-12  Georges-Axel Jaloyan  <jaloyan@adacore.com>
3247         * debug.adb: Reserving flag -gnatdF for safe pointer checking.
3248         * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
3249         dF flag.
3250         * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
3251         in preparation for the evolution of the SPARK language that
3252         includes a pointer analysis for checking non-aliasing of access
3253         types. The Check_Safe_Pointers function is the entry point, and
3254         will traverse the AST and raise compile-time errors everytime
3255         it detects non-begign aliasing.  Detailed comments are present
3256         in the sem_spark.ads file.
3257         * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
3258         functions to iterate over the list of globals of a subprogram.
3259         * libgnat/system.ads: Add restriction No_Finalization.
3260         * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
3261         dependency on g-dynhta.adb.
3263 2017-09-12  Bob Duff  <duff@adacore.com>
3265         * sem_ch6.adb (Analyze_Expression_Function): Call
3266         Check_Dynamically_Tagged_Expression.
3267         * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
3268         "and then Is_Tagged_Type (Typ)" because there is an earlier
3269         "Assert (Is_Tagged_Type (Typ))".
3271 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
3273         * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
3275 2017-09-11  Arnaud Charlet  <charlet@adacore.com>
3277         * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
3278         * doc/gnat_ugn/platform_specific_information.rst: Remove doc
3279         for no longer supported platforms.
3280         * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
3281         description of the semantics for dimensionality analysis.
3282         * gnat_ugn.texi: Regenerated.
3284 2017-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3286         * freeze.adb (Has_Incomplete_Compoent): Delete.
3287         (Freeze_Profile):
3288         Do not inhibit the freezing of the profile of an expression
3289         function here.
3290         (Freeze_Subprogram): Do not re-create extra formals.
3291         * sem_ch6.adb (Analyze_Expression_Function): Always
3292         pre-analyze the expression if the function is not a completion.
3293         (Analyze_Subprogram_Body_Helper): For the body generated
3294         from an expression function that is not a completion, do
3295         not freeze the profile and temporary mask the types declared
3296         outside the expression that are not yet frozen.
3297         * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
3298         during the pre-analysis of an expression function.
3300 2017-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3302         * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
3303         (gigi): Likewise.
3305 2017-09-11  Yannick Moy  <moy@adacore.com>
3307         * lib-xref-spark_specific.adb: Minor rewrite.
3309 2017-09-11  Jerome Lambourg  <lambourg@adacore.com>
3311         * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
3312         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
3313         renaming into account.
3315 2017-09-11  Jerome Lambourg  <lambourg@adacore.com>
3317         * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
3318         * gcc-interface/Makefile.in: Take this renaming into account.
3320 2017-09-11  Arnaud Charlet  <charlet@adacore.com>
3322         * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
3323         longer used.
3325 2017-09-11  Yannick Moy  <moy@adacore.com>
3327         * sem_util.adb (Check_Result_And_Post_State):
3328         Do not issue a warning about missing reference to an outcome if
3329         the subprogram is ghost and has no outputs.
3330         * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
3331         reformatting.
3333 2017-09-11  Yannick Moy  <moy@adacore.com>
3335         * gnat1drv.adb (Adjust_Global_Switches): Set
3336         Check_Validity_Of_Parameters to False in GNATprove mode.
3337         * opt.ads (Check_Validity_Of_Parameters): Document switch to
3338         set option.
3340 2017-09-09  Pierre-Marie de Rodat  <derodat@adacore.com>
3342         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
3343         generate debug info for inner record types if -fgnat-encodings=minimal.
3344         (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
3345         type as the debug type.
3347 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3349         * gcc-interface/decl.c (components_to_record): Do not reorder in non-
3350         packed record types if pragma Optimize_Alignment (Space) is enabled.
3352 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3354         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
3355         limits for expression functions.
3356         (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
3358 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3360         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
3361         layout of the record from the parent type only if both are or are not
3362         unchecked unions.
3363         (is_stored_discriminant): Return false for an unchecked union.
3365 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3367         * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
3368         return NULL_EXPR.
3370 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3372         * gcc-interface/decl.c (promote_object_alignment): New function taken
3373         from...
3374         (gnat_to_gnu_entity) <E_Variable>: ...here.  Invoke it.
3375         (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
3376         create a padding type on success before doing the atomic check.
3378 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3380         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
3381         promotion to static memory earlier in the processing.
3383 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3385         * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
3386         and TYPE_BY_REFERENCE_P flags on types after various promotions.
3387         * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
3388         Consider all kinds of entities.
3390 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3392         * gcc-interface/utils.c (convert): When converting to a padding type,
3393         reuse an existing CONSTRUCTOR if it has got the right size.
3395 2017-09-08  Nicolas Roche  <roche@adacore.com>
3397         * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
3398         source in libgnat/
3399         * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
3400         a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
3401         i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
3402         a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
3403         a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
3404         s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
3405         a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
3406         s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
3407         a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
3408         a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
3409         a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
3410         a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
3411         a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
3412         s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
3413         a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
3414         s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
3415         s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
3416         a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
3417         a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
3418         system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
3419         a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
3420         a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
3421         s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
3422         g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
3423         g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
3424         g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
3425         a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
3426         calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
3427         a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
3428         a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
3429         a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
3430         a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
3431         directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
3432         system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
3433         system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
3434         a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
3435         system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
3436         g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
3437         a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
3438         s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
3439         s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
3440         g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
3441         a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
3442         a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
3443         g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
3444         a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
3445         a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
3446         a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
3447         g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
3448         a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
3449         a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
3450         s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
3451         a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
3452         s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
3453         s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
3454         s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
3455         a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
3456         system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
3457         s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
3458         g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
3459         g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
3460         s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
3461         s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
3462         g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
3463         g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
3464         g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
3465         system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
3466         g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
3467         g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
3468         s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
3469         i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
3470         g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
3471         s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
3472         g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
3473         s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
3474         a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
3475         a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
3476         g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
3477         s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
3478         g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
3479         g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
3480         a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
3481         a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
3482         s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
3483         s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
3484         a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
3485         a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
3486         a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
3487         s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
3488         s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
3489         s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
3490         a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
3491         a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
3492         s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
3493         a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
3494         a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
3495         s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
3496         a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
3497         g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
3498         a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
3499         a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
3500         s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
3501         a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
3502         g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
3503         a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
3504         s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
3505         system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
3506         a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
3507         a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
3508         s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
3509         s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
3510         g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
3511         s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
3512         g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
3513         system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
3514         g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
3515         g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
3516         a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
3517         a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
3518         g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
3519         a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
3520         system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
3521         s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
3522         g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
3523         a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
3524         a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
3525         a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
3526         s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
3527         s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
3528         g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
3529         a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
3530         a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
3531         a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
3532         a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
3533         g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
3534         g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
3535         a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
3536         g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
3537         a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
3538         s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
3539         a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
3540         s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
3541         s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
3542         a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
3543         s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
3544         a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
3545         s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
3546         g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
3547         g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
3548         a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
3549         s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
3550         a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
3551         a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
3552         a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
3553         s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
3554         s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
3555         a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
3556         a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
3557         system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
3558         s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
3559         a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
3560         a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
3561         s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
3562         s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
3563         a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
3564         a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
3565         i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
3566         s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
3567         a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
3568         s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
3569         g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
3570         s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
3571         a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
3572         a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
3573         a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
3574         a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
3575         s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
3576         a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
3577         a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
3578         a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
3579         g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
3580         s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
3581         g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
3582         a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
3583         system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
3584         a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
3585         s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
3586         a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
3587         g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
3588         i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
3589         s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
3590         a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
3591         g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
3592         s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
3593         s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
3594         a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
3595         a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
3596         a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
3597         a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
3598         a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
3599         g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
3600         s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
3601         a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
3602         a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
3603         a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
3604         s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
3605         s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
3606         s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
3607         s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
3608         g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
3609         a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
3610         s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
3611         a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
3612         a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
3613         a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
3614         s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
3615         a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
3616         s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
3617         a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
3618         g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
3619         i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
3620         s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
3621         s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
3622         a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
3623         s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
3624         s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
3625         s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
3626         s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
3627         a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
3628         s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
3629         a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
3630         s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
3631         s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
3632         s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
3633         s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
3634         s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
3635         a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
3636         g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
3637         a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
3638         s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
3639         system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
3640         g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
3641         a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
3642         a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
3643         a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
3644         s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
3645         a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
3646         g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
3647         a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
3648         s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
3649         a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
3650         a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
3651         a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
3652         a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
3653         s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
3654         g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
3655         g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
3656         system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
3657         s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
3658         s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
3659         a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
3660         g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
3661         a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
3662         s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
3663         s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
3664         s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
3665         unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
3666         s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
3667         g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
3668         a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
3669         s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
3670         a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
3671         a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
3672         to libgnat subdirectory.
3674 2017-09-08  Yannick Moy  <moy@adacore.com>
3676         * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
3677         return the entity associated with the call.
3678         * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
3679         Replace the internal Get_Function_Id with the new
3680         Sem_Aux.Get_Called_Entity.
3681         (Iterate_Call_Parameters): New
3682         procedure to iterate on formals and actuals at the same time.
3683         * sem_ch12.adb (Analyze_Subprogram_Instantiation):
3684         Set SPARK_Mode from spec when set, for analysis
3685         of instance. Restore after analysis of instance.
3686         (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
3687         set, for analysis of body instance. Restored automatically at
3688         the end of the subprogram.
3689         * gnat1drv.adb (Adjust_Global_Switches): Set
3690         Check_Validity_Of_Parameters to False in GNATprove mode.
3691         * opt.ads (Check_Validity_Of_Parameters): Document switch to
3692         set option.
3694 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3696         * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
3697         (New_Copy_Tree): ...there.  Reset the hash tables only if they
3698         were used in the previous invocation.
3699         * s-htable.adb: Fix typo.
3701 2017-09-08  Bob Duff  <duff@adacore.com>
3703         * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
3705 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3707         * sem_aggr.adb: minor style fix.
3709 2017-09-08  Bob Duff  <duff@adacore.com>
3711         * sprint.adb (Write_Corresponding_Source): Ignore if there is
3712         no current source file.
3713         (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
3714         Print something helpful in case N is invalid.
3715         * sprint.ads: Minor comment fix.
3717 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3719         * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
3720         access types.
3722 2017-09-08  Bob Duff  <duff@adacore.com>
3724         * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
3725         Ada_2020, along the same lines as the other Ada version pragmas.
3727 2017-09-08  Gary Dismukes  <dismukes@adacore.com>
3729         * sem_ch12.adb: Minor typo fixes and reformatting.
3731 2017-09-08  Yannick Moy  <moy@adacore.com>
3733         * sem_aggr.adb (Resolve_Record_Aggregate):
3734         Rewrite bounds of aggregate subexpressions which may depend on
3735         discriminants of the enclosing aggregate.
3737 2017-09-08  Yannick Moy  <moy@adacore.com>
3739         * sem_ch5.adb: Prevent assertion failure on illegal code.
3741 2017-09-08  Yannick Moy  <moy@adacore.com>
3743         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
3744         calling Renamed_Entity on an entity which cannot be a renaming.
3746 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3748         * exp_aggr.adb: Add with & use clause for Urealp.
3749         (Aggr_Assignment_OK_For_Backend): Accept (almost all)
3750         elementary types instead of just discrete types.
3751         * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
3752         * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
3753         Be prepared for the FP zero value in the memset case.  Add small
3754         guard.
3756 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3758         * s-htable.adb (Static_HTable.Reset): Use aggregate instead
3759         of loop.
3761 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
3763         * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
3764         of New_Copy because the latter leaves the syntactic structure of
3765         the tree inconsistent (a child is accessible through two parents)
3766         and prevents proper replication of itypes by subsequent calls
3767         to New_Copy_Tree.
3768         * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
3769         New_Copy because the latter leaves the syntactic structure of the
3770         tree inconsistent (a child is accessible through two parents)
3771         and prevents proper replication of itypes by subsequent calls
3772         to New_Copy_Tree.
3773         * sem_util.adb (In_Subtree): New routine.
3774         (New_Copy_Tree): Reimplemented.
3775         * sem_util.ads (In_Subtree): New routine.
3776         (New_Copy_Tree): Reimplemented.
3778 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3780         * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
3781         for aspect Default_Value is a static scalar value, but it does
3782         not freeze the type. Yhis allows for subsequent representation
3783         clauses for the type.
3785 2017-09-08  Javier Miranda  <miranda@adacore.com>
3787         * sem_ch8.adb (Find_Direct_Name.Undefined): Do
3788         not add entries into the undefined reference table when we are
3789         compiling with errors ignored.
3791 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3793         * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
3794         check if the instance is within an enclosing instance body. The
3795         formal package was legal in the enclosing generic, and is
3796         legal in the enclosing instantiation.  This optimisation may be
3797         applicable elsewhere, and it also removes spurious errors that
3798         may arise with on-the-fly processing  of instantiations that
3799         contain Inline_Always subprograms.
3801 2017-09-08  Vincent Celier  <celier@adacore.com>
3803         * gnatcmd.adb: Disregard empty argument of GNAT driver.
3805 2017-09-08  Justin Squirek  <squirek@adacore.com>
3807         * checks.adb (Insert_Valid_Check): Manually decorate
3808         the generated temporary for range valdity checks.
3810 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3812         * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
3814 2017-09-08  Justin Squirek  <squirek@adacore.com>
3816         * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
3817         case to handle underscore flags.
3818         * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
3819         new procedure to handle underscores.
3821 2017-09-08  Javier Miranda  <miranda@adacore.com>
3823         * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
3824         divisions with fixed point results to avoid generating twice
3825         the runtime check on divide by zero.
3826         * checks.adb (Apply_Divide_Checks): Ensure that operands are
3827         not evaluated twice (once for their runtime checks and once for
3828         their regular computation).
3830 2017-09-08  Yannick Moy  <moy@adacore.com>
3832         * sem_prag.adb (Analyze_Part_Of): Add missing
3833         return statements after issuing errors.  Add detection of
3834         out-of-order item and single concurrent type.
3836 2017-09-08  Nicolas Roche  <roche@adacore.com>
3838         * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
3839         s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
3840         s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
3841         s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
3842         a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
3843         a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
3844         s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
3845         s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
3846         a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
3847         s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
3848         s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
3849         s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
3850         s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
3851         s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
3852         s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
3853         s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
3854         s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
3855         s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
3856         a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
3857         s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
3858         s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
3859         s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
3860         s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
3861         s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
3862         s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
3863         s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
3864         s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
3865         a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
3866         s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
3867         s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
3868         s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
3869         a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
3870         s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
3871         s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
3872         s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
3873         a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
3874         s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
3875         s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
3876         s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
3877         s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
3878         s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
3879         a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
3880         g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
3881         a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
3882         g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
3883         s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
3884         s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
3885         g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
3886         s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
3887         s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
3888         s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
3889         s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
3890         a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
3891         a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
3893 2017-09-08  Arnaud Charlet <charlet@adacore.com>
3895         * doc/share/conf.py, doc/share/latex_elements.py,
3896         doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
3897         highlighting.
3899 2017-09-08  Arnaud Charlet <charlet@adacore.com>
3901         * gnat_rm.texi, gnat_ugn.texi,
3902         doc/gnat_ugn/the_gnat_compilation_model.rst,
3903         doc/gnat_ugn/getting_started_with_gnat.rst,
3904         doc/gnat_ugn/inline_assembler.rst,
3905         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3906         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
3907         doc/gnat_ugn/about_this_guide.rst,
3908         doc/gnat_ugn/platform_specific_information.rst,
3909         doc/gnat_ugn/example_of_binder_output.rst,
3910         doc/gnat_ugn/gnat_and_program_execution.rst,
3911         doc/gnat_ugn/gnat_utility_programs.rst,
3912         doc/gnat_rm/implementation_of_specific_ada_features.rst,
3913         doc/gnat_rm/interfacing_to_other_languages.rst,
3914         doc/gnat_rm/implementation_defined_aspects.rst,
3915         doc/gnat_rm/intrinsic_subprograms.rst,
3916         doc/gnat_rm/implementation_defined_characteristics.rst,
3917         doc/gnat_rm/implementation_advice.rst,
3918         doc/gnat_rm/implementation_defined_attributes.rst,
3919         doc/gnat_rm/compatibility_and_porting_guide.rst,
3920         doc/gnat_rm/standard_library_routines.rst,
3921         doc/gnat_rm/the_gnat_library.rst,
3922         doc/gnat_rm/implementation_defined_pragmas.rst,
3923         doc/gnat_rm/representation_clauses_and_pragmas.rst,
3924         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3925         doc/gnat_rm/obsolescent_features.rst,
3926         doc/gnat_rm/about_this_guide.rst,
3927         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
3928         doc/gnat_rm/implementation_of_ada_2012_features.rst,
3929         doc/gnat_ugn.rst,
3930         doc/gnat_rm.rst: Update documentation.
3932 2017-09-08  Arnaud Charlet <charlet@adacore.com>
3934         * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
3935         s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
3936         * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
3938 2017-09-08  Bob Duff  <duff@adacore.com>
3940         * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
3941         New routine to read the Tag robustly.
3942         * exp_attr.adb (Input): Change the expansion of 'Input,
3943         in the class-wide case, to call String_Input_Tag instead of
3944         String_Input_Blk_IO.
3946 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3948         * s-rident.ads (Restriction_Id): reorder enum
3949         literals, so that Pure_Barriers is no longer in range of the
3950         Cunit_Boolean_Restrictions subtype.
3952 2017-09-08  Nicolas Roche  <roche@adacore.com>
3954         * a-taster.ads, a-taster.adb: Move to libgnarl
3955         * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
3956         Add support for files in libgnarl.
3958 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3960         * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
3961         accessibility check to an interface conversion, whose purpose
3962         is to perform a pointer adjustment in a dispatching call.
3963         * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
3964         when the actual is a construct that involves a dereference of an
3965         expression that includes a formal of the enclosing subprogram,
3966         In such cases, the accessibility level of the actual is that of
3967         the corresponding formal, which is passed in as an additional
3968         actual in the outer call.
3970 2017-09-08  Bob Duff  <duff@adacore.com>
3972         * exp_intr.adb (Add_Source_Info): Do not decode
3973         file names; they were not encoded in the first place.
3975 2017-09-08  Bob Duff  <duff@adacore.com>
3977         * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
3978         exceptions instead of crashes. Check for absurdly long strings
3979         and empty strings. Empty strings cause trouble because they can
3980         have super-null ranges (e.g. 100..10), which causes Ext_Copy to
3981         be empty, which causes an array index out of bounds.
3982         * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
3983         instead of crashes.
3985 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3987         * sem_util.adb (Is_CCT_Instance): allow use in
3988         the context of protected types.
3990 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3992         * a-tigeli.adb: minor remove extra whitespace.
3994 2017-09-08  Gary Dismukes  <dismukes@adacore.com>
3996         * par-ch4.adb: Reformatting of an error message.
3998 2017-09-08  Javier Miranda  <miranda@adacore.com>
4000         * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
4001         identifiers to ensure their correct decoration of names on
4002         aspect expressions.
4004 2017-09-08  Yannick Moy  <moy@adacore.com>
4006         * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
4007         not skip a loop coming from source which is rewritten into a loop.
4009 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4011         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4012         wrapper has convention Ada, to prevent spurious warnings on
4013         unconstrained array parameters.
4015 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4017         * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
4018         (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
4020 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4022         * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
4024 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4026         * exp_intr.adb (Append_Entity_Name): Move to ...
4027         * sem_util.ads, sem_util.adb: ... here to share it.
4028         (Subprogram_Name): New subprogram, to compute the name of the enclosing
4029         subprogram/entity.
4030         * errutil.adb (Error_Msg): Fill new field Node.
4031         * erroutc.ads (Subprogram_Name_Ptr): New.
4032         (Error_Msg_Object): New field Node.
4033         * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
4034         * errout.adb (Error_Msg): New variant with node id parameter.
4035         Fill new parameter Node when emitting messages. Revert previous
4036         changes for Include_Subprogram_In_Messages.
4037         * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
4038         generating warning message.
4040 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4042         * par-ch4.adb (P_Iterated_Component_Association): Place construct
4043         under -gnat2020 flag, given that it is a future feature of
4044         the language.
4045         * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
4046         defining identifier as referenced to prevent spurious warnings:
4047         corresponding loop is expanded into one or more loops whose
4048         variable has the same name, and the expression uses those names
4049         and not the original one.
4051 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4053         * sem_elab.adb (Check_A_Call): Do not consider
4054         references to internal variables for SPARK semantics.
4056 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4058         * inline.adb (In_Package_Spec): refine type of
4059         the parameter from Node_Id to Entity_Id.
4061 2017-09-08  Justin Squirek  <squirek@adacore.com>
4063         * exp_ch5.adb (Expand_Formal_Container_Loop):
4064         Reset the scope of the loop parameter after it is reanalyzed.
4066 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4068         * sem_util.ads (Set_Rep_Info): New inline procedure.
4069         * sem_util.adb (Set_Rep_Info): Implement it.
4070         * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
4071         always copy the representation aspects onto the subtype.
4073 2017-09-08  Georges-Alex Jaloyan  <jaloyan@adacore.com>
4075         * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
4076         Correction of the return type from access type to option type.
4077         (Simple_HTable): Moving the Instance_Data to ads file.
4079 2017-09-08  Yannick Moy  <moy@adacore.com>
4081         * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
4083 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4085         * opt.ads (Include_Subprogram_In_Messages): New variable.
4086         * errout.ads (Current_Subprogram_Ptr): New variable.
4087         * errout.adb (Error_Msg): Prepend current subprogram info
4088         in messages if Include_Subprogram_In_Messages is set.
4089         * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
4090         Current_Subprogram.
4091         * gnat1drv.adb (Adjust_Global_Switches): Set
4092         Include_Subprogram_In_Messages when -gnatdJ is set.
4093         * debug.adb: Document and reserve -gnatdJ.
4095 2017-09-08  Georges-Axel Jaloyan  <jaloyan@adacore.com>
4097         * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
4098         functions to iterate over simple hastables.
4099         (Load_Factor_HTable): Remove obsolete and inefficient implementation.
4101 2017-09-08  Javier Miranda  <miranda@adacore.com>
4103         * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
4104         missing checks on the presence of Entity() before checking the
4105         entity attributes.
4107 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4109         * sem_ch6.adb (Analyze_Expression_Function): Reorder some
4110         statements, use local variable and remove unnecessary processing.
4112 2017-09-08  Javier Miranda  <miranda@adacore.com>
4114         * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
4115         subprogram.
4116         (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
4117         (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4118         subprogram.
4119         (Unqual_BIP_Iface_Function_Call): New subprogram.
4120         * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
4121         subprogram containing code that was previously inside
4122         Make_Build_In_Place_Call_In_Object_Declaration since it is also
4123         required for one of the new subprograms.
4124         (Expand_Actuals):
4125         Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
4126         (Expand_N_Extended_Return_Statement): Extend the
4127         cases covered by an assertion on expected BIP object
4128         declarations.
4129         (Make_Build_In_Place_Call_In_Assignment):
4130         Removing unused code; found working on this ticket.
4131         (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
4132         that replaces the internal name of the renaming declaration
4133         into the new subprogram Replace_Renaming_Declaration_Id.
4134         (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
4135         (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
4136         New subprogram.
4137         (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4138         subprogram.
4139         (Unqual_BIP_Iface_Function_Call): New subprogram.
4140         * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
4141         subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
4142         * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
4143         subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4144         * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
4145         subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
4146         (Expand_N_Indexed_Component): Invoke the new subprogram
4147         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4148         (Expand_N_Selected_Component): Invoke the new subprogram
4149         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4150         (Expand_N_Slice): Invoke the new subprogram
4151         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4152         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
4153         Invoke the new subprogram
4154         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4156 2017-09-08  Javier Miranda  <miranda@adacore.com>
4158         * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
4159         access to interface types.  Remove also the accessibility check.
4161 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4163         * sem_ch6.adb (Freeze_Expr_Types): Really freeze
4164         all the types that are referenced by the expression.
4165         (Analyze_Expression_Function): Call Freeze_Expr_Types for
4166         a completion instead of manually freezing the type of the
4167         expression.
4168         (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
4170 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4172         * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
4173         New procedure, auxiliary to Expand_Pragma_Check, to handle
4174         references to the discriminants of a protected type within a
4175         precondition of a protected operation. This is needed because
4176         the original precondition has been analyzed in the context of
4177         the protected declaration, but in the body of the operation
4178         references to the discriminants have been replaved by references
4179         to the discriminants of the target object, and these references
4180         are only created when expanding the protected body.
4182 2017-09-08  Yannick Moy  <moy@adacore.com>
4184         * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
4185         Loop_Variant.
4187 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4189         * exp_attr.adb (Build_Record_VS_Func): If the record is an
4190         unchecked union, do not emit checks for its (non-existent)
4191         discriminants, or for variant parts that depend on them.
4193 2017-09-08  Justin Squirek  <squirek@adacore.com>
4195         * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
4196         Find_Comparison_Type.Try_One_Interp): Add check for generic
4197         instances.
4199 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4201         * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
4202         exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
4203         repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
4204         exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
4205         remaining references to AAMP_On_Target.
4207 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4209         * style.adb: Fix typo.
4211 2017-09-08  Javier Miranda  <miranda@adacore.com>
4213         * einfo.adb (Underlying_Type): Add missing support for class-wide
4214         types that come from the limited view.
4215         * exp_attr.adb (Attribute_Address): Check class-wide type
4216         interfaces using the underlying type to handle limited-withed
4217         types.
4218         (Attribute_Tag): Check class-wide type interfaces using
4219         the underlying type to handle limited-withed types.
4221 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4223         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
4224         over a subtype of a type with a static predicate, taking into
4225         account the predicate function of the parent type and the bounds
4226         given in the loop specification.
4227         * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
4228         a loop specification that is a subtype indication whose type mark
4229         is a type with a static predicate, inherit predicate function,
4230         used to build case statement for rewritten loop.
4232 2017-09-08  Justin Squirek  <squirek@adacore.com>
4234         * lib-load.adb: Modify printing of error message to exclude file
4235         line number.
4237 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4239         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
4240         don't inline subprograms declared in both visible and private
4241         parts of a package.
4242         (In_Package_Spec): previously In_Package_Visible_Spec; now
4243         detects subprograms declared both in visible and private parts
4244         of a package spec.
4246 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4248         * exp_util.adb (Build_Invariant_Procedure_Declaration): If
4249         the type is an anonymous array in an object declaration, whose
4250         component type has an invariant, use the object declaration
4251         as the insertion point for the invariant procedure, given that
4252         there is no explicit type declaration for an anonymous array type.
4254 2017-09-08  Bob Duff  <duff@adacore.com>
4256         * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
4258 2017-09-08  Bob Duff  <duff@adacore.com>
4260         * a-strfix.adb (Trim): Compute Low and High only if needed.
4262 2017-09-08  Justin Squirek  <squirek@adacore.com>
4264         * lib-load.adb (Load_Main_Source): Add error output in the case a
4265         source file is missing.
4267 2017-09-08  Bob Duff  <duff@adacore.com>
4269 PR ada/80888
4270         * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
4271         Default_WCEM by default (i.e. if the encoding is not specified
4272         by the Form string).
4274 2017-09-08  Bob Duff  <duff@adacore.com>
4276         * s-trasym.ads (Hexa_Traceback): If
4277         Suppress_Hex is True, print "..." instead of a hexadecimal
4278         address.
4279         * s-trasym.adb: Ignore No_Hex in this version.
4280         Misc cleanup.
4282 2017-09-08  Bob Duff  <duff@adacore.com>
4284         * debug.adb: Minor reformatting.
4286 2017-09-08  Bob Duff  <duff@adacore.com>
4288         * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
4289         code so it doesn't trigger an "uninit var" warning.
4291 2017-09-08  Nicolas Roche  <roche@adacore.com>
4293         * s-hibaen.ads: Remove obsolete file.
4295 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4297         * a-locale.ads: Add comment explaining the state of this package.
4299 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4301         * sem_util.adb (Is_CCT_Instance): Allow calls in the context
4302         of packages.
4303         * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
4304         allow calls in the context of package spec (for pragma
4305         Initializes) and bodies (for pragma Refined_State).
4307 2017-09-08  Bob Duff  <duff@adacore.com>
4309         * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
4310         new Exp.
4312 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4314         * debug.adb (dA): Adjust comment.
4315         * gnat1drv.adb (Gnat1drv): Likewise.
4316         * opt.ads (List_Representation_Info_Extended): New variable.
4317         * repinfo.adb (List_Record_Info): Split implementation into...
4318         (Compute_Max_Length): ...this.  Recurse on records if requested.
4319         (List_Record_Layout): Likewise.
4320         * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
4321         statement, accept '0' and set List_Representation_Info_Extended
4322         on 'e'.
4323         * usage.adb (Usage): Document new -gnatRe variant.
4325 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4327         * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
4328         Do not save the given entity in the global variable Default_Pool
4329         if the pragma appears within a generic unit.
4331 2017-09-08  Bob Duff  <duff@adacore.com>
4333         * errout.adb (Delete_Warning): Do not
4334         decrement Warnings_Treated_As_Errors. This is called before
4335         Warnings_Treated_As_Errors has been incremented to account for
4336         this warning. Decrementing it here can lead to negative values
4337         of Warnings_Treated_As_Errors, raising Constraint_Error in
4338         checks-on builds, and causing the compiler to return an error
4339         code in checks-off builds.
4341 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4343         * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
4344         entities of named concurrent types as Ref_Id and not of anonymous
4345         concurrent objects (because callers already know when a conversion
4346         is necessary and can easily do it); also, do not expect protected
4347         types or protected objects as Context_Id (because no flow-related
4348         SPARK pragmas are attached there); reflect these changes in a
4349         more precise comment.
4351 2017-09-08  Olivier Hainque  <hainque@adacore.com>
4353         * g-altive.ads: Add documentation.
4355 2017-09-08  Bob Duff  <duff@adacore.com>
4357         * sem_util.ads, debug.adb: Minor comment fix.
4358         * erroutc.ads: Comment fix.
4360 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4362         * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
4363         for compatibility of component types of formal and actual in an
4364         instantiation of a child unit,  when the component type of the
4365         formal is itself a formal of an enclosing generic.
4367 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4369         * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
4370         sem_prag.adb to make it available for GNATprove; for concurrent
4371         types replace custom scope climbing with Scope_Same_Or_Within; for
4372         single concurrent objects add scope climbing (with Scope_Within),
4373         which was not there (that's the primary semantic change of this
4374         commit); also, when comparing a single concurrent object with
4375         its corresponding concurrent type rely on equality of types,
4376         not of objects (because that's simpler to code).
4377         * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
4378         (Analyze_Global_Item): adjust special-casing of references to the
4379         current instance of a concurrent unit in the Global contracts
4380         of task types and single tasks objects; similar for references
4381         in the protected operations and entries of protected types and
4382         single protected objects (in all these cases the current instance
4383         behaves as an implicit parameter and must not be mentioned in
4384         the Global contract).
4386 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4388         * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
4389         function calls returning a record within a subprogram call,
4390         for C generation.
4392 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4394         * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
4395         name that designates the current instance of a child unit in its
4396         own body and appears as the prefix of a reference to an entity
4397         local to the child unit.
4398         * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
4399         Minor reformatting.
4401 2017-09-08  Yannick Moy  <moy@adacore.com>
4403         * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
4404         may be intentional.
4406 2017-09-08  Tristan Gingold  <gingold@adacore.com>
4408         * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
4409         warnings on internal units in configurable run time mode.
4411 2017-09-08  Bob Duff  <duff@adacore.com>
4413         * sem_ch3.adb (Build_Derived_Private_Type): Inherit
4414         representation items from interfaces that the derived type
4415         implements, not just from the parent type.
4416         * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
4417         this to return an empty list when there are no interfaces.
4418         * einfo.ads, sem_ch13.adb: Minor comment fixes.
4419         * sem_attr.adb: Minor comment fix.
4421 2017-09-08  Doug Rupp  <rupp@adacore.com>
4423         * sigtramp-vxworks.c [i386]: Adjust the kernel context for
4424         x86-vx7.
4426 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4428         * exp_ch4.adb (Expand_N_Allocator): Generate a
4429         call to Allocate_Any_Controlled when the allocation does not
4430         require any initialization.
4432 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4434         * sem_util.adb (Copy_Node_With_Replacement):
4435         Update the Renamed_Object field of a replicated object renaming
4436         declaration.
4438 2017-09-08  Patrick Bernardi  <bernardi@adacore.com>
4440         * exp_ch9.adb (Is_Pure_Barrier): Allow type
4441         conversions and components of objects. Simplified the detection
4442         of the Count attribute by identifying the corresponding run-time
4443         calls.
4445 2017-09-08  Yannick Moy  <moy@adacore.com>
4447         * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
4448         sem_type.adb, sinfo.ads: Minor reformatting.
4450 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4452         * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
4453         of Freeze_Profile, used to inhibit the freezing of the profile
4454         of an expression function declared within a nested package, when
4455         some type in the profile depends on a private type declared in
4456         an enclosing package.
4458 2017-09-08  Bob Duff  <duff@adacore.com>
4460         * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
4461         the subunit case. It's still OK to set it in the "missing subunits"
4462         case, because that won't cause the obsolete .ali files that cause
4463         confusion.
4465 2017-09-08  Bob Duff  <duff@adacore.com>
4467         * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
4468         unclear why this didn't cause a warning.
4469         * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
4470         pragmas. It's unclear why this didn't cause an error.
4472 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4474         * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
4475         Reimplemented.
4476         (Expand_SPARK_Potential_Renaming): Code clean up.
4477         * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
4478         the item does not have a proper entity.
4479         (Analyze_Input_Item): Add a guard in case the item does not have a
4480         proper entity.
4481         (Collect_States_And_Objects): Include object renamings in the
4482         items being collected.
4483         (Resolve_State): Update the documentation of this routine.
4484         * sem_util.adb (Entity_Of): Add circuitry to handle
4485         renamings of function results.
4486         (Remove_Entity): New routine.
4487         (Remove_Overloaded_Entity): Take advantage of factorization.
4488         * sem_util.ads (Entity_Of): Update the documentation
4489         of this routine.
4490         (Remove_Entity): New routine.
4491         (Remove_Overloaded_Entity): Update the documentation of this
4492         routine.
4494 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4496         * repinfo.adb (List_Record_Info): During first loop,
4497         do not override the normalized position and first bit
4498         if they have already been set.  Move fallback code
4499         for the packed case to the case where it belongs.
4500         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
4501         Also adjust the normalized position of components.
4502         (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
4504 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4506         * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
4507         the placement of a primitive operation O that renames an operation
4508         R declared in an inner package, and which is thus not a primitive
4509         of the dispatching type of O. In this case O is a new primitive
4510         and does not inherit its dispatch table position from R (which
4511         has none).
4513 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4515         * sem_dim.adb (Analyze_Dimension_If_Expression,
4516         Analyze_Dimension_Case_Expression): new subprograms to verify
4517         the dimensional correctness of Ada2012 conditional expressions,
4518         and set properly the dimensions of the construct.
4519         * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
4520         call Analyze_Dimension.
4522 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4524         * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
4525         loop on an interface declared as a private extension of another
4526         synchronized interface.
4528 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4530         * sem_ch12.adb (Check_Generic_Parent): New procedure within
4531         Analyze_Associations, to handle actual packages that depend on
4532         previous instances.  If a package IAP that is an instantiation is
4533         used as an actual in a subsequent instantiation SI in the same
4534         scope, and IAP has a body, IAP must be frozen before SI. If
4535         the generic parent of IAP is itself declared in a previous
4536         instantiation in the same scope, that instantiation must also
4537         be frozen before SI.
4538         (Install_Body): Prevent double insertion of freeze node for
4539         instance.
4541 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4543         * sem_prag.adb (Resolve_State): Update the
4544         comment on documentation. Generate a reference to the state once
4545         resolution takes place.
4547 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4549         * sem_ch13.adb (Analyze_Aspect_Specifications, case
4550         Linker_Section): If the aspect applies to an object declaration
4551         with explicit initialization, do not delay the freezing of the
4552         object, to prevent access-before-elaboration in the generated
4553         initialization code.
4555 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4557         * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
4558         (Integer_Value (Item)) when the size of the fixed decimal type
4559         is larger than Integer.
4561 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4563         PR ada/82127
4564         * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
4565         in order of increasing position in more cases.
4567 2017-09-07  Yannick Moy  <moy@adacore.com>
4569         * a-exetim-mingw.ads: Add contract Global=>null
4570         on all operations that are modeled as having no read or write
4571         of global variables in SPARK.
4573 2017-09-07  Raphael Amiard  <amiard@adacore.com>
4575         * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
4576         to Hmaps.Generic_Ops.
4577         * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
4578         cursors.
4579         * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
4580         cursors.
4581         * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
4582         position in cursors.
4584 2017-09-07  Javier Miranda  <miranda@adacore.com>
4586         * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
4587         allow disabling the generation of implicit pragma Elaborate_All
4588         on task bodies.
4590 2017-09-07  Javier Miranda  <miranda@adacore.com>
4592         * exp_disp.adb (Make_Tags): Avoid suffix counter
4593         in the external name of the elaboration flag. Required to fix
4594         the regressions introduced by the initial version of this patch.
4596 2017-09-07  Bob Duff  <duff@adacore.com>
4598         * sem_ch6.adb (Analyze_Function_Return): Do not
4599         insert an explicit conversion to force the displacement of the
4600         "this" pointer to reference the secondary dispatch table in the
4601         case where the return statement is returning a raise expression,
4602         as in "return raise ...".
4604 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4606         * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
4607         * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
4608         procedure from sem_disp.adb.
4609         * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
4610         with Unit.
4611         * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
4612         return the instantiation node for subprograms. Update references
4613         to Get_Unit_Instantiation_Node.
4614         * sem_ch7.adb (Install_Parent_Private_Declarations): update
4615         reference to Get_Unit_Instantiation_Node.
4616         * exp_dist.adb (Build_Package_Stubs): update reference to
4617         Get_Unit_Instantiation_Node.
4618         * sem_ch9.adb: minor typo in comment.
4619         * lib-xref-spark_specific.adb
4620         (Traverse_Declaration_Or_Statement): traverse into task type
4621         definition.
4623 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4625         * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
4626         to handle properly various cases of type conversions where the
4627         target type and/or the expression carry dimension information.
4628         (Dimension_System_Root); If a subtype carries dimension
4629         information, obtain the source parent type that carries the
4630         Dimension aspect.
4632 2017-09-07  Dmitriy Anisimkov  <anisimko@adacore.com>
4634         * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
4636 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4638         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
4639         If the prefix is a reference to an object, rewrite it as an
4640         explicit dereference, as required by 3.7.2 (2) and as is done
4641         with most other attributes whose prefix is an access value.
4643 2017-09-07  Bob Duff  <duff@adacore.com>
4645         * par-ch13.adb: Set the Inside_Depends flag if we are inside a
4646         Refined_Depends aspect.
4647         * par-ch2.adb: Set the Inside_Depends flag if we are inside a
4648         Refined_Depends pragma.
4649         * scans.ads: Fix documentation of Inside_Depends flag.
4650         * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
4652 2017-09-07  Hristian Kirtchev  <kirtchev@adacore.com>
4654         * exp_ch7.adb (Insert_Actions_In_Scope_Around):
4655         Account for the case where the are no lists to insert, but the
4656         secondary stack still requires management.
4657         * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
4658         comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
4659         lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
4660         sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
4661         Minor reformatting.
4663 2017-09-07  Vincent Celier  <celier@adacore.com>
4665         * clean.adb: Do not get the target parameters before calling
4666         gprclean.
4668 2017-09-07  Nicolas Roche  <roche@adacore.com>
4670         * s-osinte-solaris-posix.ads: Removed.
4672 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4674         * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
4675         single concurrent objects.
4677 2017-09-07  Javier Miranda  <miranda@adacore.com>
4679         * s-regexp.ads: Fix documentation of the globbing grammar.
4681 2017-09-07  Gary Dismukes  <dismukes@adacore.com>
4683         * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
4685 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4687         * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
4688         in CodePeer mode, to support more legacy code automatically.
4690 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4692         * exp_disp.adb (Replace_Formals): If thr formal is classwide,
4693         and thus not a controlling argument, preserve its type after
4694         rewriting because it may appear in an nested call with a classwide
4695         parameter.
4697 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4699         * comperr.adb (Delete_SCIL_Files): Handle case of
4700         N_Package_Instantiation.
4702 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4704         * sem_ch10.adb (Remove_Private_With_Clause): If a private with
4705         clause for a unit U appears in a context that includes a regular
4706         with_clause on U, rewrite the redundant private clause into a null
4707         statement, rather than removing it altogether from the context,
4708         so that ASIS tools can reconstruct the original source.
4710 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4712         * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
4713         for aspect Small can be of any real type (not only a universal
4714         real literal) as long as it is a static constant.
4716 2017-09-07  Thomas Quinot  <quinot@adacore.com>
4718         * par_sco.adb: Minor reformatting.
4720 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4722         * s-parame-ae653.ads: Removed.
4724 2017-09-07  Nicolas Roche  <roche@adacore.com>
4726         * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
4727         s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
4728         s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
4729         s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
4730         s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
4731         s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
4733 2017-09-07  Yannick Moy  <moy@adacore.com>
4735         * a-ngelfu.ads Add preconditions to all functions
4736         listed in Ada RM A.5.1(19-33) as having constraints on inputs.
4738 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4740         * lib-xref.adb (Generate_Reference): ignore
4741         references to entities which are Part_Of single concurrent
4742         objects.
4744 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4746         * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
4747         comment.
4749 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4751         * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
4752         Null_Task_Id is passed.
4754 2017-09-07  Javier Miranda  <miranda@adacore.com>
4756         * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
4757         attribute. Defined for record types and subtypes.
4758         * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
4759         (Init_Tags_List) to facilitate generating separate code in the
4760         IP routine to initialize the object components and for completing
4761         the elaboration of dispatch tables.
4762         * exp_ch3.adb (Build_Init_Procedure): Improve the code
4763         generated in the IP routines by means of keeping separate
4764         the initialization of the object components from the
4765         initialization of its dispatch tables.  (Init_Secondary_Tags):
4766         Adding new formal (Init_Tags_List) and adjusting calls to
4767         Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
4768         adjusting also calls to Ada.Tags.Register_Interface_Offset
4769         because the type of one of its formals has been changed.
4770         * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
4771         modified. Instead of receiving a pointer to an object this
4772         routine receives now a primary tag.
4773         (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
4774         additional formal: the tag of the primary dispatch table.
4775         * exp_disp.ads (Elab_Flag_Needed): New subprogram.
4776         * exp_disp.adb (Elab_Flag_Needed): New subprogram.
4777         (Make_Tags): Adding the declaration of the elaboration flag (if needed).
4778         * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
4779         formal in calls to Init_Secondary_Tags.
4781 2017-09-07  Javier Miranda  <miranda@adacore.com>
4783         * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
4784         subprogram.
4785         * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
4786         applied to generic subprograms.
4788 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4790         * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
4791         (because it refers to the anonymous concurrent object, not its type);
4792         fix condition for emitting error message about task/protected type,
4794 2017-09-07  Bob Duff  <duff@adacore.com>
4796         * binde.adb (Debug_Flag_Old): If both -do and -dp
4797         are specified, behave as if just -do was specified, rather than
4798         using a mixture.
4800 2017-09-07  Nicolas Roche  <roche@adacore.com>
4802         * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
4803         system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
4805 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4807         * sem_prag.adb (Find_Role): The Global_Seen flag
4808         is now consulted not only for abstract states and variables,
4809         but for all kinds of items.
4810         (Collect_Subprogram_Inputs_Outputs): Do not process formal
4811         generic parameters, because unlike ordinary formal parameters,
4812         generic formals only act as input/ outputs if they are explicitly
4813         mentioned in a Global contract.
4815 2017-09-07  Yannick Moy  <moy@adacore.com>
4817         * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
4818         predicate procedure. Check predicate pragma/aspect with Ghost entity.
4819         * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
4820         reformatting.
4822 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4824         * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
4825         (code cleanup);
4826         * sem_ch3.adb (Build_Derived_Record_Type):i Call
4827         Copy_Dimensions_Of_Components after creating the copy of the
4828         record declaration.
4829         * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
4830         derived recor type, copy the dikensions if any of each component
4831         of the parent record to the corresponding component declarations
4832         of the derived record. These expressions are used among other
4833         things as default values in aggregates with box associations.
4834         * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
4835         repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
4836         Minor reformatting.
4838 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4840         * sem_util.adb: Remove extra space after THEN.
4842 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4844         * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
4845         also mark the renamed subprogram as referenced.
4847 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4849         * par-ch6.adb (P_Subprogram): Improve error message on null
4850         procedure with misplaced aspect specification, which the parser
4851         first attempts to interpret as a malformed expression function.
4853 2017-09-07  Gary Dismukes  <dismukes@adacore.com>
4855         * sem_attr.adb (Analyze_Attribute_Old_Result):
4856         Allow attributes Result and Old in the case of an expression
4857         function.
4859 2017-09-07  Justin Squirek  <squirek@adacore.com>
4861         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
4862         Volatile to subcomponents.
4864 2017-09-07  Bob Duff  <duff@adacore.com>
4866         * exp_ch7.adb (Find_Last_Init): Check for the
4867         case where a build-in-place function call has been replaced by a
4868         'Reference attribute reference.
4870 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4872         * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
4873         nodes.
4875 2017-09-07  Bob Duff  <duff@adacore.com>
4877         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
4878         Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
4879         secondary stack for all functions that return limited tagged
4880         types -- just do it for dispatching calls.  Misc cleanup.
4881         * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
4882         remove qualifications and type conversions. Fix various bugs
4883         where only a single level of qualification or conversion was
4884         removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
4885         instead of "X".
4886         * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
4887         cleanup.
4889 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4891         * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
4892         do not create actual subtypes that may generate further predicate
4893         functions.
4894         * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
4895         of body is a predicate function as well.
4896         (Resolve_Aspect_Expressions, Resolve_Name): For a component
4897         association, only the expression needs resolution, not the name.
4898         (Resolve_Aspect_Expressions, case Predicates): Construct and
4899         analyze the predicate function declaration in the scope of the
4900         type, before making the type and its discriminants visible.
4902 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4904         * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
4905         only if the record type itself comes from source.
4907 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
4909         * sem_ch5.adb: Minor reformatting and a typo fix
4911 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4913         * sinput-l.ads: minor remove extra period at the end of comment
4915 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4917         * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
4918         E_Discriminant.
4919         (Find_Role): remove support for E_Discriminant.
4921 2017-09-06  Javier Miranda  <miranda@adacore.com>
4923         * exp_ch6.adb (Expand_Simple_Function_Return):
4924         Add missing implicit type conversion to force displacement of the
4925         "this" pointer.
4927 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
4929         * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
4931 2017-09-06  Yannick Moy  <moy@adacore.com>
4933         * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
4934         global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
4936 2017-09-06  Bob Duff  <duff@adacore.com>
4938         * sem_ch8.adb: Change Assert to be consistent with
4939         other similar ones.
4941 2017-09-06  Bob Duff  <duff@adacore.com>
4943         * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
4944         requested. Previously, the -do switch meant "run Elab_New and
4945         Elab_Old and use the order chosen by Elab_Old, possibly with
4946         debugging printouts comparing the two orders."  Now it means
4947         "do not run Elab_New." This is of use if there are bugs that
4948         cause Elab_New to crash.
4949         (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
4950         type conversions.
4951         * ali.ads (Elab_Position): Change type to Nat, to avoid various
4952         type conversions.
4954 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4956         * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
4957         reference to SPARK RM.
4959 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4961         * layout.adb: Use SSU short hand consistently throughout the file.
4963 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4965         * freeze.adb (Freeze_Record_Type)
4966         <Sized_Component_Total_Round_RM_Size>: New local variable to
4967         accumulate the rounded RM_Size of components.  Update it for
4968         every component whose RM_Size is statically known.  Add missing
4969         guard to check that bit packing is really required before issuing
4970         the error about packing.  Swap condition for clarity's sake.
4971         * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
4973 2017-09-06  Fedor Rybin  <frybin@adacore.com>
4975         * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
4976         mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
4977         mlib-tgt-specific.adb, mlib-tgt-specific.ads,
4978         mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
4979         mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
4980         mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
4981         mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
4982         mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
4983         prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
4984         prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
4985         prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
4986         prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
4987         prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
4988         prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
4989         prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
4990         project manager sources.
4992 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4994         * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
4995         entity of a mutable type and the right-hand side is a conditional
4996         expression, resolve the alternatives of the conditional using
4997         the base type of the target entity, because the alternatives
4998         may have distinct subtypes. This is particularly relevant if
4999         the alternatives are aggregates.
5001 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5003         * checks.adb (Apply_Predicate_Check): If the expression is an
5004         aggregate that is the RHS of an assignment, apply the check to
5005         the LHS after the assignment, rather than to the aggregate. This
5006         is more efficient than creating a temporary for the aggregate,
5007         and prevents back-end crashes when the aggregate includes a
5008         dynamic "others' association.
5010 2017-09-06  Yannick Moy  <moy@adacore.com>
5012         * sem_ch12.adb (Analyze_Instance_And_Renamings):
5013         Set variable to ignore SPARK_Mode in instance before the analysis
5014         of the generated package declaration.
5016 2017-09-06  Yannick Moy  <moy@adacore.com>
5018         * sem_res.adb (Resolve_Call): Do not issue a
5019         message for calls inside expression function, unless body was
5020         seen and is candidate for inlining.
5022 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5024         * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
5025         * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
5026         body. do not freeze the formals of the generic unit.
5028 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
5030         * errout.adb (Error_Msg): Separate the
5031         treatment for warning vs. style messages in inlinings and
5032         instantiations. Prevents blowups on calls to Warn_Insertion for
5033         style messages, which should not be called in that case because
5034         Warning_Msg_Char is not set.
5036 2017-09-06  Justin Squirek  <squirek@adacore.com>
5038         * sem_prag.adb (Check_VFA_Conflicts): Created
5039         to group all Volatile_Full_Access checks relating to other
5040         representation pragmas (Mark_Component_Or_Object): Created
5041         to centeralize the flagging of attributes for the record type
5042         component case, a pragma applied individually to a component, and
5043         the object case.
5044         (Process_Atomic_Independent_Shared_Volatile):
5045         Add propagation of certain pragmas to record components and move
5046         evaluation of VFA checks
5048 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5050         * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
5051         Do not warn on conditions that are not obeyed for Inline_Always
5052         subprograms, when assertions are not enabled.
5054 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
5056         * sem_util.adb (Unique_Entity): For abstract states return their
5057         non-limited view.
5059 2017-09-06  Bob Duff  <duff@adacore.com>
5061         * sem_ch12.adb (Copy_Generic_Node): When we copy a node
5062         that is a proper body corresponding to a stub, we defer the
5063         adjustment of the sloc until after the correct adjustment has
5064         been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
5065         the adjustment, because it will be outside the range in (the old,
5066         incorrect) S_Adjustment.
5067         * inline.adb: Use named notation for readability and uniformity.
5068         * sinput-l.adb: Minor improvements to debugging output printed
5069         for Debug_Flag_L.
5070         * sinput-l.ads (Create_Instantiation_Source): Minor comment
5071         correction.
5073 2017-09-06  Vincent Celier  <celier@adacore.com>
5075         * make.adb: Do not invoke gprbuild for -bargs -P.
5077 2017-09-06  Sylvain Dailler  <dailler@adacore.com>
5079         * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
5080         case when Op is of kind N_Qualified_Expression. In this case,
5081         the function is called recursively on the subexpression like in
5082         other cases.
5083         * make.adb: Minor reformatting
5085 2017-09-06  Justin Squirek  <squirek@adacore.com>
5087         * einfo.adb (Set_Linker_Section_Pragma): Modify
5088         Set_Linker_Section_Pragma to be consistant with the "getter"
5089         Linker_Section_Pragma.
5090         * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
5091         checking for container loops so that the index cursor is not
5092         directly changable by the user with the use of E_Loop_Parameter.
5093         * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
5094         * sem_warn.adb (Check_References): Revert previous change.
5096 2017-09-06  Bob Duff  <duff@adacore.com>
5098         * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
5099         calls and the like.
5101 2017-09-06  Yannick Moy  <moy@adacore.com>
5103         * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
5104         declarations to only consider valid uses of Global/Depends those on
5105         single concurrent objects.
5107 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5109         * sem_ch13.adb (Check_Record_Representation_Clause): Give an
5110         error as soon as one of the specified components overlaps the
5111         parent field.
5113 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
5115         * sem_prag.ads: minor fix typo in comment.
5117 2017-09-06  Justin Squirek  <squirek@adacore.com>
5119         * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
5120         from source before checking source references.
5121         * sem_warn.adb (Check_References): Add check for internal block
5122         before recursing.
5124 2017-09-06  Vincent Celier  <celier@adacore.com>
5126         * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
5127         make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
5128         gnatname.adb: Remove the Project Manager from the GNAT tools.
5129         * gcc-interface/Makefile.in: ditto.
5131 2017-09-06  Bob Duff  <duff@adacore.com>
5133         * sem_util.ads: Minor comment fix.
5135 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5137         * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
5138         Generate a freeze node for the actual of a formal package, if
5139         the actual is declared in the same unit and has a corresponding
5140         body, to prevent the current instance from being frozen before
5141         the actual is.
5143 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5145         * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
5147 2017-09-06  Yannick Moy  <moy@adacore.com>
5149         * sem_warn.adb: Minor refactoring.
5151 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5153         * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
5154         to retrieve the inherited classwide precondition/postcondition
5155         of a subprogram.
5156         * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
5157         freezing a subprogram, to complete the generation of the
5158         corresponding checking code.
5160 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5162         * exp_util.adb (Is_Controlled_Indexing): New routine.
5163         (Is_Displace_Call): Use routine Strip to remove indirections.
5164         (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
5165         missing case of controlled generalized indexing.
5166         (Is_Source_Object): Use routine Strip to remove indirections.
5167         (Strip): New routine.
5169 2017-09-06  Bob Duff  <duff@adacore.com>
5171         * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
5172         we include the proper header. Otherwise, we just declare the necessary
5173         things from the capabilities library. This is so we can build on
5174         machines without that library, while still enabling that library.
5175         At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
5176         simply return 0 if the library is not present, or not included
5177         in the link.
5179 2017-09-06  Pierre-Marie de Rodat  <derodat@adacore.com>
5181         * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
5182         for renamings that involve function calls in prefix form.
5184 2017-09-06  Bob Duff  <duff@adacore.com>
5186         * sem_ch3.adb (Analyze_Subtype_Declaration):
5187         Set Has_Delayed_Freeze on a subtype of an incomplete type.
5189 2017-09-06  Pierre-Marie de Rodat  <derodat@adacore.com>
5191         * par_sco.adb (Extend_Statement_Sequence): When the accept statement
5192         has no parameter specification and no entry index, use the entry name
5193         as the end of the generated SCO statement.
5195 2017-09-06  Steve Baird  <baird@adacore.com>
5197         * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
5198         uses of 'Image and related attributes as having side effects in
5199         order to avoid replicating such uses.
5200         * pprint.ads (Expression_Image) Add new generic formal flag
5201         Hide_Temp_Derefs.  The flag defaults to False; CodePeer will
5202         (eventually) override the default.
5203         * pprint.adb (Expression_Image) If the new flag is set, then
5204         suppress the ".all" suffix when displaying a dereference whose
5205         prefix is a use of a value-capturing compiler temp of the sort
5206         generated by Expr_Util.Remove_Side_Effects .
5207         * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
5208         sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
5209         Minor reformatting.
5210         * inline.adb: Minor wording change.
5212 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5214         * sem_ch7.adb: Update comment.
5216 2017-09-06  Yannick Moy  <moy@adacore.com>
5218         * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
5219         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
5220         * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
5221         with slight modification from Is_Subp_Or_Entry_Inside_Protected,
5222         so that applies to any entity.
5224 2017-09-06  Yannick Moy  <moy@adacore.com>
5226         * sem_ch3.adb (Derived_Type_Declaration): Use
5227         Incomplete_Or_Partial_View rather than local Find_Partial_View.
5229 2017-09-06  Javier Miranda  <miranda@adacore.com>
5231         * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
5232         following ISO-8861.
5234 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5236         * sem_dim.adb (Analyze_Dimension): In an instance, a type
5237         conversion takes its dimensions from the expression, not from
5238         the context type.
5239         (Dimensions_Of_Operand): Ditto.
5241 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5243         * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
5244         null procedures when GNAT coverage is used, so that their (empty)
5245         bodies are properly covered.
5247 2017-09-06  Bob Duff  <duff@adacore.com>
5249         * sem_ch13.adb (Resolve_Aspect_Expressions): If
5250         the entity is a type with discriminants, make the discriminants
5251         directly visible in aspect clauses.
5253 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5255         * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
5256         Universal_Real and the context is a floating-point type, resolve
5257         both operands to the target type.
5259 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5261         * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
5262         sem_ch3.adb, sem_util.adb: Minor reformatting.
5264 2017-09-06  Yannick Moy  <moy@adacore.com>
5266         * freeze.adb (Check_Inherited_Conditions): Rewriting
5267         of inherited preconditions and postconditions should only occur
5268         in GNATprove mode, that is, when GNATprove_Mode is True, not to
5269         be confused with SPARK_Mode being On.
5271 2017-09-06  Yannick Moy  <moy@adacore.com>
5273         * sem_warn.adb (Check_References): Take into
5274         account possibility of attribute reference as original node.
5276 2017-09-06  Yannick Moy  <moy@adacore.com>
5278         * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
5279         use of attribute.
5281 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5283         * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
5284         on the procedure created to encapsulate the body.
5285         * sem_ch7.adb: Add with clause for GNAT.HTable.
5286         (Entity_Table_Size): New constant.
5287         (Entity_Hash): New function.
5288         (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
5289         (Is_Subprogram_Ref): Rename into...
5290         (Scan_Subprogram_Ref): ...this. Record references to subprograms in
5291         the table instead of bailing out on them. Scan the value of constants
5292         if it is not known at compile time.
5293         (Contains_Subprograms_Refs): Rename into...
5294         (Scan_Subprogram_Refs): ...this.
5295         (Has_Referencer): Scan the body of all inlined subprograms. Reset the
5296         Is_Public flag on subprograms if they are not actually referenced.
5297         (Hide_Public_Entities): Beef up comment on the algorithm.
5298         Reset the table of subprograms on entry.
5300 2017-09-06  Yannick Moy  <moy@adacore.com>
5302         * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
5304 2017-09-06  Javier Miranda  <miranda@adacore.com>
5306         * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
5307         cannot handle a type conversion of an array as an aggregate
5308         component.
5310 2017-09-06  Bob Duff  <duff@adacore.com>
5312         * g-comlin.adb (Try_Help): Remove ".exe" so we
5313         get the same results on windows and unix.
5315 2017-09-06  Justin Squirek  <squirek@adacore.com>
5317         * exp_imgv.adb (Expand_Image_Attribute),
5318         (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
5319         Added case to handle new-style 'Image expansion
5320         (Rewrite_Object_Image): Moved from exp_attr.adb
5321         * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5322         attribute cases so that the relevant subprograms in exp_imgv.adb
5323         handle all expansion.
5324         (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
5325         * sem_attr.adb (Analyze_Attribute): Modified Image attribute
5326         cases to call common function Analyze_Image_Attribute.
5327         (Analyze_Image_Attribute): Created as a common path for all
5328         image attributes (Check_Object_Reference_Image): Removed
5329         * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5330         Removed and refactored into Is_Object_Image (Is_Object_Image):
5331         Created as a replacement for Is_Image_Applied_To_Object
5333 2017-09-06  Yannick Moy  <moy@adacore.com>
5335         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
5336         message for missing input.
5338 2017-09-06  Yannick Moy  <moy@adacore.com>
5340         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
5341         of protected subprograms and entries.
5342         * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
5343         New function to detect when a subprogram of entry is defined
5344         inside a protected object.
5346 2017-09-06  Bob Duff  <duff@adacore.com>
5348         * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
5349         whether the current process has the CAP_SYS_NICE capability.
5350         * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
5351         ceiling priorities if the current process has the CAP_SYS_NICE
5352         capability.
5354 2017-09-06  Bob Duff  <duff@adacore.com>
5356         * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
5357         check back to the body, because SPARK is not yet ready for
5358         "or else raise Constraint_Error".
5360 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5362         * exp_ch6.adb (Expand_Call_Helper): Replace call to null
5363         procedure by a single null statement, after evaluating the
5364         actuals that require it.
5366 2017-09-06  Javier Miranda  <miranda@adacore.com>
5368         * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
5369         Generating C code improve the code that checks the use of nested
5370         aggregates to initialize object declarations.
5372 2017-09-06  Yannick Moy  <moy@adacore.com>
5374         * sem_ch3.adb (Derived_Type_Declaration): Detect
5375         violations of new rule SPARK RM 3.4(1).  Also refactor existing
5376         check to use the new function Find_Partial_View.
5378 2017-09-06  Vincent Celier  <celier@adacore.com>
5380         * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P...  The code
5381         from the Prj hierarchy has been removed from the GNAT driver.
5383 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5385         * sem_type.adb (Interface_Present_In_Ancestor): Within an
5386         expression function, or within a spec expression (default value,
5387         etc) a reference to an incomplete type is legal: legality of
5388         the operation will be checked when some related entity (type,
5389         object or subprogram) is frozen.
5391 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
5393         * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
5394         adjustments and a typo fix.
5396 2017-09-06  Yannick Moy  <moy@adacore.com>
5398         * sem_res.adb (Resolve_Call): Do not issue info
5399         message about inlining of calls to functions in assertions,
5400         for functions whose body has not been seen yet.
5402 2017-09-06  Bob Duff  <duff@adacore.com>
5404         * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
5405         we can use modern Ada in this package.
5406         * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
5407         Move Ada.Command_Line.Response_File to System.Response_File,
5408         and make Ada.Command_Line.Response_File into a rename of
5409         System.Response_File. This is to avoid having gnatbind depend
5410         Ada.Command_Line, which would damage the bootstrap process now
5411         that Ada.Command_Line contains modern Ada (the raise expression).
5412         * gnatbind.adb: Avoid dependence on
5413         Ada.Command_Line. Depend on System.Response_File instead
5414         of Ada.Command_Line.Response_File. Change one call to
5415         Ada.Command_Line.Command_Name to use Fill_Arg.  Change one call
5416         to Ada.Command_Line.Argument_Count to use Arg_Count.
5417         * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
5419 2017-09-06  Bob Duff  <duff@adacore.com>
5421         * frontend.adb (Frontend): Skip -gnatec=gnat.adc
5422         switch, because we've already read gnat.adc by default.
5424 2017-09-06  Bob Duff  <duff@adacore.com>
5426         * exp_ch5.adb (Get_Default_Iterator): Replace
5427         "Assert(False)" with "return Iter", because if an iterable
5428         type is derived from a noniterable one, then we won't find an
5429         overriding or inherited default iterator.
5431 2017-09-06  Yannick Moy  <moy@adacore.com>
5433         * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
5434         literal index used to access a string is null or negative.
5436 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5438         * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
5439         allowed on loop parameters.
5440         (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
5441         on loop parameters.
5442         (Write_Field15_Name): Update the output for
5443         Status_Flag_Or_Transient_Decl.
5444         * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
5445         to loop parameters. Update the documentation of the attribute
5446         and the E_Loop_Parameter entity.
5447         * exp_ch7.adb (Process_Declarations): Remove the bogus guard
5448         which assumes that cursors can never be controlled.
5449         * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
5450         guard which assumes that cursors can never be controlled.
5452 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5454         * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
5455         sem_warn.adb: Minor reformatting.
5457 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5459         * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
5460         fix and preserve older GNAT warning on overlapping actuals that
5461         are not elementary types.
5463 2017-09-06  Justin Squirek  <squirek@adacore.com>
5465         * sem_attr.adb: Comment correction.
5467 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
5469         * sem_util.adb: Minor reformatting.
5471 2017-09-06  Yannick Moy  <moy@adacore.com>
5473         * a-comlin.ads (Argument): Add precondition for analysis.
5475 2017-09-06  Yannick Moy  <moy@adacore.com>
5477         * sem_res.adb (Resolve): Update message for function call as statement.
5479 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5481         * sem_ch6.adb (Check_Returns): Clean up warnings coming from
5482         generated bodies for renamings that are completions, when renamed
5483         procedure is No_Return.
5484         * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5485         rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
5486         with No_Return, the renamed entity must be No_Return as well.
5488 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5490         * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
5491         Minor reformatting.
5493 2017-09-06  Justin Squirek  <squirek@adacore.com>
5495         * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5496         attribute cases (Rewrite_Object_Reference_Image): Created to
5497         aid the rewriting of new-style 'Image attributes.
5498         * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
5499         (Check_Object_Reference_Image): Created to handle verification of
5500         'Image with object-references as prefixes.
5501         * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5502         Create predicate to identify cases where an 'Image attribute's
5503         prefix applies to an object reference.
5505 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5507         * freeze.adb (Freeze_Entity): Do not generate a freeze
5508         node for a generic unit, even if it includes delayed aspect
5509         specifications. Freeze nodes for generic entities must never
5510         appear in the tree that reaches the back-end of the compiler.
5512 2017-09-06  Yannick Moy  <moy@adacore.com>
5514         * treepr.adb (Print_Entity_Info): Do not print empty Elist.
5516 2017-09-06  Yannick Moy  <moy@adacore.com>
5518         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
5519         to subprograms in other units as possibly inlined.
5521 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5523         * freeze.adb (Freeze_Entity): For a derived type that has no
5524         explicit delayed aspects but may inherit delayed aspects from its
5525         parent type, analyze aspect at freeze point for proper capture
5526         of an inherited aspect.
5528 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
5530         * lib-xref.adb (Get_Through_Renamings): Get through subprogram
5531         renamings; also, avoid repeated calls to Renamed_Object when getting
5532         through object renamings.
5534 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5536         * sem_ch3.adb (Array_Type_Declaration): Handle properly an
5537         array type declaration in a private part, when an index is a
5538         subtype indication of a discrete type with a private partial view.
5540 2017-09-06  Javier Miranda  <miranda@adacore.com>
5542         * exp_ch4.adb (Expand_Modular_Op): Force generating
5543         temporary to improve the generated code.
5545 2017-09-06  Tristan Gingold  <gingold@adacore.com>
5547         * s-fatgen.adb: Minor typo fix in comment.
5549 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5551         * exp_ch5.adb (Make_Field_Assign): If the type
5552         of the right-hand side has stored constraint, use its values
5553         (except for those that are renamings of parent discriminants)
5554         to produce additional assignments for the discriminants of the
5555         left-hand side, which are invisible in the righ-hand side and
5556         not retrievable as selected components.
5558 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5560         * sem_util.adb (Needs_One_Formal): The first formal of such a
5561         function must be a controlling formal, so that Obj.F (X, Y)
5562         can have the interpretation F(Obj)(X, Y).
5563         * sem_util.ads: Clarify documentation.
5565 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5567         * table.ads, table.adb: Restore original implementation.
5568         * namet.h (Names_Ptr): Adjust back.
5569         (Name_Chars_Ptr): Likewise.
5570         * uintp.h (Uints_Ptr): Likewise.
5571         (Udigits_Ptr): Likewise.
5572         * g-table.ads: Remove pragma Compiler_Unit_Warning.
5573         * par_sco.adb: Do not with GNAT.Table and use Table consistently.
5574         * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
5575         * spark_xrefs.ads: Likewise.
5576         * scos.h: Undo latest changes.
5578 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5580         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
5581         No_Return flag to instance if pragma applies to generic unit. This
5582         must be done explicitly because the pragma does not appear
5583         directly in the generic declaration (unlike the corresponding
5584         aspect specification).
5586 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5588         * sem_ch7.adb (Has_Referencer): Move up and expand comment
5589         explaining the test used to detect inlining.  Use same test
5590         in second occurrence.
5591         (Analyze_Package_Body_Helper): Minor formatting fixes.
5593 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5595         * exp_ch4.adb (Handle_Changed_Representation): For an untagged
5596         derived type with a mixture of renamed and constrained parent
5597         discriminants, the constraint for the target must obtain the
5598         discriminant values from both the operand and from the stored
5599         constraint for it, given that the constrained discriminants are
5600         not visible in the object.
5601         * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
5602         side may be derived from that of the left-hand side (as in the
5603         case of an assignment with a change of representation) so the
5604         discriminant to be used in the retrieval of the value of the
5605         component must be the entity in the type of the right-hand side.
5607 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5609         * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
5610         sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5611         * exp_util.adb (Is_Source_Object): Account for
5612         the cases where the source object may appear as a dereference
5613         or within a type conversion.
5614         * exp_ch6.adb: Fix missing space in error message.
5616 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5618         * sem_prag.adb: Update description of Eliminate.
5620 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5622         * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
5623         properly an attribute reference 'Loop_Entry that appears in the
5624         list of indices of an indexed expression, to prevent an infinite
5625         loop in the compiler.
5627 2017-09-06  Bob Duff  <duff@adacore.com>
5629         * s-fileio.adb (Name): Do not raise Use_Error for temp files.
5631 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5633         * sem_ch4.adb (Analyze_Set_Membership):  If an alternative
5634         in a set membership is an overloaded enumeration literal, and
5635         the type of the alternative is resolved from a previous one,
5636         replace the entity of the alternative as well as the type,
5637         to prevent inconsistencies between the entity and the type.
5639 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5641         * ali.ads (ALIs_Record): Add No_Component_Reordering component.
5642         (No_Component_Reordering_Specified): New switch.
5643         * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
5644         (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
5645         * bcheck.adb (Check_Consistent_No_Component_Reordering):
5646         New check.
5647         (Check_Configuration_Consistency): Invoke it.
5648         * debug.adb (d.r): Toggle the effect of the switch.
5649         (d.v): Change to no-op.
5650         * einfo.ads (Has_Complex_Representation):
5651         Restrict to record types.
5652         (No_Reordering): New alias for Flag239.
5653         (OK_To_Reorder_Components): Delete.
5654         (No_Reordering): Declare.
5655         (Set_No_Reordering): Likewise.
5656         (OK_To_Reorder_Components): Delete.
5657         (Set_OK_To_Reorder_Components): Likewise.
5658         * einfo.adb (Has_Complex_Representation): Expect record types.
5659         (No_Reordering): New function.
5660         (OK_To_Reorder_Components): Delete.
5661         (Set_Has_Complex_Representation): Expect base record types.
5662         (Set_No_Reordering): New procedure.
5663         (Set_OK_To_Reorder_Components): Delete.
5664         (Write_Entity_Flags): Adjust to above change.
5665         * fe.h (Debug_Flag_Dot_R): New macro and declaration.
5666         * freeze.adb (Freeze_Record_Type): Remove conditional code setting
5667         OK_To_Reorder_Components on record types with convention Ada.
5668         * lib-writ.adb (Write_ALI): Deal with NC marker.
5669         * opt.ads (No_Component_Reordering): New flag.
5670         (No_Component_Reordering_Config): Likewise.
5671         (Config_Switches_Type): Add No_Component_Reordering component.
5672         * opt.adb (Register_Opt_Config_Switches): Copy
5673         No_Component_Reordering onto No_Component_Reordering_Config.
5674         (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
5675         (Save_Opt_Config_Switches): Save No_Component_Reordering.
5676         (Set_Opt_Config_Switches): Set No_Component_Reordering.
5677         * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
5678         * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
5679         No_Reordering flag from the default.
5680         (Build_Derived_Private_Type): Likewise.
5681         (Build_Derived_Record_Type): Likewise.  Then inherit it
5682         for untagged types and clean up handling of similar flags.
5683         (Record_Type_Declaration): Likewise.
5684         * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
5685         remove redundant test on Is_Tagged_Type.
5686         * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
5687         (Sig_Flags): Likewise.
5688         * snames.ads-tmpl (Name_No_Component_Reordering): New name.
5689         (Pragma_Id): Add Pragma_No_Component_Reordering value.
5690         * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
5691         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
5692         Copy the layout of the parent type only if the No_Reordering
5693         settings match.
5694         (components_to_record): Reorder record types with
5695         convention Ada by default unless No_Reordering is set or -gnatd.r
5696         is specified and do not warn if No_Reordering is set in GNAT mode.
5698 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5700         * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
5701         new predicate to reject declarations that can be completions,
5702         when there is a visible prior homograph that is a null procedure.
5703         * sem_ch6.adb (Analyze_Null_Procedure): use it.
5704         * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
5706 2017-09-06  Thomas Quinot  <quinot@adacore.com>
5708         * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
5709         run of 253 characters or more.
5711 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5713         * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
5714         properly incomplete subtypes that may be created by explicit or
5715         implicit declarations.
5716         (Is_Base_Type): Take E_Incomplete_Subtype into account.
5717         (Subtype_Kind): Ditto.
5718         * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
5719         Ekind of a subtype of a discriminated incomplete type.
5720         (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
5721         incomplete types, to preserve error reporting.
5722         (Process_Incomplete_Dependents): Do not create a subtype
5723         declaration for an incomplete subtype that is created internally.
5724         * sem_ch7.adb (Analyze_Package_Specification): Handle properly
5725         incomplete subtypes that do not require a completion, either
5726         because they are limited views, of they are generic actuals.
5728 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5730         * checks.adb (Insert_Valid_Check): Remove the
5731         suspicious manipulation of the Do_Range_Check flag as ths is
5732         no linger needed. Suppress validity check when analysing the
5733         validation variable.
5735 2017-09-06  Philippe Gil  <gil@adacore.com>
5737         * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
5738         GNATCOLL.Memory
5740 2017-09-06  Bob Duff  <duff@adacore.com>
5742         * sem_elim.adb: Minor comment fix.
5744 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5746         * sem_util.adb (Is_Object_Reference): A function call is an
5747         object reference, and thus attribute references for attributes
5748         that are functions (such as Pred and Succ) as well as predefined
5749         operators are legal in contexts that require an object, such as
5750         the prefix of attribute Img and the Ada2020 version of 'Image.
5752 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5754         * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
5755         exp_ch3.adb, xoscons.adb: Minor reformatting.
5757 2017-09-06  Raphael Amiard  <amiard@adacore.com>
5759         * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
5760         Position parameter. If supplied, use it to provide efficient iteration.
5761         * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
5762         a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
5763         iteration.
5765 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5767         * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
5768         designated type is class-wide and the expression is an unchecked
5769         conversion, preserve the conversion when checking the tag of the
5770         designated object, to prevent spurious semantic errors when the
5771         expression in the conversion has an untagged type (for example
5772         an address attribute).
5774 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5776         * sem_res.adb (Resolve_Entry_Call): Check whether a protected
5777         operation is subject to a pragma Eliminate.
5779 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5781         * sem_elim.ads, exp_ch4.adb: Minor reformatting.
5783 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5785         * fe.h (Eliminate_Error_Msg): Remove.
5787 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5789         * gcc-interface/utils.c (make_packable_type): Update call to
5790         mode_for_size_tree.
5792 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5794         * gcc-interface/utils2.c (build_load_modify_store):
5795         Use int_mode_for_size.
5797 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5799         PR ada/62235
5800         * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5801         for Itypes that are E_Record_Subtype with a cloned subtype.
5802         <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
5804 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5806         * gcc-interface/trans.c (convert_with_check): Use a custom base type
5807         if the base type of the expression has a different machine mode.
5808         Rename a couple of parameters and local variable.
5810 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5812         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
5813         conversions around prefixes that are not references.
5815 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5817         * gcc-interface/utils.c (unchecked_convert): When the result type is a
5818         non-biased integral type with size 0, set the result to 0 directly.
5820 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5822         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
5823         (renaming_from_instantiation_p): ...this.
5824         * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
5825         instead of explicit tests on kind of entities.  Adjust for renaming.
5826         (gnat_to_gnu_profile_type): Likewise.
5827         (gnat_to_gnu_subprog_type): Likewise.
5828         * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
5829         (Case_Statement_to_gnu): Likewise.
5830         (gnat_to_gnu): Likewise.
5831         (process_freeze_entity): Likewise.
5832         (process_type): Likewise.
5833         (add_stmt_with_node): Adjust for renaming.
5834         * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
5835         (renaming_from_generic_instantiation_p): Rename to...
5836         (renaming_from_instantiation_p): ...this.  Use inline predicate.
5837         (pad_type_hasher::keep_cache_entry): Fold.
5839 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5841         * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
5842         (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
5843         (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
5844         (N_Slice): Likewise.
5845         (N_Selected_Component): Likewise.  Do not try again to translate it.
5846         (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
5848 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5850         * repinfo.ads: Document new treatment of dynamic values.
5851         (TCode): Bump upper bound to 29.
5852         (Dynamic_Val): New constant set to 29.
5853         * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
5854         (Rep_Value)  <Dynamic_Val>: Likewise.
5855         * repinfo.h (Dynamic_Val): New macro.
5856         * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
5857         DECL_P nodes too.
5858         <INTEGER_CST>: Set TCODE instead of recursing.
5859         <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
5860         <VAR_DECL>: New case.
5861         <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
5862         <BIT_AND_EXPR>: Adjust.
5863         <CALL_EXPR>: Do not fall through.
5865 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5867         * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
5868         there is no target, do not create a temporary for the return value for
5869         an allocator either.
5871 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5873         * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
5874         unconstrained array type.
5876 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5877             Alan Hayward  <alan.hayward@arm.com>
5878             David Sherwood  <david.sherwood@arm.com>
5880         * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
5881         instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
5883 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5884             Alan Hayward  <alan.hayward@arm.com>
5885             David Sherwood  <david.sherwood@arm.com>
5887         * gcc-interface/decl.c (check_ok_for_atomic_type): Use
5888         is_a <scalar_int_mode>.
5889         * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
5890         * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
5892 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5893             Alan Hayward  <alan.hayward@arm.com>
5894             David Sherwood  <david.sherwood@arm.com>
5896         * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
5897         instead of mode_for_size.
5898         (gnat_to_gnu_subprog_type): Likewise.
5899         * gcc-interface/utils.c (make_type_from_size): Likewise.
5901 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5902             Alan Hayward  <alan.hayward@arm.com>
5903             David Sherwood  <david.sherwood@arm.com>
5905         * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
5906         (fp_size_to_prec): Likewise.
5908 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5909             Alan Hayward  <alan.hayward@arm.com>
5910             David Sherwood  <david.sherwood@arm.com>
5912         * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
5913         <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
5915 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5916             Alan Hayward  <alan.hayward@arm.com>
5917             David Sherwood  <david.sherwood@arm.com>
5919         * gcc-interface/decl.c (validate_size): Update use of
5920         GET_MODE_WIDER_MODE, forcing a wider mode to exist.
5922 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5923             Alan Hayward  <alan.hayward@arm.com>
5924             David Sherwood  <david.sherwood@arm.com>
5926         * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
5927         (fp_size_to_prec): Likewise.
5929 2017-08-29  Martin Liska  <mliska@suse.cz>
5931         PR other/39851
5932         * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
5934 2017-08-08  Martin Liska  <mliska@suse.cz>
5936         * gcc-interface/trans.c: Include header files.
5938 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
5940         * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
5941         as new argument to the imported_module_or_decl debug hook.
5943 2017-07-25  Javier Miranda  <miranda@adacore.com>
5945         * checks.adb (Apply_Divide_Checks): Ensure that operands are not
5946         evaluated twice. 
5948 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
5950         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
5951         TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
5952         (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
5954 2017-07-18  Mike Frysinger  <vapier@chromium.org>
5956         * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
5957         (../../gnatlink$(exeext)): Likewise.
5959 2017-07-15  John Paul Adrian Glaubitz  <glaubitz@physik.fu-berlin.de>
5961         PR ada/81446
5962         * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
5963         (Backend_Overflow_Checks): Set to True.
5965 2017-06-23  Jakub Jelinek  <jakub@redhat.com>
5967         * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
5969 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
5971         * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
5972         notice.  New macro.
5973         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
5974         as a definition.
5975         (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
5976         definition.
5977         * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
5978         imported subprograms for the current compilation unit as
5979         definitions.  Disable debug info for references to variables.
5980         * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
5981         * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
5982         not built-in functions to their binding scope.
5983         (create_subprog_decl): Add a DEFINITION parameter.  If it is true, tag
5984         the function as a definition.  Update all callers.
5985         (gnat_write_global_declarations): Emit debug info for imported
5986         functions.  Filter out external variables for which debug info
5987         is disabled.
5989 2017-06-15  Nicolas Boulenguez  <nicolas.boulenguez@free.fr>
5991         PR ada/81105
5992         * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
5993         (i[3456]86-pc-gnu): Likewise.
5994         (x86_64 kfreebsd): Likewise.
5996 2017-06-12  Eric Botcazou  <ebotcazou@adacore.com>
5998         PR bootstrap/80897
5999         * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
6001 2017-06-12  Eric Botcazou  <ebotcazou@adacore.com>
6003         PR ada/81070
6004         * s-interr-hwint.adb: Reinstate.
6005         * gcc-interface/Makefile.in (RTEMS): Use it again.
6007 2017-06-08  Olivier Hainque  <hainque@adacore.com>
6009         * vx_crtbegin_auto.c: Update year in copyright notice.
6010         * vx_crtbegin.c: Likewise.
6011         * vx_crtbegin.inc: Likewise. 
6012         * vx_crtend.c:  Likewise.
6014 2017-06-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6016         * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
6017         * s-tpopsp-rtems.adb: Delete.
6019 2017-06-02  Olivier Hainque  <hainque@adacore.com>
6021         * vx_crtbegin_auto.c: New file.
6022         * vx_crtbegin.c: New file.
6023         * vx_crtbegin.inc: New file.
6024         * vx_crtend.c: New file.
6026 2017-05-25  Jonathan Wakely  <jwakely@redhat.com>
6028         * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
6029         const qualifiers that cause -Wignored-qualifiers warnings.
6031 2017-05-22  Eric Botcazou  <ebotcazou@adacore.com>
6033         * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
6034         for Itypes that are E_Access_Subtype.
6035         <E_Access_Subtype>: Use the DECL of the base type directly.
6037 2017-05-22  Ed Schonberg  <schonberg@adacore.com>
6038             Eric Botcazou  <ebotcazou@adacore.com>
6040         * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
6041         limited view may appear in the profile of a function, and a call to
6042         that function in another unit in which the full view is available must
6043         use this full view to spurious type errors at the point of call.
6044         * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
6045         of parent body with a with clause for the main unit.
6046         * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
6047         (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
6048         types declared in external units like types from limited with clauses.
6049         Adjust final processing of defer_limited_with_list accordingly.
6050         * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
6051         again to translate the prefix after the field if it is incomplete.
6053 2017-05-22  Eric Botcazou  <ebotcazou@adacore.com>
6055         * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
6056         alignment for simple volatile fields and remove associated errors.
6058 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6060         * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
6061         * gcc-interface/trans.c (get_elaboration_procedure): Make static.
6063 2017-05-15  Pierre-Marie de Rodat  <derodat@adacore.com>
6065         * gcc-interface/utils.c (can_materialize_object_renaming_p):
6066         Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
6067         process Original_Node instead of expanded names.
6069 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6071         * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
6072         addressability check in the constrained case.
6074 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6076         * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
6077         types not coming from a limited context.
6079 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6081         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
6082         the inlined list that are not public.
6083         * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
6084         there is a pragma Inline_Always on the subprogram.
6086 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6088         * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
6089         <N_Allocator>: Use properly typed constants.
6090         (extract_values): Move around.
6091         (pos_to_constructor): Minor tweaks.
6092         (Sloc_to_locus): Fix formatting.
6093         * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
6094         * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
6095         (Gigi_Equivalent_Type): Adjust head comment.
6096         * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
6098 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6100         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
6101         is a representation clause on an extension, propagate the alignment of
6102         the parent type only if the platform requires strict alignment.
6104 2017-05-12  Eric Botcazou  <ebotcazou@adacore.com>
6106         * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
6107         instead of Word_Size.
6109         Revert
6110         2017-03-28  Andreas Schwab  <schwab@suse.de>
6112         PR ada/80117
6113         * system-linux-aarch64-ilp32.ads: New file.
6114         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6115         from LIBGNAT_TARGET_PAIRS.
6116         (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6117         (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6118         LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6119         or -mabi=ilp32, resp.
6121 2017-05-10  H.J. Lu  <hongjiu.lu@intel.com>
6123         PR ada/80626
6124         * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
6125         instead of Word_Size.
6127 2017-05-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6129         * raise-gcc.c (exception_class_eq): Make ec parameter const.
6131 2017-05-02  Richard Biener  <rguenther@suse.de>
6133         * gcc-interface/misc.c (gnat_post_options): Do not set
6134         -fstrict-overflow.
6136 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6138         * gcc-interface/trans.c (assoc_to_constructor): Make sure
6139         Corresponding_Discriminant is only called on discriminants.
6140         Skip the saving of the result only for them.
6141         (gnat_to_gnu) <N_Selected_Component>: Likewise.
6142         <N_Unchecked_Type_Conversion>: Translate the result type first.
6143         (gigi): Set TREE_NOTHROW on Begin_Handler.
6144         (stmt_list_cannot_raise_p): New predicate.
6145         (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
6146         a cleanup if the statements of the handler cannot raise.
6147         (process_freeze_entity): Use Is_Record_Type.
6148         (process_type): Likewise.
6150 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6152         * einfo.ads (Corresponding_Record_Component): New alias
6153         for Node21 used for E_Component and E_Discriminant.
6154         * einfo.adb (Corresponding_Record_Component): New function.
6155         (Set_Corresponding_Record_Component): New procedure.
6156         (Write_Field21_Name): Handle Corresponding_Record_Component.
6157         * sem_ch3.adb (Inherit_Component): Set
6158         Corresponding_Record_Component for every component in
6159         the untagged case.  Clear it afterwards for non-girder
6160         discriminants.
6161         * gcc-interface/decl.c (gnat_to_gnu_entity)
6162         <E_Record_Type>: For a derived untagged type with discriminants
6163         and constraints, apply the constraints to the layout of the
6164         parent type to deduce the layout.
6165         (field_is_aliased): Delete.
6166         (components_to_record): Test DECL_ALIASED_P directly.
6167         (annotate_rep): Check that fields are present except for
6168         an extension.
6169         (create_field_decl_from): Add DEBUG_INFO_P
6170         parameter and pass it in recursive and other calls.  Add guard
6171         for the manual CSE on the size.
6172         (is_stored_discriminant): New predicate.
6173         (copy_and_substitute_in_layout): Consider only
6174         stored discriminants and check that original fields are present
6175         in the old type.  Deal with derived types.  Adjust call to
6176         create_variant_part_from.
6178 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6180         * exp_ch6.adb (Expand_Call_Helper): When locating the
6181         accessibility entity created for an access parameter, handle
6182         properly a reference to a formal of an enclosing subprogram. if
6183         the reference appears in an inherited class-wide condition, it
6184         is the rewriting of the reference in the ancestor expression,
6185         but the accessibility entity must be that of the current formal.
6187 2017-05-02  Javier Miranda  <miranda@adacore.com>
6189         * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
6190         (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
6191         Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
6192         Call Expand_Non_Binary_Modular_Op.
6194 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6196         * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
6197         has discriminants, do not override the Stored_Constraint list of
6198         the full view of the derived type with that of the derived type.
6200 2017-05-02  Bob Duff  <duff@adacore.com>
6202         * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
6204 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
6206         * s-os_lib.ads: Minor typo fix.
6208 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
6210         * gnatls.adb: Merge and refactor code from Prj.Env and remove
6211         this deprecated dependency.
6213 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6215         * exp_util.ads: minor comment addition.
6217 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6219         * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
6220         pastos in part #3 of the head comment.
6222 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6224         * exp_ch3.adb (Freeze_Type): Do not generate an invariant
6225         procedure body for a local (sub)type declaration within a
6226         predicate function. Invariant checks do not apply to these, and
6227         the expansion of the procedure will happen in the wrong scope,
6228         leading to misplaced freeze nodes.
6230 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6232         * exp_util.adb (Insert_Library_Level_Action): Use proper scope
6233         to analyze generated actions.  If the main unit is a body,
6234         the required scope is that of the corresponding unit declaration.
6236 2017-05-02  Arnaud Charlet  <charlet@adacore.com>
6238         * einfo.adb (Declaration_Node): flip branches of
6239         an IF statement to avoid repeated negations in its condition;
6240         no change in semantics, only to improve readability.
6242 2017-05-02  Arnaud Charlet  <charlet@adacore.com>
6244         * sem_case.adb: Remove extra spaces in parameter declarations.
6246 2017-05-02  Justin Squirek  <squirek@adacore.com>
6248         * usage.adb: Replace space with hyphen ("run time" -> "run-time")
6249         in usage line for new -gnatwE switch.
6251 2017-05-02  Claire Dross  <dross@adacore.com>
6253         * a-cofuve.ads (Remove): Remove unnecessary
6254         conditions in precondition.
6256 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
6258         * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
6259         sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
6261 2017-05-02  Justin Squirek  <squirek@adacore.com>
6263         * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6264         alternative expression.
6265         * sem_res.adb (Resolve_Case_Expression): Ditto.
6267 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6269         * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
6270         Refine predicate for the case where the primitive operation
6271         is a renaming of equality.  An overriding operation that is
6272         a user-defined renaming of predefined equality inherits its
6273         slot from the overridden operation. Otherwise it is treated
6274         as a predefined op and occupies the same predefined slot as
6275         equality. A call to it is transformed into a call to its alias,
6276         which is the predefined equality. A dispatching call thus uses
6277         the proper slot if operation is further inherited and called
6278         with class-wide arguments.
6280 2017-05-02  Justin Squirek  <squirek@adacore.com>
6282         * errout.adb (Set_Msg_Text): Add a case to switch the message
6283         type when the character '[' is detected signifying a warning
6284         about a run-time exception.
6285         * opt.ads Add a new Warning_Mode value for new switch
6286         * switch-b.adb (Scan_Binder_Switches): Add case for the binder
6287         to handle new warning mode
6288         * usage.adb (Usage): Add usage entry for -gnatwE
6289         * warnsw.adb (Set_Warning_Switch): Add case for the new switch
6291 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6293         * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
6294         declaration that operates on some fixed point type.
6296 2017-05-02  Justin Squirek  <squirek@adacore.com>
6298         * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
6300 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6302         * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
6304 2017-05-02  Justin Squirek  <squirek@adacore.com>
6306         * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6307         expression (Analyze_If_Expression): Add check for valid condition
6308         * sem_eval.adb (Eval_Case_Expression): Add check for error posted
6309         on case-expression
6310         * sem_res.adb (Resolve_If_Expression): Add check for valid
6311         condition and then-expression.
6313 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6315         * exp_ch3.adb (Build_Initialization_Call): Generate a null
6316         statement if the initialization call is a null procedure, as
6317         can happen with a controlled type with no explicit Initialize
6318         procedure, or an array of such.
6319         * exp_ch7.adb (Process_Object_Declaration): For a type with
6320         controlled components that has a trivial Initialize procedure,
6321         insert declaration for finalization counter after object
6322         declaration itself.
6323         (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
6324         finalization block and attendant declarations if component has
6325         a trivial Initialize procedure.
6326         (Make_Init_Call): Do not generate a call if controlled type has
6327         a trivial Initialize procedure.
6329 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6331         * g-forstr.ads (Data): Move Format component last.
6332         * g-forstr.adb ("+"): Adjust for above change.
6333         * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
6334         * g-sechas.ads (Context): Move Key last.
6335         * g-socket.ads (Service_Entry_Type): Move Aliases last.
6336         * s-fileio.adb (Temp_File_Record): Move Name last.
6337         * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
6338         * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
6340 2017-05-02  Jerome Lambourg  <lambourg@adacore.com>
6342         * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
6343         switch introduced recently. finally not needed.
6345 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6347         * sem_ch6.adb (Analyze_Null_Procedure): Set the
6348         Corresponding_Body link for a null procedure declaration.
6350 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6352         * atree.h (Flag290): Add missing terminating parenthesis.
6353         * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
6354         (Set_Is_Class_Wide_Clone): Likewise.
6355         * einfo.ads (Is_Class_Wide_Clone): Likewise.
6357 2017-05-02  Gary Dismukes  <dismukes@adacore.com>
6359         * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
6360         parameter Array_Comp to indicate the case of an array object
6361         with null-excluding components.
6362         * checks.adb (Null_Exclusion_Static_Checks):
6363         Call Compile_Time_Constraint_Error instead of
6364         Apply_Compile_Time_Constraint_Error in the component case. Also
6365         call that when Array_Comp is True, with an appropriate warning for
6366         the array component case. Only create an explicit initialization
6367         by null in the case of an object of a null-excluding access type
6368         (and no longer do that in the component case).
6369         * sem_ch3.adb (Check_Component): Add a Boolean parameter
6370         Array_Comp defaulted to False.  Pass Empty for the Comp
6371         actual when calling Null_Exclusion_Static_Checks in the case
6372         where Comp_Decl matches Object_Decl, because we don't have a
6373         component in that case. In the case of an object or component
6374         of an array type, pass True for Array_Comp on the recursive call
6375         to Check_Component.
6377 2017-05-02  Bob Duff  <duff@adacore.com>
6379         * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
6380         compute the linux priority from the Ada priority. Call this everywhere
6381         required. In particular, the previous version was not doing this
6382         computation when setting the ceiling priority in various places. It
6383         was just converting to C.int, which results in a ceiling that is off
6384         by 1.
6386 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6388         * sem_ch3.adb: Comment predicate inheritance.
6390 2017-05-02  Tristan Gingold  <gingold@adacore.com>
6392         * s-trasym.ads: Add comment.
6394 2017-05-02  Bob Duff  <duff@adacore.com>
6396         * sem_elab.adb, sem_elab.ads: Minor comment fixes.
6397         * sem_ch4.adb: Minor reformatting.
6398         * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
6399         * s-taspri-posix-noaltstack.ads: Minor refactoring.
6400         * sinput.ads: Minor typo fix.
6402 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6404         * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
6405         * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
6406         here from exp_ch9, to recognize objects whose creation requires
6407         dynamic allocation, so that the proper warning can be emitted
6408         when restriction No_Implicit_Heap_Allocation is in effect.
6409         * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
6410         to emit proper warning when an object that requires dynamic
6411         allocation is declared.
6413 2017-05-02  Tristan Gingold  <gingold@adacore.com>
6415         * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
6417 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6419         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
6420         visibility rules for equality operators that apply within an
6421         instantiation apply within an inlined body.
6422         * sem_type.adb (Add_One_Interp): ditto.
6424 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6426         * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
6427         procedures.
6429 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6431         * snames.ads-tmpl
6432         (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
6433         Name_No_Tagged_Streams): Move to regular pragmas.  Add
6434         placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
6435         and Secondary_Stack_Size.
6436         (Pragma_Id): Move Pragma_Assume,
6437         Pragma_Attribute_Definition, Pragma_Loop_Optimize and
6438         Pragma_No_Tagged_Streams to second part.
6440 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6442         * exp_attr.adb: Minor reformatting.
6444 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6446         * sem_ch4.adb (Analyze_Selected_Component): Improve error
6447         detection for illegal references to private components or
6448         operations of a protected type in the body of the type.
6450 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6452         * opt.ads: Add missing GNAT markers in comments.
6453         * opt.adb (Set_Opt_Config_Switches): Do not override earlier
6454         settings of Optimize_Alignment at the end.
6456 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6458         * checks.adb (Apply_Constraint_Check): Do not apply
6459         a discriminant check when the associated type is a constrained
6460         subtype created for an unconstrained nominal type.
6461         * exp_attr.adb: Minor reformatting.
6463 2017-05-02  Bob Duff  <duff@adacore.com>
6465         * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
6466         the N_Raise_Expression case.
6467         * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
6468         and add assertions.
6470 2017-05-02  Yannick Moy  <moy@adacore.com>
6472         * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
6473         optimize length comparison in GNATprove mode.
6474         * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
6475         operator /= into negation of operator = when needed.
6476         (Expand_SPARK): Call new
6477         function to expand operator /=.
6479 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6481         * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
6482         Simplify the expression for a fixed-fixed division to remove
6483         divisions by constants whenever possible, as an optimization
6484         for restricted targets.
6486 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6488         * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
6490 2017-05-02  Bob Duff  <duff@adacore.com>
6492         * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
6493         to find primitive ops, instead of using an Identifier that will
6494         later be looked up. This is necessary because these ops are not
6495         necessarily visible at all places where we need to call them.
6496         * exp_util.ads: Minor comment fix.
6498 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6500         * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
6501         references are fully conformant if they are both expansions
6502         of the discriminant of a protected type, within one of the
6503         protected operations. One occurrence may be expanded into a
6504         constant declaration while the other is an input parameter to
6505         the corresponding generated subprogram.
6507 2017-05-02  Justin Squirek  <squirek@adacore.com>
6509         * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
6510         recursivly searching composite-types for null-excluding access
6511         types and verifying them.
6512         (Analyze_Object_Declaration): Add a
6513         call to Check_Null_Excluding_Components for static verification
6514         of non-initialized objects.
6515         * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
6516         a parameter for a composite-type's component and an extra case
6517         for printing component information.
6519 2017-05-02  Yannick Moy  <moy@adacore.com>
6521         * sem_ch10.adb (Analyze_Subunit): Take
6522         configuration pragma into account when restoring appropriate
6523         pragma for analysis of subunit.
6525 2017-05-02  Justin Squirek  <squirek@adacore.com>
6527         * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
6528         s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
6529         g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
6530         clauses from the runtime.
6532 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6534         * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
6535         array components specially.
6537 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6539         * sem_ch8.adb (Premature_Usage): If the premature usage of
6540         an entity is as the expression in its own object decaration,
6541         rewrite the reference as Any_Id to prevent cascaded errors or
6542         compiler loops when such an entity is used in an address clause.
6544 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
6546         * gcc-interface/decl.c (components_to_record): Add missing guard.
6548 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
6550         * gcc-interface/decl.c (components_to_record): Add more comments.
6551         Put back pending fields onto the regular list if the misalignment
6552         happens to cancel itself.
6554 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6556         * sem_ch4.adb (Complete_Object_Operation): When rewriting the
6557         controlling actual in a prefixed call, preserve the original node
6558         information if the prefix itself has been rewritten, for ASIS use.
6560 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6562         * exp_ch6.adb (Insert_Post_Call_Actions):
6563         Code clean up. Insert the post-call actions after an enclosing
6564         procedure call when N denotes a function call and appears as an
6565         actual parameter in the procedure call.
6567 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6569         * freeze.adb (Check_Component_Storage_Order): If there is a clause
6570         for the component, also reject the attribute if the component
6571         doesn't end on a byte boundary and its scalar storage order is
6572         different from that of the enclosing record type.
6574 2017-04-28  Javier Miranda  <miranda@adacore.com>
6576         * atree.ads (Info_Messages): Removed.
6577         (Warning_Info_Messages): New counter.
6578         (Report_Info_Messages): New counter.
6579         * err_vars.ads Update documentation.
6580         * errout.adb (Delete_Warning_And_Continuations): Update
6581         Info_Message occurrences.
6582         (Error_Msg_Internal): Update Info_Message occurrences.
6583         (Delete_Warning): Update Info_Message occurrences.
6584         (Write_Error_Summary): Update Info_Message occurrences.
6585         (Output_Messages): Update Info_Message occurrences.
6586         (To_Be_Removed): Update Info_Message occurrences.
6587         (Reset_Warnings): Update Info_Message occurrences.
6588         * errutil.adb (Error_Msg): Update Info_Message occurrences.
6589         (Finalize): Update Info_Message occurrences.
6590         (Initialize): Update Info_Message occurrences.
6591         * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
6592         (Compilation_Errors): Update Info_Message_Occurences.
6594 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6596         * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
6597         * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
6598         * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
6599         * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
6600         * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
6601         * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
6602         Y_Size.
6603         * sem_eval.adb (Why_Not_Static): Initialize Typ.
6604         * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
6606 2017-04-28  Bob Duff  <duff@adacore.com>
6608         * sem_util.ads, sem_util.adb (Might_Raise): New function
6609         that replaces Is_Exception_Safe, but has the opposite
6610         sense. Is_Exception_Safe was missing various cases -- calls inside
6611         a pragma Debug, calls inside an 'if' or assignment statement,
6612         etc. Might_Raise now walks the entire subtree looking for things
6613         that can raise.
6614         * exp_ch9.adb (Is_Exception_Safe): Remove.
6615         (Build_Protected_Subprogram_Body): Replace call to
6616         Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
6617         constants where possible).
6618         * exp_ch7.adb: Rename Is_Protected_Body -->
6619         Is_Protected_Subp_Body. A protected_body is something different
6620         in the grammar.
6622 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6624         * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
6625         * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
6626         (P_Discrete_Choice_List): Initialize Expr_Node variable.
6627         * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
6628         (P_Protected): Likewise.
6629         * sem_case.adb (Check_Duplicates):
6630         Add pragma Warnings on variable.
6631         * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
6632         * sem_ch4.adb (List_Operand_Interps):  Add pragma Warnings on variable.
6633         * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
6634         (Analyze_Exit_Statement): Initialize Scope_Id variable.
6635         (Analyze_Iterator_Specification): Initialize Bas variable.
6636         * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
6637         Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
6638         (Analyze_Accept_Statement): Initialize Task_Nam.
6640 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6642         * checks.adb (Install_Primitive_Elaboration_Check):
6643         Do not generate an elaboration check if all checks have been
6644         suppressed.
6646 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6648         * sem_ch13.adb (Analyze_Aspect_Specifications, case
6649         Interrupt_Handler and Attach_Handler): Generate reference
6650         to protected operation to prevent spurious warnings about
6651         unreferenced entities. Previous scheme failed with style checks
6652         enabled.
6654 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6656         * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
6657         that follows an expression function must not be relocated to
6658         the generated body, because it applies to the code that follows.
6660 2017-04-28  Gary Dismukes  <dismukes@adacore.com>
6662         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
6663         Relaxed_RM_Semantics to avoid having CodePeer issue errors on
6664         code that might violate the more stringent checking for 'Access
6665         introduced in Ada 2005.
6667 2017-04-28  Arnaud Charlet  <charlet@adacore.com>
6669         * a-cforse.adb: minor style fix in comment.
6671 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6673         * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
6674         initialize Block_Decls variable.
6675         (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
6676         (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
6677         * exp_disp.adb (Expand_Interface_Actuals): Initialize
6678         Formal_DDT and Actual_DDT variables.
6679         (Expand_Interface_Thunk): Initialize Iface_Formal.
6680         (Make_DT): Initialize Size_Comp.
6681         (Make_Select_Specific_Data_Table): Initialize Decls.
6682         * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
6683         Also initialize more RPC_Receiver_* variables.
6684         (Build_To_Any_Function): Initialize Cstr_Formal.
6685         * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
6687 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6689         * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
6690         node between access types, freeze the designated type as well,
6691         so that dispatch table pointers are created in the proper scope,
6692         and not in the constructed body of the expression function.
6694 2017-04-28  Bob Duff  <duff@adacore.com>
6696         * alloc.ads (Nodes_Initial): Go back to previous value. The large
6697         value makes large compilations faster, but small compilations slower.
6699 2017-04-28  Arnaud Charlet  <charlet@adacore.com>
6701         * sem_util.adb: minor typos in Is_Child_Or_Sibling.
6703 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6705         * erroutc.adb (Compilation_Errors): Do not consider info messages
6706         as suitable warnings when warnings must be treated as errors.
6707         * sem_ch7.adb (Analyze_Package_Specification): Do not consider
6708         internally-generated packages when outputting completion
6709         information.
6710         * errout.adb (Output_Messages): Do not consider info messages as
6711         suitable warnings when warnings must be treated as errors.
6712         * errutil.adb (Finalize): Do not consider info messages as
6713         suitable warnings when warnings must be treated as errors.
6715 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6717         * warnsw.ads: Minor fix for incorrect wording in comment.
6719 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6721         * sem_res.adb (In_Instance_Code): New predicate in
6722         Valid_Conversion, to determine whether a type conversion appears
6723         as (or within) an actual for a formal object.  Type conversions
6724         in instances are not rechecked in Valid_Conversion because
6725         visibility changes between generic location andi instance may
6726         lead to spurious errors, but conversions within an actual must be
6727         fully checked, and they are not fully resolved when pre-analyzing
6728         the actuals.
6730 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6732         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
6733         New_Copy_Tree instead of Relocate_Node as any subsequent copies
6734         of the relocated node will have mangled Parent pointers.
6735         * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
6736         tables used in conjunction with entity and itype replication.
6737         (Visit_Entity): Rewrite the restriction on which entities
6738         require duplication.  The restriction now includes all types.
6740 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6742         * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
6743         a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
6744         a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
6745         cleanups.
6747 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6749         * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
6750         gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
6752 2017-04-28  Gary Dismukes  <dismukes@adacore.com>
6754         * exp_util.adb: Minor reformatting.
6756 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6758         * sem_ch4.adb: Fix copy/pasto.
6760 2017-04-27  Tristan Gingold  <gingold@adacore.com>
6762         * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
6763         raise-gcc.c. Fix include search path for raise-gcc.c
6765 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
6767         * fe.h (Warn_On_Questionable_Layout): Declare.
6768         * warnsw.ads (Warn_On_Record_Holes): Move down.
6769         (Warn_On_Questionable_Layout): New boolean variable.
6770         (Warning_Record): Add Warn_On_Questionable_Layout field.
6771         * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
6772         (Restore_Warnings): Likewise.
6773         (Save_Warnings): Likewise.
6774         (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
6775         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
6776         components_to_record.
6777         (gnu_field_to_gnat): New function.
6778         (warn_on_field_placement): Likewise.
6779         (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
6780         parameters.  Rename local variables and adjust recursive call.
6781         Rework final scan of the field list and implement warnings on the
6782         problematic placement of specific sorts of fields.
6784 2017-04-27  Bob Duff  <duff@adacore.com>
6786         * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
6787         * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
6788         * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
6789         * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
6790         * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
6791         * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
6792         For efficiency, cache results of Is_Internal_File_Name and
6793         Is_Predefined_File_Name in the Units table. This avoids a lot
6794         of repeated text processing.
6796 2017-04-27  Emmanuel Briot  <briot@adacore.com>
6798         * g-comlin.adb (Sort_Sections): remove useless test.
6800 2017-04-27  Claire Dross  <dross@adacore.com>
6802         * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
6803         allow the use of regular equality over elements in contracts.
6804         (Formal_Model): Ghost package containing model functions that are
6805         used in subprogram contracts.
6806         (Current_To_Last): Removed, model functions should be used instead.
6807         (First_To_Previous): Removed, model functions should be used instead.
6808         (Strict_Equal): Removed, model functions should be used instead.
6809         (No_Overlap): Removed, model functions should be used instead.
6810         (Equivalent_Keys): Functions over cursors are removed. They were
6811         awkward with explicit container parameters.
6812         * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
6813         allow the use of regular equality over elements in contracts.
6814         (Formal_Model): Ghost package containing model functions that
6815         are used in subprogram contracts.
6816         (Current_To_Last): Removed, model functions should be used instead.
6817         (First_To_Previous): Removed, model functions should be used instead.
6818         (Strict_Equal): Removed, model functions should be used instead.
6819         (No_Overlap): Removed, model functions should be used instead.
6821 2017-04-27  Yannick Moy  <moy@adacore.com>
6823         * gnat1drv.adb: Code cleanup.
6825 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6827         * exp_util.adb (Replace_Entity): The prefix of a 'Result
6828         attribute reference in a post- condition is the subprogram to
6829         which the condition applies. If the condition is inherited
6830         by a type extension, the prefix becomes a reference to the
6831         inherited operation, but there is no need to create a wrapper
6832         for this operation, because 'Result is expanded independently
6833         when elaborating the postconditions.
6835 2017-04-27  Bob Duff  <duff@adacore.com>
6837         * sinput.adb: Minor code cleanup.
6838         * namet.adb (Append): Create faster versions of
6839         Append(String) and Append(Name_Id) by using slice assignment
6840         instead of loops.
6841         * sem_util.adb (In_Instance): Speed this up by removing
6842         unnecessary tests; Is_Generic_Instance is defined for all
6843         entities.
6844         * sem_util.ads, sem_util.adb (In_Parameter_Specification):
6845         Remove unused function.
6846         * alloc.ads (Nodes_Initial): Use a much larger value, because
6847         the compiler was spending a lot of time copying the nodes table
6848         when it grows. This number was chosen in 1996, so is rather out
6849         of date with current memory sizes. Anyway, it's virtual memory.
6850         Get rid of Orig_Nodes_...; use Node_... instead.
6851         * atree.adb (Lock): Do not release the Nodes tables; it's a
6852         waste of time.
6853         Orig_Nodes_ ==> Nodes_
6854         * nlists.adb: Orig_Nodes_ ==> Nodes_
6855         * g-table.adb: Remove unused "with" clause.
6856         * g-table.ads, table.ads: Remove Big_Table_Type, which should
6857         not be used by clients.
6858         * g-dyntab.adb (Last_Allocated): New function
6859         to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
6861 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6863         * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
6864         check.
6865         (Subtypes_Statically_Match): Remove duplicate check.
6866         * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
6868 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6870         * exp_aggr.adb (Replace_Type): Remove the special processing
6871         for selected components.
6872         * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
6873         processing for attributes Fixed_Value and Integer_Value.
6874         * exp_util.adb (Side_Effect_Free): Merge the processing for
6875         qualified expressions, type conversions, and unchecked type
6876         conversions.
6877         * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
6878         and Optional.
6879         * par-ch3.adb (P_Declarative_Items): Merge the processing for
6880         tokens function, not, overriding, and procedure.
6881         * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
6882         for qualified expressions, type conversions, and unchecked
6883         type conversions.
6884         * sem_util.adb (Compile_Time_Constraint_Error): Merge the
6885         processing for Ada 83 and instances.
6886         (Object_Access_Level): Merge the processing for indexed components
6887         and selected components.
6888         * uname.adb (Add_Node_Name): Merge the processing for stubs.
6890 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6892         * checks.adb (Install_Primitive_Elaboration_Check):
6893         Do not generate the check when restriction No_Elaboration_Code
6894         is in effect.
6896 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6898         * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
6899         of Expand_Dispatching_Call. If the denoted subprogram has a
6900         class-wide precondition, this is the only precondition that
6901         applies to the call, rather that the class-wide preconditions
6902         that may apply to the body that is executed. (This is specified
6903         in AI12-0195).
6905 2017-04-27  Yannick Moy  <moy@adacore.com>
6907         * gnat1drv.adb (Adjust_Global_Switches): Issue
6908         a warning in GNATprove mode if the runtime library does not
6909         support IEEE-754 floats.
6911 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6913         * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
6914         is itself inherited it does not carry any contract information,
6915         so examine its parent operation which is its Alias.
6917 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6919         * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
6920         prefix can be an object reference in which case Obj'Image (X)
6921         can only be interpreted as an indexing of the parameterless
6922         version of the attribute.
6923         * par-ch4.adb (P_Name): An attribute reference can be the prefix of
6924         an indexing or a slice operation if the attribute does not require
6925         parameters. In Ada2012 'Image also belongs in this category,
6926         and A'Image (lo .. hi) is legal and must be parsed as a slice.
6928 2017-04-27  Yannick Moy  <moy@adacore.com>
6930         * exp_ch4.adb: Minor reformatting.
6931         * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
6932         disable the CodePeer and C generation modes. Similar to the
6933         opposite actions done in CodePeer mode.
6935 2017-04-27  Yannick Moy  <moy@adacore.com>
6937         * sem_res.adb: Remove duplicate code.
6938         * sem_attr.adb: Delete duplicate code.
6940 2017-04-27  Bob Duff  <duff@adacore.com>
6942         * g-dyntab.adb: Reduce the amount of copying in
6943         Release. No need to copy items past Last.
6945 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6947         * checks.adb Add with and use clauses for Sem_Disp.
6948         (Install_Primitive_Elaboration_Check): New routine.
6949         * checks.ads (Install_Primitive_Elaboration_Check): New routine.
6950         * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
6951         processing of 'Elaborated.
6952         * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
6953         elaboration check.
6955 2017-04-27  Bob Duff  <duff@adacore.com>
6957         * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
6958         If the table grows and then shrinks back to empty, we won't necessarily
6959         point back to the empty array. Code cleanups.
6960         * sinput.ads: Add 'Base to Size clause to match the declared
6961         component subtypes.
6963 2017-04-27  Claire Dross  <dross@adacore.com>
6965         * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
6966         allow the use of regular equality over elements in contracts.
6967         (Formal_Model): Ghost package containing model functions that
6968         are used in subprogram contracts.
6969         (Current_To_Last): Removed, model functions should be used instead.
6970         (First_To_Previous): Removed, model functions should be used instead.
6971         (Strict_Equal): Removed, model functions should be used instead.
6972         (No_Overlap): Removed, model functions should be used instead.
6973         * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
6974         Boolean generic parameter to disable contracts for equivalence
6975         between keys.
6976         (Witness): Create a witness of a key that is used for handling of
6977         equivalence between keys.
6978         (Has_Witness): Check whether a witness is contained in a map.
6979         (W_Get): Get the element associated to a witness.
6980         (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
6981         directly.
6982         * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
6983         Boolean generic parameter to disable contracts for equivalence
6984         between keys.
6985         * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
6986         of equivalence on functional maps.
6987         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
6988         of equivalence on functional maps.
6990 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6992         * exp_ch9.adb (Expand_Entry_Barrier): Code
6993         cleanup. Do not perform the optimization which removes the
6994         declarations of the discriminant and component renamings when
6995         validity checks on operands and attributes are in effect.
6997 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6999         * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
7000         freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
7001         a-cfhama.ads, a-cofove.ads: Minor reformatting.
7003 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7005         * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
7006         pointer dereference.
7007         * g-spipat.adb (Dump): Code clean up. Protect against a possible
7008         null pointer dereference.
7010 2017-04-27  Bob Duff  <duff@adacore.com>
7012         * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
7013         Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
7014         Free renames Init, since they do the same thing.
7015         * g-table.ads: Default for Table_Low_Bound.
7016         * table.ads: Default for Table_Low_Bound, Table_Initial, and
7017         Table_Increment.
7019 2017-04-27  Bob Duff  <duff@adacore.com>
7021         * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
7022         can reallocate.
7023         * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
7024         * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
7025         Reorder code so that above assertions do not fail.
7026         * table.ads: Remove obsolete comment on Locked.
7028 2017-04-27  Claire Dross  <dross@adacore.com>
7030         * a-cfdlli.ads: Code cleanup.
7032 2017-04-27  Yannick Moy  <moy@adacore.com>
7034         * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
7035         when needed for proof.  (Expand_SPARK): Call the new procedure.
7036         * exp_util.ads Fix typo.
7038 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7040         * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
7041         fixes.
7043 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7045         * sem_elab.adb Add new type Visited_Element
7046         and update the contents of table Elab_Visited.  Various code clean up.
7047         (Check_Elab_Call): Determine whether a prior call to
7048         the same subprogram was already examined within the same context.
7049         (Check_Internal_Call_Continue): Register the subprogram being
7050         called as examined within a particular context. Do not suppress
7051         elaboration warnings.
7053 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7055         * xoscons.adb, osint.ads: Minor reformatting.
7057 2017-04-27  Bob Duff  <duff@adacore.com>
7059         * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
7060         Table_Count_Type --> Table_Last_Type, because the name
7061         was confusing (a "count" usually starts at zero).  Add
7062         functionality supported or needed by other tables packages
7063         (Move, Release_Threshold).
7064         * g-table.ads, g-table.adb: This is now just a thin wrapper
7065         around g-dyntab.ads/g-dyntab.adb.  Add functionality supported
7066         or needed by other tables packages (Save, Restore).
7067         * table.ads, table.adb: This is now just a thin wrapper around
7068         * g-table.ads/g-table.adb.
7069         * namet.h, scos.h, uintp.h: These files are reaching into the
7070         private data of some instances of g-table, whose names changed,
7071         so the above change requires some adjustment here. It now uses
7072         public interfaces.
7074 2017-04-27  Bob Duff  <duff@adacore.com>
7076         * namet.adb, namet.ads: Minor: remove unused procedures.
7078 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
7080         * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
7081         (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
7082         Add pragma Warnings on Rtype variable in nested block.  *
7083         * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
7084         * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
7085         (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
7086         * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
7087         (Process_Component_List_For_Finalize): Initialize Counter_Id.
7088         (Build_Finalize_Statements): Initialize Bod_Stmts.
7089         * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
7091 2017-04-27  Claire Dross  <dross@adacore.com>
7093         * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
7094         allow the use of regular equality over elements in contracts.
7095         (Formal_Model): Ghost package containing model functions that are
7096         used in subprogram contracts.
7097         (Current_To_Last): Removed, model
7098         functions should be used instead.
7099         (First_To_Previous): Removed, model functions should be used instead.
7100         (Strict_Equal): Removed, model functions should be used instead.
7101         (No_Overlap): Removed, model functions should be used instead.
7102         (Equivalent_Keys): Functions over cursors are removed. They were
7103         awkward with explicit container parameters.
7104         * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
7105         (proof only) procedure to help GNATprove when equivalence over
7106         keys is not equality.
7108 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7110         * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
7111         sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
7112         Minor reformatting and code cleanups.
7114 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7116         * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
7117         subsidiary of Check_Inherited_Conditions, to build pragmas for an
7118         operation whose ancestor has classwide pre/postconditions. This
7119         is used both to check the legality of the inheritance in Ada
7120         and in SPARK, and to determine whether a wrapper is needed for
7121         an inherited operation.
7122         * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
7123         Improve placement of error message for inherited classwide
7124         conditions that become illegal on type derivation.
7126 2017-04-27  Yannick Moy  <moy@adacore.com>
7128         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
7129         SPARK_Mode from context on generic package.
7130         * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
7131         useless test.
7133 2017-04-27  Claire Dross  <dross@adacore.com>
7135         * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
7136         overflows in computations.
7137         * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
7138         overflows in computations.
7139         (Insert): Rewrite precondition to avoid overflows in computations.
7140         * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
7141         overflows in computations.
7142         (Insert): Rewrite precondition to avoid overflows in computations.
7144 2017-04-27  Steve Baird  <baird@adacore.com>
7146         * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
7147         flag when it is declared in order to avoid confusing CodePeer about
7148         the possibility of an uninitialized variable read.
7150 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7152         * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
7153         no dimensionality error if the subtype of the expression is
7154         identical to the nominal subtype in the declaration, even though
7155         the expression itself may have been constant-folded and lack a
7156         dimension vector.
7157         * sem_dim.ads: Add comments on setting of dimension vectors and
7158         its interaction with node rewritings and side-effect removal.
7160 2017-04-27  Bob Duff  <duff@adacore.com>
7162         * debug.adb: Minor comment correction.
7163         * sem_dim.ads: Minor reformatting and typo fixes.
7165 2017-04-27  Bob Duff  <duff@adacore.com>
7167         * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
7168         Last of the tables via function calls, rather than relying on layout
7169         of data structures.
7171 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7173         * exp_util.adb: No wrapper in GNATprove mode.
7175 2017-04-27  Yannick Moy  <moy@adacore.com>
7177         * sem_res.adb (Resolve_Comparison_Op): Always
7178         evaluate comparisons between values of universal types.
7180 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7182         * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
7183         an elaboration counter nor a check when in GNATprove mode.
7184         * sem_util.adb (Build_Elaboration_Entity): Do not create an
7185         elaboration counter when in GNATprove mode.
7187 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7189         * freeze.adb: copy-paste typo.
7191 2017-04-27  Yannick Moy  <moy@adacore.com>
7193         * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
7194         Use correct test to detect call in GNATprove mode instead of
7195         compilation.
7197 2017-04-27  Claire Dross  <dross@adacore.com>
7199         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
7200         New property function expressing that the element of a
7201         sequence are contained in the union of two sequences.
7202         (Formal_Model.M_Elements_Included): New property function
7203         expressing that the element of a sequence are another sequence.
7204         (Generic_Sorting): Use new property functions to state that
7205         elements are preserved by Sort and Merge.
7206         * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
7207         allow the use of regular equality over elements in contracts.
7208         (Formal_Model): Ghost package containing model functions
7209         that are used in subprogram contracts.  (Capacity):
7210         On unbounded containers, return the maximal capacity.
7211         (Current_To_Last): Removed, model functions should be used instead.
7212         (First_To_Previous): Removed, model functions should be used instead.
7213         (Append): Default parameter value replaced
7214         by new wrapper to allow more precise contracts.
7215         (Insert): Subprogram restored, it seems it was useful to users even if
7216         it is inefficient.
7217         (Delete): Subprogram restored, it seems it was useful to users even if
7218         it is inefficient.
7219         (Prepend): Subprogram restored, it seems it was useful to users even
7220         if it is inefficient.
7221         (Delete_First): Subprogram restored, it seems it
7222         was useful to users even if it is inefficient.  (Delete_Last):
7223         Default parameter value replaced by new wrapper to allow more
7224         precise contracts.
7225         (Generic_Sorting.Merge): Subprogram restored.
7226         * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
7227         allow the use of regular equality over elements in contracts.
7228         (Formal_Model): Ghost package containing model functions
7229         that are used in subprogram contracts.  (Capacity):
7230         On unbounded containers, return the maximal capacity.
7231         (Current_To_Last): Removed, model functions should be used
7232         instead.
7233         (First_To_Previous): Removed, model functions should be used instead.
7234         (Append): Default parameter value replaced
7235         by new wrapper to allow more precise contracts.
7236         (Insert): Subprogram restored, it seems it was useful to users even if
7237         it is inefficient.
7238         (Delete): Subprogram restored, it seems it was useful to users even if
7239         it is inefficient.
7240         (Prepend): Subprogram restored, it seems it was useful to users even
7241         if it is inefficient.
7242         (Delete_First): Subprogram restored, it seems it
7243         was useful to users even if it is inefficient.  (Delete_Last):
7244         Default parameter value replaced by new wrapper to allow more
7245         precise contracts.
7246         (Generic_Sorting.Merge): Subprogram restored.
7247         (Vector): Do not reuse formal vectors, as it is no longer possible
7248         to supply them with an equality function over elements.
7250 2017-04-27  Bob Duff  <duff@adacore.com>
7252         * g-dyntab.adb (Release): When allocating the new
7253         table, use the correct slice of the old table to initialize it.
7255 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
7257         * einfo.ads: Minor fixes in comments.
7259 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7261         * sem_prag.adb: disable clones in SPARK_Mode.
7263 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7265         * sem_util.ads, contracts.adb: Minor reformatting.
7267 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7269         * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
7270         Build body of subprogram that has a class-wide condition that
7271         contains calls to other primitives.
7272         (Build_Class_Wide_Clone_Call); Build a call to the common
7273         class-wide clone of a subprogram with classwide conditions. The
7274         body of the subprogram becomes a wrapper for a call to the
7275         clone. The inherited operation becomes a similar wrapper to which
7276         modified conditions apply, and the call to the clone includes
7277         the proper conversion in a call the parent operation.
7278         (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
7279         subprogram that has a classwide condition that contains calls to
7280         other primitives, build an internal subprogram that is invoked
7281         through a type-specific wrapper for all inherited subprograms
7282         that may have a modified condition.
7283         * sem_prag.adb (Check_References): If subprogram has a classwide
7284         condition, create entity for corresponding clone, to be invoked
7285         through wrapper subprograns.
7286         (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
7287         message about placement if pragma isi internally generated.
7288         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
7289         a classwide clone, build body of clone as copy of original body,
7290         and rewrite original body as a wrapper as a wrapper for a call to
7291         the clone, so that it incorporates the original pre/postconditions
7292         of the subprogram.
7293         * freeze.adb (Check_Inherited_Conditions): For an inherited
7294         subprogram that inherits a classwide condition, build spec and
7295         body of corresponding wrapper so that call to inherited operation
7296         gets the modified conditions.
7297         * contracts.adb (Analyze_Contracts): If analysis of classwide
7298         condition has created a clone for a primitive operation, analyze
7299         declaration of clone.
7301 2017-04-27  Steve Baird  <baird@adacore.com>
7303         * exp_util.adb (Build_Allocate_Deallocate_Proc):
7304         Add "Suppress => All_Checks" to avoid generating unnecessary
7305         checks.
7307 2017-04-27  Yannick Moy  <moy@adacore.com>
7309         * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
7310         * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
7311         inlining body in GNATprove mode when switch -gnatdm used.
7312         * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
7313         in GNATprove mode when switch -gnatdm used.
7315 2017-04-27  Arnaud Charlet  <charlet@adacore.com>
7317         * sem_ch13.adb (Analyze_Attribute_Definition_Clause
7318         [Attribute_Address]): Call Set_Address_Taken when ignoring rep
7319         clauses, so that we keep an indication of the address clause
7320         before removing it from the tree.
7322 2017-04-27  Yannick Moy  <moy@adacore.com>
7324         * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
7325         of expression being qualified, when not an object name, or else
7326         evaluate the underlying name.
7328 2017-04-27  Jerome Lambourg  <lambourg@adacore.com>
7330         * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
7332 2017-04-27  Justin Squirek  <squirek@adacore.com>
7334         * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
7335         Process_Component_List_For_Finalization as a local variable.
7336         (Process_Component_For_Finalize): Add an extra parameter to avoid
7337         global references.
7338         (Process_Component_List_For_Finalization): Correct calls to
7339         Process_Component_For_Finalize to take Num_Comps as a parameter.
7341 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7343         * sem_ch8.adb (Find_Direct_Name): Account for the case where
7344         a use-visible entity is defined within a nested scope of an
7345         instance when giving priority to entities which were visible in
7346         the original generic.
7347         * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
7349 2017-04-27  Tristan Gingold  <gingold@adacore.com>
7351         * raise-gcc.c: Don't use unwind.h while compiling
7352         for the frontend, but mimic host behavior.
7354 2017-04-27  Javier Miranda  <miranda@adacore.com>
7356         * sem_ch3.adb (Build_Discriminated_Subtype):
7357         Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
7359 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7361         * sem_prag.adb (Analyze_Global_Item):
7362         Do not consider discriminants because they are not "entire
7363         objects". Remove the discriminant-related checks because they are
7364         obsolete.
7365         (Analyze_Input_Output): Do not consider discriminants
7366         because they are not "entire objects".
7368 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7370         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
7371         perform check if the current scope does not come from source,
7372         as is the case for a rewritten task body, because check has
7373         been performed already, and may not be doable because of changed
7374         visibility.
7376 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7378         * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
7379         a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
7380         Minor reformatting.
7382 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7384         * sem_ch4.adb (Analyze_Call): If the return type of a function
7385         is incomplete in an context in which the full view is available,
7386         replace the type of the call by the full view, to prevent spurious
7387         type errors.
7388         * exp_disp.adb (Check_Premature_Freezing): Disable check on an
7389         abstract subprogram so that compiler does not reject a parameter
7390         of a primitive operation of a tagged type being frozen, when
7391         the untagged type of that parameter cannot be frozen.
7393 2017-04-27  Bob Duff  <duff@adacore.com>
7395         * sem_attr.adb (Compute_Type_Key): Don't walk
7396         representation items for irrelevant types, which could be in a
7397         different source file.
7399 2017-04-27  Steve Baird  <baird@adacore.com>
7401         * exp_attr.adb (Expand_N_Attribute_Reference):
7402         Don't expand Image, Wide_Image, Wide_Wide_Image attributes
7403         for CodePeer.
7405 2017-04-27  Yannick Moy  <moy@adacore.com>
7407         * exp_unst.ads: Fix typos in comments.
7409 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7411         * sem_eval.adb (Choice_Matches): Handle properly a real literal
7412         whose type has a defined static predicate.
7414 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7416         * exp_ch4.adb (Insert_Dereference_Action):
7417         Do not adjust the address of a controlled object when the
7418         associated access type is subject to pragma No_Heap_Finalization.
7419         Code reformatting.
7421 2017-04-27  Pierre-Marie de Rodat  <derodat@adacore.com>
7423         * gcc-interface/utils.c (gnat_type_for_size): Set
7424         TYPE_ARTIFICIAL on created types.
7426 2017-04-27  Claire Dross  <dross@adacore.com>
7428         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7429         modifications in functional containers.
7430         * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7431         to improve readablity. Subprograms are separated between basic
7432         operations, constructors and properties. Universally quantified
7433         formulas in contracts are factorized in independant functions
7434         with a name and a comment.  Names of parameters are improved.
7436 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7438         * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7440 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7442         * sem_res.adb (Resolve_Type_Conversion): Do not
7443         install a predicate check here since this is already done during
7444         the expansion phase. Verify whether the operand satisfies the
7445         static predicate (if any) of the target type.
7446         * sem_ch3.adb (Analyze_Object_Declaration): Do
7447         not install a predicate check if the object is initialized by
7448         means of a type conversion because the conversion is subjected
7449         to the same check.
7451 2017-04-27  Tristan Gingold  <gingold@adacore.com>
7453         * raise.c (__gnat_builtin_longjmp): Remove.
7454         (__gnat_bracktrace):
7455         Add a dummy definition for the compiler (__gnat_eh_personality,
7456         __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
7457         __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
7458         __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
7459         * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
7460         * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
7461         and a-except-2005.adb.
7462         * raise-gcc.c: Allow build in compiler, compiled as a C++
7463         file.
7464         (__gnat_Unwind_ForcedUnwind): Adjust prototype.
7465         (db): Constify msg_format.
7466         (get_call_site_action_for): Don't use void arithmetic.
7467         * system.ads (Frontend_Exceptions): Set to False.
7468         (ZCX_By_Default): Set to True.
7469         (GCC_ZC_Support): Set to True.
7470         * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
7471         a-except.ad[sb].
7472         * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
7473         in gnat1 and gnatbind.
7474         * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
7475         s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
7476         * s-excmac.ads, s-excmac.adb: Copy of variants.
7477         * a-except.o: Adjust preequisites.
7478         Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
7480 2017-04-27  Claire Dross  <dross@adacore.com>
7482         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7483         modifications in functional containers.
7484         * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7485         to improve readablity. Subprograms are separated between basic
7486         operations, constructors and properties. Universally quantified
7487         formulas in contracts are factorized in independant functions
7488         with a name and a comment.  Names of parameters are improved.
7490 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7492         * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7494 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7496         * sem_res.adb (Resolve_Type_Conversion): Do not
7497         install a predicate check here since this is already done during
7498         the expansion phase. Verify whether the operand satisfies the
7499         static predicate (if any) of the target type.
7500         * sem_ch3.adb (Analyze_Object_Declaration): Do
7501         not install a predicate check if the object is initialized by
7502         means of a type conversion because the conversion is subjected
7503         to the same check.
7505 2017-04-27  Tristan Gingold  <gingold@adacore.com>
7507         * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
7508         replaced by their variants).
7510 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7512         * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
7513         cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
7514         a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
7516 2017-04-27  Tristan Gingold  <gingold@adacore.com>
7518         * s-excmac-gcc.ads, s-excmac-gcc.adb,
7519         s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
7520         Ada95.
7522 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7524         * exp_ch7.adb (Establish_Transient_Scope): Rewrite
7525         the loop which detects potential enclosing transient scopes. The
7526         loop now terminates much earlier as transient scopes are bounded
7527         by packages and subprograms.
7529 2017-04-27  Claire Dross  <dross@adacore.com>
7531         * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
7532         allow the use of regular equality over elements in contracts.
7533         (Cursor): Type is now public so that it can be used in
7534         model functions.
7535         (Formal_Model): Ghost package containing
7536         model functions that are used in subprogram contracts.
7537         (Current_To_Last): Removed, model functions should be used
7538         instead.
7539         (First_To_Previous): Removed, model functions should
7540         be used instead.
7541         (Strict_Equal): Removed, model functions
7542         should be used instead.
7543         (Append): Default parameter value
7544         replaced by new wrapper to allow more precise contracts.
7545         (Insert): Default parameter value replaced by new wrapper to
7546         allow more precise contracts.
7547         (Delete): Default parameter
7548         value replaced by new wrapper to allow more precise contracts.
7549         (Prepend): Default parameter value replaced by new wrapper to
7550         allow more precise contracts.
7551         (Delete_First): Default parameter
7552         value replaced by new wrapper to allow more precise contracts.
7553         (Delete_Last): Default parameter value replaced by new wrapper
7554         to allow more precise contracts.
7556 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7558         * exp_spark.adb (Expand_SPARK): Perform specialized expansion
7559         for object declarations.
7560         (Expand_SPARK_N_Object_Declaration): New routine.
7561         * sem_elab.adb (Check_A_Call): Include calls to the
7562         Default_Initial_Condition procedure of a type under the SPARK
7563         elaboration checks umbrella.
7565 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7567         * sem.adb (Analyze): Diagnose an illegal iterated component
7568         association.
7569         * sem_util.ads, sem_util.adb
7570         (Diagnose_Iterated_Component_Association): New routine.
7572 2017-04-27  Bob Duff  <duff@adacore.com>
7574         * adaint.c (__gnat_get_current_dir): Return 0 in length if
7575         getcwd fails.
7576         * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
7577         exception if getcwd failed.
7579 2017-04-27  Yannick Moy  <moy@adacore.com>
7581         * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
7582         entities with special prefix.
7584 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7586         * debug.adb Change the documentation of switch -gnatd.s.
7587         * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
7588         to manage the secondary stack when an enclosing scope already
7589         performs this functionality (aka relaxed management). Switch
7590         -gnatd.s may be used to force strict management in which case
7591         the block will manage the secondary stack unconditionally. Add
7592         a guard to stop the traversal when encountering a package or a
7593         subprogram scope.
7595 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7597         * sem_res.adb (Resolve_Call): Refine further the handling of
7598         limited views of return types in function calls. If the function
7599         that returns a limited view appears in the current unit,
7600         we do not replace its type by the non-limited view because
7601         this transformation is performed int the back-end. However,
7602         the type of the call itself must be the non-limited view, to
7603         prevent spurious resolution errors.
7605 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7607         * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
7608         Removed, proposed implementation using generics for class-wide
7609         preconditions proved impractical.
7610         (Class_Wide_Clone): New attribute of subprogram. Designates
7611         subprogram created for primitive operations with class-wide
7612         pre/postconditions that contain calls to other primitives. The
7613         clone holds the body of the original primitive, but the
7614         pre/postonditions do not apply to it. The original body is
7615         rewritten as a wrapper for a call to the clone.
7616         (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
7617         the flag is set, no code for the corresponding pre/postconditions
7618         is inserted into its body.
7620 2017-04-27  Bob Duff  <duff@adacore.com>
7622         * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
7623         Scalar_Storage_Order if -gnatI is given.
7624         * sem_prag.adb (Analyze_Pragma): Ignore
7625         Default_Scalar_Storage_Order if -gnatI is given.
7627 2017-04-27  Claire Dross  <dross@adacore.com>
7629         * a-cofuba.ads (Add): Take as an additional input parameter
7630         the position where the element should be inserted.
7631         (Remove): New function that removes an element from the container.
7632         * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
7633         * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
7634         (Remove): New function that removes an element from a set.
7635         * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
7636         (Remove): New function that removes an element from a sequence.
7637         (Insert): New function that adds anywhere in a sequence.
7639 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7641         * checks.adb (Generate_Range_Check): Revert previous change.
7643 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7645         * sem_util.adb: Minor reformatting/rewording.
7647 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7649         * lib-xref.adb (Generate_Reference): The use
7650         of attribute 'Result is not considered a violation of pragma
7651         Unreferenced.
7653 2017-04-27  Justin Squirek  <squirek@adacore.com>
7655         * cstand.adb (Create_Standard): Correctly set
7656         Directly_Designated_Type for Any_Access.
7657         * sem_type.adb (Covers): Minor grammar fixes.
7659 2017-04-27  Bob Duff  <duff@adacore.com>
7661         * sem_attr.adb: Minor cleanup.
7663 2017-04-27  Claire Dross  <dross@adacore.com>
7665         * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
7666         private child of Ada.Containers used to implement all functional
7667         containers.
7668         * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
7669         child of Ada.Containers. It provides functional indefinite unbounded
7670         maps which can be used as high level models for specification
7671         of data structures.
7672         * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
7673         child of Ada.Containers. It provides functional indefinite unbounded
7674         sets which can be used as high level models for specification
7675         of data structures.
7676         * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
7677         child of Ada.Containers.  It provides functional indefinite unbounded
7678         vectors which can be used as high level models for specification
7679         of data structures.
7680         * Makefile.rtl: Add new packages.
7681         * impunit.adb: Add new packages.
7683 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7685         * sem_ch4.adb: Minor reformatting.
7687 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7689         * sem_ch12.adb (Analyze_Associations): minor reformatting.
7690         (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
7691         point type actual that has user-defined arithmetic primitives,
7692         when there is a previous actual for a formal package that defines
7693         a fixed-point type with the parent user-defined operator.
7695 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7697         * checks.adb (Generate_Range_Check): Reinstate part of previous change.
7698         * sem_attr.adb (Resolve_Attribute): Generate a range check when
7699         the component type allows range checks.
7701 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7703         * sem_aux.adb (Is_Generic_Formal): Use original node to locate
7704         corresponding declaration, because formal derived types are
7705         rewritten as private extensions.
7707 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7709         * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
7710         dimensions of operands if node has been analyzed already, because
7711         previous analysis and dimension checking will have removed the
7712         dimension information from the operands.
7714 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7716         * debug.adb: Document the use of switch -gnatd.s.
7717         * einfo.ads Update the documentation on attribute
7718         Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
7719         the uses of these attributes from certain entities.
7720         * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
7721         which determines whether the block should continue to manage
7722         the secondary stack.
7723         (Manages_Sec_Stack): New routine.
7725 2017-04-27  Bob Duff  <duff@adacore.com>
7727         * atree.ads: Minor edit.
7729 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7731         * sinfo.ads: Update the section on Ghost mode. Add
7732         a section on SPARK mode. Update the placement of section on
7733         expression functions.
7735 2017-04-27  Bob Duff  <duff@adacore.com>
7737         * sinput.adb (Get_Source_File_Index): Don't
7738         assert that S is in the right range in the case where this is
7739         a .dg file under construction.
7741 2017-04-27  Yannick Moy  <moy@adacore.com>
7743         * sem_util.adb (Check_Result_And_Post_State):
7744         Handle more precisely each conjunct in expressions formed by
7745         and'ing sub-expressions.
7747 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7749         * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
7751 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7753         * gnat_rm.texi, gnat_ugn.texi,
7754         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7755         doc/gnat_ugn/platform_specific_information.rst,
7756         doc/gnat_ugn/gnat_and_program_execution.rst,
7757         doc/gnat_ugn/gnat_utility_programs.rst,
7758         doc/gnat_ugn/the_gnat_compilation_model.rst,
7759         doc/gnat_rm/implementation_defined_attributes.rst,
7760         doc/gnat_rm/the_gnat_library.rst,
7761         doc/gnat_rm/implementation_defined_pragmas.rst,
7762         doc/gnat_rm/representation_clauses_and_pragmas.rst,
7763         doc/gnat_rm/implementation_of_specific_ada_features.rst,
7764         doc/gnat_rm/implementation_defined_aspects.rst,
7765         doc/gnat_rm/implementation_defined_characteristics.rst: Update
7766         documentation.
7768 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7770         * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
7771         generating C code on complex case expressions.
7773 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7775         * sem_prag.adb (Analyze_Pragma): Generate a warning instead
7776         of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
7777         * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
7778         Ada_2012 instead of Ada_2005 to be compatible with the above
7779         change.
7780         * bindgen.adb: Silence new warning on pragma Ada_95.
7782 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7784         * checks.adb (Generate_Range_Check): Revert part of previous change.
7786 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7788         * sem_ch4.adb (Try_Container_Indexing): Handle properly a
7789         container indexing operation that appears as a an actual in a
7790         parameter association in a procedure call.
7792 2017-04-25  Olivier Ramonat  <ramonat@adacore.com>
7794         * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
7795         Fix spelling mistakes.
7797 2017-04-25  Bob Duff  <duff@adacore.com>
7799         * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
7800         * sinput-p.adb: Use regular fat pointers, with bounds checking,
7801         for source buffers.  Fix misc obscure bugs.
7802         * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
7803         checking, for source buffers.  Modify representation clause for
7804         Source_File_Record as appropriate.  Move Source_File_Index_Table
7805         from spec to body, because it is not used outside the body.
7806         Move Set_Source_File_Index_Table into the private part, because
7807         it is used only in the body and in children.  Use trickery to
7808         modify the dope in the generic instantiation case.  It's ugly,
7809         but not as ugly as the previous method.  Fix documentation.
7810         Remove obsolete code.
7811         * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
7812         indexing in source buffers.
7813         * fmap.adb: Avoid conversions from one string type to another.
7814         Remove a use of global name buffer.
7815         * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
7816         fixes.
7818 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
7820         * exp_util.adb, exp_ch4.adb: Minor reformatting.
7822 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7824         * checks.adb: Code clean up in various routines.
7825         (Generate_Range_Check): Do not generate a range check when the
7826         expander is not active or when index/range checks are suppressed
7827         on the target type.
7828         (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
7829         Remove variants that include a Supress parameter. These routines
7830         are never used, and were introduced before the current scope-based
7831         check suppression method.
7833 2017-04-25  Vasiliy Fofanov  <fofanov@adacore.com>
7835         * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
7836         code and some subprogram calls that are now noop.
7838 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7840         * exp_ch4.adb (Expand_N_Case_Expression): Take
7841         Minimize_Expression_With_Actions into account when possible.
7843 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7845         * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
7846         (Known_Null): Moved to Sem_Util.
7847         * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
7848         (Known_Null): Moved to Sem_Util.
7849         * sem_util.adb Add new enumeration type Null_Status_Kind.
7850         (Known_Non_Null): Moved from Exp_Util. Most of the logic in
7851         this routine is now carried out by Null_Status.
7852         (Known_Null): Moved from Exp_Util. Most of the logic in this routine
7853         is now carried out by Null_Status.
7854         (Null_Status): New routine.
7855         * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
7856         (Known_Null): Moved from Exp_Util.
7858 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7860         * sem_ch6.adb (Analyze_Expression_Function): Do not report an
7861         error on the return type of an expression function that is a
7862         completion, if the type is derived from a generic formal type.
7864 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7866         * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
7867         conversion are those of the target type.
7869 2017-04-25  Bob Duff  <duff@adacore.com>
7871         * a-clrefi.adb: Minor cleanup.
7873 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
7875         * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
7877 2017-04-25  Bob Duff  <duff@adacore.com>
7879         * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
7880         types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
7881         errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
7882         scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
7883         the Internal_Source buffer. This removes the incorrect call to "="
7884         the customer noticed.
7885         Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
7886         eventually need to eliminate them altogether. Or else get rid
7887         of zero-origin addressing.
7889 2017-04-25  Claire Dross  <dross@adacore.com>
7891         * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
7892         function used in GNATprove to know if an expression contains
7893         non-dispatching calls on primitives of a tagged type.
7895 2017-04-25  Bob Duff  <duff@adacore.com>
7897         * rtsfind.adb (Initialize): Initialize
7898         First_Implicit_With. Building the compiler with Normalize_Scalars
7899         and validity checking finds this being used as an uninitialized
7900         variable.
7902 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7904         * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
7905         Add a warning about SPARK mode management. The routine now
7906         saves and restores both the mode and associated pragma.
7907         (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
7908         SPARK mode management. The routine now saves and restores both
7909         the mode and associated pragma.
7910         (Analyze_Object_Contract):
7911         Add a warning about SPARK mode management. The routine
7912         now saves and restores both the mode and associated pragma.
7913         (Analyze_Package_Body_Contract): Add a warning about SPARK mode
7914         management.  The routine now saves and restores both the mode
7915         and associated pragma.  (Analyze_Package_Contract): Add a warning
7916         about SPARK mode management. The routine now saves and restores
7917         both the mode and associated pragma.
7918         (Analyze_Task_Contract):
7919         Add a warning about SPARK mode management. The routine now saves
7920         and restores both the mode and associated pragma.
7921         * expander.adb (Expand): Change the way the Ghost mode is saved
7922         and restored.
7923         * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
7924         saved and restored.
7925         * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
7926         and restored.
7927         * exp_util.adb (Build_DIC_Procedure_Body):
7928         Change the way the Ghost mode is saved and restored.
7929         (Build_DIC_Procedure_Declaration): Change the way the Ghost
7930         mode is saved and restored.
7931         (Build_Invariant_Procedure_Body):
7932         Change the way the Ghost mode is saved and restored.
7933         (Build_Invariant_Procedure_Declaration): Change the way the Ghost
7934         mode is saved and restored.
7935         (Make_Predicate_Call): Change the
7936         way the Ghost mode is saved and restored.
7937         * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
7938         saved and restored.
7939         * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7940         and its assignment.
7941         (Mark_And_Set_Ghost_Body): Remove parameter
7942         Mode and its assignment.
7943         (Mark_And_Set_Ghost_Completion):
7944         Remove parameter Mode and its assignment.
7945         (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
7946         assignment.
7947         (Mark_And_Set_Ghost_Instantiation): Remove parameter
7948         Mode and its assignment.
7949         (Mark_And_Set_Ghost_Procedure_Call):
7950         Remove parameter Mode and its assignment.
7951         (Set_Ghost_Mode):
7952         Remove parameter Mode and its assignment.
7953         * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7954         and update the comment on usage.
7955         (Mark_And_Set_Ghost_Body):
7956         Remove parameter Mode and update the comment on usage.
7957         (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
7958         update the comment on usage.
7959         (Mark_And_Set_Ghost_Declaration):
7960         Remove parameter Mode and update the comment on usage.
7961         (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
7962         update the comment on usage.
7963         (Mark_And_Set_Ghost_Procedure_Call):
7964         Remove parameter Mode and update the comment on usage.
7965         (Set_Ghost_Mode): Remove parameter Mode and update the comment
7966         on usage.
7967         * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
7968         types.
7969         * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
7970         of obsolete field SPARK_Mode_Pragma.
7971         (Load_Main_Source): Remove
7972         the assignment of obsolete field SPARK_Mode_Pragma.
7973         (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
7974         * lib-writ.adb (Add_Preprocessing_Dependency): Remove
7975         the assignment of obsolete field SPARK_Mode_Pragma.
7976         (Ensure_System_Dependency): Remove the assignment of obsolete
7977         field SPARK_Mode_Pragma.
7978         * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
7979         mode management. Change the way Ghost and SPARK modes are saved
7980         and restored.
7981         * sem.adb (Analyze): Change the way the Ghost mode is saved
7982         and restored.
7983         * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
7984         Ghost mode is saved and restored.
7985         (Process_Full_View): Change
7986         the way the Ghost mode is saved and restored.
7987         * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
7988         mode is saved and restored.
7989         * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
7990         mode is saved and restored.
7991         (Analyze_Subprogram_Body_Helper):
7992         Change the way the Ghost mode is saved and restored.
7993         * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
7994         Ghost mode is saved and restored.
7995         * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
7996         management. Save the SPARK mode-related data prior to any changes
7997         to the scope stack and contexts. The mode is then reinstalled
7998         before the subunit is analyzed in order to restore the original
7999         view of the subunit.
8000         * sem_ch12.adb (Analyze_Package_Instantiation): Update the
8001         warning on region management.  Change the way the Ghost and
8002         SPARK modes are saved and restored.
8003         (Inline_Instance_Body):
8004         Add a warning about SPARK mode management. Code clean up.
8005         (Analyze_Subprogram_Instantiation): Update the warning on region
8006         management.  Change the way the Ghost and SPARK modes are saved
8007         and restored.
8008         (Instantiate_Package_Body): Update the warning
8009         on region management. Change the way the Ghost and SPARK modes
8010         are saved and restored.
8011         (Instantiate_Subprogram_Body): Update
8012         the warning on region management. Change the way the Ghost and
8013         SPARK modes are saved and restored.
8014         (Set_Instance_Env): Add a
8015         warning about SPARK mode management. Change the way SPARK mode
8016         is saved and restored.
8017         * sem_ch13.adb (Build_Predicate_Functions):
8018         Change the way the Ghost mode is saved and restored.
8019         (Build_Predicate_Function_Declaration): Change the way the Ghost
8020         mode is saved and restored.
8021         * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
8022         mode management. Change the way SPARK mode is saved and restored.
8023         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
8024         Change the way the Ghost mode is saved and restored.
8025         (Analyze_Initial_Condition_In_Decl_Part): Change the way
8026         the Ghost mode is saved and restored.
8027         (Analyze_Pragma):
8028         Change the way the Ghost mode is saved and restored.
8029         (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
8030         Ghost mode is saved and restored.
8031         * sem_util.adb (Install_SPARK_Mode): New routine.
8032         (Restore_SPARK_Mode): New routine.
8033         (Save_SPARK_Mode_And_Set): Removed.
8034         (Set_SPARK_Mode): New routine.
8035         * sem_util.ads (Install_SPARK_Mode): New routine.
8036         (Restore_SPARK_Mode): New routine.
8037         (Save_SPARK_Mode_And_Set): Removed.
8038         (Set_SPARK_Mode): New routine.
8040 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8042         * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
8043         to determine whether a type is declared in a local package that
8044         has not yet been frozen.
8045         * freeze.adb (Freeze_Before): Use new predicate to determine
8046         whether a local package must be installed on the scope stack
8047         in order to evaluate in the proper scope actions generated by
8048         aspect specifications, such as Predicate
8049         * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
8050         using new predicate.
8052 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8054         * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
8055         comparisons between non- scalar expressions expressions because
8056         their values cannot be invalidated.
8057         * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
8058         comment on usage.
8060 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8062         * par_sco.adb: Minor reformatting.
8064 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8066         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
8067         is a type from an unfrozen local package, install package to
8068         complete the analysis of delayed aspects of the type.
8070 2017-04-25  Tristan Gingold  <gingold@adacore.com>
8072         * bingen.adb (System_Version_Control_Used): New variable.
8073         (Resolve_Binder_Options): Set the above variable.
8074         (Gen_Output_File_Ada): Conditionally call Gen_Versions.
8075         (Gen_Elab_Order): Emit blank line before.
8077 2017-04-25  Justin Squirek  <squirek@adacore.com>
8079         * sem_cat.adb (Validate_RT_RAT_Component): Added
8080         an extra check to ignore incomplete types.
8082 2017-04-25  Thomas Quinot  <quinot@adacore.com>
8084         * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
8085         bogus circuitry for the case where Name is Predicate.
8087 2017-04-25  Thomas Quinot  <quinot@adacore.com>
8089         * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
8090         Create SCOs for Predicate aspects in disabled
8091         state initially, to be enabled later on by...
8092         * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
8093         SCO for predicate as enabled.
8095 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8097         * comperr.adb (Compiler_Abort): Remove now obsolete pair of
8098         pragmas Warnings Off / On.
8099         * namet.adb (Finalize): Remove now obsolete pair of pragmas
8100         Warnings Off / On.
8101         * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
8102         * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
8103         consider comparisons between static expressions because their
8104         values cannot be invalidated.
8105         * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
8106         Warnings Off / On.
8107         (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
8108         * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
8110 2017-04-25  Bob Duff  <duff@adacore.com>
8112         * sem_elab.adb (In_Task_Activation): Trace internal calls in
8113         task bodies.
8115 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8117         * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
8118         typo fixes.
8120 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8122         * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
8123         On/Off to defend against a spurious warning in conditional
8124         compilation.
8125         * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
8126         * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
8127         defend against a spurious warning in conditional compilation.
8128         * output.adb Add a pair of pragma Warnings On/Off to defend
8129         against a spurious warning in conditional compilation.
8130         * sem_eval.adb (Eval_Relational_Op): Major code clean up.
8131         (Fold_General_Op): New routine.
8132         (Fold_Static_Real_Op): New routine.
8133         (Test_Comparison): New routine.
8134         * sem_eval.ads (Test_Comparison): New routine.
8135         * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
8136         (Warn_On_Constant_Valid_Condition): New routine.
8137         (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
8138         to detect a specific case.
8139         * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
8140         * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
8141         to defend against a spurious warning in conditional compilation.
8142         (Tree_Write): Add a pair of pragma Warnings On/Off to defend
8143         against a spurious warning in conditional compilation.
8144         * usage.adb Add a pair of pragma Warnings On/Off to defend
8145         against a spurious warning in conditional compilation.
8147 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
8149         * sinfo.ads, sem_ch13.adb: Update comment.
8151 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8153         * sem_util.adb (Is_Post_State): A reference to a
8154         generic in out parameter is considered a change in the post-state
8155         of a subprogram.
8157 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8159         * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
8160         declaration of a subprogram instance within its wrapper package,
8161         skip over null statements that may result from the rewriting of
8162         ignored pragmas.
8164 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8166         * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
8167         If the type is an unchecked_union, replace the attribute with
8168         a Raise_Program_Error (rather than inserting such before the
8169         attribute reference) to handle properly the case where we are
8170         processing a component of a larger record, and we need to prevent
8171         further expansion for the unchecked union.
8172         (Expand_Attribute_Reference, case 'Write): If the type is
8173         an unchecked_union, check whether enclosing scope is a Write
8174         subprogram. Replace attribute with a Raise_Program_Error if the
8175         discriminants of the unchecked_union type have not default values
8176         because such a use is erroneous..
8178 2017-04-25  Tristan Gingold  <gingold@adacore.com>
8180         * exp_ch9.adb (Expand_N_Task_Type_Declaration):
8181         Add relative_deadline to task record on edf profile.
8182         (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
8183         (Make_Task_Create_Call): Pass relative_deadline value.
8184         * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
8185         * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
8186         (Profile_Info): Add info for GNAT_Ravenscar_EDF.
8187         * sem_prag.adb (Set_Ravenscar_Profile): Handle
8188         GNAT_Ravenscar_EDF (set scheduling policy).
8189         (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
8190         pragma.
8191         (Sig_Flags): Add choice for Pragma_Deadline_Floor.
8192         * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
8193         New names.
8194         (Pragma_Deadline_Floor): New pragma.
8195         * targparm.adb (Get_Target_Parameters): Recognize
8196         GNAT_Ravenscar_EDF profile.
8198 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
8200         * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
8202 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8204         * sem_aux.adb (Nearest_Ancestor): Use original node of type
8205         declaration to locate nearest ancestor, because derived
8206         type declarations for record types are rewritten as record
8207         declarations.
8208         * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
8209         properly derivations that are completions of private types.
8210         (Add_Predicates): If type is private, examine rep. items of full
8211         view, which may include inherited predicates.
8212         (Build_Predicate_Functions): Ditto.
8214 2017-04-25  Javier Miranda  <miranda@adacore.com>
8216         * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
8217         to generate new entities for subtype declarations located in
8218         Expression_With_Action nodes.
8220 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8222         * sem_elab.adb (Check_A_Call): Remove
8223         local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
8224         need for Elaborate_All when SPARK elaboration checks are
8225         required. Update the checks for instances, variables, and calls
8226         to Default_Initial_Condition procedures.
8228 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8230         * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
8231         into a boolean aspect, in analogy with the Ada aspect No_Return.
8233 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8235         * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
8237 2017-04-25  Bob Duff  <duff@adacore.com>
8239         * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
8240         Is_True_Constant for an array variable that is passed to a
8241         foreign function as an 'in' parameter.
8242         * debug.adb: Document -gnatd.q.
8244 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8246         * sem_ch6.adb (Analyze_Expression_Function): If expression function
8247         is completion and return type is an access type do not freeze
8248         designated type: this will be done in the process of freezing
8249         the expression if needed.
8250         (Freeze_Expr_Types): Check whether type is complete before
8251         creating freeze node, to provide a better error message if
8252         reference is premature.
8253         * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
8254         functions created by type derivations.
8256 2017-04-25  Pascal Obry  <obry@adacore.com>
8258         * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
8260 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8262         * sem_res.adb (Resolve_Type_Conversion):
8263         When resolving against any fixed type, set the type of the
8264         operand as universal real when the operand is a multiplication
8265         or a division where both operands are of any fixed type.
8266         (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
8267         placement of an error message by pointing to the operand of a
8268         type conversion rather than the conversion itself.
8270 2017-04-25  Thomas Quinot  <quinot@adacore.com>
8272         * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
8273         Needs_Debug_Info when producing SCOs.
8275 2017-04-25  Thomas Quinot  <quinot@adacore.com>
8277         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
8278         Always pass a null finalization master for a library level named access
8279         type to which a pragme No_Heap_Finalization applies.
8281 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
8283         PR ada/78845
8285         * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
8286         set to A'First(2) and vice versa.
8288 2017-04-25  Yannick Moy  <moy@adacore.com>
8290         * freeze.adb (Freeze_Record_Type): Remove obsolete
8291         rule on volatile tagged record restriction on SPARK code.
8293 2017-04-25  Yannick Moy  <moy@adacore.com>
8295         * sem_prag.adb (minor) Fix SPARK RM reference.
8297 2017-04-25  Yannick Moy  <moy@adacore.com>
8299         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
8300         comment to reflect which entity is chosen as unique entity.
8301         (Unique_Entity): Return full view instead of private spec for
8302         protected type or task type. Fix possible incorrect access when
8303         called on entry.
8305 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8307         * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
8308         array types only instead of all packed array types.
8310 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8312         * sem_ch6.adb (Conforming_Types): If type of formal as a specified
8313         dimension system, verify that dimensions of both match.
8314         (Check_Conformance): Add error message in case of dimension
8315         mismatch.
8316         * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
8317         predicate.
8319 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
8321         * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
8322         confusing.
8324 2017-04-25  Yannick Moy  <moy@adacore.com>
8326         * sem_util.adb: Minor refactoring.
8327         * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
8329 2017-04-25  Claire Dross  <dross@adacore.com>
8331         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
8332         ultimate alias when accessing overridden operation. Indeed, if the
8333         overridden operation is itself inherited, it won't have any explicit
8334         contract.
8336 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8338         * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
8339         overlap if the two formals have different types, because formally
8340         the corresponding actuals cannot designate the same objects.
8342 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8344         * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
8345         dimensions are present from context, use them.  b) If operand is
8346         a static constant rewritten as a literal, obtain the dimensions
8347         from the original declaration, otherwise use dimensions of type
8348         established from context.
8350 2017-04-25  Yannick Moy  <moy@adacore.com>
8352         * sem_util.adb (Is_Effectively_Volatile): Protect against base type
8353         of array that is private.
8355 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8357         * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
8358         reformatting.
8360 2017-04-25  Yannick Moy  <moy@adacore.com>
8362         * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
8363         on body.
8365 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8367         * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
8368         the check that recognizes a call to a private overridding and
8369         replaces the called subprogram with its alias.
8371 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8373         * exp_util.adb: Minor reformatting.
8375 2017-04-25  Justin Squirek  <squirek@adacore.com>
8377         * exp_ch3.adb (Freeze_Type): Add condition to always treat
8378         interface types as a partial view of a private type for the
8379         generation of invariant procedure bodies.
8380         * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
8381         Add a condition to get the Corresponding_Record_Type for
8382         concurrent types, add condition to return in the absence of a
8383         class in the pragma, remove call to Replace_Type_References,
8384         and add call to Replace_References.
8385         (Add_Interface_Invariatns),
8386         (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
8387         to including the working type T.
8388         (Add_Own_Invariants): Remove
8389         legacy condition for separate units, remove dispatching for ASIS
8390         and save a copy of the expression in the pragma expression.
8391         (Build_Invariant_Procedure_Body): Default initalize vars,
8392         remove return condition on interfaces, always use the
8393         private type for interfaces, and move the processing of types
8394         until after the processing of invariants for the full view.
8395         (Build_Invariant_Procedure_Declaration): Remove condition
8396         to return if an interface type is encountered and add
8397         condition to convert the formal parameter to its class-wide
8398         counterpart if Work_Typ is abstract.
8399         (Replace_Type): Add call to Remove_Controlling_Arguments.
8400         (Replace_Type_Ref): Remove class-wide dispatching for the current
8401         instance of the type.
8402         (Replace_Type_References): Remove parameter "Derived"
8403         (Remove_Controlling_Arguments): Created in order to removing
8404         the controlliong argument from calls to primitives in the case
8405         of the formal parameter being an class-wide abstract type.
8406         * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
8407         to the change made to Freeze_Type in exp_ch3. Add a condition
8408         to treat interface types as a partial view.
8409         * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
8410         to Build_Invariant_Procedure_Declaration to properly generate a
8411         "partial" invariant procedure when Typ is an interface.
8413 2017-04-25  Bob Duff  <duff@adacore.com>
8415         * a-numeri.ads: Go back to using brackets encoding for the Greek
8416         letter pi.
8418 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8420         * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
8421         (10-15): if derived type T with progenitors is abstract,
8422         and primitive P of this type inherits non-trivial classwide
8423         preconditions from both a parent operation and from an interface
8424         operation, then the inherited operation is abstract if the parent
8425         operation is not null.
8426         * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
8427         with Covered_Interface_Op to yield the actual interface operation
8428         that is implemented by a given inherited operation.
8430 2017-04-25  Javier Miranda  <miranda@adacore.com>
8432         * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
8433         and right operands after performing the validity checks. Required
8434         because validity checks may remove side effects from the operands.
8436 2017-04-25  Javier Miranda  <miranda@adacore.com>
8438         * exp_attr.adb (Attribute_Unrestricted_Access):
8439         Do not disable implicit type conversion.  Required to generate
8440         code that displaces the pointer to reference the secondary
8441         dispatch table.
8443 2017-04-25  Pascal Obry  <obry@adacore.com>
8445         * prj-attr.adb, snames.ads-tmpl: Add package Install's
8446         Required_Artifacts attribute.
8448 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8450         * sem_util.adb (Same_Value): String literals are compile-time
8451         values, and comparing them must use Expr_Value_S.
8453 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8455         * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
8456         dereference is introduced for the object, and the object is
8457         overloaded, do not check whether it is aliased, because it may
8458         include an implicit dereference.
8459         * sem_type.adb (Disambiguate): If two interpretations are access
8460         attribute types with the same designated type keep either of
8461         them and do not report an ambiguity.  A true ambiguity will be
8462         reported elsewhere.
8464 2017-04-25  Bob Duff  <duff@adacore.com>
8466         * a-numeri.ads: Change the encoding of Greek letter Pi from
8467         brackets encoding to UTF-8.  Use pragma Wide_Character_Encoding
8468         to indicate the encoding. We considered using a byte order mark
8469         (BOM), but that causes various trouble (misc software eats the
8470         BOM, if you have a patch with a BOM, then it's not at the start
8471         of the patch, so it's not a BOM, the BOM affects with-ing files,
8472         etc.).
8473         * scng.adb, s-wchcnv.adb: Minor.
8475 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8477         * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
8478 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8480         * sem_ch3.adb (Add_Internal_Interface_Entities): Move
8481         Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
8482         Improve error message on operations that inherit non-conforming
8483         classwide preconditions from ancestor and progenitor.
8484         * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
8485         moved here from sem_ch3.
8486         * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
8487         check given in RM 6.1.1 (17) concerning renamings of overriding
8488         operations that inherits class-wide preconditions from ancestor
8489         or progenitor.
8491 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8493         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
8494         (Build_Adjust_Statements): Code cleanup.
8495         (Build_Finalizer): Update the initialization of
8496         Exceptions_OK.
8497         (Build_Finalize_Statements): Code cleanup.
8498         (Build_Initialize_Statements): Code cleanup.
8499         (Make_Deep_Array_Body): Update the initialization of
8500         Exceptions_OK.
8501         (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
8502         (Process_Object_Declaration): Generate a null exception handler only
8503         when exceptions are allowed.
8504         (Process_Transients_In_Scope): Update the initialization of
8505         Exceptions_OK.
8506         * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
8507         routine.
8508         * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
8509         restrictions when the handler is internally generated and the
8510         mode is warnings.
8512 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8514         * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
8515         enforce legality rule on classwide preconditions inherited from
8516         both an ancestor and a progenitor (RM 6.1.1 (10-13).
8517         * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
8518         subprogram need not be dispatching if it appears in a precondition
8519         for an abstract or null subprogram.
8521 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8523         * sem_ch10.adb: Minor typo fix.
8525 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
8527         * gcc-interface/Makefile.in: Cleanup VxWorks targets.
8529 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8531         * fname.adb (Is_Internal_File_Name): Arrange for the slices to
8532         have a length which is a power of 2.
8533         (Is_Predefined_File_Name): Likewise. Adjust comment.
8535 2017-04-25  Bob Duff  <duff@adacore.com>
8537         * exp_aggr.adb (Component_Count): Protect the
8538         arithmetic from attempting to convert a value >= 2**31 to Int,
8539         which would otherwise raise Constraint_Error.
8541 2017-04-25  Bob Duff  <duff@adacore.com>
8543         * opt.ads (Locking_Policy): Fix incorrect documentation. The
8544         first character of the policy name is not unique.
8546 2017-04-25  Bob Duff  <duff@adacore.com>
8548         * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
8549         * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
8550         about this flag not being used. It was already used, and it is
8551         now used more.
8553 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8555         * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
8556         (Ignore_SPARK_Mode_Pragmas): New routine.
8557         (Set_Ignore_SPARK_Mode_Pragmas): New routine.
8558         (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
8559         * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
8560         related entities.
8561         (Ignore_SPARK_Mode_Pragmas): New routine
8562         along with pragma Inline.
8563         (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
8564         * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
8565         Ignore_SPARK_Mode_Pragmas_In_Instance.
8566         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8567         Save and restore the value of global flag
8568         Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
8569         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
8570         the corresponding spec or the body must ignore all SPARK_Mode
8571         pragmas found within.
8572         (Analyze_Subprogram_Declaration): Mark
8573         the spec when it needs to ignore all SPARK_Mode pragmas found
8574         within to allow the body to infer this property in case it is
8575         instantiated or inlined later.
8576         * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
8577         value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8578         the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8579         when the corresponding spec also ignored all SPARK_Mode pragmas
8580         found within.
8581         (Analyze_Package_Declaration): Mark the spec when
8582         it needs to ignore all SPARK_Mode pragmas found within to allow
8583         the body to infer this property in case it is instantiated or
8584         inlined later.
8585         * sem_ch12.adb (Analyze_Formal_Package_Declaration):
8586         Save and restore the value of flag
8587         Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8588         formal spec when it needs to ignore all SPARK_Mode
8589         pragmas found within to allow the body to infer this
8590         property in case it is instantiated or inlined later.
8591         (Analyze_Package_Instantiation): Save and restore the value
8592         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
8593         the instance spec when it needs to ignore all SPARK_Mode
8594         pragmas found within to allow the body to infer this
8595         property in case it is instantiated or inlined later.
8596         (Analyze_Subprogram_Instantiation): Save and restore the value
8597         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8598         instance spec and anonymous package when they need to ignore
8599         all SPARK_Mode pragmas found within to allow the body to infer
8600         this property in case it is instantiated or inlined later.
8601         (Instantiate_Package_Body): Save and restore the value of global
8602         flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
8603         global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
8604         corresponding instance spec also ignored all SPARK_Mode pragmas
8605         found within.
8606         (Instantiate_Subprogram_Body): Save and restore the
8607         value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8608         the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8609         when the corresponding instance spec also ignored all SPARK_Mode
8610         pragmas found within.
8611         * sem_prag.adb (Analyze_Pragma): Update the reference to
8612         Ignore_Pragma_SPARK_Mode.
8613         * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
8614         all SPARK_Mode pragmas defined within yields mode "off".
8616 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8618         * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
8620 2017-04-25  Bob Duff  <duff@adacore.com>
8622         * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
8623         All_Checks" to avoid generating unnecessary checks.
8624         * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
8625         All_Checks".
8626         * sem.ads: Fix comment.
8627         * expander.ads: Fix comment.
8628         * exp_atag.ads: Fix comment: "Index = 0" should be
8629         "Index >= 0".
8631 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8633         * s-taprop-linux.adb: Minor editorial fixes.
8635 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8637         * sem_util.adb (New_Copy_Tree): Put back the declarations of the
8638         hash tables at library level.  Reinstate the NCT_Hash_Tables_Used
8639         variable and set it to True whenever the main hash table is
8640         populated.  Short- circuit the Assoc function if it is false
8641         and add associated guards.
8643 2017-04-25  Olivier Hainque  <hainque@adacore.com>
8645         * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
8646         specs without elaboration code that have an elaboration counter
8647         nevertheless, e.g.  when compiled with -fpreserve-control-flow.
8648         * sem_ch10.adb (Analyze_Compilation_Unit):
8649         Set_Elaboration_Entity_Required when requested to preserve
8650         control flow, to ensure the unit elaboration is materialized at
8651         bind time, resulting in the inclusion of the unit object file
8652         in the executable closure at link time.
8654 2017-04-25  Pierre-Marie de Rodat  <derodat@adacore.com>
8656         * exp_dbug.adb: In Debug_Renaming_Declaration,
8657         when dealing with indexed component, accept to produce a renaming
8658         symbol when the index is an IN parameter or when it is a name
8659         defined in an outer scope.
8661 2017-04-25  Yannick Moy  <moy@adacore.com>
8663         * errout.adb (Error_Msg): Adapt continuation
8664         message in instantiations and inlined bodies for info messages.
8666 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8668         * fname.adb (Has_Internal_Extension): Add pragma Inline.
8669         Use direct 4-character slice comparisons.
8670         (Has_Prefix): Add
8671         pragma Inline.  (Has_Suffix): Delete.
8672         (Is_Internal_File_Name):
8673         Test Is_Predefined_File_Name first.
8674         (Is_Predefined_File_Name):
8675         Use direct slice comparisons as much as possible and limit all
8676         comparisons to at most 8 characters.
8678 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8680         * checks.adb (Insert_Valid_Check): Code cleanup.
8681         * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
8682         (Expand_Actuals): Generate proper copy-back for a validation
8683         variable when it acts as the argument of a type conversion.
8684         * sem_util.adb (Is_Validation_Variable_Reference): Augment the
8685         predicate to operate on type qualifications.
8687 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8689         * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
8690         Minor reformatting.
8692 2017-04-25  Bob Duff  <duff@adacore.com>
8694         * sem_prag.adb (No_Return): Give an error if the pragma applies
8695         to a body. Specialize the error for the specless body case,
8696         as is done for (e.g.) pragma Convention.
8697         * debug.adb: Add switch -gnatd.J to disable the above legality
8698         checks. This is mainly for use in our test suite, to avoid
8699         rewriting a lot of illegal (but working) code.  It might also
8700         be useful to customers. Under this switch, if a pragma No_Return
8701         applies to a body, and the procedure raises an exception (as it
8702         should), the pragma has no effect. If the procedure does return,
8703         execution is erroneous.
8705 2017-04-25  Bob Duff  <duff@adacore.com>
8707         * exp_ch6.adb (Expand_Actuals): This is the
8708         root of the problem. It took N as an 'in out' parameter, and in
8709         some cases, rewrote N, but then set N to Original_Node(N). So
8710         the node returned in N had no Parent. The caller continued
8711         processing of this orphaned node. In some cases that caused a
8712         crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
8713         and trips over the Empty Parent). The solution is to make N an
8714         'in' parameter.  Instead of rewriting it, return the list of
8715         post-call actions, so the caller can do the rewriting later,
8716         after N has been fully processed.
8717         (Expand_Call_Helper): Move most of Expand_Call here. It has
8718         too many premature 'return' statements, and we want to do the
8719         rewriting on return.
8720         (Insert_Post_Call_Actions): New procedure to insert the post-call
8721         actions in the appropriate place. In the problematic case,
8722         that involves rewriting N as an Expression_With_Actions.
8723         (Expand_Call): Call the new procedures Expand_Call_Helper and
8724         Insert_Post_Call_Actions.
8726 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8728         * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
8729         properly type derived from generic formal types, to handle
8730         properly modified version of ACATS 4.1B B611017.
8732 2017-04-25  Javier Miranda  <miranda@adacore.com>
8734         * exp_unst.adb (Subp_Index): Adding missing
8735         support for renamings and functions that return a constrained
8736         array type (i.e. functions for which the frontend built a
8737         procedure with an extra out parameter).
8739 2017-04-25  Pascal Obry  <obry@adacore.com>
8741         * s-string.adb: Minor code clean-up.
8743 2017-04-25  Bob Duff  <duff@adacore.com>
8745         * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
8746         procedure.
8747         * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
8748         function for Non_Blocking_Wait_Process.
8750 2017-04-25  Bob Duff  <duff@adacore.com>
8752         * prep.adb (Preprocess): Remove incorrect
8753         Assert. Current character can be ASCII.CR.
8755 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8757         * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
8758         convention Stdcall, which has a number of exceptions. Convention
8759         is legal on a component declaration whose type is an anonymous
8760         access to subprogram.
8762 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8764         * sem_ch4.adb: sem_ch4.adb Various reformattings.
8765         (Try_One_Prefix_Interpretation): Use the base type when dealing
8766         with a subtype created for purposes of constraining a private
8767         type with discriminants.
8769 2017-04-25  Javier Miranda  <miranda@adacore.com>
8771         * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
8772         * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
8773         dispatching primitives (Restore_Warnings): Restore warning on
8774         late dispatching primitives (Save_Warnings): Save warning on late
8775         dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
8776         to enable/disable this warning.
8777         (WA_Warnings): Set warning on late dispatching primitives.
8778         * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
8779         that its parent type has a private extension.
8780         * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
8781         New subprogram.
8782         * usage.adb: Document -gnatw.j and -gnatw.J.
8784 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8786         * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
8787         reformatting.
8789 2017-04-25  Bob Duff  <duff@adacore.com>
8791         * binde.adb (Validate): Do not pass dynamic strings
8792         to pragma Assert, because older compilers do not support that.
8794 2017-04-25  Bob Duff  <duff@adacore.com>
8796         * s-fileio.adb (Close): When a temp file is
8797         closed, delete it and clean up its Temp_File_Record immediately,
8798         rather than waiting until later.
8799         (Temp_File_Record): Add File
8800         component, so Close can know which Temp_File_Record corresponds
8801         to the file being closed.
8802         (Delete): Don't delete temp files,
8803         because they are deleted by Close.
8804         (Open): Set the File component
8805         of Temp_File_Record. This requires moving the creation of the
8806         Temp_File_Record to the end, after the AFCB has been created.
8808 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8810         * checks.adb (Insert_Valid_Check): Do not generate
8811         a validity check when inside a generic.
8813 2017-04-25  Yannick Moy  <moy@adacore.com>
8815         * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
8817 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
8819         * snames.ads-tmpl (Snames): More names for detecting predefined
8820         potentially blocking subprograms.
8822 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8824         * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
8825         concerning inheritance of class-wide preconditions do not apply
8826         to postconditions.
8828 2017-04-25  Bob Duff  <duff@adacore.com>
8830         * s-ficobl.ads: Minor comment fix.
8832 2017-04-25  Yannick Moy  <moy@adacore.com>
8834         * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
8835         conversions from float to integer in GNATprove mode.
8836         (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
8837         to call Apply_Type_Conversion_Checks, so that range checks
8838         are properly positioned when needed on conversions, including
8839         when converting from float to integer.  (Determine_Range): In
8840         GNATprove mode, take into account the possibility of conversion
8841         from float to integer.
8842         * sem_res.adb (Resolve_Type_Conversion): Only enforce range
8843         check on conversions from fixed-point to integer, not anymore
8844         on conversions from floating-point to integer, when in GNATprove
8845         mode.
8847 2017-04-25  Yannick Moy  <moy@adacore.com>
8849         * checks.adb (Determine_Range_R): Special case type conversions
8850         from integer to float in order to get bounds in that case too.
8851         * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
8852         mode, for computations involved in interval checking.
8854 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8856         * checks.adb (Insert_Valid_Check): Partially reimplement validity
8857         checks.
8858         * einfo.adb Node36 is now used as Validated_Object.
8859         (Validated_Object): New routine.
8860         (Set_Validated_Object): New routine.
8861         (Write_Field36_Name): Add an entry for Validated_Object.
8862         * einfo.ads Add new attribute Validated_Object along with
8863         usage in entities.
8864         (Validated_Object): New routine along with pragma Inline.
8865         (Set_Validated_Object): New routine along with pragma Inline.
8866         * exp_attr.adb (Make_Range_Test): Add processing for validation
8867         variables to avoid extra reads and copies of the prefix.
8868         * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
8869         variables in order to reflect any changes done in the variable
8870         back into the original object.
8871         * sem_util.adb (Is_Validation_Variable_Reference): New routine.
8872         * sem_util.ads (Is_Validation_Variable_Reference): New routine.
8874 2017-04-25  Steve Baird  <baird@adacore.com>
8876         * exp_ch7.adb (Build_Array_Deep_Procs,
8877         Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
8878         generate Finalize_Address routines for CodePeer.
8880 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8882         * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
8883         Analyze_Pre_Post_Condition, to implement the legality checks
8884         mandated by AI12-0131: Pre'Class shall not be specified for an
8885         overriding primitive subprogram of a tagged type T unless the
8886         Pre'Class aspect is specified for the corresponding primitive
8887         subprogram of some ancestor of T.
8889 2017-04-25  Bob Duff  <duff@adacore.com>
8891         * sem_ch8.adb (Use_One_Type): If a use_type_clause
8892         is redundant, set its Used_Operations to empty. This is only
8893         necessary for use clauses that appear in the parent of a generic
8894         child unit, because those use clauses get reanalyzed when we
8895         instantiate the generic, and we don't want the Used_Operations
8896         carried over from the original context (where it was probably
8897         not redundant).
8899 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8901         * exp_ch6.adb: Minor reformatting.
8903 2017-04-25  Bob Duff  <duff@adacore.com>
8905         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
8906         Use Source_Index (Current_Sem_Unit) to find the correct casing.
8907         * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
8908         (Current_Sem_Unit) to find the correct casing.
8909         * par.adb (Par): Null out Current_Source_File, to ensure that
8910         the above bugs won't rear their ugly heads again.
8912 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8914         * sem_ch8.adb (Find_Type): For an attribute reference
8915         'Class, if prefix type is synchronized and previous errors
8916         have suppressed the creation of the corresponding record type,
8917         create a spurious class-wide for the synchonized type itself,
8918         to catch other misuses of the attribute
8920 2017-04-25  Steve Baird  <baird@adacore.com>
8922         * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
8923         is True, then don't generate the accessibility check for the
8924         tag of a tagged result.
8925         * exp_intr.adb (Expand_Dispatching_Constructor_Call):
8926         if CodePeer_Mode is True, then don't generate the
8927         tag checks for the result of call to an instance of
8928         Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
8929         descendant of" check and the accessibility check).
8931 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8933         * sem_ch13.adb: Code cleanups.
8934         * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
8935         * sem_ch8.ads: Minor comment fix.
8937 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8939         * exp_ch4.adb (Library_Level_Target): New function.
8940         (Expand_Concatenate): When optimization is enabled, also expand
8941         the operation out-of-line if the concatenation is present within
8942         the expression of the declaration of a library-level object and
8943         not only if it is the expression of the declaration.
8945 2017-04-25  Bob Duff  <duff@adacore.com>
8947         * freeze.adb (Freeze_Object_Declaration): Do
8948         not Remove_Side_Effects if there is a pragma Linker_Section,
8949         because in that case we want static initialization in the
8950         appropriate section.
8952 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8954         * exp_dbug.adb: Minor rewording and reformatting.
8956 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8958         * sem_attr.adb (Statically_Denotes_Object): New predicate, to
8959         handle the proposed changes to rules concerning potentially
8960         unevaluated expressions, to include selected components that
8961         do not depend on discriminants, and indexed components with
8962         static indices.
8963         * sem_util.adb (Is_Potentially_Unevaluated): Add check for
8964         predicate in quantified expression, and fix bugs in the handling
8965         of case expressions and membership test.
8966         (Analyze_Attribute_Old_Result): use new predicate.
8967         (Analyze_Attribute, case Loop_Entry): ditto.
8969 2017-04-25  Bob Duff  <duff@adacore.com>
8971         * s-secsta.adb (SS_Info): Add a comment
8972         explaining why we don't need to walk all the chunks in order to
8973         compute the total size.
8975 2017-04-25  Bob Duff  <duff@adacore.com>
8977         * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
8978         of the global name buffer to 4*Max_Line_Length.
8980 2017-04-25  Javier Miranda  <miranda@adacore.com>
8982         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
8983         renaming entity for debug information, mark the entity as needing debug
8984         info if it comes from sources.
8986 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8988         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
8989         restriction converning the use of 'Address where the prefix is
8990         of a controlled type.
8992 2017-04-25  Pierre-Marie de Rodat  <derodat@adacore.com>
8994         * exp_dbug.adb: In Debug_Renaming_Declaration,
8995         skip slices that are made redundant by an indexed component
8996         access.
8997         * atree.h: New definition for Original_Node.
8999 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9001         * sem_prag.adb, sem_prag.ads: Minor reformatting.
9003 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9005         * sem_ch3.adb (Check_Entry_Contract): Call
9006         Preanalyze_Spec_Expression so that resolution takes place as well.
9007         * sem_util.adb (Check_Internal_Protected_Use): Reject properly
9008         internal calls that appear in preconditions of protected
9009         operations, in default values for same, and in contract guards
9010         for contract cases in SPARK.
9012 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
9014         * a-numaux.ads: Fix description of a-numaux-darwin
9015         and a-numaux-x86.
9016         (Double): Define to Long_Float.
9017         * a-numaux-vxworks.ads (Double): Likewise.
9018         * a-numaux-darwin.ads
9019         (Double): Likewise.
9020         * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
9021         * a-numaux-x86.ads: Fix package description.
9022         * a-numaux-x86.adb (Is_Nan): Minor tweak.
9023         (Reduce): Adjust and complete description. Call Is_Nan instead of
9024         testing manually. Use an integer temporary to hold rounded value.
9025         * a-numaux-darwin.adb (Reduce): Likewise.
9026         (Is_Nan): New function.
9028 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9030         * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
9031         on analysis of prefix whose type is a current instance of a
9032         synchronized type, but where the prefix itself is an entity that
9033         is an object.
9035 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9037         * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
9038         the identity of callable entities therein, because they have been
9039         properly resolved, and prefixed calls may have been rewritten
9040         as normal calls.
9042 2017-04-25  Patrick Bernardi  <bernardi@adacore.com>
9044         * exp_ch3.adb (Build_Init_Statements): Convert
9045         the expression of the pragma/aspect Secondary_Stack_Size to
9046         internal type System.Parameters.Size_Type before assigning
9047         it to the Secondary_Stack_Size component of the task type's
9048         corresponding record.
9050 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
9052         * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
9053         (etc) optimizations when the type is modular and the offsets
9054         are equal.
9056 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
9058         * s-osinte-freebsd.ads: Minor comment tweaks
9060 2017-04-25  Javier Miranda  <miranda@adacore.com>
9062         * urealp.adb (UR_Write): Reverse previous patch
9063         adding documentation on why we generate multiplications instead
9064         of divisions (needed to avoid expressions whose computation with
9065         large numbers may cause division by 0).
9067 2017-04-25  Bob Duff  <duff@adacore.com>
9069         * erroutc.adb (Set_Specific_Warning_Off,
9070         Set_Warnings_Mode_Off): Use the correct source file for
9071         Stop. Was using Current_Source_File, which is only valid during
9072         parsing. Current_Source_File will have a leftover value from
9073         whatever file happened to be parsed last, because of a with_clause
9074         or something.
9076 2017-04-25  Bob Duff  <duff@adacore.com>
9078         * lib.ads, lib.adb (In_Internal_Unit): New functions similar
9079         to In_Predefined_Unit, but including GNAT units.
9080         * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
9081         with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
9082         because Should_Ignore_Pragma was not working reliably outside
9083         the parser, because Current_Source_File is not valid.
9084         * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
9085         * par-prag.adb: Call Should_Ignore_Pragma_Par.
9087 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
9089         * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
9090         codepeer mode.
9092 2017-04-25  Javier Miranda  <miranda@adacore.com>
9094         * urealp.adb (UR_Write): Fix output of constants with a base other
9095         that 10.
9097 2017-04-25  Justin Squirek  <squirek@adacore.com>
9099         * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
9100         * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
9101         Add extra parameter for Process_Interface_Name.
9102         (Process_Interface_Name): Add parameter for pragma to analyze
9103         corresponding aspect.
9104         * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
9105         from sem_ch13.adb
9107 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
9109         * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
9110         correction.
9112 2017-04-25  Yannick Moy  <moy@adacore.com>
9114         * sem_res.adb (Resolve_Comparison_Op): Do not
9115         attempt evaluation of relational operations inside assertions.
9117 2017-04-25  Justin Squirek  <squirek@adacore.com>
9119         * exp_util.adb (Add_Interface_Invariants):
9120         Restored, code moved back from Build_Invariant_Procedure_Body.
9121         (Add_Parent_Invariants): Restored, code moved back from
9122         Build_Invariant_Procedure_Body.
9123         (Build_Invariant_Procedure_Body):
9124         Remove refactored calls and integrated code from
9125         Add_Parent_Invariants and Add_Interface_Invariants.
9127 2017-04-25  Johannes Kanig  <kanig@adacore.com>
9129         * errout.adb (Output_Messages): Adjust computation of total
9130         errors
9131         * erroutc.adb (Error_Msg): In statistics counts, deal
9132         correctly with informational messages that are not warnings.
9133         * errutil.adb (Finalize): adjust computation of total errors.
9135 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
9137         * terminals.c (__gnat_terminate_pid): New.
9138         * g-exptty.ads (Terminate_Process): New. Update comments.
9140 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
9142         * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
9144 2017-04-25  Justin Squirek  <squirek@adacore.com>
9146         * sem_ch3.adb (Analyze_Declarations): Minor
9147         correction to comments, move out large conditional and scope
9148         traversal into a predicate.
9149         (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
9150         logic.
9152 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9154         * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
9155         of prefix whose type is a current instance of a synchronized
9156         type. If the prefix is an object this is an external call (or
9157         requeue) that can only access public operations of the object. The
9158         previous predicate was too restrictive, and did not allow public
9159         protected operations, only task entries.
9161 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9163         * sem_ch5.adb, fname.adb: Minor reformatting.
9165 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9167         * einfo.adb (Is_Anonymous_Access_Type): New routine.
9168         * einfo.ads Update the placement of
9169         E_Anonymous_Access_Subprogram_Type along with all subtypes that
9170         mention the ekind.
9171         (Is_Anonymous_Access_Type): New routine.
9172         * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
9173         master for an access type subject to pragma No_Heap_Finalization.
9174         * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
9175         allocated or deallocated does not finalization actions if the
9176         associated access type is subject to pragma No_Heap_Finalization.
9177         * opt.ads Add new global variable No_Heap_Finalization_Pragma.
9178         * par-prag.adb Pragma No_Heap_Finalization does not need special
9179         processing from the parser.
9180         * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
9181         ??? comments. Use the new predicate Is_Anonymous_Access_Type.
9182         * sem_prag.adb Add an entry in table Sig_Flags for pragma
9183         No_Heap_Finalization.
9184         (Analyze_Pragma): Add processing for
9185         pragma No_Heap_Finalization. Update various error messages to
9186         use Duplication_Error.
9187         * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
9188         * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
9189         and corresponding pragma id.
9191 2017-04-25  Bob Duff  <duff@adacore.com>
9193         * freeze.adb (Freeze_Record_Type): Use the
9194         underlying type of the component type to determine whether it's
9195         elementary. For representation clause purposes, a private type
9196         should behave the same as its full type.
9197         * fname.ads, fname.adb (Is_Predefined_File_Name):
9198         Make sure things like "system.ali" are recognized as predefined.
9200 2017-04-25  Javier Miranda  <miranda@adacore.com>
9202         * debug.adb: Update documentation of -gnatd.6.
9204 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9206         * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
9207         element iterator when the name is an overloaded function call,
9208         one of whose interpretations yields an array.
9210 2017-04-25  Bob Duff  <duff@adacore.com>
9212         * uname.ads, uname.adb (Is_Predefined_Unit_Name,
9213         Is_Internal_Unit_Name): New functions for operating on unit
9214         names, as opposed to file names. There's some duplicated code
9215         with fname.adb, which is unfortunate, but it seems like we don't
9216         want to add dependencies here.
9217         * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
9218         to Is_Predefined_Unit_Name; the former was wrong, because Uname
9219         is not a file name at all.
9220         * fname.ads, fname.adb: Document the fact that
9221         Is_Predefined_File_Name and Is_Internal_File_Name can be called
9222         for ALI files, and fix the code so it works properly for ALI
9223         files. E.g. these should return True for "system.ali".
9225 2017-04-25  Justin Squirek  <squirek@adacore.com>
9227         * exp_util.adb (Add_Invariant): Removed,
9228         code moved to Add_Invariant_Check, Add_Inherited_Invariant,
9229         and Add_Own_Invariant.  (Add_Invariant_Check): Used
9230         for adding runtime checks from any kind of invariant.
9231         (Add_Inherited_Invariant): Generates invariant checks for
9232         class-wide invariants (Add_Interface_Invariants): Removed, code
9233         moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
9234         Create a types own invariant procedure (Add_Parent_Invariants):
9235         Removed, code moved to Build_Invariant_Procedure_Body
9236         (Build_Invariant_Procedure_Body): Add refactored calls
9237         and integrated code from Add_Parent_Invariants and
9238         Add_Interface_Invariants.
9239         (Process_Type): Removed, the
9240         relavant code was inlined into both Add_Own_Invariant and
9241         Add_Inherited_Invariant.
9243 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9245         * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
9246         scn.adb, osint.adb, fname.adb: Minor reformatting.
9248 2017-04-25  Pascal Obry  <obry@adacore.com>
9250         * s-taprop-mingw.adb: Do not check for CloseHandle in
9251         Finalize_TCB.
9253 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9255         * sem_util.adb (Check_Part_Of_Reference):
9256         Continue to examine the context if the reference appears within
9257         an expression function.
9259 2017-04-25  Justin Squirek  <squirek@adacore.com>
9261         * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
9262         and Build_Invariant_Procedure_Declaration.
9263         * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
9264         and Build_Invariant_Procedure_Declaration from exp_ch7
9265         and break-out Is_Untagged_Private_Derivation from
9266         Build_Invariant_Procedure_Body.
9267         (Replace_Type_References):
9268         Append an extra parameter to allow for dispatching replacements
9269         and add the corrasponding logic.
9270         (Type_Invariant): Remove
9271         Replace_Typ_Refs and replace its references with calls to
9272         Replace_Type_References.
9273         * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
9275 2017-04-25  Bob Duff  <duff@adacore.com>
9277         * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
9278         that returns True when appropriate.
9279         * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
9280         when compiling predefined files.
9281         * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
9282         "gnat.adc" should not be considered a predefined file name.
9283         That required (or at least encouraged) a lot of cleanup of global
9284         variable usage. We shouldn't be communicating information via
9285         the global name buffer.
9286         * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
9287         * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
9288         required by the above-mentioned cleanup.
9290 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9292         * osint.adb (Find_File): Handle properly a request for a
9293         configuration file whose name is a directory.
9295 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9297         * sem_attr.adb, sem_ch5.adb: Minor reformatting.
9299 2017-04-25  Bob Duff  <duff@adacore.com>
9301         * types.ads: Minor: Fix '???' comment.
9302         * sem_ch8.adb: Minor comment fix.
9304 2017-04-25  Bob Duff  <duff@adacore.com>
9306         * sem_prag.adb: Remove suspicious uses of Name_Buf.
9307         * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
9308         Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
9309         Add String_To_Name with no side effects.
9311 2017-04-25  Justin Squirek  <squirek@adacore.com>
9313         * sem_ch3.adb (Analyze_Declarations): Add
9314         additional condition for edge case.
9316 2017-04-25  Bob Duff  <duff@adacore.com>
9318         * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
9319         reserved words inside pragmas. This is necessary to allow the
9320         pragma name Interface to be used in pragma Ignore_Pragma.
9321         * par.adb: Minor comment fix.
9323 2017-04-25  Javier Miranda  <miranda@adacore.com>
9325         * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
9326         * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
9327         * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
9328         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
9329         occurrences of RE_Type_Is_Abstract
9331 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9333         * exp_util.adb (Build_Chain): Account for ancestor
9334         subtypes while traversing the derivation chain.
9336 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9338         * sem_attr.adb: minor reformatting.
9340 2017-04-25  Doug Rupp  <rupp@adacore.com>
9342         * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
9344 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9346         * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
9347         the first pass over an assignment statement with target names,
9348         to prevent the generation of subtypes (such as discriminated
9349         record components)that may carry the target name outside of the
9350         tree for the assignment. The subtypes will be generated when
9351         the assignment is reanalyzed in full.
9352         (Analyze_Target_Name): Handle properly class-wide types.
9354 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9356         * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
9357         * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9358         the purposes of freezing.
9359         * exp_util.adb Update the documentation and structure of the
9360         type map used in class-wide semantics of assertion expressions.
9361         (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9362         and resolve the triaged expression because all substitutions
9363         refer to the proper entities.  Update the replacement of
9364         references.
9365         (Build_DIC_Procedure_Body): Add formal parameter
9366         For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9367         are now only processed when freezing occurs.  Build a body only
9368         when one is needed.
9369         (Entity_Hash): Removed.
9370         (Map_Types): New routine.
9371         (Replace_Object_And_Primitive_References): Removed.
9372         (Replace_References): New routine.
9373         (Replace_Type_References): Moved to the library level of Exp_Util.
9374         (Type_Map_Hash): New routine.
9375         (Update_Primitives_Mapping): Update the mapping call.
9376         (Update_Primitives_Mapping_Of_Types): Removed.
9377         * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9378         parameter For_Freeze and update the comment on usage.
9379         (Map_Types): New routine.
9380         (Replace_References): New routine.
9381         (Replace_Type_References): Moved to the library level of Exp_Util.
9382         (Update_Primitives_Mapping_Of_Types): Removed.
9383         * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9384         properties of the private type to the full view in case the full
9385         view derives from a parent type and inherits a DIC pragma.
9386         * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9387         DIC pragma is placed at the top of a declarative region.
9389 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
9391         * a-tasatt.adb: Complete previous change and use an unsigned
9392         int to avoid overflow checks.
9394 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9396         * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
9397         the error message when the attribute reference is an actual in
9398         a call to a subprogram inherited from a generic formal type with
9399         unknown discriminants, which makes the subprogram and its formal
9400         parameters intrinsic (see RM 6.3.1 (8) and (13)).
9402 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9404         * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
9405         sem_prag.adb: Minor reformatting.
9407 2017-04-25  Bob Duff  <duff@adacore.com>
9409         * sem_attr.adb (Type_Key): Add code in the
9410         recursive Compute_Type_Key to protect against fetching the source
9411         code for Standard, in case a component of the type is declared
9412         in Standard. There was already code to do this for the original
9413         type, but not for its components.
9415 2017-04-25  Javier Miranda  <miranda@adacore.com>
9417         * exp_ch3.adb (Build_Initialization_Call): Handle
9418         subtypes of private types when searching for the underlying full
9419         view of a private type.
9421 2017-04-25  Javier Miranda  <miranda@adacore.com>
9423         * sem_res.adb (Set_Mixed_Mode_Operand): A universal
9424         real conditional expression can appear in a fixed-type context
9425         and must be resolved with that context to facilitate the code
9426         generation to the backend.
9428 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9430         * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
9431         to indicate whether during inline processing, when some unit U1
9432         appears in the context of a unit U2 compiled for instantiation
9433         or inlining purposes, the body of U1 needs to be compiled as well.
9434         * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
9435         context is a package declaration.
9436         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
9437         Analyze_Generic_Package_Declaration): ditto.
9438         * inline.adb (Analyze_Inlined_Bodies): Check
9439         Body_Needed_For_Inlining.
9441 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9443         * par.adb (Current_Assign_Node): Global variable use to record
9444         the presence of a target_name in the right hand side of the
9445         assignment being parsed.
9446         * par-ch4.adb (P_Name): If the name is a target_name, mark the
9447         enclosing assignment node accordingly.
9448         * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
9449         appropriately.
9450         * sem_ch5.adb (Analyze_Assignment): Disable expansion before
9451         analyzing RHS if the statement has target_names.
9452         * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
9453         properly choices that are subtype marks.
9454         * exp_ch5.adb: Code cleanup.
9456 2017-04-25  Bob Duff  <duff@adacore.com>
9458         * s-memory.adb: Add a comment regarding efficiency.
9459         * atree.adb: Fix the assertion, and combine 2 assertions into one,
9460         "the source has an extension if and only if the destination does."
9461         * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
9463 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
9465         * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
9466         conversion.
9468 2017-04-25  Doug Rupp  <rupp@adacore.com>
9470         * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
9471         handling for ppc64-vx7.
9472         * sigtramp-vxworks-target.inc
9473         [SIGTRAMP_BODY]: Add section for ppc64-vx7.
9475 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
9477         * ada_get_targ.adb: New file.
9479 2017-04-25  Bob Duff  <duff@adacore.com>
9481         * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
9482         Direct_Val (Right), instead of the incorrect Direct_Val (Left).
9483         (UI_GCD): Remove ??? comment involving possible efficiency
9484         improvements. This just isn't important after all these years.
9485         Also minor cleanup.
9486         * uintp.ads: Minor cleanup.
9488 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9490         * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
9491         Revert previous changes.
9492         * scng.adb: Minor reformatting.
9493         * s-stratt.ads: Fix unbalanced parens in comment.
9495 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9497         * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
9498         Minor reformatting.
9500 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9502         * scng.adb (Scan): Handle '@' appropriately.
9503         * sem_ch5.adb: Code cleanup.
9505 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9507         * freeze.adb (Check_Expression_Function): Do not check for the
9508         use of deferred constants if the freezing of the expression
9509         function is triggered by its generated body, rather than a
9510         premature use.
9512 2017-04-25  Javier Miranda  <miranda@adacore.com>
9514         * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
9515         subtypes of private types when performing the view conversion.
9517 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9519         * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9520         the purposes of freezing.
9521         * exp_util.adb Update the documentation and structure of the
9522         type map used in class-wide semantics of assertion expressions.
9523         (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9524         and resolve the triaged expression because all substitutions
9525         refer to the proper entities.  Update the replacement of
9526         references.
9527         (Build_DIC_Procedure_Body): Add formal parameter
9528         For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9529         are now only processed when freezing occurs.  Build a body only
9530         when one is needed.
9531         (Entity_Hash): Removed.
9532         (Map_Types): New routine.
9533         (Replace_Object_And_Primitive_References): Removed.
9534         (Replace_References): New routine.
9535         (Replace_Type_References): Moved to the library level of Exp_Util.
9536         (Type_Map_Hash): New routine.
9537         (Update_Primitives_Mapping): Update the mapping call.
9538         (Update_Primitives_Mapping_Of_Types): Removed.
9539         * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9540         parameter For_Freeze and update the comment on usage.
9541         (Map_Types): New routine.
9542         (Replace_References): New routine.
9543         (Replace_Type_References): Moved to the library level of Exp_Util.
9544         (Update_Primitives_Mapping_Of_Types): Removed.
9545         * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9546         properties of the private type to the full view in case the full
9547         view derives from a parent type and inherits a DIC pragma.
9548         * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9549         DIC pragma is placed at the top of a declarative region.
9551 2017-04-25  Tristan Gingold  <gingold@adacore.com>
9553         * s-mmap.ads (Data): Add pragma Inline.
9555 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9557         * checks.adb (Insert_Valid_Check): Do not use
9558         a renaming to alias a volatile name because this will lead to
9559         multiple evaluations of the volatile name. Use a constant to
9560         capture the value instead.
9562 2017-04-25  Doug Rupp  <rupp@adacore.com>
9564         * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
9566 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9568         * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
9569         Add out parameter to indicate to caller that a wrapper must
9570         be constructed for an inherited primitive whose inherited
9571         pre/postcondition has called to overridden primitives.
9572         * freeze.adb (Check_Inherited_Conditions): Build wrapper body
9573         for inherited primitive that requires it.
9574         * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
9575         legal primitive operations and belong to the list of bodies
9576         generated after the freeze point of a type.
9577         * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
9578         of Build_Class_Wide_Expression.
9579         * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
9580         to construct the specification of the wrapper subprogram created
9581         for an inherited operation.
9583 2017-04-25  Bob Duff  <duff@adacore.com>
9585         * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
9586         pthread_mutexattr_setprioceiling): Add new interfaces for these
9587         pthread operations.
9588         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
9589         protocols as appropriate for Locking_Policy 'C' and 'I'.
9590         * s-taprop-posix.adb: Minor reformatting to make it more similar
9591         to s-taprop-linux.adb.
9593 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9595         * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
9596         Handle properly a multi- level derivation involving both renamed
9597         and constrained parent discriminants, when the type to be
9598         constrained has fewer discriminants that the ultimate ancestor.
9600 2017-04-25  Bob Duff  <duff@adacore.com>
9602         * sem_util.adb (Is_Object_Reference): In the
9603         case of N_Explicit_Dereference, return False if it came from a
9604         conditional expression.
9606 2017-04-25  Bob Duff  <duff@adacore.com>
9608         * par-ch4.adb (P_Case_Expression): If a semicolon
9609         is followed by "when", assume that ";" was meant to be ",".
9611 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
9613         * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
9614         fixes.
9616 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
9618         * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
9619         loading of an entity.
9620         * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
9621         previously repeated in the analysis.
9622         * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
9623         procedure SPARK_Implicit_Load.  (Analyze_Task_Type_Declaration):
9624         use new procedure SPARK_Implicit_Load.
9625         * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
9626         SPARK_Implicit_Load.
9628 2017-04-25  Javier Miranda  <miranda@adacore.com>
9630         * sem_util.adb (New_Copy_Tree): By default
9631         copying of defining identifiers is prohibited because
9632         this would introduce an entirely new entity into the
9633         tree. This patch introduces an exception to this general
9634         rule: the declaration of constants and variables located in
9635         Expression_With_Action nodes.
9636         (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
9637         (In_Map): New subprogram.
9638         (Visit_Entity): New subprogram.
9639         (Visit_Node): Handle EWA_Level,
9640         EWA_Inner_Scope_Level, and take care of defining entities defined
9641         in Expression_With_Action nodes.
9643 2017-04-25  Thomas Quinot  <quinot@adacore.com>
9645         * exp_ch6.adb: minor comment edit.
9646         * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
9647         procedure specifications that come from source.
9648         * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
9649         Null_Statement attribute.
9650         * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
9651         procedure, generate statement SCO for the generated NULL statement.
9652         * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
9653         parser, if available.
9655 2017-04-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9657         * system-linux-s390.ads: Use Long_Integer'Size to define
9658         Memory_Size.
9660 2017-04-04  Eric Botcazou  <ebotcazou@adacore.com>
9662         * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
9664 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
9666         * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
9667         * g-socket.adb (To_Host_Entry): Fix typo in comment.
9668         * gnat_ugn.texi: Fix typo.
9669         * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
9670         * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
9671         * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
9672         * sem_util.adb (Mark_Coextensions): Likewise.
9673         * sem_util.ads (Available_Full_View_Of_Component): Likewise.
9675 2017-03-28  Andreas Schwab  <schwab@suse.de>
9677         PR ada/80117
9678         * system-linux-aarch64-ilp32.ads: New file.
9679         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
9680         from LIBGNAT_TARGET_PAIRS.
9681         (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
9682         (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
9683         LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
9684         or -mabi=ilp32, resp.
9686 2017-03-14  James Cowgill  <James.Cowgill@imgtec.com>
9688         * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
9690 2017-03-08  Thanassis Tsiodras  <ttsiodras@gmail.com>
9692         PR ada/79903
9693         * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
9695 2017-03-08  Eric Botcazou  <ebotcazou@adacore.com>
9697         PR ada/79945
9698         * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
9700         * system-linux-arm.ads (Default_Bit_Order): Likewise.
9701         * system-linux-mips.ads (Default_Bit_Order): Likewise.
9702         * system-linux-armeb.ads: Delete.
9703         * system-linux-mipsel.ads: Likewise.
9704         * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
9705         (ARM/Linux): Likewise.
9707 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
9709         PR c/79677
9710         * gcc-interface/misc.c (gnat_handle_option): Pass true to
9711         handle_generated_option GENERATED_P.
9713 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9715         * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
9716         around a justified modular type if it doesn't have the same scalar
9717         storage order as the enclosing record type.
9719 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9721         * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
9722         of boolean rvalues to function calls.
9724 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9726         * gcc-interface/utils.c (fold_bit_position): New function.
9727         (rest_of_record_type_compilation): Call it instead of bit_position to
9728         compute the field position and remove the call to remove_conversions.
9729         (compute_related_constant): Factor out the multiplication in both
9730         operands, if any, and streamline the final test.
9732 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9734         * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
9736 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9738         * gcc-interface/decl.c: Include demangle.h.
9739         (is_cplusplus_method): Return again true for a primitive operation
9740         only if it is dispatching.  For a subprogram with an interface name,
9741         call the demangler to get the number of C++ parameters and compare it
9742         with the number of Ada parameters.
9744 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9746         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
9747         there is no end label, put the location of the At_End procedure on
9748         the call to the procedure.
9750 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9752         * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
9753         value for array types with TYPE_INDEX_TYPE set on their domain type.
9754         * gcc-interface/utils.c (max_size): For operations and expressions, do
9755         not build a new node if the operands have not changed or are missing.
9757 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9759         * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
9760         argument when recursing on TRUTH_NOT_EXPR.
9762 2017-02-12  John Marino  <gnugcc@marino.st>
9764         * system-freebsd-x86.ads: Rename into...
9765         * system-freebsd.ads: ...this.
9766         (Default_Bit_Order): Define using Standard'Default_Bit_Order.
9767         * gcc-interface/Makefile.in: Support aarch64-freebsd.
9768         (x86-64/FreeBSD): Adjust to above renaming.
9769         (i386/FreeBSD): Likewise.
9771 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
9773         * comperr.adb: Update FSF bug reporting URL.
9775 2017-02-01  Eric Botcazou  <ebotcazou@adacore.com>
9776             Jakub Jelinek  <jakub@redhat.com>
9778         PR ada/79309
9779         * adaint.c (__gnat_killprocesstree): Fix broken string handling.
9781 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
9783         PR lto/79061
9784         * gcc-interface/utils.c (get_global_context): Pass main_input_filename
9785         to build_translation_unit_decl.
9787 2017-01-23  Javier Miranda  <miranda@adacore.com>
9789         * sem_util.adb (New_Copy_Tree): Code cleanup:
9790         removal of the internal map (ie. variable Actual_Map, its
9791         associated local variables, and all the code handling it).
9792         * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
9793         force loading of the System package when processing a task type.
9794         (Analyze_Protected_Type_Declaration): in GNATprove mode force
9795         loading of the System package when processing a protected type.
9796         * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
9797         force loading of the System package when processing compilation
9798         unit with a main-like subprogram.
9799         * frontend.adb (Frontend): remove forced loading of the System
9800         package.
9802 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9804         * sem_prag.adb (Default_Initial_Condition): If the desired type
9805         declaration is a derived type declaration with discriminants,
9806         it is rewritten as a private type declaration.
9807         * sem_ch13.adb (Replace_Type_References_Generic,
9808         Visible_Component): A discriminated private type with descriminnts
9809         has components that must be rewritten as selected components
9810         if they appear as identifiers in an aspect expression such as
9811         a Default_Initial_Condition.
9812         * sem_util.adb (Defining_Entity): support N_Iterator_Specification
9813         nodes.
9815 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9817         * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
9818         * gnat1drv.adb Generate an empty object file for an ignored
9819         Ghost compilation unit.
9820         * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
9822 2017-01-23  Yannick Moy  <moy@adacore.com>
9824         * sem_ch4.adb (Analyze_Indexed_Component_Form):
9825         Adapt to inlined prefix with string literal subtype.
9826         * inline.adb (Expand_Inlined_Call): Keep unchecked
9827         conversion inside inlined call when formal type is constrained.
9829 2017-01-23  Javier Miranda  <miranda@adacore.com>
9831         * sem_util.adb (New_Copy_Tree): Code cleanup:
9832         removal of global variables. All the global variables, global
9833         functions and tables of this subprogram are now declared locally.
9835 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
9837         * exp_strm.ads: Minor reformatting and typo fixes.
9839 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9841         * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
9842         exp_aggr.adb: Minor reformatting.
9843         * g-diopit.adb: minor grammar/punctuation fix in comment.
9844         * g-byorma.ads: minor fix of unbalanced parens in comment.
9846 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9848         * par.adb: Update the documentation of component Labl.
9849         * par-ch6.adb (P_Return_Statement): Set the expected label of
9850         an extended return statement to Error.
9852 2017-01-23  Tristan Gingold  <gingold@adacore.com>
9854         * s-boustr.ads, s-boustr.adb (Is_Full): New function.
9856 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9858         * expander.adb: Handle N_Delta_Aggregate.
9860 2017-01-23  Javier Miranda  <miranda@adacore.com>
9862         * exp_ch6.adb (Expand_Call): Improve the code that
9863         checks if some formal of the called subprogram is a class-wide
9864         interface, to handle subtypes of class-wide interfaces.
9866 2017-01-23  Javier Miranda  <miranda@adacore.com>
9868         * checks.adb (Apply_Parameter_Aliasing_Checks):
9869         Remove side effects of the actuals before generating the overlap
9870         check.
9872 2017-01-23  Justin Squirek  <squirek@adacore.com>
9874         * exp_strm.ads, exp_strm.ads
9875         (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
9876         as to avoid getting the underlying type by default.
9877         * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
9878         underlying type in the Iiput and output attribute cases when
9879         building their respective functions.
9881 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
9883         * scng.adb: Minor reformatting of error message.
9885 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9887         * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
9888         to freeze the return type of an expression funxtion that is a
9889         completion, if the type is a limited view and the non-limited
9890         view is available.
9892 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9894         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
9895         aggregate construct.
9896         (P_Record_Or_Array_Component_Association): An array aggregate
9897         can start with an Iterated_Component_Association.
9898         * scng.adb: Modify error message on improper use of @ in earlier
9899         versions of the language.
9900         * sinfo.ads: New node kind N_Delta_Aggregate.
9901         * sinfo.adb: An N_Delta_Aggregate has component associations and
9902         an expression.
9903         * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
9904         * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
9905         Create a new index for each one of the choices in the association,
9906         to prevent spurious homonyms in the scope.
9907         (Resolve_Delta_Aggregate): New.
9908         * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
9909         * exp_util.adb (Insert_Actions): Take into account
9910         N_Delta_Aggregate.
9911         * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
9912         * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
9913         and local procedures Expand_Delta_Array_Aggregate and
9914         expand_Delta_Record_Aggregate.
9915         * sprint.adb: Handle N_Delta_Aggregate.
9917 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9919         * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
9920         empty name when the exception declaration is subject to pragma
9921         Discard_Names.
9922         (Null_String): New routine.
9924 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9926         * par-ch9.adb (P_Protected_Definition): Parse
9927         any optional and potentially illegal pragmas which appear in
9928         a protected operation declaration list.
9929         (P_Task_Items): Parse
9930         any optional and potentially illegal pragmas which appear in a
9931         task item list.
9933 2017-01-23  Pascal Obry  <obry@adacore.com>
9935         * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
9936         is needed when a foreign thread call a Win32 API using a thread handle
9937         like GetThreadTimes() for example.
9939 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9941         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9942         allow an 'Address clause to be specified on a prefix of a
9943         class-wide type.
9945 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9947         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9948         attribute 'Valid is a renaming of the original expression when
9949         the expression denotes a name. For all other kinds of expression,
9950         use a constant to capture the value.
9951         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9952         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9954 2017-01-23  Justin Squirek  <squirek@adacore.com>
9956         * sem_eval.adb (Eval_Integer_Literal): Add special
9957         case to avoid optimizing out check if the literal appears in
9958         an if-expression.
9960 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9962         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9963         allow an 'Address clause to be specified on a prefix of a
9964         class-wide type.
9966 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9968         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9969         attribute 'Valid is a renaming of the original expression when
9970         the expression denotes a name. For all other kinds of expression,
9971         use a constant to capture the value.
9972         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9973         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9975 2017-01-23  Justin Squirek  <squirek@adacore.com>
9977         * sem_eval.adb (Eval_Integer_Literal): Add special
9978         case to avoid optimizing out check if the literal appears in
9979         an if-expression.
9981 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9983         * sem_ch4.adb (Try_Primitive_Operations,
9984         Is_Valid_First_Argument_Of): argument is valid if it is a derived
9985         type with unknown discriminants that matches its underlying
9986         record view.
9987         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
9988         expression if its type is derived from a limited type with
9989         unknown discriminants, because the expansion (which is a call)
9990         must be expanded in the enclosing context to add the proper build-
9991         in-place parameters to the call.
9992         * lib.ads, exp_ch9.adb: Minor fixes in comments.
9994 2017-01-23  Yannick Moy  <moy@adacore.com>
9996         * frontend.adb (Frontend): Do not load runtime
9997         unit for GNATprove when parsing failed.
9998         * exp_ch9.adb: minor removal of extra whitespace
9999         * exp_ch6.adb: minor typo in comment
10000         * sem_util.adb: Code cleanup.
10001         * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
10002         * a-ngcefu.adb: minor style fix in whitespace
10004 2017-01-23  Thomas Quinot  <quinot@adacore.com>
10006         * scos.ads: Document usage of 'd' as default SCO kind for
10007         declarations.
10008         * par_sco.adb (Traverse_Declarations_Or_Statements.
10009         Traverse_Degenerate_Subprogram): New supporting routine for expression
10010         functions and null procedures.
10011         (Traverse_Declarations_Or_Statements.Traverse_One): Add
10012         N_Expression_Function to the subprogram case; add required
10013         support for null procedures and expression functions.
10015 2017-01-23  Bob Duff  <duff@adacore.com>
10017         * namet.ads (Bounded_String): Decrease the size of type
10018         Bounded_String to avoid running out of stack space.
10019         * namet.ads (Append): Don't ignore buffer overflow; raise
10020         Program_Error instead.
10022 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
10024         * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
10025         sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
10026         reformatting.
10027         * exp_ch9.adb: minor style fix in comment.
10029 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
10031         * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
10032         for a limited record extension with unknown discriminants whose
10033         full view has no discriminants.
10035 2017-01-23  Yannick Moy  <moy@adacore.com>
10037         * exp_spark.adb: Alphabetize with clauses.
10039 2017-01-23  Yannick Moy  <moy@adacore.com>
10041         * sem_util.adb (Has_Enabled_Property): Treat
10042         protected objects and variables differently from other variables.
10044 2017-01-23  Thomas Quinot  <quinot@adacore.com>
10046         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
10047         Split original Ada 95 part off into new subprogram
10048         below. Call that subprogram (instead of proceeding with
10049         AI95-0133 behaviour) if debug switch -gnatd.p is in use.
10050         (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
10051         * debug.adb Document new switch -gnatd.p
10052         * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
10053         record for reverse bit order if an error has already been posted
10054         on the record type.  This avoids generating extraneous "info:"
10055         messages for illegal code.
10057 2017-01-23  Justin Squirek  <squirek@adacore.com>
10059         * sem_ch3.adb (Analyze_Declarations): Correct comments
10060         * freeze.adb (Find_Constant): Add detection of deferred constants
10061         so they are not incorrectly flagged as premature.
10063 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
10065         * scans.ads: New token At_Sign. Remove '@' from list of illegal
10066         characters for future version of the language. '@' is legal name.
10067         * scng.ads, scng.adb (Scan):  Handle '@' appropriately.
10068         * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
10069         denotes a Target_Name.
10070         * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
10071         * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
10072         (Has_Target_Names): New flag on N_Assignment_Statement, to
10073         indicate that RHS has occurrences of N_Target_Name.
10074         * sem.adb: Call Analyze_Target_Name.
10075         * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
10076         (urrent_LHS): Global variable that denotes LHS of assignment,
10077         used in the analysis of Target_Name nodes.
10078         * sem_res.adb (Resolve_Target_Name): New procedure.
10079         * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
10080         N is an assignment statement whose RHS contains occurences of @
10081         that designate the value of the LHS of the assignment. If the
10082         LHS is side-effect free the target names can be replaced with
10083         a copy of the LHS; otherwise the semantics of the assignment
10084         is described in terms of a procedure with an in-out parameter,
10085         and expanded as such.
10086         (Expand_N_Assignment_Statement): Call
10087         Expand_Assign_With_Target_Names when needed.
10088         * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
10089         * sprint.adb: Handle N_Target_Name.
10091 2017-01-23  Eric Botcazou  <ebotcazou@adacore.com>
10093         * checks.adb: Minor fix in comment.
10095 2017-01-23  Philippe Gil  <gil@adacore.com>
10097         * g-debpoo.adb (Do_Report) remove freed chunks from chunks
10098         count in Sort = Memory_Usage or Allocations_Count
10100 2017-01-23  Justin Squirek  <squirek@adacore.com>
10102         * sem_ch3.adb: Code cleanup.
10104 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
10106         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
10107         variables to the local variable section. Update the profile
10108         of various nested routine that previously had visibility
10109         of those globals. One the matching phase has completed,
10110         remove certain classes of clauses which are considered noise.
10111         (Check_Dependency_Clause): Properly detect a match between two
10112         'Result attributes. Update the various post-match cases to use
10113         Is_Already_Matched as this routine now automatically recognizes
10114         a previously matched 'Result attribute.
10115         (Is_Already_Matched): New routine.
10116         (Remove_Extra_Clauses): New routine.
10117         (Report_Extra_Clauses): Remove the detection of ... => null
10118         clauses as this is now done in Remove_Extra_Clauses.
10120 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
10122         * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
10123         report on spurious overlaps between values involving a subtype
10124         with a static predicate, because the expansion of such a subtype
10125         into individual ranges in inhibited in ASIS mode.
10127 2017-01-23  Justin Squirek  <squirek@adacore.com>
10129         * sem_ch3.adb (Analyze_Declarations): Add detection
10130         of an edge case and delay freezing if it is present.
10132 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
10134         * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
10135         sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
10137 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
10139         * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
10140         access-to-subprogram types inherit the convention of the
10141         associated subprogram.  (Set_Profile_Convention): New routine.
10142         * sem_ch6.adb (Check_Conformance): Do not compare the conventions
10143         of the two entities directly, use Conventions_Match to account
10144         for anonymous access-to-subprogram and subprogram types.
10145         (Conventions_Match): New routine.
10147 2017-01-23  Claire Dross  <dross@adacore.com>
10149         * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
10150         which return Universal_Integer, force the overflow check flag for
10151         Length and Range_Length for types as big as Long_Long_Integer.
10153 2017-01-23  Claire Dross  <dross@adacore.com>
10155         * exp_spark.adb (Expand_SPARK_Attribute_Reference):  For
10156         attributes which return Universal_Integer, introduce a conversion
10157         to the expected type with the appropriate check flags set.
10158         * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
10159         base type if the range is null. It may still be invalid if it
10160         is higher than the lower bound. This is checked later in the
10161         context in which the range appears.
10163 2017-01-23  Pierre-Marie de Rodat  <derodat@adacore.com>
10165         * scos.ads: Introduce a constant to represent ignored
10166         dependencies in SCO_Unit_Table_Entry.
10168 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
10170         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
10171         spaces from error messages.
10173 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
10175         * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
10176         subsidiary to Expand_N_Object_ Declaration, to compute a guard on
10177         an object declaration for an array type with a modular index type
10178         with the size of Long_Long_Integer. Special processing is needed
10179         in this case to compute reliably the size of the object, and
10180         eventually  to raise Storage_Error, when wrap-around arithmetic
10181         might compute a meangingless size for the object.
10183 2017-01-23  Justin Squirek  <squirek@adacore.com>
10185         * a-wtenau.adb, par-endh.adb, sem_prag.adb,
10186         sem_type.adb: Code cleanups.
10188 2017-01-23  Bob Duff  <duff@adacore.com>
10190         * sem_res.adb (Resolve_Call): In the part of the code where
10191         it is deciding whether to turn the call into an indexed
10192         component, avoid doing so if the call is to an instance of
10193         Unchecked_Conversion. Otherwise, the compiler turns it into an
10194         indexed component, and resolution of that turns it back into a
10195         function call, and so on, resulting in infinite recursion.
10196         * sem_util.adb (Needs_One_Actual): If the first formal has a
10197         default, then return False.
10199 2017-01-21  Eric Botcazou  <ebotcazou@adacore.com>
10201         * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
10202         optimizations when the type is modular and the offsets are equal.
10204 2017-01-20  Thomas Quinot  <quinot@adacore.com>
10206         * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
10207         message.
10209 2017-01-20  Nicolas Roche  <roche@adacore.com>
10211         * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
10213 2017-01-20  Bob Duff  <duff@adacore.com>
10215         * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
10216         (etc) optimizations when the type is modular.
10218 2017-01-20  Yannick Moy  <moy@adacore.com>
10220         * sem_ch6.adb (Move_Pragmas): move some pragmas,
10221         but copy the SPARK_Mode pragma instead of moving it.
10222         (Build_Subprogram_Declaration): Ensure that the generated spec
10223         and original body share the same SPARK_Pragma aspect/pragma.
10224         * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
10225         procedure to copy SPARK_Mode aspect.
10227 2017-01-20  Bob Duff  <duff@adacore.com>
10229         * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
10230         even in ASIS mode.
10231         * sem_ch13.adb (Resolve_Name): Enable setting the entity to
10232         Empty even in ASIS mode.
10234 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10236         * exp_ch9.adb: minor style fixes in comments.
10237         * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
10238         relative statement introduces an implicit dependency on
10239         Ada.Real_Time.Clock_Time.
10240         * sem_util.adb: Minor reformatting.
10242 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10244         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
10245         must be treated as delayed aspect even if the expression is
10246         a literal, because the aspect affects the freezing and the
10247         elaboration of the object to which it applies.
10249 2017-01-20  Tristan Gingold  <gingold@adacore.com>
10251         * s-osinte-vxworks.ads (Interrup_Range): New subtype.
10253 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10255         * lib-xref.adb (Generate_Reference): Do not warn about the
10256         presence of a pragma Unreferenced if the entity appears as the
10257         actual in a procedure call that does not come from source.
10259 2017-01-20  Pascal Obry  <obry@adacore.com>
10261         * expect.c, terminals.c: Fix some warnings about unused variables.
10262         * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
10263         of the runtime.
10265 2017-01-20  Bob Duff  <duff@adacore.com>
10267         * exp_attr.adb (Constrained): Apply an access check (check that
10268         the prefix is not null) when the prefix denotes an object of an
10269         access type; that is, when there is an implicit dereference.
10271 2017-01-20  Gary Dismukes  <dismukes@adacore.com>
10273         * s-rident.ads (constant Profile_Info): Remove
10274         No_Calendar from GNAT_Extended_Ravenscar restrictions.
10276 2017-01-20  Tristan Gingold  <gingold@adacore.com>
10278         *  s-maccod.ads: Add pragma No_Elaboration_Code_All
10280 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10282         * ghost.adb (Mark_Ghost_Clause): New routine.
10283         (Prune_Node): Do not prune compilation unit nodes.
10284         (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
10285         This does not touch the node itself, but does prune all its fields.
10286         * ghost.ads (Mark_Ghost_Clause): New routine.
10287         * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
10288         package clause mentions Ghost and non-Ghost packages. Mark a
10289         use package clause as Ghost when it mentions a Ghost package.
10290         (Analyze_Use_Type): Emit an error when a use type clause mentions
10291         Ghost and non-Ghost types. Mark a use type clause as Ghost when
10292         it mentions a Ghost type.
10293         * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
10294         Ghost when it withs a Ghost unit.
10296 2017-01-20  Javier Miranda  <miranda@adacore.com>
10298         * sem_res.adb (Resolve_Call): If a function call
10299         returns a limited view of a type and at the point of the call the
10300         function is not declared in the extended main unit then replace
10301         it with the non-limited view, which must be available. If the
10302         called function is in the extended main unit then no action is
10303         needed since the back-end handles this case.
10305 2017-01-20  Eric Botcazou  <ebotcazou@adacore.com>
10307         * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
10308         (Contains_Subprograms_Refs): ...this.  Adjust comment
10309         for constants.  (Is_Subp_Or_Const_Ref): Rename into...
10310         (Is_Subprogram_Ref): ...this.
10311         (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
10312         Has_Non_Subprograms_Referencer and adjust comment.  Remove
10313         incorrect shortcut for package declarations and bodies.
10315 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10317         * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
10318         base type differs from that of the completion and the private
10319         subtype is an itype (created for a constraint on an access
10320         type e.g.), set Delayed_Freeze on both to prevent out-of-scope
10321         anomalies in gigi.
10323 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10325         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10326         When inheriting the SPARK_Mode of a prior expression function,
10327         look at the properly resolved entity rather than the initial
10328         candidate which may denote a homonym.
10330 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10332         * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
10333         Precondition or Postcondition, and the context is pragma
10334         Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
10335         and suggest the standard names Assertion_Policy /Pre /Post
10336         instead.
10338 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10340         * sem_ch10.adb, sem_cat.adb: Minor reformatting.
10342 2017-01-20  Javier Miranda  <miranda@adacore.com>
10344         * sem_ch3.adb (Access_Type_Declaration): Protect access to the
10345         Entity attribute.
10346         * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
10347         * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
10348         malformed trees.
10350 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10352         * sem_ch13.adb (Analyze_Aspect_Specification, case
10353         Dynamic_Predicate): If the entity E is a subtype that inherits
10354         a static predicate for its parent P,, the inherited and the
10355         new predicate combine in the generated predicate function,
10356         and E only has a dynamic predicate.
10358 2017-01-20  Tristan Gingold  <gingold@adacore.com>
10360         * s-boustr.ads, s-boustr.adb: New package.
10361         * Makefile.rtl: Add s-boustr.
10363 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10365         * inline.adb (Process_Formals): Qualify the
10366         expression of a return statement when it yields a universal type.
10368 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10370         * freeze.adb (Freeze_All): Freeze the default
10371         expressions of all eligible formal parameters that appear in
10372         entries, entry families, and protected subprograms.
10374 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10376         * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
10377         for illegal inherited Implicit_Dereference aspects with renamed
10378         discriminants.
10380 2017-01-20  Javier Miranda  <miranda@adacore.com>
10382         * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
10383         * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
10384         * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
10385         (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
10386         Set_Prev, Tree_Read): Adding assertion.
10387         * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
10388         * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
10389         (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
10390         Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
10391         Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
10392         Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
10393         Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
10394         Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
10395         Set_ListN_With_Parent): Adding assertion.
10397 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10399         * sem_prag.adb (Process_Convention): Diagnose properly a pragma
10400         import that applies to several homograph subprograms. when one
10401         of them is declared by a subprogram body.
10403 2017-01-20  Justin Squirek  <squirek@adacore.com>
10405         * exp_ch6.adb (Expand_Call): Remove optimization
10406         that nulls out calls to null procedures.
10408 2017-01-20  Yannick Moy  <moy@adacore.com>
10410         * inline.adb (Expand_Inlined_Call): Keep more
10411         precise type of actual for inlining whenever possible. In
10412         particular, do not switch to the formal type in GNATprove mode in
10413         some case where the GNAT backend might require it for visibility.
10415 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10417         * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
10418         aspect Implicit_Dereference can be inherited by a full view if
10419         the partial view has no discriminants, because there is no way
10420         to apply the aspect to the partial view.
10421         (Build_Derived_Record_Type): If derived type renames discriminants
10422         of the parent, the new discriminant inherits the aspect from
10423         the old one.
10424         * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
10425         call through an access discriminant designating a subprogram.
10426         * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
10427         properly a parameterless call through an access discriminant on
10428         the left-hand side of an assignment.
10429         * sem_res.adb (resolve): If an interpreation involves a
10430         discriminant with an implicit dereference and the expression is an
10431         entity, resolution takes place later in the appropriate routine.
10432         * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
10433         access discriminants that designate a subprogram type.
10435 2017-01-20  Pascal Obry  <obry@adacore.com>
10437         * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
10439 2017-01-20  Yannick Moy  <moy@adacore.com>
10441         * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
10442         on implicitly with'ed units in GNATprove mode.
10443         * sinfo.ads (Implicit_With): Document use of flag for implicitly
10444         with'ed units in GNATprove mode.
10446 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10448         * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
10449         unit Do not report an error on a non-static entity that appears
10450         in the context of a spec expression, such as an aspect expression.
10452 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10454         * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
10455         (Is_Underlying_Full_View): New routine.
10456         (Set_Is_Underlying_Full_View): New routine.
10457         (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
10458         * einfo.ads Add new attribute Is_Underlying_Full_View.
10459         (Is_Underlying_Full_View): New routine along with pragma Inline.
10460         (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
10461         * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
10462         class-wide types and underlying full views. The first subtype
10463         is used as the working type for all Itypes, not just array base types.
10464         (Build_DIC_Procedure_Declaration): Do not consider
10465         class-wide types and underlying full views. The first subtype
10466         is used as the working type for all Itypes, not just array
10467         base types.
10468         * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
10469         view or an underlying full view without clobbering the attributes
10470         of a previous freeze node.
10471         (Inherit_Freeze_Node): New routine.
10472         * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
10473         full view as such.
10474         (Build_Underlying_Full_View): Mark an underlying full view as such.
10475         * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
10476         full view as such.
10478 2017-01-20  Yannick Moy  <moy@adacore.com>
10480         * sinfo.ads: Document lack of Do_Division_Check flag
10481         on float exponentiation.
10483 2017-01-19  Javier Miranda  <miranda@adacore.com>
10485         * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
10486         identifier attribute of a block-statement node. Required to avoid
10487         assertion failure when building the new containers library.
10489 2017-01-19  Bob Duff  <duff@adacore.com>
10491         * exp_ch3.adb: Update comment.
10493 2017-01-19  Vincent Celier  <celier@adacore.com>
10495         * gprep.adb (Gnatprep): Parse the definition file without
10496         "replace in comments" even when switch -C is used.
10498 2017-01-19  Justin Squirek  <squirek@adacore.com>
10500         * exp_ch9.adb (Is_Pure_Barrier): Create function
10501         Is_Count_Attribute to identify an expansion of the 'Count
10502         attribute.
10504 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10506         * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
10507         statements within an element iterator loop are only analyzed
10508         agter the loop is rewritten. Within a generic the analysis must
10509         be performed in any case to complete name capture.
10511 2017-01-19  Bob Duff  <duff@adacore.com>
10513         * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
10514         before checking for unrecognized pragmas.
10515         Initialize Pname on its declarations; that's always good style.
10517 2017-01-19  Claire Dross  <dross@adacore.com>
10519         * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
10520         body into the tree for GNATprove by setting its Parent field. The
10521         components invariants of composite types are not checked by
10522         the composite type's invariant procedure in GNATprove mode.
10523         (Build_Invariant_Procedure_Declaration): Semi-insert the
10524         declaration into the tree for GNATprove by setting its Parent
10525         field.
10526         * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
10527         the component invariants to the array type  invariant procedure
10528         so that the procedure can be used to  check the array type
10529         invariants if any.
10530         (Freeze_Record_Type): In GNATprove mode, do
10531         not add the component invariants to the record type  invariant
10532         procedure so that the procedure can be used to  check the record
10533         type invariants if any.
10535 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10537         * lib-xref-spark_specific.adb: Minor reformatting.
10538         * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
10540 2017-01-19  Javier Miranda  <miranda@adacore.com>
10542         * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
10543         Build_Back_End_Aggregate.
10544         (Generate_Aggregate_For_Derived_Type): Code cleanup.
10545         (Prepend_Stored_Values): Code cleanup.
10547 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10549         * sem_ch6.adb (Analyze_Expression_Function): Check for an
10550         incomplete return type after attempting to freeze it, so that
10551         other freeze actiona are generated in the proper order.
10553 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10555         * sem_aggr.adb (Resolve_Aggregate): If the type is a string
10556         type, ie. a type whose component is a character type, and the
10557         aggregate is positional, do not convert into a string literal
10558         if the index type is not an integer type, because the original
10559         type may be required in an enclosing operation.
10561 2017-01-19  Bob Duff  <duff@adacore.com>
10563         * binde.adb, debug.adb: Enable new elaboration order algorithm
10564         by default. -dp switch reverts to the old algorithm.
10566 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10568         * sem_ch3.adb Add with and use clauses for Exp_Ch7.
10569         (Analyze_Declarations): Create the DIC and Invariant
10570         procedure bodies s after all freezing has taken place.
10571         (Build_Assertion_Bodies): New routine.
10572         * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
10573         and Exp_Util.
10574         (Analyze_Package_Specification): Remove the
10575         generation of the DIC and Invariant procedure bodies. This is
10576         now done by Analyze_Declarations.
10577         * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
10578         procedures are never treated as primitives.
10580 2017-01-19  Yannick Moy  <moy@adacore.com>
10582         * frontend.adb: Analyze inlined bodies and check elaboration
10583         rules in GNATprove mode too.
10584         * sem_elab.adb (Delay_Element): Add Boolean component to save
10585         indication that call is in SPARK code.  (Check_Elab_Calls):
10586         Check elaboration rules in GNATprove mode, and correctly set
10587         the current value of SPARK_Mode.
10588         * lib-xref-spark_specific.adb
10589         (Add_SPARK_Xrefs): Simplify iteration over dereferences.
10591 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10593         * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
10594         checks on the expression for the high bound of concatenation
10595         when checks are disabled, to suppress warnings about potential
10596         constraint errors in restricted runtimes.
10598 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10600         * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
10601         representation-to-position function as inlined.
10602         * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
10603         the purity of an internally generated entity if it has been
10604         explicitly marked as pure for optimization purposes.
10605         * exp_aggr.adb: Minor reformatting.
10607 2017-01-19  Javier Miranda  <miranda@adacore.com>
10609         * exp_ch6.adb (Expand_Call): Remove side effects on
10610         actuals that are allocators with qualified expression since the
10611         initialization of the object is performed by means of individual
10612         statements (and hence it must be done before the call).
10614 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10616         * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
10617         (Build_Derived_Enumeration_Type): If the derived type inherits a
10618         dynamic predicate from its parent, the bounds of the type must
10619         freeze because an explicit constraint is constructed for the
10620         type and the corresponding range is elaborated now.
10622 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
10624         * sem_attr.ads: minor fix of inconsistent casing in comment
10625         * lib-writ.ads: minor align comments in columns
10626         * sem_ch3.adb: Minor reformatting.
10627         * spark_xrefs.ads: minor fix typo in SPARK-related comment
10628         * table.ads: minor style fix in comment
10629         * lib-xref-spark_specific.adb
10630         (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
10631         * sem_ch12.adb: minor whitespace fix
10632         * freeze.adb: Add comment.
10633         * sem_util.adb (Unique_Name): for instances of
10634         generic subprograms ignore the name of the wrapper package.
10636 2017-01-19  Javier Miranda  <miranda@adacore.com>
10638         * exp_aggr.adb (Resolve_Record_Aggregate):
10639         Factorize code needed for aggregates of limited and unlimited
10640         types in a new routine.
10641         (Pass_Aggregate_To_Back_End): New subprogram.
10643 2017-01-19  Yannick Moy  <moy@adacore.com>
10645         * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
10647 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10649         * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
10650         public, for use elsewhere.
10651         * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
10652         an Inlined_body, recognize a call that uses object notation
10653         and has not been rewritten as a regular call because regular
10654         expansion has not taken place.
10656 2017-01-19  Bob Duff  <duff@adacore.com>
10658         * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
10659         in case of generic formal discrete types, because it causes crashes in
10660         the compiler when built with assertions on.
10662 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10664         * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
10665         sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
10667 2017-01-19  Bob Duff  <duff@adacore.com>
10669         * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
10670         Increment Warnings_Detected.  It was decrementing, which is
10671         wrong since we just issued a warning message.
10672         * binderr.ads (Errors_Detected, Warnings_Detected): Declare
10673         these variables to be of subtype Nat instead of Int, because
10674         they should never be negative.
10676 2017-01-19  Javier Miranda  <miranda@adacore.com>
10678         * contracts.adb (Build_Postconditions_Procedure): Replace
10679         Generate_C_Code by Modify_Tree_For_C.
10680         * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
10681         Replace Generate_C_Code by Modify_Tree_For_C.
10682         * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
10683         Modify_Tree_For_C.
10684         * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
10685         Generate_C_Code by Modify_Tree_For_C.
10686         * exp_ch4.adb (Expand_Allocator_Expression): Replace
10687         Generate_C_Code by Modify_Tree_For_C.
10688         * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
10689         by Modify_Tree_For_C.
10690         * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
10691         Generate_C_Code by Modify_Tree_For_C.
10692         * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
10693         by Modify_Tree_For_C.
10694         * sinfo.ads (Modify_Tree_For_C): Adding documentation.
10696 2017-01-19  Javier Miranda  <miranda@adacore.com>
10698         * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
10699         subprogram.
10700         (Is_Inlinable_Expression_Function): New subprogram.
10701         * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
10702         to Sem_Util.
10703         (Is_Inlinable_Expression_Function): Moved to Sem_Util.
10705 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10707         * sem_ch4.adb (Diagnose_Call): Improve error message when a
10708         selected component has a prefix that might be interpreted
10709         as a parameterless function call, but none of the candidate
10710         interpretations is parameterless, and there is a hidden homonym
10711         of the prefix that is a package.
10712         * sem_ch8.adb (Find_Selected_Component): If the prefix might be
10713         interpreted as a parameterless function call and its analysis
10714         fails, do not call Analyze_Selected_Component.
10716 2017-01-19  Steve Baird  <baird@adacore.com>
10718         * sem_util.ads: Add new Use_Full_View Boolean parameter to
10719         Get_Index_Bounds.
10720         * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
10721         calls to a newly-defined Scalar_Range_Of_Right_View function.
10723 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
10725         * gnat1drv.adb: minor fix of unbalanced parens in comment
10726         * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
10727         to visible part of the package to allow re-use in GNATprove.
10728         * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
10729         from repeated code of Traverse_Compilation_Unit.
10730         (Traverse_Declaration_Or_Statement): fixed detection of
10731         generic subprograms and packages; also, iteration over case
10732         statement alternatives rewritten to avoid testing if the first
10733         alternative is present (since it must be present due to Ada
10734         syntax restrictions).
10736 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10738         * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
10739         returning by reference not just for subprogram body stubs,
10740         but for all subprogram cases.
10741         * sem_util.adb: Code reformatting.
10742         (Requires_Transient_Scope): Update the call to Results_Differ.
10743         (Results_Differ): Update the parameter profile and the associated
10744         comment on usage.
10746 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10748         * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
10749         identifier nodes that do not come from source, to handle properly
10750         dimensionality check within an inlined body which inclddes both
10751         original operands and rewritten operands. This removes spurious
10752         dimensionality errors in the presence of front-end inlining,
10753         as well as in SPARK mode.
10755 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
10757         PR driver/49726
10758         * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
10760 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10762         * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
10764 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
10766         * doc/gnat_ugn/getting_started_with_gnat.rst,
10767         doc/gnat_ugn/inline_assembler.rst,
10768         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
10769         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
10770         doc/gnat_ugn/about_this_guide.rst,
10771         doc/gnat_ugn/platform_specific_information.rst,
10772         doc/gnat_ugn/example_of_binder_output.rst,
10773         doc/gnat_ugn/gnat_and_program_execution.rst,
10774         doc/gnat_ugn/gnat_utility_programs.rst,
10775         doc/gnat_ugn/the_gnat_compilation_model.rst,
10776         doc/gnat_rm/implementation_defined_attributes.rst,
10777         doc/gnat_rm/compatibility_and_porting_guide.rst,
10778         doc/gnat_rm/standard_library_routines.rst,
10779         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
10780         doc/gnat_rm/implementation_defined_pragmas.rst,
10781         doc/gnat_rm/the_gnat_library.rst,
10782         doc/gnat_rm/obsolescent_features.rst,
10783         doc/gnat_rm/about_this_guide.rst,
10784         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
10785         doc/gnat_rm/implementation_of_ada_2012_features.rst,
10786         doc/gnat_rm/interfacing_to_other_languages.rst,
10787         doc/gnat_rm/implementation_defined_aspects.rst,
10788         doc/gnat_rm.rst: Update documentation.
10789         * gnat_rm.texi, gnat_ugn.texi: Regenerated.
10791 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10793         * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
10794         * scil_ll.adb: Minor style fix in comment.
10795         * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
10796         even if entity is already set, because the node may be renalyzed
10797         after inlining transformations.
10799 2017-01-13  Javier Miranda  <miranda@adacore.com>
10801         * sem_res.adb (Resolve_Call): Do not establish a transient scope
10802         for a call to inlinable expression function (since the call will
10803         be replaced by its returned object).
10804         * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
10805         * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
10806         (Expand_Call): For inlinable expression function call replace the
10807         call by its returned object.
10808         (Is_Inlinable_Expression_Function): New subprogram.
10810 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10812         * checks.adb: Minor typo fix and reformatting.
10814 2017-01-13  Javier Miranda  <miranda@adacore.com>
10816         * contracts.adb (Contract_Only_Subprograms): Remove formal.
10817         (Copy_Original_Specification): Removed.
10818         (Skip_Contract_Only_Subprogram): Move here checks previously
10819         located in the caller of this routine (to leave the code more clean).
10820         (Build_Contract_Only_Subprogram): Code cleanup.
10821         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
10822         (Get_Contract_Only_Missing_Body_Name): Removed.
10824 2017-01-13  Javier Miranda  <miranda@adacore.com>
10826         * sem_ch6.adb (Cloned_Expression): New subprogram.
10827         (Freeze_Expr_Types): Complete previous patch since the expression
10828         of an expression-function may have iterators and loops with
10829         defining identifiers which, as part of the preanalysis of the
10830         expression, may be left decorated with itypes that will not be
10831         available in the tree passed to the backend.
10833 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10835         * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
10836         conversion to Integer of an expression that is an attribute
10837         reference 'Pos on an enumeration type.
10839 2017-01-13  Bob Duff  <duff@adacore.com>
10841         * atree.ads: Minor comment fix.
10843 2017-01-13  Justin Squirek  <squirek@adacore.com>
10845         * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
10846         calls in accessibility check on return statement.
10848 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10850         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10851         Ensure that the input body is a subprogram body before trying to
10852         determine whether it denoted an expression function.  Note that
10853         subprogram body stubs cannot denote expression functions.
10855 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10857         * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
10858         and typo fixes.
10860 2017-01-13  Javier Miranda  <miranda@adacore.com>
10862         * einfo.ads (Component_Bit_Offset): Fix documentation.
10863         * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
10864         on record holes for components with unknown compile-time offsets.
10866 2017-01-13  Bob Duff  <duff@adacore.com>
10868         * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
10869         * g-locfil.ads: Minor comment fix.
10871 2017-01-13  Bob Duff  <duff@adacore.com>
10873         * binde.adb (Elab_New): New elaboration order algorithm
10874         that is expected to cause fewer ABE issues. This is a work in
10875         progress. The new algorithm is currently disabled, and can be
10876         enable by the -dp switch, or by modifying the Do_Old and Do_New
10877         etc. flags and rebuilding. Experimental code is included to
10878         compare the results of the old and new algorithms.
10879         * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
10880         can have multiple of these tables, so the old and new algorithms
10881         can coexist.
10882         * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
10883         parameter of type array. This avoids the global variable, and
10884         allows bounds checking (which is normally defeated by the tables
10885         packages). It also ensures that the Elab_Order is read-only
10886         to Bindgen.
10887         * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
10888         subprograms that need it, as above.
10889         * debug.adb: Document new -dp switch. Modify doc of old -do
10890         switch.
10891         * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
10892         and Bindgen.  Move writing of closure (-R and -Ra switches)
10893         to Binde; that's more convenient.
10895 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10897         * sem_ch6.adb (Analyze_Expression_Function): If the expression
10898         function is a completion, all entities referenced in the
10899         expression are frozen. As a consequence, a reference to an
10900         uncompleted private type from an enclosing scope is illegal.
10902 2017-01-13  Javier Miranda  <miranda@adacore.com>
10904         * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
10905         (Analyze_Subprogram_Body_Helper): At the occurrence of an
10906         expression function declaration that is a completion, its
10907         expression causes freezing (AI12-0103).
10909 2017-01-13  Vadim Godunko  <godunko@adacore.com>
10911         * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
10912         Reference functions of Ada.Containers.Indefinite_Holders.
10914 2017-01-13  Bob Duff  <duff@adacore.com>
10916         * s-os_lib.ads: Minor comment fixes.
10918 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10920         * exp_ch3.adb (Default_Initialize_Object): Do not default
10921         initialize an object when it is of a task type and restriction
10922         No_Tasking is in effect because the initialization is obsolete.
10923         * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
10924         restriction No_Tasking is in effect.
10925         (Build_Master_Renaming): Do not rename a master when restriction
10926         No_Tasking is in effect.
10928 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10930         * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
10931         the legality of An others clause applies as well to a choice in
10932         an Iterated_component_ association.
10933         (Resolve_Iterated_Component_Association): An others choice
10934         is legal.
10935         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
10936         Iterated_Component_Association is not static.
10938 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10940         * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
10941         control is passed to the expresion handler before the new mode
10942         is set.
10943         * sem_ch12.adb (Analyze_Package_Instantiation,
10944         Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
10945         in case control is passed to the expresion handler before the
10946         new mode is set.
10948 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10950         * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
10951         exp_aggr.adb: Minor reformatting.
10953 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10955         * inline.adb: Minor reformatting and typo fix.
10957 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10959         * sem_util.ads, sem_util.adb (Choice_List): Move function here
10960         from sem_aggr.adb, for use elsewhere.
10961         * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
10962         * sem_aggr.adb (Resolve_Array_Aggregate): Remove
10963         Iterated_Component_Present.
10964         * exp_aggr.adb: Use Choice_List throughout, to handle
10965         Iterated_Component_Associations.
10966         (Gen_Loop): Generate proper loop for an
10967         Iterated_Component_Association: loop variable has the identifier
10968         of the original association. Generate a loop even for a single
10969         component choice, in order to make loop parameter visible in
10970         expression.
10971         (Flatten): An Iterated_Component_Association is not static.
10973 2017-01-13  Yannick Moy  <moy@adacore.com>
10975         * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
10976         float exponentiation for statically known small negative values
10977         is the reciprocal of the exponentiation for the opposite value
10978         of the exponent.
10979         * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
10980         Ensure that the value of float exponentiation for negative values
10981         is the reciprocal of the exponentiation for the opposite value
10982         of the exponent.
10983         * inline.adb (Expand_Inlined_Call): Fix the count
10984         for the number of generated gotos.
10986 2017-01-13  Yannick Moy  <moy@adacore.com>
10988         * inline.adb: Code cleanup.
10989         * sem_util.adb (Is_OK_Volatile_Context): Add
10990         expression in delay statement as OK for volatile context.
10992 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10994         * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
10995         mode a choice that is a subtype with a static predicate is
10996         replaced by the values it covers. This transformation must not
10997         be performed in ASIS mode, to preserve the source for analysis.
10999 2017-01-13  Justin Squirek  <squirek@adacore.com>
11001         * nlists.ads: Correct minor typo.
11003 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
11005         * sem_ch13.adb: Minor reformatting and typo fix.
11007 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
11009         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
11010         Iterated_Component_Association is a named association in an
11011         array aggregate.
11012         * sem_aggr.adb (Resolve_Iterated_Component_Association): New
11013         procedure, subsidiary of Resolve_Array_Aggregate, to analyze
11014         and resolve the discrete choices and the expression of the
11015         new construct.
11016         * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
11017         Loop_Actions and Box_Present are attributes of
11018         N_Iterated_Component_Association nodes. Box_Present is always
11019         False in this case.
11020         * sprint.adb (Sprint_Node): An Iterated_Component_Association
11021         has a Discrete_Choices list, as specified in the RM. A
11022         Component_Association for aggregate uses instead a Choices list.
11023         We have to live with this small inconsistency because the new
11024         construct also has a defining identifier, and there is no way
11025         to merge the two node structures.
11027 2017-01-13  Yannick Moy  <moy@adacore.com>
11029         * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
11030         list of pragmas to remove.  Remove pragmas from the list of
11031         statements in the body to inline.
11032         * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
11034 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
11036         * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
11037         Analyze_Declarations, to analyze and resolve the expressions of
11038         aspect specifications in the current declarative list, so that
11039         the expressions have proper entity and type info.  This is needed
11040         for ASIS when there is no subsequent expansion to generate this
11041         semantic information.
11042         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
11043         original expression, to suppress cascaded errors when expression
11044         has been constant-folded.
11045         (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
11046         ASIS mode, because there is no subsequent expansion to decorate
11047         the tree.
11049 2017-01-13  Yannick Moy  <moy@adacore.com>
11051         * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
11052         New function to detect when a call may be inlined or not in
11053         GNATprove mode.
11054         (Expand_Inlined_Call): Ensure that a temporary
11055         is always created in the cases where a type conversion may be
11056         needed on an input parameter in GNATprove mode, so that GNATprove
11057         sees the check to perform.
11058         * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
11059         when not applicable due to actual requiring type conversion
11060         with possible check but no temporary value can be copied for
11061         GNATprove to see the check.
11063 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11065         * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
11066         exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
11067         layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
11068         exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
11069         exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
11070         g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
11071         sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
11072         prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
11073         a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
11074         get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
11075         g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
11076         sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
11077         s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
11078         contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
11079         g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
11080         g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
11081         a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
11082         ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
11083         get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
11084         prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
11085         exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
11086         s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
11087         a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
11088         a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
11089         g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
11090         par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
11091         uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
11092         a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
11093         statements to reflect the new style for case alternatives. Various
11094         code clean up and reformatting.
11096 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
11098         * exp_util.adb: Minor reformatting.
11100 2017-01-13  Yannick Moy  <moy@adacore.com>
11102         * exp_spark.adb: Code cleanup.
11103         * sem_ch9.adb (Analyze_Delay_Until): Resolve
11104         expression so that calls are identified as such inside delay
11105         until.
11107 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
11109         * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
11110         * par-ch3.adb (P_Discrete_Choice_List): An
11111         Iterated_Component_Association is an array aggregate component.
11112         * par-ch4.adb (P_Iterated_Component_Association): New procedure.
11113         (Is_Quantified_Expression): New function that performs a lookahead
11114         to distinguish quantified expressions from iterated component
11115         associations.
11116         (P_Aggregate_Or_Paren_Expr): Recognize iterated component
11117         associations.
11118         (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
11119         * sem.adb (Analyze): Handle Iterated_Component_Association.
11120         * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
11121         component associations.
11122         * sinfo.ads, sinfo.adb: Entries for for
11123         N_Iterated_Component_Association and its fields.
11124         * sprint.adb (Sprint_Node_Actual): Handle
11125         N_Iterated_Component_Association.
11127 2017-01-13  Justin Squirek  <squirek@adacore.com>
11129         * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
11130         of the style check until after preanalysis of acutals.
11132 2017-01-13  Yannick Moy  <moy@adacore.com>
11134         * sem_ch13.adb: Minor reformatting.
11135         * par-ch11.adb: minor style fix in whitespace
11136         * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
11137         reduced to Add_Artificial_ALI_File; style fix in declaration of
11138         Text; grammar fix in comment.
11139         * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
11140         * freeze.adb: Cleanup to pass pragma instead of
11141         expression to call.
11142         * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
11143         replace System'To_Address by equivalent call.
11145 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
11147         * bindusg.adb: Improve usage output for -f switch.
11149 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11151         * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
11152         Minor reformatting.
11154 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
11156         * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
11157         treat comparisons on strings as legal in a Static_Predicate.
11158         (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
11159         a function call that is the expansion of a string comparison.The
11160         function call is built when compiling the corresponding predicate
11161         function, but the expression has been found legal as a static
11162         predicate during earlier analysis.
11163         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
11164         properly a function call that is the expansion of a string
11165         comparison operation, in order to recover the Static_Predicate
11166         expression and apply it to a static argument when needed.
11168 2017-01-13  Tristan Gingold  <gingold@adacore.com>
11170         * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
11171         (Open_Read): Re-implement using Open_Read_No_Exception.
11172         (Open_Write): Raise exception in case of error.
11173         * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
11174         * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
11175         reaise exception.
11176         * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
11178 2017-01-13  Yannick Moy  <moy@adacore.com>
11180         * checks.adb: Code cleanup.
11182 2017-01-13  Yannick Moy  <moy@adacore.com>
11184         * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
11185         expression instead of unanalyzed aspect expression for checking
11186         the validity of inheriting an operation. Also copy the expression
11187         being passing it to Build_Class_Wide_Expression, as this call
11188         modifies its argument.
11189         * sem_util.ads Fix comment to reference correct function name
11190         New_Copy_Tree.
11192 2017-01-13  Javier Miranda  <miranda@adacore.com>
11194         * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
11195         when we propagate information about the indexes back to the original
11196         indexing mode and the prefix of the index is a function call, do not
11197         remove any parameter from such call.
11199 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
11201         * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
11202         * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
11203         a build-in-place function whose result type is tagged.
11205 2017-01-13  Yannick Moy  <moy@adacore.com>
11207         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11208         Do not generate a wrapper when the only candidate is a class-wide
11209         subprogram.
11210         (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
11211         inside a generic context.
11213 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11215         * exp_util.adb (Add_Inherited_Tagged_DIC):
11216         Pass the object parameters of both the parent and the derived
11217         type DIC procedure to the reference replacement circuitry.
11218         (Find_DIC_Type): Modify the circuitry to present the partial
11219         view of a private type in case the private type defines its own
11220         DIC pragma.
11221         (Replace_Object_And_Primitive_References): Add two
11222         optional formal parameters.  Update the comment on usage. Update
11223         the replacement of references to object parameters.
11225 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
11227         * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
11229 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
11231         * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
11232         an out parameter that is a type conversion, independently of th
11233         range check that may apply to the expression of the conversion,
11234         for use in GNATProve.
11236 2017-01-13  Yannick Moy  <moy@adacore.com>
11238         * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
11239         GNATprove_Mode here to Frontend.
11240         * frontend.adb (Frontend): Move the implicit with for System
11241         in GNATprove_Mode here as it ismore correct this way; the old
11242         place only worked by chance, since there were no overloaded names.
11243         * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
11244         * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
11245         four attributes identified in SRM 9(18), add an implicit with
11246         to Ada.Task_Identification.
11247         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11248         Deal specially with the wrapper introduced for AI05-0071 in GNATprove
11249         mode.
11250         * checks.adb (Apply_Discriminant_Check,
11251         Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
11252         In GNATprove mode, we do not apply the checks, but we still
11253         analyze the expression to possibly issue errors on SPARK
11254         code when a run-time error can be detected at compile time.
11255         (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
11256         in GNATprove mode.
11258 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11260         * expander.adb (Expand): Add a warning about using return
11261         statements in Ghost management code.
11262         * exp_ch3.adb (Freeze_Type): Add a warning about using return
11263         statements in Ghost management code.
11264         * exp_ch7.adb (Build_Invariant_Procedure_Body,
11265         Build_Invariant_Procedure_Declaration): Add a warning about
11266         using return statements in Ghost management code.
11267         * exp_disp.adb (Make_DT): Add a warning about using return
11268         statements in Ghost management code.
11269         * exp_util.adb (Build_DIC_Procedure_Body,
11270         Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
11271         warning about using return statements in Ghost management code.
11272         * freeze.adb (Freeze_Entity): Add a warning about using return
11273         statements in Ghost management code.
11274         * sem.adb (Analyze, Do_Analyze): Add a warning about using return
11275         statements in Ghost management code.
11276         * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
11277         a warning about using return statements in Ghost management code.
11278         * sem_ch5.adb (Analyze_Assignment): Add a warning about using
11279         return statements in Ghost management code.
11280         * sem_ch6.adb (Analyze_Procedure_Call,
11281         Analyze_Subprogram_Body_Helper): Add a warning about using return
11282         statements in Ghost management code.
11283         * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
11284         using return statements in Ghost management code.
11285         * sem_ch12.adb (Analyze_Package_Instantiation,
11286         Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
11287         Instantiate_Subprogram_Body): Add a warning about using return
11288         statements in Ghost management code.
11289         * sem_ch13.adb (Build_Predicate_Functions,
11290         Build_Predicate_Function_Declarations): Add a warning about
11291         using return statements in Ghost management code.
11292         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
11293         Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
11294         Analyze_Pre_Post_Condition_In_Decl_Part):  Add a warning about
11295         using return statements in Ghost management code.
11297 2017-01-13  Tristan Gingold  <gingold@adacore.com>
11299         * s-mmosin-mingw.adb: Fix pragma import.
11301 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
11303         * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
11304         codepeer mode.
11306 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11308         * atree.adb (Allocate_Initialize_Node): A newly created node is
11309         no longer marked as Ghost at this level.
11310         (Mark_New_Ghost_Node): New routine.
11311         (New_Copy): Mark the copy as Ghost.
11312         (New_Entity): Mark the entity as Ghost.
11313         (New_Node): Mark the node as Ghost.
11314         * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
11315         apply to unanalyzed entities.
11316         (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
11317         entities.
11318         (Set_Is_Checked_Ghost_Entity): This attribute now
11319         applies to all entities as well as unanalyzed entities.
11320         (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
11321         all entities as well as unanalyzed entities.
11322         * expander.adb Add with and use clauses for Ghost.
11323         (Expand): Install and revert the Ghost region associated with the node
11324         being expanded.
11325         * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
11326         (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
11327         (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
11328         (Expand_Freeze_Record_Type): Remove all Ghost-related code.
11329         (Freeze_Type): Install and revert the Ghost region associated
11330         with the type being frozen.
11331         * exp_ch5.adb Remove with and use clauses for Ghost.
11332         (Expand_N_Assignment_Statement): Remove all Ghost-related code.
11333         * exp_ch6.adb Remove with and use clauses for Ghost.
11334         (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
11335         (Expand_N_Subprogram_Body): Remove all Ghost-related code.
11336         * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
11337         Ghost region of the working type.
11338         (Build_Invariant_Procedure_Declaration): Install and revert
11339         the Ghost region of the working type.
11340         (Expand_N_Package_Body): Remove all Ghost-related code.
11341         * exp_ch8.adb Remove with and use clauses for Ghost.
11342         (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
11343         code.
11344         (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
11345         (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
11346         (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
11347         code.
11348         * exp_ch13.adb Remove with and use clauses for Ghost.
11349         (Expand_N_Freeze_Entity): Remove all Ghost-related code.
11350         * exp_disp.adb (Make_DT): Install and revert the Ghost region of
11351         the tagged type. Move the generation of various entities within
11352         the Ghost region of the type.
11353         * exp_prag.adb Remove with and use clauses for Ghost.
11354         (Expand_Pragma_Check): Remove all Ghost-related code.
11355         (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
11356         (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
11357         (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
11358         * exp_util.adb (Build_DIC_Procedure_Body): Install
11359         and revert the Ghost region of the working types.
11360         (Build_DIC_Procedure_Declaration): Install and revert the
11361         Ghost region of the working type.
11362         (Make_Invariant_Call): Install and revert the Ghost region of the
11363         associated type.
11364         (Make_Predicate_Call): Reimplemented. Install and revert the
11365         Ghost region of the associated type.
11366         * freeze.adb (Freeze_Entity): Install and revert the Ghost region
11367         of the entity being frozen.
11368         (New_Freeze_Node): Removed.
11369         * ghost.adb Remove with and use clauses for Opt.
11370         (Check_Ghost_Completion): Update the parameter profile
11371         and all references to formal parameters.
11372         (Ghost_Entity): Update the comment on usage.
11373         (Install_Ghost_Mode): New routines.
11374         (Is_Ghost_Assignment): New routine.
11375         (Is_Ghost_Declaration): New routine.
11376         (Is_Ghost_Pragma): New routine.
11377         (Is_Ghost_Procedure_Call): New routine.
11378         (Is_Ghost_Renaming): Removed.
11379         (Is_OK_Declaration): Reimplemented.
11380         (Is_OK_Pragma): Reimplemented.
11381         (Is_OK_Statement): Reimplemented.
11382         (Is_Subject_To_Ghost): Update the comment on usage.
11383         (Mark_And_Set_Ghost_Assignment): New routine.
11384         (Mark_And_Set_Ghost_Body): New routine.
11385         (Mark_And_Set_Ghost_Completion): New routine.
11386         (Mark_And_Set_Ghost_Declaration): New routine.
11387         (Mark_And_Set_Ghost_Instantiation): New routine.
11388         (Mark_And_Set_Ghost_Procedure_Call): New routine.
11389         (Mark_Full_View_As_Ghost): Removed.
11390         (Mark_Ghost_Declaration_Or_Body): New routine.
11391         (Mark_Ghost_Pragma): New routine.
11392         (Mark_Ghost_Renaming): New routine.
11393         (Mark_Pragma_As_Ghost): Removed.
11394         (Mark_Renaming_As_Ghost): Removed.
11395         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
11396         (Prune_Node): Freeze nodes no longer need special pruning, they
11397         are processed by the general ignored Ghost code mechanism.
11398         (Restore_Ghost_Mode): New routine.
11399         (Set_Ghost_Mode): Reimplemented.
11400         (Set_Ghost_Mode_From_Entity): Removed.
11401         * ghost.ads Add with and use clauses for Ghost.
11402         (Check_Ghost_Completion): Update the parameter profile
11403         along with the comment on usage.
11404         (Install_Ghost_Mode): New routine.
11405         (Is_Ghost_Assignment): New routine.
11406         (Is_Ghost_Declaration): New routine.
11407         (Is_Ghost_Pragma): New routine.
11408         (Is_Ghost_Procedure_Call): New routine.
11409         (Mark_And_Set_Ghost_Assignment): New routine.
11410         (Mark_And_Set_Ghost_Body): New routine.
11411         (Mark_And_Set_Ghost_Completion): New routine.
11412         (Mark_And_Set_Ghost_Declaration): New routine.
11413         (Mark_And_Set_Ghost_Instantiation): New routine.
11414         (Mark_And_Set_Ghost_Procedure_Call): New routine.
11415         (Mark_Full_View_As_Ghost): Removed.
11416         (Mark_Ghost_Pragma): New routine.
11417         (Mark_Ghost_Renaming): New routine.
11418         (Mark_Pragma_As_Ghost): Removed.
11419         (Mark_Renaming_As_Ghost): Removed.
11420         (Restore_Ghost_Mode): New routine.
11421         (Set_Ghost_Mode): Redefined.
11422         (Set_Ghost_Mode_From_Entity): Removed.
11423         * sem.adb (Analyze): Install and revert the Ghost region of the
11424         node being analyzed.
11425         (Do_Analyze): Change the way a clean Ghost
11426         region is installed and reverted.
11427         * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
11428         all Ghost-related code.
11429         (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
11430         (Analyze_Number_Declaration): Remove all Ghost-related code.
11431         (Analyze_Object_Declaration): Install and revert the Ghost region of
11432         a deferred object declaration's completion.
11433         (Array_Type_Declaration): Remove all Ghost-related code.
11434         (Build_Derived_Type): Update the comment on
11435         the propagation of Ghost attributes from a parent to a derived type.
11436         (Derive_Subprogram): Remove all Ghost-related code.
11437         (Make_Class_Wide_Type): Remove all Ghost-related code.
11438         (Make_Implicit_Base): Remove all Ghost-related code.
11439         (Process_Full_View): Install and revert the Ghost region of
11440         the partial view.  There is no longer need to check the Ghost
11441         completion here.
11442         * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
11443         region of the left hand side.
11444         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
11445         all Ghost-related code.
11446         (Analyze_Expression_Function): Remove all Ghost-related code.
11447         (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
11448         (Analyze_Procedure_Call): Install and revert the Ghost region of
11449         the procedure being called.
11450         (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
11451         region of the spec or body.
11452         (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
11453         (Build_Subprogram_Declaration): Remove all Ghost-related code.
11454         (Find_Corresponding_Spec): Remove all Ghost-related code.
11455         (Process_Formals): Remove all Ghost-related code.
11456         * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
11457         the Ghost region of the spec.
11458         (Analyze_Package_Declaration): Remove all Ghost-related code.
11459         * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
11460         Ghost when it aliases a Ghost entity.
11461         (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
11462         a Ghost entity.
11463         (Analyze_Object_Renaming): Mark a renaming as Ghost when
11464         it aliases a Ghost entity.
11465         (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
11466         a Ghost entity.
11467         (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
11468         aliases a Ghost entity.
11469         * sem_ch11.adb Remove with and use clauses for Ghost.
11470         (Analyze_Exception_Declaration): Remove all Ghost-related code.
11471         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
11472         Ghost-related code.
11473         (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
11474         code.
11475         (Analyze_Package_Instantiation): Install and revert the Ghost region
11476         of the package instantiation.
11477         (Analyze_Subprogram_Instantiation): Install
11478         and revert the Ghost region of the subprogram instantiation.
11479         (Instantiate_Package_Body): Code clean up. Install and revert the
11480         Ghost region of the package body.
11481         (Instantiate_Subprogram_Body): Code clean up. Install and revert the
11482         Ghost region of the subprogram body.
11483         * sem_ch13.adb (Build_Predicate_Functions): Install
11484         and revert the Ghost region of the related type.
11485         (Build_Predicate_Function_Declaration): Code clean up. Install
11486         and rever the Ghost region of the related type.
11487         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
11488         Install and revert the Ghost region of the pragma.
11489         (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
11490         Ghost region of the pragma.
11491         (Analyze_Pragma): Install and revert the Ghost region of various
11492         pragmas.  Mark a pragma as Ghost when it is related to a Ghost entity
11493         or encloses a Ghost entity.
11494         (Analyze_Pre_Post_Condition): Install and revert the Ghost
11495         region of the pragma.
11496         (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
11497         Ghost region of the pragma.
11498         * sem_res.adb (Resolve): Remove all Ghost-related code.
11499         * sem_util.adb (Is_Declaration): Reimplemented.
11500         (Is_Declaration_Other_Than_Renaming): New routine.
11501         * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
11502         * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
11503         (Is_Ghost_Pragma): Removed.
11504         (Is_Ignored_Ghost_Pragma): New routine.
11505         (Set_Is_Checked_Ghost_Pragma): New routine.
11506         (Set_Is_Ghost_Pragma): Removed.
11507         (Set_Is_Ignored_Ghost_Pragma): New routine.
11508         * sinfo.ads: Update the documentation on Ghost mode and
11509         Ghost regions.  New attributes Is_Checked_Ghost_Pragma
11510         and Is_Ignored_Ghost_Pragma along with usages in nodes.
11511         Remove attribute Is_Ghost_Pragma along with usages in nodes.
11512         (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11513         (Is_Ghost_Pragma): Removed along with pragma Inline.
11514         (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11515         (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11516         (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
11517         (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11519 2017-01-12  Tristan Gingold  <gingold@adacore.com>
11521         * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
11522         s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
11524 2017-01-12  Yannick Moy  <moy@adacore.com>
11526         * errout.adb, errout.ads (Initialize): Factor common treatment
11527         in Reset_Warnings.
11528         (Reset_Warnings): New procedure to reset counts related to warnings.
11529         (Record_Compilation_Errors): New variable to store the presence of an
11530         error, used in gnat2why to allow changing the Warning_Mode.
11531         (Compilation_Errors): Use new variable Record_Compilation_Errors to
11532         store the presence of an error.
11534 2017-01-12  Javier Miranda  <miranda@adacore.com>
11536         * sem_ch13.adb (Analyze_Aspect_Specifications):
11537         For Interrupt_Handler and Attach_ Handler aspects, decorate the
11538         internally built reference to the protected procedure as coming
11539         from sources and force its analysis.
11541 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11543         * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
11544         inherit predicates if any from the first_subtype of the parent,
11545         not from the anonymous parent type.
11546         * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
11547         predicate is not a static subtype.
11549 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11551         * freeze.adb (Check_Suspicious_Convention): New procedure
11552         performing a warning check on discriminated record types with
11553         convention C or C++. Factored out of procedure Freeze_Record_Type,
11554         and changed to only apply to base types (to avoid spurious
11555         warnings on subtypes). Minor improvement of warning messages
11556         to refer to discriminated rather than variant record types.
11557         (Freeze_Record_Type): Remove code for performing a suspicious
11558         convention check.
11559         (Freeze_Entity): Only call Freeze_Record_Type
11560         on types that aren't declared within any enclosing generic units
11561         (rather than just excluding the type when the innermost scope
11562         is generic). Call Check_Suspicious_Convention whether or not
11563         the type is declared within a generic unit.
11564         * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
11565         * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
11566         from Sem_Ch8).
11568 2017-01-12  Tristan Gingold  <gingold@adacore.com>
11570         * sysdep.c, adaint.c, rtinit.c, ming32.h:
11571         (__gnat_current_codepage): Renamed from CurrentCodePage
11572         (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
11574 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11576         * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
11577         quantified expressions, following AI12-050: the loop parameters
11578         of two quantified expressions are conformant if they have the
11579         same identifier.
11581 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
11583         * gcc-interface/Makefile.in: Clean up VxWorks targets.
11585 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11587         * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
11588         Hnadle properly the attribute reference when it appears as part
11589         of an expression in another loop aspect.
11591 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11593         * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
11594         subsidiary of Build_Initialization_Call, to complete generation
11595         of predicate checks on discriminants whose (sub)types have
11596         predicates, and to add checks on variants that do not have an
11597         others clause.
11598         * sem_util.adb (Gather_Components): A missing Others alternative is
11599         not an error when the type of the discriminant is a static predicate
11600         (and coverage has been checked when analyzing the case statement). A
11601         runtime check is generated to verify that a given discriminant
11602         satisfies the predicate (RM 3.8.1. (21.1/2)).
11604 2017-01-12  Yannick Moy  <moy@adacore.com>
11606         * gnat1drv.adb (Adjust_Global_Switches): Only
11607         perform checking of exception mechanism when generating code.
11609 2017-01-12  Justin Squirek  <squirek@adacore.com>
11611         * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
11612         Remove handling of access component with invariant.
11613         (Build_Invariant_Procedure_Declaration): Remove return on class
11614         wide type.
11615         * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
11616         conditional exception for component or array so Has_Own_Invariants
11617         flag is not falsly set.
11618         * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
11619         wide type to have no invariant flags.
11621 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11623         * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
11624         sem_ch13.adb: Minor reformatting.
11626 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11628         * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
11629         adjustment primitive when the ancestor type was not properly frozen.
11630         (Gen_Assign): Guard against a missing initialization
11631         primitive when the component type was not properly frozen.
11632         (Initialize_Array_Component): Guard against a missing adjustment
11633         primitive when the component type was not properly frozen.
11634         (Initialize_Record_Component): Guard against a missing adjustment
11635         primitive when the component type was not properly frozen.
11636         (Process_Transient_Component_Completion): The transient object may
11637         not be finalized when its associated type was not properly frozen.
11638         * exp_ch3.adb (Build_Assignment): Guard against a missing
11639         adjustment primitive when the component type was not properly frozen.
11640         (Build_Initialization_Call): Guard against a missing
11641         initialization primitive when the associated type was not properly
11642         frozen.
11643         (Expand_N_Object_Declaration): Guard against a missing
11644         adjustment primitive when the base type was not properly frozen.
11645         (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
11646         body when there is no adjustment primitive available. Create an
11647         empty Deep_Finalize body when there is no finalization primitive
11648         available.
11649         * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
11650         missing finalization primitive when the designated type was
11651         not properly frozen.
11652         (Expand_N_Allocator): Guard against a missing initialization primitive
11653         when the designated type was not properly frozen.
11654         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
11655         only when the corresponding adjustment primitive is available.
11656         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
11657         adjustment/finalization statements only when there is an available
11658         primitive to carry out the action.
11659         (Build_Initialize_Statements): Generate the initialization/finalization
11660         statements only when there is an available primitive to carry out the
11661         action.
11662         (Make_Adjust_Call): Do not generate a call when the underlying
11663         type is not present due to a possible missing full view.
11664         (Make_Final_Call): Do not generate a call when the underlying
11665         type is not present due to a possible missing full view.
11666         (Make_Finalize_Address_Stmts): Generate an empty body when the
11667         designated type lacks a finalization primitive.
11668         (Make_Init_Call): Do not generate a call when the underlying type is
11669         not present due to a possible missing full view.
11670         (Process_Component_For_Adjust): Add the adjustment call only when the
11671         corresponding adjustment primitive is available.
11672         (Process_Component_For_Finalize): Add the finalization call only when
11673         the corresponding finalization primitive is available.
11674         (Process_Object_Declaration): Use a null statement to emulate a
11675         missing call to the finalization primitive of the object type.
11676         * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
11677         (Make_Final_Call): Update the comment on usage.
11678         (Make_Init_Call): Update the comment on usage.
11679         * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
11681 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
11683         * einfo.ads: Update documentation of Address_Taken.
11684         * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
11685         [Access_Attribute]): Only consider 'Access/'Unchecked_Access
11686         for subprograms when setting Address_Taken flag.
11688 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
11690         * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
11691         Configurable_Run_Time_Mode off when analysing with'ed predefined
11692         libraries.
11694 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11696         * sem_prag.adb: Minor reformatting.
11697         * sem_util.adb (Unique_Entity): fix result for
11698         bodies of entry families.
11700 2017-01-12  Justin Squirek  <squirek@adacore.com>
11702         * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
11703         Resolve_Suppressible in the pragma Assertion_Policy case.
11704         (Resolve_Suppressible): Created this function to factor out
11705         common code used to resolve Suppress to either Ignore or Check
11706         * snames.ads-tmpl: Add name for Suppressible.
11708 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11710         * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
11711         reformatting.
11712         * debug.adb: Minor comment fixes.
11714 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
11716         * sem_util.adb (Unique_Entity): For concurrent
11717         bodies that are defined with stubs and complete a declaration
11718         of a single concurrent object return the entity of an implicit
11719         concurrent type, not the entity of the anonymous concurrent
11720         object.
11721         * debug.adb: -gnatd.J is no longer used.
11722         * make.adb (Globalize): Removed, no longer used.
11723         * sem_ch9.adb: minor typo in comment for entry index
11725 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
11727         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11728         * exp_ch3.adb (Build_Init_Statements): As part of initialising
11729         the value record of a task, set its _Secondary_Stack_Size field
11730         if present.
11731         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11732         a _Secondary_Stack_Size field in the value record of
11733         the task if a Secondary_Stack_Size rep item is present.
11734         (Make_Task_Create_Call): Include secondary stack size
11735         parameter. If No_Secondary_Stack restriction is in place, passes
11736         stack size of 0.
11737         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11738         Secondary_Stack_Size.
11739         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11740         function to define the overhead of the secondary stack.
11741         * s-tarest.adb (Create_Restricted_Task,
11742         Create_Restricted_Task_Sequential): Functions now include
11743         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11744         * s-tarest.adb (Create_Restricted_Task,
11745         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
11746         include Secondary_Stack_Size parameter.
11747         (Task_Wrapper): Secondary stack now allocated to the size specified by
11748         the Secondary_Stack_Size parameter in the task's ATCB.
11749         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
11750         Secondary_Stack_Size component.
11751         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
11752         Create_Restricted_Task_Sequential): Function now include
11753         Secondary_Stack_Size parameter.
11754         (Task_Wrapper): Secondary stack now allocated to the size
11755         specified by the Secondary_Stack_Size parameter in the task's
11756         ATCB.
11757         * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
11758         to include Secondary_Stack_Size parameter.
11759         * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
11760         Secondary_Stack_Size aspect, turning the aspect into its corresponding
11761         internal attribute.
11762         (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
11763         * snames.adb-tmpl, snames.ads-tmpl: Added names
11764         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
11765         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
11767 2017-01-12  Yannick Moy  <moy@adacore.com>
11769         * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
11770         subtree.
11772 2017-01-12  Justin Squirek  <squirek@adacore.com>
11774         * exp_attr.adb (Expand_N_Attribute_Reference):
11775         Fix Finalization_Size case by properly resolving the type after
11776         rewritting the node.
11778 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11780         * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
11781         the tree.
11782         (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
11783         * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
11784         exp_sel.ads: Minor reformatting.
11786 2017-01-12  Justin Squirek  <squirek@adacore.com>
11788         * exp_ch6.adb (Expand_Call): Add guard to prevent
11789         invariant checks from being created for internally generated
11790         subprograms.
11792 2017-01-12  Bob Duff  <duff@adacore.com>
11794         * lib-writ.ads: Remove incorrect comment.
11796 2017-01-12  Javier Miranda  <miranda@adacore.com>
11798         * debug.adb (-gnatd.K): Enable generation of contract-only
11799         procedures in CodePeer mode.
11800         * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
11801         New subprogram.
11802         (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
11803         set.
11804         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
11805         subprogram.
11806         (Get_Contract_Only_Missing_Body_Name): New subprogram.
11807         (Get_Contract_Only_Body): New subprogram.
11808         (Set_Contract_Only_Body): New subprogram.
11809         (Is_Contract_Only_Body): New subprogram.
11810         (Set_Is_Contract_Only_Body): New subprogram.
11811         (SCIL_Nodes): Replace table by hash-table.
11813 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11815         * exp_ch6.adb: Minor reformatting.
11816         * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
11818 2017-01-12  Bob Duff  <duff@adacore.com>
11820         * binde.adb (Forced): New reason for a dependence.
11821         (Force_Elab_Order): Implementation of the new switch.
11822         * binde.ads: Minor comment fixes.
11823         * bindusg.adb: Add -f switch. Apparently, there was an -f switch
11824         long ago that is no longer supported; removed comment about that.
11825         * opt.ads (Force_Elab_Order_File): Name of file specified for
11826         -f switch.
11827         * switch-b.adb: Parse -f switch.
11829 2017-01-12  Justin Squirek  <squirek@adacore.com>
11831         * exp_ch6.adb (Check_View_Conversion): Created this function
11832         to properly chain calls to check type invariants that may be
11833         present in a subprogram call after the subprogram.
11834         (Expand_Call): Add a conditional to identify when a view conversion
11835         needs to be checked.
11836         * nlists.adb, nlists.ads (Prepend_New): New routine.
11837         (Prepend_New_To): New routine.
11839 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11841         * sinfo.ads: Minor reformatting.
11843 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11845         * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
11846         reformatting.
11848 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11850         * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
11851         variable Definite. Create a local object and pass its 'Access to the
11852         BIP function when the result type is either definite or it does not
11853         require any finalization or secondary stack management.
11855 2017-01-12  Bob Duff  <duff@adacore.com>
11857         * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
11858         exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
11859         frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
11860         par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
11861         sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
11862         sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
11863         sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
11864         sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
11865         Change name to Pragma_Name_Unmapped.
11866         (Pragma_Name_Mapped): Change name to Pragma_Name.
11867         This is because the "mapped" version should be the usual case.
11869 2017-01-09  Hristian Kirtchev  <kirtchev@adacore.com>
11871         * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
11872         Is_Default_Init_Cond_Procedure, and
11873         Has_Inherited_Default_Init_Cond.  Add uses of flags
11874         Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
11875         (Default_Init_Cond_Procedure): Removed.
11876         (DIC_Procedure): New routine.
11877         (Has_Default_Init_Cond): Removed.
11878         (Has_DIC): New routine.
11879         (Has_Inheritable_Invariants): The attribute applies to the base type.
11880         (Has_Inherited_Default_Init_Cond): Removed.
11881         (Has_Inherited_DIC): New routine.
11882         (Has_Inherited_Invariants): The attribute applies to the base type.
11883         (Has_Own_DIC): New routine.
11884         (Has_Own_Invariants): The attribute applies to the base type.
11885         (Is_Default_Init_Cond_Procedure): Removed.
11886         (Is_DIC_Procedure): New routine.
11887         (Set_Default_Init_Cond_Procedure): Removed.
11888         (Set_DIC_Procedure): New routine.
11889         (Set_Has_Default_Init_Cond): Removed.
11890         (Set_Has_Inheritable_Invariants): The attribute applies
11891         to the base type.
11892         (Set_Has_Inherited_Default_Init_Cond): Removed.
11893         (Set_Has_Inherited_DIC): New routine.
11894         (Set_Has_Inherited_Invariants): The attribute applies to the base type.
11895         (Set_Has_Own_DIC): New routine.
11896         (Set_Has_Own_Invariants): The attribute applies to the base type.
11897         (Set_Is_Default_Init_Cond_Procedure): Removed.
11898         (Set_Is_DIC_Procedure): New routine.
11899         (Write_Entity_Flags): Update the output of all flags related to
11900         default initial condition.
11901         * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
11902         of the call to the DIC procedure.
11903         (Freeze_Type): Generate the body of the DIC procedure.
11904         * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
11905         all occurrences of Create_Append with Append_New_To. Do
11906         not generate an invariant procedure for a class-wide type.
11907         The generated body acts as a freeze action of the working type.
11908         (Build_Invariant_Procedure_Declaration): Do not generate an
11909         invariant procedure for a class-wide type.
11910         (Create_Append): Removed.
11911         * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
11912         sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
11913         class-wide pre/postcondition description and data structures from
11914         Sem_Prag.
11915         (Build_Class_Wide_Expression): Moved from Sem_Prag.
11916         (Build_DIC_Call): New routine.
11917         (Build_DIC_Procedure_Body): New routine.
11918         (Build_DIC_Procedure_Declaration): New routine.
11919         (Entity_Hash): Moved from Sem_Prag.
11920         (Find_DIC_Type): New routine.
11921         (Update_Primitives_Mapping): Reimplemented.
11922         (Update_Primitives_Mapping_Of_Types): New routine.
11923         * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
11924         (Build_DIC_Call): New routine.
11925         (Build_DIC_Procedure_Body): New routine.
11926         (Build_DIC_Procedure_Declaration): New routine.
11927         (Update_Primitives_Mapping): Moved from Sem_Prag.
11928         (Update_Primitives_Mapping_Of_Types): New routine.
11929         * nlists.adb (Append_New): New routine.
11930         (Append_New_To): New routine.
11931         * nlists.ads (Append_New): New routine.
11932         (Append_New_To): New routine.
11933         * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
11934         of DIC procedures here. This is now done at the end of the
11935         visible declarations, private declarations, and at the freeze
11936         point of a type.
11937         (Analyze_Private_Extension_Declaration):
11938         A private extension inherits the DIC pragma of a parent type.
11939         (Analyze_Subtype_Declaration): No need to propagate invariant
11940         attributes to a subtype as those apply to the base type.
11941         (Build_Derived_Record_Type): No need to inherit invariants here
11942         as this is now done in Build_Derived_Type.
11943         (Build_Derived_Type): Inherit both the DIC pragma and invariants from
11944         a parent type.
11945         (Process_Full_View): Update the propagation of DIC attributes.
11946         (Propagate_Default_Init_Cond_Attributes): Removed.
11947         * sem_ch7.adb Add with and use clauses for Exp_Util.
11948         (Analyze_Package_Specification): Create the body of the DIC
11949         procedure at the end of the visible and private declarations.
11950         (Preserve_Full_Attributes): Propagate DIC attributes.
11951         * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
11952         DIC attributes.
11953         (Analyze_Task_Type_Declaration): Propagate DIC attributes.
11954         * sem_elab.adb (Check_A_Call): Update the call to
11955         Is_Nontrivial_Default_Init_Cond_Procedure.
11956         * sem_prag.adb Remove the with and use clauses for
11957         GNAT.HTable. Move the handling of class- wide pre/postcondition
11958         description and data structures to Exp_Util.
11959         (Analyze_Pragma): Create the declaration of the DIC procedure. There
11960         is no need to propagate invariant-related attributes at this point
11961         as this is done in Build_Invariant_Procedure_Declaration.
11962         (Build_Class_Wide_Expression): Moved to Exp_Util.
11963         (Entity_Hash): Moved to Exp_Util.
11964         (Update_Primitives_Mapping): Moved to Exp_Util.
11965         * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
11966         (Update_Primitives_Mapping): Moved to Exp_Util.
11967         * sem_util.adb: Remove with and use clauses for Ghost
11968         and Sem_Ch13.
11969         (Build_Default_Init_Cond_Call): Removed.
11970         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11971         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11972         (Get_Views): Reimplemented.
11973         (Has_Full_Default_Initialization): Reimplement the section on DIC.
11974         (Inherit_Default_Init_Cond_Procedure): Removed.
11975         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11976         (Is_Nontrivial_DIC_Procedure): New routine.
11977         (Is_Verifiable_DIC_Pragma): New routine.
11978         (Propagate_DIC_Attributes): New routine.
11979         * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
11980         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11981         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11982         (Inherit_Default_Init_Cond_Procedure): Removed.
11983         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11984         (Is_Nontrivial_DIC_Procedure): New routine.
11985         (Is_Verifiable_DIC_Pragma): New routine.
11986         (Propagate_DIC_Attributes): New routine.
11987         * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
11988         on DIC.
11989         * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
11990         usage in nodes.
11991         (Expression_Copy): New routine along with pragma Inline.
11992         (Set_Expression_Copy): New routine along with pragma Inline.
11994 2017-01-06  Bob Duff  <duff@adacore.com>
11996         * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
11997         "Bind_Main_Program" to "not Bind_For_Library", because otherwise
11998         we won't generate the call to s_stalib_adafinal when the main
11999         is not written in Ada.
12001 2017-01-06  Bob Duff  <duff@adacore.com>
12003         * sem_prag.adb: Minor: remove pragma Warnings.
12005 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12007         * Makefile.rtl: Do not compile s-stchop by default.
12009 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
12011         * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
12012         sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
12013         snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
12014         s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
12015         Reverted previous change for now.
12017 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12019         * exp_ch3.adb (Build_Initialization_Call): Apply predicate
12020         check to default discriminant value if checks are enabled.
12021         (Build_Assignment): If type of component has static predicate,
12022         apply check to its default value, if any.
12024 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
12026         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
12027         * exp_ch3.adb (Build_Init_Statements): As part of initialising
12028         the value record of a task, set its _Secondary_Stack_Size field
12029         if present.
12030         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
12031         a _Secondary_Stack_Size field in the value record of
12032         the task if a Secondary_Stack_Size rep item is present.
12033         (Make_Task_Create_Call): Include secondary stack size
12034         parameter. If No_Secondary_Stack restriction is in place, passes
12035         stack size of 0.
12036         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
12037         Secondary_Stack_Size.
12038         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
12039         function to define the overhead of the secondary stack.
12040         * s-tarest.adb (Create_Restricted_Task,
12041         Create_Restricted_Task_Sequential): Functions now include
12042         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
12043         * s-tarest.adb (Create_Restricted_Task,
12044         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
12045         now include Secondary_Stack_Size parameter.
12046         (Task_Wrapper):
12047         Secondary stack now allocated to the size specified by the
12048         Secondary_Stack_Size parameter in the task's ATCB.
12049         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
12050         Secondary_Stack_Size component.
12051         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
12052         Create_Restricted_Task_Sequential): Function now include
12053         Secondary_Stack_Size parameter.
12054         (Task_Wrapper): Secondary stack
12055         now allocated to the size specified by the Secondary_Stack_Size
12056         parameter in the task's ATCB.
12057         * sem_ch13.adb (Analyze_Aspect_Specification): Add support
12058         for Secondary_Stack_Size aspect, turning the aspect into its
12059         corresponding internal attribute.
12060         (Analyze_Attribute_Definition):
12061         Process Secondary_Stack_Size attribute.
12062         * snames.adb-tmpl, snames.ads-tmpl: Added names
12063         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
12064         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
12066 2017-01-06  Pascal Obry  <obry@adacore.com>
12068         * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
12069         Sequential_IO and Direct_IO.
12071 2017-01-06  Bob Duff  <duff@adacore.com>
12073         * snames.ads-tmpl (Renamed): New name for the pragma argument.
12074         * par-ch2.adb: Allow the new pragma (with analysis deferred
12075         to Sem_Prag).
12076         * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
12077         Keep a mapping from new pragma names to old names.
12078         * sem_prag.adb: Check legality of pragma Rename_Pragma, and
12079         implement it by calling Map_Pragma_Name.
12080         * checks.adb, contracts.adb, einfo.adb, errout.adb,
12081         * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
12082         * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
12083         * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
12084         * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
12085         * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
12086         * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
12087         as appropriate.
12089 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12091         * exp_ch9.adb: Minor reformatting.
12093 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12095         * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
12096         * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
12097         (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
12098         (unused).
12099         * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
12100         Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
12101         * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
12102         Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
12104 2017-01-06  Bob Duff  <duff@adacore.com>
12106         * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
12107         dummy implementation of Map_Pragma_Name.
12109 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12111         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
12112         entry_body variable constant.
12113         * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
12114         * s-tpoben.ads (Protected_Entry_Body_Access): Now access
12115         to constant.
12116         * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
12117         now access to constant.
12119 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
12121         * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
12122         reformatting and typo fixes.
12124 2017-01-06  Bob Duff  <duff@adacore.com>
12126         * snames.ads-tmpl: New names for pragma renaming.
12127         * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
12128         * par-prag.adb: Add new pragma name to case statement.
12129         * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
12130         of the pragma.
12131         * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
12132         Dummy implementation of Pragma_Name_Mapped.
12134 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12136         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
12137         better detect call within an entry_wrapper.
12138         * sem_res.adb (Resolve_Call): A protected call within an
12139         entity_wrapper is analyzed in the context of the protected
12140         object but corresponds to a pre-analysis and is not an access
12141         before elaboration.
12142         * sem_attr.adb: Minor reformatting.
12144 2017-01-06  Justin Squirek  <squirek@adacore.com>
12146         * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
12147         Finalization_Size to allow a prefix of any non-class-wide type.
12148         * sem_attr.ads Modify comment for Finalization_Size to include
12149         definite type use case.
12151 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12153         * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
12154         on procedures that are wrappers created for entries that have
12155         preconditions.
12156         * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
12157         body is an entry_wrapper, compile it in the context of the
12158         synchronized type, because a precondition may refer to funtions
12159         of the type.
12160         * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
12161         body entity.
12162         * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
12163         within an Entry_Wrapper this is an external call whose target
12164         is the synchronized object that is the actual in the call to
12165         the wrapper.
12167 2017-01-06  Yannick Moy  <moy@adacore.com>
12169         * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
12170         in tree, which means not analyzing the previous prefix if the node has
12171         been rewritten into its prefix.
12173 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
12175         * s-tpobop.adb: Minor reformatting.
12177 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12179         * checks.adb (Ensure_Valid): Do not generate a validity check
12180         within a generated predicate function, validity checks will have
12181         been applied earlier when required.
12183 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12185         * s-tpoben.ads (Protection_Entries): Add comment and reorder
12186         components for performances.
12187         * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
12188         semantic.
12190 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12192         * sem_eval.adb (Check_Expression_Against_Static_Predicate):
12193         If expression is compile-time known and obeys a static predicate
12194         it must be labelled as static, to prevent spurious warnings and
12195         run-time errors, e.g. in case statements. This is relevant when
12196         the expression is the result of constant-folding a type conversion
12197         whose expression is a variable with a known static value.
12199 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12201         * exp_attr.adb, sem_attr.ads: Minor reformatting.
12203 2017-01-06  Justin Squirek  <squirek@adacore.com>
12205         * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
12206         expansion of Finalization_Size attribute.
12207         * sem_attr.adb (Analyze_Attribute): Add entry to check the
12208         semantics of Finalization_Size.
12209         (Eval_Attribute): Add null entry for Finalization_Size.
12210         * sem_attr.ads: Add Finalization_Size to the implementation
12211         dependent attribute list.
12212         * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
12214 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12216         * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
12217         iterator specification with a serious syntactic error, transform
12218         construct into an infinite loop in order to continue analysis
12219         and prevent a compiler abort.
12221 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12223         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
12224         max_queue_lengths_array if unused.
12226 2017-01-06  Bob Duff  <duff@adacore.com>
12228         * errout.adb (Set_Msg_Text): Protect against out-of-bounds
12229         array access, in case "\" is at the end of Text.
12230         * stylesw.adb (Set_Style_Check_Options): Don't include input
12231         characters in the error message template, because they could
12232         be control characters such as "\", which Errout will try to
12233         interpret.
12235 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12237         * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
12238         For a private type examine the visible declarations that follow
12239         the partial view, not just the private declarations that follow
12240         the full view.
12242 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12244         * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
12245         code cleanup.
12247 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12249         * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
12250         alias of the inherited op is the parent iterator, no need to
12251         examine dispatch table positions which might not be established
12252         yet if type is not frozen.
12253         * sem_disp.adb (Check_Controlling_Formals): The formal of a
12254         predicate function may be a subtype of a tagged type.
12255         * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
12256         of representation items for the completion of a type extension
12257         where a predicate applies to the partial view.
12258         * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
12259         parameter that designates function whose actual receives a
12260         predicate check, to improve warning message when the check will
12261         lead to infinite recursion.
12262         * sem_res.adb (Resolve_Actuals): Pass additional parameter to
12263         Apply_Predicate_Check.
12265 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12267         * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
12268         Gnat_Extended_Ravenscar.
12269         * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
12271 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
12273         * sem_util.ads: Minor typo fix and reformatting.
12275 2017-01-06  Yannick Moy  <moy@adacore.com>
12277         * ghost.adb Minor fixing of references to SPARK RM.
12278         (Check_Ghost_Context): Check whether reference is to a lvalue
12279         before issuing an error about violation of SPARK RM 6.9(13)
12280         when declaration has Ghost policy Check and reference has Ghost
12281         policy Ignore.
12282         * sem_util.adb Minor indentation.
12283         * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
12284         Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
12285         * sem_util.ads (Unique_Defining_Entity): Document the result
12286         for package body stubs.
12288 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12290         * raise-gcc.c (abort): Macro to call Abort_Propagation.
12291         * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
12292         constant.
12293         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12294         Do not generate the Entry_Max_Queue_Lengths_Array if all default
12295         values.
12296         * exp_util.adb (Corresponding_Runtime_Package): Consider
12297         Max_Queue_Length pragma.
12299 2017-01-06  Justin Squirek  <squirek@adacore.com>
12301         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12302         Remove declaration generation in the case of
12303         System_Tasking_Protected_Objects_Single_Entry being used,
12304         and add a warning message when this is detected to occur.
12305         (Make_Initialize_Protection): Remove reference pass in the case
12306         of System_Tasking_Protected_Objects_Single_Entry.
12307         * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
12308         * s-tposen.adb (Initialize_Protection_Entry): Remove
12309         Entry_Queue_Max parameter.
12310         * s-tposen.ads: Remove the types use to store the entry queue
12311         maximum.
12312         * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
12314 2017-01-06  Yannick Moy  <moy@adacore.com>
12316         * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
12317         behavior of function, to also accept out of range positions
12318         and raise Constraint_Error in such case, and to copy sloc from
12319         literal if No_Location passed as location.
12320         * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
12321         of functions to raise Constraint_Error in case of value not in
12322         appropriate range.
12324 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12326         * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
12327         Invalidate_Stack_Cache.
12329 2017-01-06  Eric Botcazou  <ebotcazou@adacore.com>
12331         * s-os_lib.adb: Minor fix to the signature of Readlink.
12333 2017-01-06  Javier Miranda  <miranda@adacore.com>
12335         * sem_ch6.adb (Conforming_Types): Handle another
12336         confusion between views in a nested instance with an actual
12337         private type whose full view is not in scope.
12339 2017-01-06  Arnaud Charlet  <charlet@adacore.com>
12341         * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
12342         mark a rewritten if statement as explicit (Comes_From_Source).
12344 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
12346         * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
12348 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12350         * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
12352 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12354         * sem_case.adb: Minor reformatting.
12356 2017-01-06  Thomas Quinot  <quinot@adacore.com>
12358         * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
12360 2017-01-06  Justin Squirek  <squirek@adacore.com>
12362         * aspects.adb: Register aspect in Canonical_Aspect.
12363         * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
12364         into respective tables.
12365         * einfo.ads, einfo.adb: Add a new attribute for
12366         handling the parameters for Pragma_Max_Entry_Queue
12367         (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
12368         for accessing and setting were added as well.
12369         * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
12370         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
12371         declaration for pramga arguments and store them in the protected
12372         type node.
12373         (Make_Initialize_Protection): Pass a reference to
12374         the Entry_Max_Queue_Lengths_Array in the protected type node to
12375         the runtime.
12376         * rtsfind.adb: Minor grammar fix.
12377         * rtsfind.ads: Register new types taken from the
12378         runtime libraries RE_Protected_Entry_Queue_Max and
12379         RE_Protected_Entry_Queue_Max_Array
12380         * s-tposen.adb, s-tpoben.adb
12381         (Initialize_Protection_Entry/Initialize_Protection_Entries):
12382         Add extra parameter and add assignment to local object.
12383         * s-tposen.ads, s-tpoben.ads: Add new types to
12384         store entry queue maximums and a field to the entry object record.
12385         * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
12386         for Aspect_Max_Queue_Length.
12387         (Check_Aspect_At_Freeze_Point):
12388         Add aspect to list of aspects that don't require delayed analysis.
12389         * sem_prag.adb (Analyze_Pragma): Add case statement for
12390         Pragma_Max_Queue_Length, check semantics, and register arugments
12391         in the respective entry nodes.
12392         * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
12393         and Has_Max_Queue_Length
12394         * snames.ads-tmpl: Add constant for the new aspect-name
12395         Name_Max_Queue_Length and corrasponding pragma.
12397 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12399         * exp_util.adb (Is_Controlled_Function_Call):
12400         Reimplemented. Consider any node which has an entity as the
12401         function call may appear in various ways.
12403 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12405         * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
12406         an unchecked type conversion when performing a view conversion
12407         to/from a private type. In all other cases use a regular type
12408         conversion to ensure that any relevant checks are properly
12409         installed.
12411 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12413         * sem_prag.adb, sem_ch8.adb: Minor reformatting.
12415 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12417         * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
12418         error on case expression that is an entity, when coverage is
12419         incomplete and entity has a static value obtained by local
12420         propagation.
12421         (Handle_Static_Predicate): New procedure, subsidiary of
12422         Check_Choices, to handle case alternatives that are either
12423         subtype names or subtype indications involving subtypes that
12424         have static predicates.
12426 2017-01-06  Thomas Quinot  <quinot@adacore.com>
12428         * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
12429         (GNAT.Socket): Add support for Busy_Polling and Generic_Option
12431 2017-01-06  Bob Duff  <duff@adacore.com>
12433         * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
12434         Elaborate_All(P) to P itself. That could happen in obscure cases,
12435         and always introduced a cycle (P body must be elaborated before
12436         P body).
12437         * lib-writ.ads: Comment clarification.
12438         * ali-util.ads: Minor comment fix.
12439         * ali.adb: Minor reformatting.
12441 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12443         * a-exexpr-gcc.adb: Improve comment.
12445 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
12447         * s-linux-mips.ads: Use correct signal and errno constants.
12448         (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
12450 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
12452         * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
12453         * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
12454         sections.
12456 2017-01-01  Eric Botcazou  <ebotcazou@adacore.com>
12458         * gnatvsn.ads: Bump copyright year.
12460 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
12462         * gnat_ugn.texi: Bump @copying's copyright year.
12463         * gnat_rm.texi: Likewise.
12465 Copyright (C) 2017 Free Software Foundation, Inc.
12467 Copying and distribution of this file, with or without modification,
12468 are permitted in any medium without royalty provided the copyright
12469 notice and this notice are preserved.