Fix the new pr83361.c testcase
[official-gcc.git] / gcc / ada / ChangeLog
blobc676e7b877f9dbab0d457d0166fe3e2b73395a19
1 2017-12-08  Jakub Jelinek  <jakub@redhat.com>
3         * gcc-interface/utils.c (gnat_internal_attribute_table): Add
4         exclusions to the comment.
6 2017-12-07  Martin Sebor  <msebor@redhat.com>
8         PR c/81544
9         * gcc-interface/utils.c (gnat_internal_attribute_table): Initialize
10         new member of struct attribute_spec.
12 2017-12-06  Simon Wright  <simon@pushface.org>
14         PR ada/66205
15         * bindgen.adb (Gen_AdaFinal): If the restriction No_Task_Termination is
16         set, generate a null body.
18 2017-12-05  Piotr Trojanek  <trojanek@adacore.com>
20         * sem_util.adb (Contains_Refined_State): Remove.
22 2017-12-05  Ed Schonberg  <schonberg@adacore.com>
24         * sem_ch13.adb (Analyze_Aspect_Specifications, case Predicate): A
25         predicate cannot apply to a formal type.
27 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
29         * exp_unst.ads: Fix typos.
31 2017-12-05  Jerome Lambourg  <lambourg@adacore.com>
33         * libgnarl/s-taprop__qnx.adb: Better detect priority ceiling bug in
34         QNX.  At startup, the first mutex created has a non-zero ceiling
35         priority whatever its actual policy. This makes some tests fail
36         (c940013 for example).
38 2017-12-05  Bob Duff  <duff@adacore.com>
40         * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Call
41         Expand_Cleanup_Actions for N_Extended_Return_Statement.
42         * exp_ch7.adb (Expand_Cleanup_Actions): Handle
43         N_Extended_Return_Statement by transforming the statements into a
44         block, and (indirectly) calling Expand_Cleanup_Actions on the block.
45         It's too hard for Expand_Cleanup_Actions to operate directly on the
46         N_Extended_Return_Statement, because it has a different structure than
47         the other node kinds that Expand_Cleanup_Actions.
48         * exp_util.adb (Requires_Cleanup_Actions): Add support for
49         N_Extended_Return_Statement.  Change "when others => return False;" to
50         "when others => raise ...;" so it's clear what nodes this function
51         handles.  Use named notation where appropriate.
52         * exp_util.ads: Mark incorrect comment with ???.
54 2017-12-05  Javier Miranda  <miranda@adacore.com>
56         * exp_ch9.adb (Install_Private_Data_Declarations): Add missing
57         Debug_Info_Needed decoration of internally generated discriminal
58         renaming declaration.
60 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
62         * exp_unst.adb (Unnest_Subprogram): Add handling of 'Access on
63         nested subprograms.
65 2017-12-05  Sergey Rybin  <rybin@adacore.com>
67         * doc/gnat_ugn/gnat_utility_programs.rst: Add description of '--ignore'
68         option for gnatmetric, gnatpp, gnat2xml, and gnattest.
70 2017-12-05  Piotr Trojanek  <trojanek@adacore.com>
72         * sem_util.adb (Contains_Refined_State): Remove.
74 2017-12-05  Piotr Trojanek  <trojanek@adacore.com>
76         * rtsfind.ads: Add new enumeration literals: RE_Clock_Time (for
77         Ada.Real_Time.Clock_Time) and RO_CA_Clock_Time (for
78         Ada.Calendar.Clock_Time).
80 2017-12-05  Ed Schonberg  <schonberg@adacore.com>
82         * sem_ch4.adb (Is_Private_Overriding): If the candidate private
83         subprogram is overloaded, scan the list of homonyms in the same
84         scope, to find the inherited operation that may be overridden
85         by the candidate.
86         * exp_ch11.adb, exp_ch7.adb: Minor reformatting.
88 2017-12-05  Bob Duff  <duff@adacore.com>
90         * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
91         Init_Assignment is rewritten, we need to set Assignment_OK on the new
92         node.  Otherwise, we will get spurious errors when initializing via
93         assignment statement.
95 2017-12-05  Hristian Kirtchev  <kirtchev@adacore.com>
97         * sem_elab.adb: Update the terminology and switch sections.
98         (Check_SPARK_Model_In_Effect): New routine.
99         (Check_SPARK_Scenario): Verify the model in effect for SPARK.
100         (Process_Conditional_ABE_Call_SPARK): Verify the model in effect for
101         SPARK.
102         (Process_Conditional_ABE_Instantiation_SPARK): Verify the model in
103         effect for SPARK.
104         (Process_Conditional_ABE_Variable_Assignment_SPARK): Verify the model
105         in effect for SPARK.
107 2017-12-05  Nicolas Setton  <setton@adacore.com>
109         * terminals.c (__gnat_setup_child_communication): As documented,
110         __gnat_setup_child_communication should not terminate - it is intended
111         to be used as the child process of a call to fork().  However, execvp
112         might actually return in some cases, for instance when attempting to
113         run a 32-bit binary on a 64-bit Linux distribution when the
114         compatibility packages are not installed. In these cases, exit the
115         program to conform to the documentation.
117 2017-12-05  Olivier Hainque  <hainque@adacore.com>
119         * libgnat/s-tsmona.adb: Fix for oversight in the tsmona interface
120         update.
122 2017-12-05  Gary Dismukes  <dismukes@adacore.com>
124         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Minor typo fix
125         and reformatting.
126         * gnat_ugn.texi: Regenerate.
128 2017-12-05  Olivier Hainque  <hainque@adacore.com>
130         * sem_util.adb (Set_Convention): Always clear Can_Use_Internal_Rep
131         on access to subprogram types with foreign convention.
133 2017-12-05  Yannick Moy  <moy@adacore.com>
135         * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix User's
136         Guide description of default settings of warnings.
138 2017-12-05  Olivier Hainque  <hainque@adacore.com>
140         * s-dwalin.adb (Read_And_Execute_Isn): Adjust test checking for the end
141         of section. Add comments explaining the rationale of the computation.
143 2017-12-05  Bob Duff  <duff@adacore.com>
145         * exp_ch11.adb: Minor refactoring.
147 2017-12-05  Hristian Kirtchev  <kirtchev@adacore.com>
149         * debug.adb: Add debug switches d_a, d_e, and d_p, along with
150         documentation.
151         (Set_Underscored_Debug_Flag): New routine.
152         * debug.ads: Add the flags for all underscore switches.
153         (Set_Underscored_Debug_Flag): New routine.
154         * einfo.adb: Flag303 is now Suppress_Elaboration_Warnings.
155         (Suppress_Elaboration_Warnings): New routine.
156         (Set_Suppress_Elaboration_Warnings): New routine.
157         (Write_Entity_Flags): Add output for Suppress_Elaboration_Warnings.
158         * einfo.ads: Add new flag Suppress_Elaboration_Warnings.
159         (Suppress_Elaboration_Warnings): New routine along with pragma Inline.
160         (Set_Suppress_Elaboration_Warnings): New routine along with pragma
161         Inline.
162         * exp_ch3.adb (Build_Init_Procedure): Restore the behavior of the
163         legacy elaboration model.
164         (Default_Initialize_Object): Restore the behavior of the legacy
165         elaboration model.
166         * exp_ch9.adb: Add with and use clause for Sem_Elab.
167         (Build_Task_Activation_Call): Restore the behavior of the legacy
168         elaboration model.
169         * frontend.adb (Frontend): Restore the behavior of the legacy
170         elaboration model.
171         * opt.ads: Add new flags Legacy_Elaboration_Checks and
172         Relaxed_Elaboration_Checks, along with documentation.
173         * sem_attr.adb (Analyze_Access_Attribute): Restore the behavior of the
174         legacy elaboration model.
175         * sem_ch5.adb (Analyze_Assignment): Restore the behavior of the legacy
176         elaboration model.
177         * sem_ch7.adb (Analyze_Package_Declaration): Restore the behavior of
178         the legacy elaboration model.
179         * sem_ch8.adb (Attribute_Renaming): Restore the behavior of the legacy
180         elaboration model.
181         * sem_ch12.adb (Analyze_Instance_And_Renamings): Restore the behavior
182         of the legacy elaboration model.
183         (Analyze_Package_Instantiation): Restore the behavior of the legacy
184         elaboration model.
185         (Analyze_Subprogram_Instantiation): Restore the behavior of the legacy
186         elaboration model.
187         * sem_elab.adb: Update the documentation of the Processing phase.
188         Update the documentation on elaboration-related compilation
189         switches.  Update the documentation on adding a new target.  Add
190         Processing_Attributes which represent the state of the Processing
191         phase.  Resurrect the previous elaboration model as "legacy elaboration
192         model".
193         (Build_Call_Marker): This routine does not function when the legacy
194         elaboration model is in effect. Do not consider entry calls and requeue
195         statements when debug flag d_e is in effect. Do not consider calls to
196         subprograms which verify the runtime semantics of certain assertion
197         pragmas when debug flag d_p is in effect.
198         (Build_Variable_Reference_Marker): This routine does not function when
199         the legacy elaboration model is in effect.
200         (Check_Elaboration_Scenarios): This routine does not function when the
201         legacy elaboration model is in effect.
202         (Ensure_Prior_Elaboration): The various flags have now been replaced
203         with a state. Do not generate implicit Elaborate[_All] pragmas when
204         their creation has been suppressed.
205         (Ensure_Prior_Elaboration_Static): The with clause is marked based on
206         the requested pragma, not on the nature of the scenario.
207         (In_External_Context): Removed.
208         (Is_Assertion_Pragma_Target): New routine.
209         (Is_Potential_Scenario): Stop the traversal of a task body when
210         reaching an accept or select statement, and debug switch d_a is in
211         effect.
212         (Kill_Elaboration_Scenario): This routine does not function when the
213         legacy elaboration model is in effect.
214         (Process_Activation_Generic): The various flags have now been replaced
215         with a state.
216         (Process_Conditional_ABE): The various flags have now been replaced
217         with a state.
218         (Process_Conditional_ABE_Access): The various flags have now been
219         replaced with a state.
220         (Process_Conditional_ABE_Activation_Impl): The various flags have now
221         been replaced with a state. Do not process an activation call which
222         activates a task whose type is defined in an external instance, and
223         debug switch dL is in effect. Suppress the generation of implicit
224         Elaborate[_All] pragmas once a conditional ABE check has been
225         installed.
226         (Process_Conditional_ABE_Call): The various flags have now been
227         replaced with a state. Do not process a call which invokes a subprogram
228         defined in an external instance, and debug switch dL is in effect.
229         (Process_Conditional_ABE_Call_Ada): The various flags have now been
230         replaced with a state. Suppress the generation of implicit
231         Elaborate[_All] pragmas once a conditional ABE check has been
232         installed.
233         (Process_Conditional_ABE_Call_SPARK): The various flags have now been
234         replaced with a state.
235         (Process_Conditional_ABE_Instantiation): The various flags have now
236         been replaced with a state.
237         (Process_Conditional_ABE_Instantiation_Ada): The various flags have now
238         been replaced with a state. Suppress the generation of implicit
239         Elaborate[_All] pragmas once a conditional ABE check has been
240         installed.
241         (Process_Conditional_ABE_Instantiation_SPARK): The various flags have
242         now been replaced with a state.
243         (Process_Guaranteed_ABE_Activation_Impl): The various flags have now
244         been replaced with a state.
245         (Process_Single_Activation): The various flags have now been replaced
246         with a state.
247         (Record_Elaboration_Scenario): This routine does not function when the
248         legacy elaboration model is in effect.
249         (Traverse_Body): The various flags have now been replaced with a state.
250         * sem_elab.ads: Resurrect the pre-18.x elaboration model as "legacy
251         elaboration model".
252         * sem_prag.adb (Analyze_Pragma): Restore the behavior of the legacy
253         elaboration model.
254         * sem_res.adb (Resolve_Call): Restore the behavior of the legacy
255         elaboration model.
256         (Resolve_Entity_Name): Restore the behavior of the legacy elaboration
257         model.
258         * sem_util.adb (Mark_Elaboration_Attributes): This routine does not
259         function when the legacy elaboration model is in effect.
260         * sinfo.adb (Is_Known_Guaranteed_ABE): Update the assertion check.
261         (No_Elaboration_Check): New routine.
262         (Set_Is_Known_Guaranteed_ABE): Update the assertion check.
263         (Set_No_Elaboration_Check): New routine.
264         * sinfo.ads: Update the documentation of flag Is_Known_Guaranteed_ABE
265         along with occurrences in nodes.  Add new flag No_Elaboration_Check
266         along with occurrences in nodes.
267         * switch-c.adb (Scan_Front_End_Switches): Add processing for debug
268         switches with underscores.  Add processing for switches -gnatH and
269         -gnatJ.
270         * usage.adb (Usage): Add output for switches -gnatH and -gnatJ.
271         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
272         documentation to include the legacy and relaxed elaboration models.
273         * gnat_ugn.texi: Regenerate.
275 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
277         * doc/gnat_ugn/platform_specific_information.rst: Minor edit.
278         Improve doc on required packages for linux 32bits.
280 2017-12-05  Doug Rupp  <rupp@adacore.com>
282         * tracebak.c (ppc64-vx7): USE_GCC_UNWINDER for 64bit.
284 2017-12-05  Javier Miranda  <miranda@adacore.com>
286         * checks.adb (Generate_Range_Check): Force evaluation of the node in
287         more cases.  This patch was written to improve the code generated by
288         the CCG compiler but it is enabled for all targets since double
289         evaluation is always a potential source of inefficiency.
291 2017-12-05  Gary Dismukes  <dismukes@adacore.com>
293         * doc/gnat_ugn/gnat_utility_programs.rst: Remove reference to obsolete
294         -fdump-xref switch.
296 2017-12-05  Eric Botcazou  <ebotcazou@adacore.com>
298         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use the SLOC of the
299         iteration scheme throughout, except for the new loop statement(s).
301 2017-12-05  Ed Schonberg  <schonberg@adacore.com>
303         * exp_aggr.adb (Gen_Assign): Do not analyze the expressionn of the
304         assignment if it is part of an Iterated_Component_Association: the
305         analysis needs to take place once the loop structure is analyzed and
306         the loop parameter made visible, because references to it typically
307         appear in the corresponding expression.  This is necessary if the
308         expression is an aggregate, because previous pre-analysis of the
309         expression does not handle nested aggregates properly.
311 2017-12-05  Bob Duff  <duff@adacore.com>
313         * sem_res.adb (Resolve_Allocator): Avoid coextension processing for an
314         allocator that is the expansion of a build-in-place function call.
316 2017-12-05  Olivier Hainque  <hainque@adacore.com>
318 libgnat/
319         * s-trasym__dwarf.adb (spec of Module_Name.Get): Instead of
320         possibly adjusting the lookup address by a load address, expect
321         a extra argument through which the load address can be conveyed
322         separately.
323         (Multi_Module_Symbolic_Traceback): Adjust accordingly. Pass the
324         retrieved load address to Init_Module.
325         * s-tsmona__linux.adb (Get): Honor the new interface.
326         * s-tsmona__mingw.adb (Get): Likewise.
327         * s-dwalin.ads: Adjust comments to be explicit about which
328         addresses are from module info and which are run-time addresses,
329         offsetted by the module load address.
330         * s-dwalin.adb (Set_Load_Address): Simply set C.Load_Slide.
331         Do not alter the module Low and High (relative) addresses.
332         (Is_Inside): Improve documentation regarding the kinds of addresses
333         at hand and correct the test.
334         (Symbolic_Traceback): Use separate variables with explicit names
335         for the address in traceback (run-time value) and the address to
336         lookup within the shared object (module-relative). Adjust the
337         computation of address passed to Symbolic_Address for symbolization.
339 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
341         * opt.ads (Expand_Nonbinary_Modular_Ops): New flag.
342         * exp_ch4.adb (Expand_Nonbinary_Modular_Op): Use
343         Expand_Nonbinary_Modular_Ops instead of Modify_Tree_For_C, so that
344         other back-ends can also benefit from the front-end expansion. Remove
345         test for Modify_Tree_For_C in all callers to better share code.
346         * gnat1drv.adb (Adjust_Global_Switches): Set
347         Expand_Nonbinary_Modular_Ops when generating C code.
349 2017-12-05  Ed Schonberg  <schonberg@adacore.com>
351         * exp_ch5.adb (Expand_Formal_Container_Loop): Ensure that the loop
352         parameter becomes invisible after analyzing the loop, which has been
353         rewritten as a while-loop.
355 2017-12-05  Doug Rupp  <rupp@adacore.com>
357         * vxaddr2line.adb: Revise and enhance for new ports, remove dead ports,
358         and update for 64bit ports.
360 2017-12-05  Bob Duff  <duff@adacore.com>
362         * exp_ch6.adb (Build_In_Place_Formal): Search for the formal by suffix
363         instead of the full name.
364         * sem_ch6.adb (Create_Extra_Formals): Make sure there are extra formals
365         in the case of an instance of a generic.
367 2017-12-05  Arnaud Charlet  <charlet@adacore.com>
369         (Adjust_Global_Switches): Create an alias GNAT_Annotate to map to
370         pragma Annotate.
372 2017-12-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
374         * gcc-interface/Makefile.in (RTEMS): Define EH_MECHANISM.
376 2017-12-04  Sebastian Huber  <sebastian.huber@embedded-brains.de>
378         * gcc-interface/Makefile.in (RTEMS): Use s-osprim__rtems.adb.
379         * libgnat/s-osprim__rtems.adb: New file.
380         * libgnarl/s-osinte__rtems.adb (pthread_cond_t): Fix alignment.
381         (pthread_mutexattr_t): Likewise.
382         (pthread_rwlockattr_t): Likewise.
383         (pthread_rwlock_t): Likewise.
384         (time_t): Use 64-bit integer.
386 2017-12-01  Sebastian Huber  <sebastian.huber@embedded-brains.de>
388         * libgnarl/s-osinte__rtems.ads (pthread_cond_t): Use correct size and
389         alignment.
390         (pthread_mutex_t): Likewise.
391         (pthread_rwlock_t): Likewise.
393 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
395         * gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR
396         using build2 instead of build3.
398 2017-11-23  Eric Botcazou  <ebotcazou@adacore.com>
400         PR ada/83091
401         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not build a variant
402         type for the implementation type of a packed array.
404 2017-11-23  Mike Stump  <mikestump@comcast.net>
405             Eric Botcazou  <ebotcazou@adacore.com>
407         * gcc-interface/trans.c (gnat_gimplify_stmt) <LOOP_STMT>: Pass 3rd
408         operand to ANNOTATE_EXPR and also pass unrolling hints.
410 2017-11-20  Eric Botcazou  <ebotcazou@adacore.com>
412         PR ada/83016
413         * gnatlink.adb (Process_Args): Accept multiple switches for --LINK.
414         (Usage): Adjust.
415         * gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES).
416         (common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in
417         the invocations of $(GNATLINK).
418         (../../gnatdll$(exeext)): Likewise.
419         (../../vxaddr2line$(exeext)): Likewise.
420         (gnatmake-re): Likewise.
421         (gnatlink-re): Likewise.
423 2017-11-16  Doug Rupp  <rupp@adacore.com>
425         * gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
427 2017-11-16  Steve Baird  <baird@adacore.com>
429         * debug.adb: Update another comment to indicate gnat2scil's use of the
430         -gnatd.7 switch.
432 2017-11-16  Bob Duff  <duff@adacore.com>
434         * exp_ch6.adb (Expand_Call_Helper): Avoid creating a transient scope in
435         the case of nested build-in-place calls.
437 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
439         * doc/gnat_ugn/gnat_utility_programs.rst: Document the switches
440         available in gnatsymbolize.
442 2017-11-16  Steve Baird  <baird@adacore.com>
444         * debug.adb: Update comment to indicate gnat2scil's use of the -gnatd.7
445         switch.
447 2017-11-16  Gary Dismukes  <dismukes@adacore.com>
449         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, sem_ch6.adb,
450         sem_elab.adb: Minor editorial corrections.
451         * gnat_ugn.texi: Regenerate.
453 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
455         * doc/gnat_ugn/gnat_utility_programs.rst (GNAT UGN): Add
456         gnatsymbolize documentation.
457         * gnat_ugn.texi: Regenerate.
459 2017-11-16  Steve Baird  <baird@adacore.com>
461         * sem_ch3.adb (Build_Derived_Record_Type): Replace all uses of
462         "Scope (Parent_Type)" with "Scope (Parent_Base)".
464 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
466         * opt.ads: Elaboration warnings are now on by default. Add a comment
467         explaining why this is needed.
468         * sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration
469         warnings.
470         * sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of
471         elaboration warnings.
472         (Analyze_Subprogram_Instantiation): Preserve the status of elaboration
473         warnings.
474         * sem_elab.adb: Update the structure of Call_Attributes and
475         Instantiation_Attributes.
476         (Build_Call_Marker): Propagate the status of elaboration warnings from
477         the call to the marker.
478         (Extract_Call_Attributes): Extract the status of elaboration warnings.
479         (Extract_Instantiation_Attributes): Extract the status of elaboration
480         warnings.
481         (Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are
482         now dependent on the status of elaboration warnings.
483         (Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now
484         dependent on the status of elaboration warnings.
485         (Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics
486         are now dependent on the status of elaboration warnings.
487         (Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced
488         for formal Call_Attrs. Elaboration diagnostics are now dependent on the
489         status of elaboration warnings.
490         (Process_Guaranteed_ABE_Call): Elaboration diagnostics are now
491         dependent on the status of elaboration warnings.
492         (Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now
493         dependent on the status of elaboration warnings.
494         * sem_prag.adb (Analyze_Pragma): Remove the unjustified warning
495         concerning pragma Elaborate.
496         * sem_res.adb (Resolve_Call): Preserve the status of elaboration
497         warnings.
498         (Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node
499         from the procedure call to the entry call.
500         * sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter
501         Warnings.
502         (Mark_Elaboration_Attributes_Node): Preserve the status of elaboration
503         warnings
504         * sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter
505         Warnings. Update the comment on usage.
506         * sinfo.adb (Is_Dispatching_Call): Update to use Flag6.
507         (Is_Elaboration_Warnings_OK_Node): New routine.
508         (Set_Is_Dispatching_Call): Update to use Flag6.
509         (Set_Is_Elaboration_Warnings_OK_Node): New routine.
510         * sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new
511         attribute Is_Elaboration_Warnings_OK_Node along with occurrences
512         in nodes.
513         (Is_Elaboration_Warnings_OK_Node): New routine along with pragma
514         Inline.
515         (Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma
516         Inline.
517         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various
518         sections to indicate how to suppress elaboration warnings.  Document
519         switches -gnatwl and -gnatwL.
520         * gnat_ugn.texi: Regenerate.
522 2017-11-16  Sylvain Dailler  <dailler@adacore.com>
524         * sem_util.adb (Get_Enum_Lit_From_Pos): Add a condition for Pos
525         lower than 0.
527 2017-11-16  Bob Duff  <duff@adacore.com>
529         * sem_ch13.adb (Check_Expr_Constants): Avoid error message in case of
530         System'To_Address.
532 2017-11-16  Yannick Moy  <moy@adacore.com>
534         * sem_elab.adb (Include): Fix mode of parameter Curr to out.
536 2017-11-16  Piotr Trojanek  <trojanek@adacore.com>
538         * sem_util.ads, sem_util.adb (Is_CCT_Instance): Allow calls where
539         Context_Id denotes a record type.
541 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
543         * sem_ch8.adb (Check_SPARK_Primitive_Operation): Enable the check in
544         instantiations.
546 2017-11-16  Doug Rupp  <rupp@adacore.com>
548         Initial gnat port to aarch64-wrs-vxworks7
549         * libgnarl/s-vxwork__aarch64.ads,
550         libgnat/system-vxworks7-aarch64-rtp-smp.ads,
551         libgnat/system-vxworks7-aarch64.ads: New files
552         * sigtramp-vxworks-target.inc (aarch64): New section.
553         * tracebak.c (USE_ARM_UNWINDING): Disable for ARMARCH8A.
555 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
557         * sem_elab.adb (Include): Including a node which is also a compilation
558         unit terminates the search because there are no more lists to examine.
560 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
562         * sem_ch8.adb (Analyze_Subprogram_Renaming): Ensure that a renaming
563         declaration does not define a primitive operation of a tagged type for
564         SPARK.
565         (Check_SPARK_Primitive_Operation): New routine.
567 2017-11-16  Arnaud Charlet  <charlet@adacore.com>
569         * libgnat/a-elchha.adb (Last_Chance_Handler): Display Argv (0) in
570         message when using -E binder switch.
572 2017-11-16  Piotr Trojanek  <trojanek@adacore.com>
574         * errout.ads: Fix minor typo in comment.
576 2017-11-16  Ed Schonberg  <schonberg@adacore.com>
578         * sem_ch3.adb (Process_Subtype): If the subtype indication does not
579         syntactically denote a type, return Any_Type to prevent subsequent
580         compiler crashes or infinite loops.
582 2017-11-16  Steve Baird  <baird@adacore.com>
584         * lib-writ.adb: Fix bug which causes Program_Error to be raised in some
585         cases when writing out a .ali file when a Rename_Pragma pragma is in
586         effect.
587         * lib-writ.adb (Write_Unit_Information): Replace call to
588         Pragma_Name_Unmapped with call to Pragma_Name.
590 2017-11-16  Gary Dismukes  <dismukes@adacore.com>
592         * sem_elab.adb: Minor typo fixes.
594 2017-11-16  Justin Squirek  <squirek@adacore.com>
596         * sem_res.adb (Resolve_Allocator): Correct warning messages and make
597         them more explicit.
599 2017-11-16  Hristian Kirtchev  <kirtchev@adacore.com>
601         * atree.ads (Nkind_In): Add 10 and 11 parameter versions.
602         * checks.adb (Install_Primitive_Elaboration_Check): Mark the setting of
603         the elaboration flag as elaboration code.
604         * einfo.adb (Contract): Update the comments.
605         (Ignore_SPARK_Mode_Pragmas): Update the comments.
606         (SPARK_Aux_Pragma): Update the comments.
607         (SPARK_Aux_Pragma_Inherited): Update the comments.
608         (SPARK_Pragma): Update the comments. The attribute now applies
609         to all types and abstract states.
610         (SPARK_Pragma_Inherited): Update the comments. The attribute now
611         applies to all types and abstract states.
612         (Set_Contract): Update the comments.
613         (Set_Ignore_SPARK_Mode_Pragmas): Update the comments.
614         (Set_SPARK_Aux_Pragma): Update the comments.
615         (Set_SPARK_Aux_Pragma_Inherited): Update the comments.
616         (Set_SPARK_Pragma): Update the comments. The attribute now applies to
617         all types and abstract states.
618         (Set_SPARK_Pragma_Inherited): Update the comments. The attribute now
619         applies to all types and abstract states.
620         (Write_Field40_Name): Add output for SPARK_Pragma when it appears on a
621         type and abstract states.
622         * einfo.ads: Update the documentation of attributes SPARK_Pragma and
623         SPARK_Pragma_Inherited.  Both of them now apply to all types and
624         abstract states.
625         * exp_util.adb (Set_Elaboration_Flag): Mark the setting of the
626         elaboration flag as elaboration code.
627         * sem_ch3.adb: Add with and use clauses for Sem_Elab.
628         (Analyze_Full_Type_Declaration): Set the SPARK_Mode of the type. Record
629         a derived type for later processing by the ABE mechanism.
630         (Analyze_Incomplete_Type_Decl): Set the SPARK_Mode of the type.
631         (Analyze_Private_Extension_Declaration): Set the SPARK_Mode of the
632         type.
633         * sem_ch7.adb (Analyze_Private_Type_Declaration): Set the SPARK_Mode of
634         the type.
635         * sem_elab.adb: Define the term "early call region".  Update the
636         terminology for "scenario" and "target".  Update the architecture of
637         the ABE mechanism.  Update the steps which must be taken when adding a
638         new scenario.  Update the section on debugging ABE issues.  Add new
639         hash tables Early_Call_Regions and Recorded_SPARK_Scenarios.  Add new
640         table SPARK_Scenarios.  Hash table Elaboration_Context is now
641         Elaboration_Statuses.  The majority of Process_xxx routines have been
642         updated to better reflect their role.
643         (Add_Unit): Reimplemented.
644         (Check_Elaboration_Constituent): New routine.
645         (Check_Elaboration_Scenarios): Verify previously recorded scenarios for
646         conditional ABE issues. Verify previously recorded SPARK scenarios.
647         (Check_SPARK_Derived_Type): New routine.
648         (Check_SPARK_Instantiation): New routine.
649         (Check_SPARK_Scenario): New routine.
650         (Check_SPARK_Refined_State_Pragma): New routine.
651         (Early_Call_Region): New routine.
652         (Elaboration_Status): New routine.
653         (Ensure_Prior_Elaboration): Add new formal parameter Prag_Nam. The
654         implicit Elabotate[_All] pragma is now specified via Prag_Nam.
655         (Find_Early_Call_Region): New routine.
656         (Info_Scenario): Add output for refinement constituents.
657         (Is_Recorded_SPARK_Scenario): New routine.
658         (Is_Suitable_SPARK_Derived_Type): New routine.
659         (Is_Suitable_SPARK_Instantiation): New routine.
660         (Is_Suitable_SPARK_Refined_State_Pragma): New routine.
661         (Is_Visited_Body): New routine.
662         (Kill_Elaboration_Scenario): Reimplemented.
663         (Output_Active_Scenarios): Add output for pragma Refined_State.
664         (Output_SPARK_Refined_State_Pragma): New routine.
665         (Process_Conditional_ABE_Call): Remove the use of -gnatd.v. The effect
666         is now achieved by different means.
667         (Process_Conditional_ABE_Call_SPARK): Verify that a call which precedes
668         the subprogram body appears within the early call region of the body.
669         Either ensure the prior elaboration of external subprograms or verify
670         that the context meets the suitable elaboration requirement.
671         (Process_Conditional_ABE_Instantiation_SPARK): New routine.
672         (Record_Elaboration_Scenario): Reimplement the portion which enforces
673         the level restrictions of the static model. Add support for SPARK
674         scenarios.
675         (Record_SPARK_Elaboration_Scenario): New routine.
676         (Reset_Visited_Bodies): New routine.
677         (Set_Early_Call_Region): New routine.
678         (Set_Elaboration_Status): New routine.
679         (Set_Is_Recorded_SPARK_Scenario): New routine.
680         (Update_Elaboration_Scenario): Reimplemented.
681         * sem_elab.ads: Add new subtype Library_Or_Instantiation_Level.
682         * sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Save the pragma
683         for examination by the ABE Processing phase.
684         (Create_Abstract_State): Save the SPARK_Mode from the context.
685         * sem_util.adb (Is_Non_Preelaborable_Construct): New routine.
686         * sem_util.ads (Is_Non_Preelaborable_Construct): New routine.
687         * sinfo.adb (Is_Elaboration_Code): New routine.
688         (Set_Is_Elaboration_Code): New routine.
689         (Nkind_In): Add 10 and 11 parameter versions.
690         * sinfo.ads: Add new attribute Is_Elaboration_Code along with
691         occurrences in nodes.
692         (Is_Elaboration_Code): New routine along with pragma Inline.
693         (Set_Is_Elaboration_Code): New routine along with pragma Inline.
694         (Nkind_In): Add 10 and 11 parameter versions.
696 2017-11-16  Justin Squirek  <squirek@adacore.com>
698         * sem.adb (Analyze): Remove requirement that the original node of N be
699         an operator in the case that analysis on the node yields the relevant
700         operator - so prefer it instead.
702 2017-11-16  Bob Duff  <duff@adacore.com>
704         * sem_ch6.adb (Create_Extra_Formals): The type of the BIP_Object_Access
705         formal must not have a designated type that is the full view coming
706         from a limited-with'ed package.
707         * sem_util.adb,sem_util.ads (Incomplete_View_From_Limited_With): New
708         function called from sem_ch6.
709         * sem_ch5.adb (Analyze_Assignment): Treat user-defined concatenation
710         specially for b-i-p cases.
712 2017-11-10  Martin Sebor  <msebor@redhat.com>
714         PR c/81117
715         * adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
716         * argv.c (__gnat_fill_arg, __gnat_fill_env): Likewise.
718 2017-11-10  Eric Botcazou  <ebotcazou@adacore.com>
720         * gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
721         not fall through to the next case.
722         <ARRAY_TYPE>: Deal specially with a dereference from another array
723         type with the same element type.
725 2017-11-09  Gary Dismukes  <dismukes@adacore.com>
727         * exp_util.adb, freeze.adb: Minor reformatting.
729 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
731         * gcc-interface/Makefile.in: Add rules to build aarch64-qnx runtimes.
733 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
735         * gcc-interface/trans.c (gnat_to_gnu): Add processing for
736         N_Variable_Reference_Marker nodes.
738 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
740         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
741         the pragma Compile_Time_Error when it appears in a generic package
742         declaration and uses an expanded name to denote the current unit.
744 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
746         * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
747         * tracebak.c: Add support for tracebacks in QNX.
749 2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
751         * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
753 2017-11-09  Yannick Moy  <moy@adacore.com>
755         * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
756         justification.
758 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
760         * doc/gnat_ugn/platform_specific_information.rst: Document packages
761         needed on GNU/Linux by GNAT.
762         * gnat_ugn.texi: Regenerate.
764 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
766         * contracts.adb (Analyze_Contracts): Remove the three parameter
767         version. This routine now only analyzes contracts and does not perform
768         any freezing actions.
769         (Analyze_Previous_Contracts): Removed.
770         (Freeze_Previous_Contracts): New routine.
771         * contracts.ads (Analyze_Previous_Contracts): Removed.
772         (Freeze_Previous_Contracts): New routine.
773         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
774         enclosing package spec regardless of whether the list denotes the
775         visible or private declarations.  Fix the removal of partial state
776         refinements when the context is a package spec.
777         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
778         contracts.
779         * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
780         * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
781         (Analyze_Protected_Body): Freeze previous contracts.
782         (Analyze_Task_Body): Freeze previous contracts.
783         * sem_prag.adb: Comment reformatting.
785 2017-11-09  Bob Duff  <duff@adacore.com>
787         * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
788         Export this so users can use it without importing
789         System.Tasking.Utilities.
790         * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
791         that fails when Make_Independent is called on a user task.
792         * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
793         capitalization style ((style) bad casing of "Master_of_Task").
795 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
797         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
798         uninitialized variable uncovered by Codepeer.
800 2017-11-09  Arnaud Charlet  <charlet@adacore.com>
802         * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
804 2017-11-09  Javier Miranda  <miranda@adacore.com>
806         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
807         (Static_Dispatch_Tables): Minor rewording.
808         * gnat_rm.texi: Regenerate.
810 2017-11-09  Justin Squirek  <squirek@adacore.com>
812         * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
813         use_clauses within instances.
814         (Use_One_Package): Add condition to check for "hidden" open scopes to
815         avoid skipping over packages that have not been properly installed even
816         though they are visible.
818 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
820         * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
821         private operation of a protected type, when the type has no visible
822         operations.
824 2017-11-09  Javier Miranda  <miranda@adacore.com>
826         * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
827         * exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
828         if available.
830 2017-11-09  Bob Duff  <duff@adacore.com>
832         * exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
833         sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
834         sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
835         variables.
837 2017-11-09  Yannick Moy  <moy@adacore.com>
839         * exp_disp.adb (Make_DT): Default initialize Ifaces_List and
840         Ifaces_Comp_List.
842 2017-11-09  Pascal Obry  <obry@adacore.com>
844         * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
845         only for foreign threads.  We initialize the thread handle only if not
846         yet initialized. This happens in Enter_Task for foreign threads only.
847         But for native threads (Ada tasking) we do want to keep the real
848         handle (from Create_Task) to be able to free the corresponding
849         resources in Finalize_TCB (CloseHandle).
851 2017-11-09  Yannick Moy  <moy@adacore.com>
853         * sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
854         P_Base_Type.
855         (Error_Attr_P): Fix name in pragma No_Return.
856         (Unexpected_Argument): Add pragma No_Return.
857         (Placement_Error): Add pragma No_Return.
859 2017-11-09  Javier Miranda  <miranda@adacore.com>
861         * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
862         dispatch table is statically built.
863         (Make_DT): Declare constant the Interface_Table object associated with
864         an statically built dispatch table. For this purpose the Offset_To_Top
865         value of each interface is computed using the dummy object.
866         * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
867         the Offset_To_Top field of secondary dispatch tables when the dispatch
868         table is statically built.
869         (Initialize_Tag): Do not generate calls to Register_Interface_Offset
870         when the dispatch table is statically built.
871         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
872         Document the new GNAT restriction Static_Dispatch_Tables.
873         * gnat_rm.texi: Regenerate.
875 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
877         * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
878         to avoid a dormant bug.
880 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
882         * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
883         as such capability is not available on the OS.
884         * link.c: Make sure linker options for QNX are correct.
885         * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
886         * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
887         in particular a workaround with locks priority ceiling where a higher
888         priority task is allowed to lock a lower ceiling priority lock. This
889         also fixes the scheduling of FIFO tasks when the priority of a task is
890         lowered.
891         * libgnat/system-qnx-aarch64.ads: Fix priority ranges.
893 2017-11-09  Yannick Moy  <moy@adacore.com>
895         * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
896         message.
897         * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
898         condition.
899         * namet.adb (Copy_One_Character): Add assumption for static analysis,
900         as knowledge that Hex(2) is in the range 0..255 is too complex for
901         CodePeer.
902         (Finalize): Add assumption for static analysis, as the fact that there
903         are symbols in the table depends on a global invariant at this point in
904         the program.
905         * set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
906         * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
907         true.
909 2017-11-09  Javier Miranda  <miranda@adacore.com>
911         * libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
912         * exp_disp.adb (Building_Static_DT): Check restriction.
913         (Building_Static_Secondary_DT): Check restriction.
914         (Make_DT): Initialize the HT_Link to No_Tag.
915         * opt.ads (Static_Dispatch_Tables): Rename flag...
916         (Building_Static_Dispatch_Tables): ... into this.  This will avoid
917         conflict with the restriction name.
918         * gnat1drv.adb: Update.
919         * exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
920         * exp_ch3.adb (Expand_N_Object_Declaration): Update.
922 2017-11-09  Pascal Obry  <obry@adacore.com>
924         * libgnarl/s-taprop__mingw.adb: Minor code clean-up.  Better using a
925         named number.
927 2017-11-09  Yannick Moy  <moy@adacore.com>
929         * binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
930         * checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
931         use.  Default initialize Hi, Lo.
932         (Selected_Range_Checks): Retype Num_Checks more precisely.
933         (Determine_Range, Determine_Range_R): Default initialize Hi_Right,
934         Lo_Right.
935         * contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
936         Unmodified.
937         (Process_Postconditions): Mark parameter Stmts as Unmodified.
938         * exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
939         * exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
940         (Expand_Concatenate): Default initialize High_Bound.
941         (Optimize_Length_Comparison): Default initialize Ent, Index.
942         * exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
943         L_Lo.
944         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
945         Return_Stmt.
946         * exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
947         remove pragma Warnings(Off).
948         * exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
949         * exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
950         * freeze.adb (Check_Component_Storage_Order): Default initialize
951         Comp_Byte_Aligned rather than silencing messages with pragma
952         Warnings(Off), which does not work for CodePeer initialization
953         messages, and given that here the possible read of an unitialized value
954         depends on a proper use of parameters by the caller.
955         * inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
956         * sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
957         * sem_ch3.adb (Build_Derived_Array_Type): Default initialize
958         Implicit_Base.
959         * sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
960         pragma Warnings(Off).
961         (Analyze_Case_Expression): Rescope checking block within branch where
962         Others_Present is set by the call to Check_Choices.
963         * sem_ch5.adb (Analyze_Assignment): Default initialize
964         Save_Full_Analysis.
965         * sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
966         and restructure code to defend against previous errors, so that, in
967         that case, control does not flow to the elsif condition which read an
968         uninitialized Obj_Decl.
969         * sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
970         (Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
971         which seem to be left uninitialized and possibly read in some cases.
972         * sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
973         precisely.  This requires to exchange the test for exiting in case of
974         too many positions and the increment to Position, inside the loop.
975         * sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
976         which cannot be read uninitialized, but the reasons for that are quite
977         subtle.
978         * sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
979         * sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
980         Spec_Id.
981         * sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
982         and test for presence of non-null Opnd_Type before testing its scope,
983         in a test which would read its value uninitialized, and is very rarely
984         exercized (it depends on the presence of an extension of System).
985         * sem_spark.ads: Update comment to fix name of main analysis procedure.
986         * sem_warn.adb (Warn_On_Known_Condition): Default initialize
987         Test_Result.
988         * set_targ.adb (FailN): Mark procedure with No_Return.
989         * stylesw.adb (Save_Style_Check_Options): Delete useless code to
990         initialize all array Options to white space, as there is already code
991         doing the same for the remaining positions in Options at the end of the
992         procedure.
994 2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
996         * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
997         generic instantiations either.
999 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1001         * sem_prag.adb (Analyze_Part_Of): Reword error message.
1002         (Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
1003         SPARK_Mode appears with an illegal mode, treat this as a non-existent
1004         mode.
1006 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
1008         * sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
1009         a limited view of a type T declared in unit U1, when the function is
1010         declared in another unit U2 and the call appears in a procedure within
1011         another unit.
1013 2017-11-09  Justin Squirek  <squirek@adacore.com>
1015         * sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
1016         when processing generic instances.
1018 2017-11-09  Bob Duff  <duff@adacore.com>
1020         * namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
1021         Error_Name and No_Name.  Use this (versus Name_Id) to indicate which
1022         objects can have those special values. Valid_Name_Id could usefully be
1023         used all over the compiler front end, but that's too much trouble for
1024         now. If we did that, we might want to rename:
1025         Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
1026         For parameters of type Valid_Name_Id, remove some redundant tests,
1027         including the ones found by CodePeer.  Use Is_Valid_Name instead of
1028         membership test when appropriate.
1029         (Error_Name_Or_No_Name): Delete this; it's no longer needed.
1030         * sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
1031         "in Error_Name_Or_No_Name".
1032         (Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
1033         Error_Name_Or_No_Name".
1035 2017-11-09  Arnaud Charlet  <charlet@adacore.com>
1037         * gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
1038         mode here unless -gnateC is specified.
1039         * switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
1040         -gnatC here.
1042 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1044         * lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
1045         part of the ALI writing; they are now processed directly from memory
1046         when requested by the backend.
1047         * lib-xref.ads (Collect_SPARK_Xrefs): Remove.
1048         (Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
1049         * lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
1050         (Add_SPARK_File): Remove.
1051         (Add_SPARK_Xref): Refactored from removed code; filters xref entries
1052         that are trivially uninteresting to the SPARK backend.
1053         * spark_xrefs.ads: Remove code that is no longer needed.
1054         * spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
1056 2017-11-09  Hristian Kirtchev  <kirtchev@adacore.com>
1058         * sem_elab.adb: Update the documentation on adding a new elaboration
1059         schenario. Add new hash table Recorded_Top_Level_Scenarios.
1060         (Is_Check_Emitting_Scenario): Removed.
1061         (Is_Recorded_Top_Level_Scenario): New routine.
1062         (Kill_Elaboration_Scenario): Reimplemented.
1063         (Record_Elaboration_Scenario): Mark the scenario as recorded.
1064         (Set_Is_Recorded_Top_Level_Scenario): New routine.
1065         (Update_Elaboration_Scenario): Reimplemented.
1066         * sinfo.adb (Is_Recorded_Scenario): Removed.
1067         (Set_Is_Recorded_Scenario): Removed.
1068         * sinfo.ads: Remove attribute Is_Recorded_Scenario along with
1069         occurrences in nodes.
1070         (Is_Recorded_Scenario): Removed along with pragma Inline.
1071         (Set_Is_Recorded_Scenario): Removed along with pragma Inline.
1073 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1075         * sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
1076         error message.
1078 2017-11-09  Justin Squirek  <squirek@adacore.com>
1080         * sem_res.adb (Resolve_Allocator): Add warning messages corresponding
1081         to the allocation of an anonymous access-to-controlled object.
1083 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
1085         * sigtramp-qnx.c: Fix obvious typo.
1087 2017-11-09  Doug Rupp  <rupp@adacore.com>
1089         * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
1091 2017-11-09  Ed Schonberg  <schonberg@adacore.com>
1093         * sem_res.adb (Resolve): If expression is an entity whose type has
1094         implicit dereference, generate reference to it, because no reference is
1095         generated for an overloaded entity during analysis, given that its
1096         identity may not be known.
1098 2017-11-09  Javier Miranda  <miranda@adacore.com>
1100         * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
1101         offset-to-top field by addition.
1102         (Make_Secondary_DT): Initialize the offset-to-top field with a negative
1103         offset.
1104         * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
1105         return a negative offset-to-top value.
1106         (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
1107         Set_Static_Offset_To_Top passing a negative offet-to-top value;
1108         initialize also the offset-to-top field with a negative offset.
1109         * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
1110         an addition since the offset-to-top field is now a negative value.
1111         (Displace): Displace the pointer to the object means of a substraction
1112         since it is now a negative value.
1113         (Set_Dynamic_Offset_to_top): Displace the pointer to the object by
1114         means of a substraction since it is now a negative value.
1116 2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>
1118         * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
1119         before Errout.Output_Messages also in the case of compilation errors.
1121 2017-11-09  Javier Miranda  <miranda@adacore.com>
1123         * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
1124         the Class Level): Fix error interfacing with C strings.
1125         * gnat_ugn.texi: Regenerate.
1127 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
1129         * system-qnx-aarch64.ads: Fix the priority constants.
1130         * s-osinte__qnx.ads: Fix constants for handling the locking protocols
1131         and scheduling.
1132         * s-osinte__qnx.adb: New file , prevents the use of priority 0 that
1133         corresponds to an idle priority on QNX.
1135 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1137         * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
1138         comments.
1140 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1142         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
1143         in expression funtions that are expanded into variables.
1145 2017-11-09  Piotr Trojanek  <trojanek@adacore.com>
1147         * sem_util.adb: Minor whitespace cleanup.
1149 2017-11-09  Jerome Lambourg  <lambourg@adacore.com>
1151         * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
1152         s-taprop version rather than a custom one.
1153         * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
1155 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1157         * lib-xref.ads, lib-xref-spark_specific.adb
1158         (Traverse_Compilation_Unit): Move declaration to package body.
1160 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1162         * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
1163         the type of the renaming from its defining entity, rather then the
1164         subtype mark as there may not be a subtype mark.
1166 2017-11-08  Jerome Lambourg  <lambourg@adacore.com>
1168         * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
1169         libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
1170         libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
1171         libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
1172         terminals.c: Initial port of GNAT for aarch64-qnx
1174 2017-11-08  Elisa Barboni  <barboni@adacore.com>
1176         * exp_util.adb (Find_DIC_Type): Move...
1177         * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
1179 2017-11-08  Justin Squirek  <squirek@adacore.com>
1181         * sem_res.adb (Resolve_Allocator): Add info messages corresponding to
1182         the owner and corresponding coextension.
1184 2017-11-08  Ed Schonberg  <schonberg@adacore.com>
1186         * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
1187         following separate procedures.
1188         (Resolve_Delta_Array_Aggregate): Previous code form
1189         Resolve_Delta_Aggregate.
1190         (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
1191         ARG decisions on the legality rules for delta aggregates for records:
1192         in the case of a variant record, components from different variants
1193         cannot be specified in the delta aggregate, and this must be checked
1194         statically.
1196 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1198         * spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
1199         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1200         removed component.
1202 2017-11-08  Gary Dismukes  <dismukes@adacore.com>
1204         * sem_ch4.adb: Minor typo fix.
1206 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1208         * spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
1209         Spec_Scope_Num components.
1210         * spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
1211         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1212         removed components.
1213         (Collect_SPARK_Xrefs): Skip setting proper values of removed
1214         components.
1216 2017-11-08  Gary Dismukes  <dismukes@adacore.com>
1218         * exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
1219         name is a discriminant in check for unconditional accessibility
1220         violation within instances.
1222 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1224         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
1225         for constants (with variable input).
1226         (Is_Constant_Object_Without_Variable_Input): Remove.
1228 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1230         * exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
1232 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1234         * spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
1235         cross-references.
1236         (dspark): Remove hardcoded table bound.
1238 2017-11-08  Ed Schonberg  <schonberg@adacore.com>
1240         * sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
1241         the type of the base of the construct to determine the type (or
1242         candidate interpretations) of the delta aggregate. This allows the
1243         construct to appear in a context that expects a private extension.
1244         * sem_res.adb (Resolve): Handle properly a delta aggregate with an
1245         overloaded base.
1247 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1249         * spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
1250         with Entity_Id of the reference.
1251         * spark_xrefs.adb (dspark): Adapt pretty-printing routine.
1252         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
1253         reference, not the file and scope indices.
1255 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1257         * errout.ads (Current_Node): New.
1258         * errout.adb (Error_Msg): Use Current_Node.
1259         * par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
1260         when relevant.
1261         * style.adb: Call Error_Msg_N when possible.
1263 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1265         * spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
1266         Entity.
1267         * lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
1268         the Scope_Id record component.
1270 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1272         * spark_xrefs.ads (SPARK_File_Record): Remove string components.
1273         * spark_xrefs.adb (dspark): Remove pretty-printing of removed
1274         SPARK_File_Record components.
1275         * lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
1276         representation of files/units.
1278 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1280         * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
1281         Remove Inside_Stubs parameter.
1283 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1285         * spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
1286         represented by Entity_Id.
1287         (SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
1288         represented by Entity_Id; this information is not repeated as
1289         Scope_Entity.
1290         (Heap): Moved from lib-xref-spark_specific.adb, to reside next to
1291         Name_Of_Heap_Variable.
1292         * spark_xrefs.adb (dspark): Adapt debug routine to above changes in
1293         data types.
1294         * lib-xref-spark_specific.adb: Adapt routines for populating SPARK
1295         scope and xrefs tables to above changes in data types.
1297 2017-11-08  Justin Squirek  <squirek@adacore.com>
1299         * sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
1300         primitives of generic actuals.
1301         (Mark_Use_Type): Add recursive call to properly mark class-wide type's
1302         base type clauses as per ARM 8.4 (8.2/3).
1304 2017-11-08  Ed Schonberg  <schonberg@adacore.com>
1306         * sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
1307         categorization dependency of the body, as is done for non-generic
1308         units.
1309         (New_Overloaded_Entity, Visible_Part_Type): Remove linear search
1310         through declarations (Simple optimization, no behavior change).
1312 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1314         * spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
1315         (SPARK_Scope_Record): Remove inessential components.
1316         * spark_xrefs.adb (dspark): Remove pretty-printing of removed record
1317         components.
1318         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
1319         removed record components.
1320         (Add_SPARK_Xrefs): Remove setting of removed record components.
1322 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1324         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
1325         empty entities.
1327 2017-11-08  Javier Miranda  <miranda@adacore.com>
1329         * sem_disp.adb (Is_Inherited_Public_Operation): Extend the
1330         functionality of this routine to handle multiple levels of derivations.
1332 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1334         * einfo.adb: Elist36 is now used as Nested_Scenarios.
1335         (Nested_Scenarios): New routine.
1336         (Set_Nested_Scenarios): New routine.
1337         (Write_Field36_Name): New routine.
1338         * einfo.ads: Add new attribute Nested_Scenarios along with occurrences
1339         in entities.
1340         (Nested_Scenarios): New routine along with pragma Inline.
1341         (Set_Nested_Scenarios): New routine along with pragma Inline.
1342         * sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
1343         (Process_Nested_Scenarios): New routine.
1344         (Traverse_Body): When a subprogram body is traversed for the first
1345         time, find, save, and process all suitable scenarios found within.
1346         Subsequent traversals of the same subprogram body utilize the saved
1347         scenarios.
1349 2017-11-08  Piotr Trojanek  <trojanek@adacore.com>
1351         * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
1352         protected operations.
1353         (Add_SPARK_Xrefs): Simplify detection of empty entities.
1354         * get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
1355         put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
1356         reading and testing SPARK cross-references stored in the ALI files.
1357         * lib-xref.ads (Output_SPARK_Xrefs): Remove.
1358         * lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
1359         ALI file.
1360         * spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
1361         with description of the SPARK xrefs ALI format.
1362         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
1363         and put_spark_refs.o.
1365 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1367         * exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
1368         when the associated access type is subject to pragma
1369         No_Heap_Finalization.
1370         * exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
1371         designated type in case it comes from a limited withed unit.
1373 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1375         * exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
1376         SPARK-related flags.  Add ??? comment.
1377         * exp_util.adb (Insert_Actions): Add an entry for node
1378         N_Variable_Reference_Marker.
1379         * sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
1380         * sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
1381         and record a variable reference marker for the current name.
1382         (Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
1383         a variable reference marker for the current name.
1384         * sem_elab.adb (Build_Variable_Reference_Marker): New routine.
1385         (Extract_Variable_Reference_Attributes): Reimplemented.
1386         (Info_Scenario): Add output for variable references and remove output
1387         for variable reads.
1388         (Info_Variable_Read): Removed.
1389         (Info_Variable_Reference): New routine.
1390         (Is_Suitable_Scenario): Variable references are now suitable scenarios
1391         while variable reads are not.
1392         (Output_Active_Scenarios): Add output for variable references and
1393         remove output for variable reads.
1394         (Output_Variable_Read): Removed.
1395         (Output_Variable_Reference): New routine.
1396         (Process_Variable_Read): Removed.
1397         (Process_Variable_Reference): New routine.
1398         (Process_Variable_Reference_Read): New routine.
1399         * sem_elab.ads (Build_Variable_Reference_Marker): New routine.
1400         * sem_res.adb (Resolve_Actuals): Build and record a variable reference
1401         marker for the current actual.
1402         * sem_spark.adb (Check_Node): Add an entry for node
1403         N_Variable_Reference_Marker.
1404         * sem_util.adb (Within_Subprogram_Call): Moved to the library level.
1405         * sem_util.ads (Within_Subprogram_Call): Moved to the library level.
1406         * sinfo.adb (Is_Read): New routine.
1407         (Is_Write): New routine.
1408         (Target): Updated to handle variable reference markers.
1409         (Set_Is_Read): New routine.
1410         (Set_Is_Write): New routine.
1411         (Set_Target): Updated to handle variable reference markers.
1412         * sinfo.ads: Add new attributes Is_Read and Is_Write along with
1413         occurrences in nodes. Update attribute Target. Add new node
1414         kind N_Variable_Reference_Marker.
1415         (Is_Read): New routine along with pragma Inline.
1416         (Is_Write): New routine along with pragma Inline.
1417         (Set_Is_Read): New routine along with pragma Inline.
1418         (Set_Is_Write): New routine along with pragma Inline.
1419         * sprint.adb (Sprint_Node_Actual): Add an entry for node
1420         N_Variable_Reference_Marker.
1422 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1424         * sem_util.adb (Subprogram_Name): Append suffix for overloaded
1425         subprograms.
1427 2017-11-08  Yannick Moy  <moy@adacore.com>
1429         * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
1430         about unused use-type or use-package clauses inside inlined bodies.
1432 2017-11-08  Hristian Kirtchev  <kirtchev@adacore.com>
1434         * sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
1435         In_Partial_Fin along with a comment on its usage. Do not guarantee the
1436         prior elaboration of a unit when the need came from a partial
1437         finalization context.
1438         (In_Initialization_Context): Relocated to Process_Call.
1439         (Is_Partial_Finalization_Proc): New routine.
1440         (Process_Access): Add new parameter In_Partial_Fin along with a comment
1441         on its usage.
1442         (Process_Activation_Call): Add new parameter In_Partial_Fin along with
1443         a comment on its usage.
1444         (Process_Activation_Conditional_ABE_Impl): Add new parameter
1445         In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1446         diagnostics when the activation occurs in a partial finalization
1447         context.
1448         (Process_Activation_Guaranteed_ABE_Impl): Add new parameter
1449         In_Partial_Fin along with a comment on its usage.
1450         (Process_Call): Add new parameter In_Partial_Fin along with a comment
1451         on its usage. A call is within a partial finalization context when it
1452         targets a finalizer or primitive [Deep_]Finalize, and the call appears
1453         in initialization actions. Pass this information down to the recursive
1454         steps of the Processing phase.
1455         (Process_Call_Ada): Add new parameter In_Partial_Fin along with a
1456         comment on its usage. Remove the guard which suppresses the generation
1457         of implicit Elaborate[_All] pragmas. This is now done in
1458         Ensure_Prior_Elaboration.
1459         (Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
1460         with a comment on its usage. Do not emit any ABE diagnostics when the
1461         call occurs in a partial finalization context.
1462         (Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
1463         comment on its usage.
1464         (Process_Instantiation): Add new parameter In_Partial_Fin along with a
1465         comment on its usage.
1466         (Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
1467         with a comment on its usage.
1468         (Process_Instantiation_Conditional_ABE): Add new parameter
1469         In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1470         diagnostics when the instantiation occurs in a partial finalization
1471         context.
1472         (Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
1473         with a comment on its usage.
1474         (Process_Scenario): Add new parameter In_Partial_Fin along  with a
1475         comment on its usage.
1476         (Process_Single_Activation): Add new parameter In_Partial_Fin along
1477         with a comment on its usage.
1478         (Traverse_Body): Add new parameter In_Partial_Fin along with a comment
1479         on its usage.
1481 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1483         * sem_ch13.adb: Add optional parameter to Error_Msg.
1485 2017-11-08  Jerome Lambourg  <lambourg@adacore.com>
1487         * fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
1488         for the Interfaces.* hierarchy as longer unit names are now allowed.
1490 2017-11-08  Arnaud Charlet  <charlet@adacore.com>
1492         * sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
1493         subprogram as well.  Support more cases of entities.
1494         (Append_Entity_Name): Add some defensive code.
1496 2017-11-06  Eric Botcazou  <ebotcazou@adacore.com>
1498         * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
1500 2017-10-31  Eric Botcazou  <ebotcazou@adacore.com>
1502         PR ada/82785
1503         * gcc-interface/Makefile.in (m68k/Linux): Fix typo.
1505 2017-10-21  Eric Botcazou  <ebotcazou@adacore.com>
1507         * gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
1509 2017-10-21  Eric Botcazou  <ebotcazou@adacore.com>
1511         * gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
1512         (convert): Do not use an unchecked conversion for converting from a
1513         type to another type padding it.
1515 2017-10-20  Doug Rupp  <rupp@adacore.com>
1517         * libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
1518         needed for using monotonic clock.
1519         * libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
1520         changes.
1521         * libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
1522         out monotonic clock related functions body.
1523         (Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
1524         Compute_Deadline): Move to...
1525         * libgnarl/s-tpopmo.adb: ... here. New separate package body.
1527 2017-10-20  Ed Schonberg  <schonberg@adacore.com>
1529         * sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
1530         case where the controlling formal is an anonymous access to interface
1531         type.
1532         * exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
1533         access type, handle properly the the constructed dereference that
1534         designates the object used in the rewritten synchronized call.
1535         (Parameter_Block_Pack): If the type of the actual is by-copy, its
1536         generated declaration in the parameter block does not need an
1537         initialization even if the type is a null-excluding access type,
1538         because it will be initialized with the value of the actual later on.
1539         (Parameter_Block_Pack): Do not add controlling actual to parameter
1540         block when its type is by-copy.
1542 2017-10-20  Justin Squirek  <squirek@adacore.com>
1544         * sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
1545         scope stack traversal into the context clause.
1547 2017-10-20  Bob Duff  <duff@adacore.com>
1549         * sinfo.ads: Fix a comment typo.
1551 2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1553         * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
1554         warning against usage in conjunction with -gnatn.
1555         (-fdump-xref): Delete entry.
1556         * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
1557         -fdump-xref switch.
1558         * gnat_ugn.texi: Regenerate.
1560 2017-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
1562         * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
1563         Minor reformatting.
1565 2017-10-20  Yannick Moy  <moy@adacore.com>
1567         * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
1568         compare a dimensioned expression with a literal.
1569         (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
1570         special value zero.
1571         * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
1572         dimensionality system in GNAT.
1573         * gnat_ugn.texi: Regenerate.
1575 2017-10-20  Yannick Moy  <moy@adacore.com>
1577         * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
1578         inadequate silencing of errors.
1579         * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
1580         checking the subprogram body generated from an expression function,
1581         when this is done as part of the preanalysis done on expression
1582         functions, as the subprogram body may not yet be attached in the AST.
1583         The error if any will be issued later during the analysis of the body.
1584         (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
1586 2017-10-20  Arnaud Charlet  <charlet@adacore.com>
1588         * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
1589         warning on ineffective use clause.
1591 2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1593         * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
1594         * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
1595         to issue the warning on the absence of local raise.
1596         (Possible_Local_Raise): Do not issue the warning for Call_Markers.
1597         (Warn_If_No_Local_Raise): New procedure to issue the warning on the
1598         absence of local raise.
1599         * sem_elab.adb: Add with and use clauses for Exp_Ch11.
1600         (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
1601         where a scenario could give rise to raising Program_Error.
1602         * sem_elab.adb: Typo fixes.
1603         * fe.h (Warn_If_No_Local_Raise): Declare.
1604         * gcc-interface/gigi.h (get_exception_label): Change return type.
1605         * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
1606         simple vector of Entity_Id.
1607         (gnu_storage_error_label_stack): Likewise.
1608         (gnu_program_error_label_stack): Likewise.
1609         (gigi): Adjust to above changes.
1610         (Raise_Error_to_gnu): Likewise.
1611         (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
1612         (N_Push_Constraint_Error_Label): Push the label onto the stack.
1613         (N_Push_Storage_Error_Label): Likewise.
1614         (N_Push_Program_Error_Label): Likewise.
1615         (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
1616         a warning on the absence of local raise.
1617         (N_Pop_Storage_Error_Label): Likewise.
1618         (N_Pop_Program_Error_Label): Likewise.
1619         (push_exception_label_stack): Delete.
1620         (get_exception_label): Change return type to Entity_Id and adjust.
1621         * gcc-interface/utils2.c (build_goto_raise): Change type of first
1622         parameter to Entity_Id and adjust.  Set TREE_USED on the label.
1623         (build_call_raise): Adjust calls to get_exception_label and also
1624         build_goto_raise.
1625         (build_call_raise_column): Likewise.
1626         (build_call_raise_range): Likewise.
1627         * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
1628         Document actual default behavior.
1630 2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
1632         * einfo.ads: Minor consistent punctuation in comment.  All numbered
1633         items in the comment of Is_Internal are now terminated with a period.
1635 2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
1637         * exp_util.adb (Build_Temporary): Mark created temporary entity as
1638         internal.
1640 2017-10-20  Piotr Trojanek  <trojanek@adacore.com>
1642         * sem_type.adb (In_Generic_Actual): Simplified.
1644 2017-10-20  Justin Squirek  <squirek@adacore.com>
1646         * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
1647         verify a renaming exists for a generic formal before comparing it to
1648         the actual as defaulted formals will not have a renamed_object.
1650 2017-10-20  Javier Miranda  <miranda@adacore.com>
1652         * exp_ch6.adb (Replace_Returns): Fix wrong management of
1653         N_Block_Statement nodes.
1655 2017-10-20  Bob Duff  <duff@adacore.com>
1657         * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
1658         component of an array aggregate if it is initialized by a
1659         build-in-place function call.
1660         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
1661         bip for nonlimited types.
1662         * debug.adb: Document -gnatd.9.
1664 2017-10-20  Bob Duff  <duff@adacore.com>
1666         * sem_ch12.adb: Remove redundant setting of Parent.
1668 2017-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1670         * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
1671         of the operands is a string literal.
1673 2017-10-20  Bob Duff  <duff@adacore.com>
1675         * einfo.ads: Comment fix.
1677 2017-10-20  Clement Fumex  <fumex@adacore.com>
1679         * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
1681 2017-10-20  Ed Schonberg  <schonberg@adacore.com>
1683         * sem_dim.adb (Extract_Power): Accept dimension values that are not
1684         non-negative integers when the dimensioned base type is an Integer
1685         type.
1687 2017-10-20  Bob Duff  <duff@adacore.com>
1689         * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
1690         that an allocator came from a b-i-p return statement.
1691         * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
1692         object of a nonlimited build-in-place function call.
1693         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
1694         Alloc_For_BIP_Return flag on generated allocators.
1695         * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
1696         If the N_Assignment_Statement has been transformed into something else,
1697         then Should_Transform_BIP_Assignment won't work.
1698         * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
1699         "Remove Adjust if we're building the return object of an extended
1700         return statement in place." Back out that part of the change, because
1701         the Alloc_For_BIP_Return flag is now used for that.
1703 2017-10-19  Bob Duff  <duff@adacore.com>
1705         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
1706         should be "T".  Handle case of a subtype of a class-wide type.
1708 2017-10-19  Bob Duff  <duff@adacore.com>
1710         * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
1711         which node kinds can legitimately be ignored, and raise Program_Error
1712         for others.
1714 2017-10-19  Hristian Kirtchev  <kirtchev@adacore.com>
1716         * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
1717         instantiation that acts as a compilation unit.
1718         (Find_Code_Unit): Reimplemented.
1719         (Find_Top_Unit): Reimplemented.
1720         (Find_Unit_Entity): New routine.
1721         (Process_Instantiation_SPARK): Correct the elaboration requirement a
1722         package instantiation imposes on a unit.
1724 2017-10-19  Bob Duff  <duff@adacore.com>
1726         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
1727         for a narrow set of controlled types.
1729 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
1731         * sinput.ads (Line_Start): Add pragma Inline.
1732         * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
1734 2017-10-19  Bob Duff  <duff@adacore.com>
1736         * exp_attr.adb (Expand_N_Attribute_Reference): Disable
1737         Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
1738         build-in-place function call so that the temp is declared in the right
1739         place.
1741 2017-10-18  Eric Botcazou  <ebotcazou@adacore.com>
1743         * gcc-interface/misc.c (gnat_tree_size): Move around.
1745         * gcc-interface/utils.c (max_size): Deal with SSA names.
1747 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
1749         * gcc-interface/misc.c (gnat_tree_size): New function.
1750         (LANG_HOOKS_TREE_SIZE): Redefine.
1752 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1754         * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
1755         Remote_Call_Interface is not a suitable preelaboratd context when the
1756         call appears in the package body.
1758 2017-10-14  Eric Botcazou  <ebotcazou@adacore.com>
1760         * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
1761         * layout.adb (Set_Elem_Alignment): Likewise.  Use M name as maximum
1762         alignment for consistency.  If Align is non-zero, use the minimum of
1763         Align and M for the alignment.
1764         * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
1765         setting the alignment directly.
1767 2017-10-14  Ed Schonberg  <schonberg@adacore.com>
1769         * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
1770         optional string in an Assert pragma until the expansion of the pragma
1771         has rewritten it as a conditional statement, so that the string
1772         argument is only evaluaed if the assertion fails. This is mandated by
1773         RM 11.4.2.
1775 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1777         * debug.adb: Switch -gnatd.v and associated flag are now used to
1778         enforce the SPARK rules for elaboration in SPARK code.
1779         * sem_elab.adb: Describe switch -gnatd.v.
1780         (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
1781         (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
1782         in effect.
1783         (Process_Variable_Assignment): Clarify why variable assignments are
1784         processed reglardless of whether -gnatd.v is in effect.
1785         * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
1786         sections on elaboration code and compilation switches.
1787         * gnat_ugn.texi: Regenerate.
1789 2017-10-14  Gary Dismukes  <dismukes@adacore.com>
1791         * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
1792         sem_warn.adb: Minor reformattings.
1794 2017-10-14  Ed Schonberg  <schonberg@adacore.com>
1796         * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
1797         for reverse iteration over formal containers.
1798         * gnat_rm.texi: Regenerate.
1800 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1802         * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
1803         Ensure_Prior_Elaboration_Dynamic for consistency reasons.
1804         (Ensure_Static_Prior_Elaboration): Renamed to
1805         Ensure_Prior_Elaboration_Static for consistency reasons.
1806         (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
1807         reflect its new purpose.
1808         (Is_Initialized): New routine.
1809         (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
1810         in order to reflect its new purpose.
1811         (Is_Variable_Read): New routine.
1812         (Output_Variable_Reference): Renamed to Output_Variable_Read in order
1813         to reflect its new purpose.
1814         (Process_Variable_Assignment): This routine now acts as a top level
1815         dispatcher for variable assignments.
1816         (Process_Variable_Assignment_Ada): New routine.
1817         (Process_Variable_Assignment_SPARK): New routine.
1818         (Process_Variable_Reference): Renamed to Process_Variable_Read in order
1819         to reflects its new purpose. A reference to a variable is now suitable
1820         for ABE processing only when it is a read. The logic in the routine now
1821         reflects the latest SPARK elaboration rules.
1823 2017-10-14  Justin Squirek  <squirek@adacore.com>
1825         * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
1826         triggers marking on formal subprograms.
1828 2017-10-14  Javier Miranda  <miranda@adacore.com>
1830         * checks.adb (Ensure_Valid): Do not skip adding the validity check on
1831         renamings of objects that come from the sources.
1833 2017-10-14  Eric Botcazou  <ebotcazou@adacore.com>
1835         * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
1836         parameter and set the alignment of the type to Align.
1837         (Copy_Float_Type): Adjust call to Build_Float_Type.
1838         (Register_Float_Type): Add pragma Unreferenced for Precision.  Adjust
1839         call to Build_Float_Type and do not set RM_Size and Alignment.
1841 2017-10-14  Patrick Bernardi  <bernardi@adacore.com>
1843         * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
1844         GNATRTL_NONTASKING_OBJ.
1846 2017-10-14  Bob Duff  <duff@adacore.com>
1848         * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
1849         enabling b-i-p for nonlimited controlled types (but disabled).
1851 2017-10-14  Justin Squirek  <squirek@adacore.com>
1853         * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
1854         Has_Warnings_Off with Warnings_Off.
1856 2017-10-14  Piotr Trojanek  <trojanek@adacore.com>
1858         * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
1860 2017-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1862         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
1863         enclosing package at the end of the visible declarations.
1864         * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
1865         an initialization item which is undefined due to some illegality.
1867 2017-10-14  Patrick Bernardi  <bernardi@adacore.com>
1869         * ali.adb: Add new ALI line 'T' to read the number of tasks contain
1870         within each unit that require a default-sized primary and secondary
1871         stack to be generated by the binder.
1872         (Scan_ALI): Scan new 'T' lines.
1873         * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
1874         * bindgen.adb (Gen_Output_File): Count the number of default-sized
1875         stacks within the closure that are to be created by the binder.
1876         (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
1877         stacks and record these in System.Secodnary_Stack.
1878         (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
1879         closure of the program being bound.
1880         * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
1881         * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
1882         (Expand_N_Object_Declaration): Count the number of default-sized stacks
1883         used by task objects contained within the object whose declaration is
1884         being expanded.  Only performed when either the restrictions
1885         No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
1886         effect.
1887         * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
1888         (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
1889         the expansion of a task type if the size of the stack is known at
1890         run-time and the restrictions No_Implicit_Heap_Allocations or
1891         No_Implicit_Task_Allocations are in effect.
1892         (Make_Task_Create_Call): If using a restricted profile provide
1893         secondary stack parameter: either the statically created stack or null.
1894         * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
1895         Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
1896         Unit_Record initialization expressions.
1897         * lib-writ.adb (Add_Preprocessing_Dependency,
1898         Ensure_System_Dependency): Include Primary_Stack_Count and
1899         Sec_Stack_Count in Unit_Record initialization expression.
1900         (Write_ALI): Write T lines.
1901         (Write_Unit_Information): Do not output 'T' lines if there are no
1902         stacks for the binder to generate.
1903         * lib-writ.ads: Updated library information documentation to include
1904         new T line entry.
1905         * lib.adb (Increment_Primary_Stack_Count): New routine.
1906         (Increment_Sec_Stack_Count): New routine.
1907         (Primary_Stack_Count): New routine.
1908         (Sec_Stack_Count): New routine.
1909         * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
1910         Unit_Record and updated documentation.
1911         (Increment_Primary_Stack_Count): New routine along with pragma Inline.
1912         (Increment_Sec_Stack_Count): New routine along with pragma Inline.
1913         (Primary_Stack_Count): New routine along with pragma Inline.
1914         (Sec_Stack_Count): New routine along with pragma Inline.
1915         * opt.ads: New constant No_Stack_Size.  Flag Default_Stack_Size
1916         redefined.  New flag Default_Sec_Stack_Size and
1917         Quantity_Of_Default_Size_Sec_Stacks.
1918         * rtfinal.c Fixed erroneous comment.
1919         * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
1920         System.Secondary_Stack to System.Parameters.  Add RE_SS_Stack.
1921         * sem_util.adb (Number_Of_Elements_In_Array): New routine.
1922         * sem_util.ads (Number_Of_Elements_In_Array): New routine.
1923         * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
1924         * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
1925         (Set_Sec_Stack_Addr): Removed routine.
1926         (Get_Sec_Stack): New routine.
1927         (Set_Sec_Stack): New routine.
1928         (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
1929         reflect new procedure and global names.
1930         * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
1931         libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
1932         libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
1933         parameter profile to allow the secondary stack size to be specified.
1934         * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
1935         profile to include Sec_Stack_Address.  Update Tasking.Initialize_ATCB
1936         call to remove Secondary_Stack_Size reference.  Add secondary stack
1937         address and size to SSL.Create_TSD call.
1938         (Task_Wrapper): Remove secondary stack creation.
1939         * libgnarl/s-tarest.ads (Create_Restricted_Task,
1940         Create_Restricted_Task_Sequential): Update parameter profile to include
1941         Sec_Stack_Address and clarify the Size parameter.
1942         * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
1943         from profile and body.
1944         (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
1945         * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
1946         Common_ATCB.
1947         (Initialize_ATCB): Update the parameter profile to remove
1948         Secondary_Stack_Size.
1949         * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
1950         call to Initialize_ATCB.  Add secondary stack address and size to
1951         SSL.Create_TSD call, and catch any storage exception from the call.
1952         (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
1953         new subprogram and component names.
1954         (Task_Wrapper): Remove secondary stack creation.
1955         (Vulnerable_Complete_Master): Update to reflect TSD changes.
1956         * libgnarl/s-tassta.ads: Reformat comments.
1957         (Create_Task): Update parameter profile.
1958         * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
1959         profile to include secondary stack size. Remove secondary size
1960         parameter from Initialize_ATCB call and add it to Create_TSD call.
1961         * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
1962         libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
1963         * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
1964         libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
1965         Percentage.  Remove constants Dynamic, Sec_Stack_Percentage and
1966         Sec_Stack_Dynamic.  Add constant Runtime_Default_Sec_Stack_Size and
1967         Sec_Stack_Dynamic.
1968         (Default_Sec_Stack_Size): New routine.
1969         * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
1970         now Preelaborate.
1971         * libgnat/s-soflin.adb: Removed unused with-clauses.  With
1972         System.Soft_Links.Initialize to initialize non-tasking TSD.
1973         (Create_TSD): Update parameter profile. Initialize the TSD and
1974         unconditionally call SS_Init.
1975         (Destroy_TSD): Update SST.SS_Free call.
1976         (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
1977         Set_Sec_Stack_Addr_Soft): Remove routines.
1978         (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
1979         Set_Sec_Stack_Soft): Add routines.
1980         (NT_TSD): Move to private part of package specification.
1981         * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
1982         with suppressed access checks.  Renamed *_Sec_Stack_Addr_* routines and
1983         objects to *_Sec_Stack_*.  TSD: removed warning suppression and
1984         component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
1985         (Create_TSD): Update parameter profile.
1986         (NT_TSD): Move to private section from body.
1987         * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
1988         * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
1989         * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
1990         Remove routine.
1991         (Get_Sec_Stack, Set_Sec_Stack): Add routine.
1992         (Thread_Body_Enter): Update parameter profile and body to adapt to new
1993         System.Secondary_Stack.
1994         (Init_RTS): Update body for new System.Soft_Links names.
1995         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
1996         s-soliin.o.
1998 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
2000         * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
2001         operating on trees as wide_ints.
2003 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2005         * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
2006         as a scoping construct when it is byproduct of exception handling.
2008 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2010         * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
2011         semantic field Target of node N_Call_Marker.
2013 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2015         * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
2016         attempts to copy a limited value, when the allocator is the expression
2017         in an expression function.
2019 2017-10-09  Joel Brobecker  <brobecker@adacore.com>
2021         * doc/share/conf.py: Tell the style checker that this is a Python
2022         fragment, and therefore that pyflakes should not be run to validate
2023         this file.
2025 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
2027         * einfo.ads (Is_Boolean_Type): Add pragma Inline.
2028         (Is_Entity_Name): Likewise.
2029         (Is_String_Type): Likewise.
2030         * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
2031         and remove useless comparisons on the base types.
2032         (Covers): Use simple tests for Standard_Void_Type.  Move up cheap tests
2033         on T2.  Always test Is_Private_Type before Full_View_Covers.
2035 2017-10-09  Bob Duff  <duff@adacore.com>
2037         * exp_ch4.adb: Minor refactoring.
2039 2017-10-09  Javier Miranda  <miranda@adacore.com>
2041         * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
2042         not components.
2044 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2046         * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
2047         are verified only in the static model.
2049 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2051         * sem_ch5.adb (Analyze_Iterator_Specification,
2052         Check_Reverse_Iteration): Check that the domain of iteration supports
2053         reverse iteration when it is a formal container.  This requires the
2054         presence of a Previous primitive in the Iterable aspect.
2055         * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
2056         primitives Last and Previous to support reverse iteration over formal
2057         containers.
2058         (Validate_Iterable_Aspect): Add check for reverse iteration operations.
2059         * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
2060         for reverse iteration using primitives Last and Previous in generated
2061         loop.
2063 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2065         * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
2066         of the Defining_Program_Unit_Name, which is an identifier, in order to
2067         construct the string for the fully qualified name.
2069 2017-10-09  Justin Squirek  <squirek@adacore.com>
2071         * sem_ch3.adb: Rename Uses_Unseen_Priv into
2072         Contains_Lib_Incomplete_Type.
2074 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2076         * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
2077         sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
2078         exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
2079         prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
2080         sem_ch10.adb, par-ch8.adb: Minor reformatting.
2082 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2084         * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
2085         in the static model.
2086         (Is_Suitable_Variable_Assignment): This scenario is now only relevant
2087         in the static model.
2088         (Is_Suitable_Variable_Reference): This scenario is now only relevant in
2089         the static model.
2091 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2093         * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
2094         expressions when the enclosing scope is a subprogram body and the next
2095         declaration is a body that freezes entities previously declared in the
2096         scope.
2098 2017-10-09  Justin Squirek  <squirek@adacore.com>
2100         * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
2101         ghost packages and living packages in use clauses.
2102         (Use_One_Type, Note_Redundant_Use): Correct warning messages
2104 2017-10-09  Justin Squirek  <squirek@adacore.com>
2106         * osint.ads: Document new parameter FD for Read_Source_File.
2108 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2110         * exp_util.adb (Make_Predicate_Call): If the type of the expression to
2111         which the predicate check applies is tagged, convert the expression to
2112         that type. This is in most cases a no-op, but is relevant if the
2113         expression is clas-swide, because the predicate function being invoked
2114         is not a primitive of the type and cannot take a class-wide actual.
2116 2017-10-09  Gary Dismukes  <dismukes@adacore.com>
2118         * exp_disp.adb: Minor reformatting.
2120 2017-10-09  Arnaud Charlet  <charlet@adacore.com>
2122         * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
2124 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2126         * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
2127         GNATprove.
2128         (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
2130 2017-10-09  Bob Duff  <duff@adacore.com>
2132         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
2133         immediately if the call has already been processed (by a previous call
2134         to Make_Build_In_Place_Call_In_Anonymous_Context).
2135         * sem_elab.adb: Minor typo fixes.
2137 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2139         * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
2140         predicate, do not replace an identifier that matches the type if the
2141         identifier is a selector in a selected component, because this
2142         indicates a reference to some homograph of the type itself, and  not to
2143         the current occurence in the predicate.
2145 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
2147         * repinfo.adb (List_Record_Layout): Tweak formatting.
2148         (Write_Val): Remove superfluous spaces in back-end layout mode.
2150 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
2152         * sem_res.adb (Property_Error): Remove.
2153         (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
2154         current wording of the rule.
2156 2017-10-09  Justin Squirek  <squirek@adacore.com>
2158         * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
2159         before analyzing a given scope due to an expression function.
2160         (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
2162 2017-10-09  Bob Duff  <duff@adacore.com>
2164         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
2165         Defining_Identifier (Obj_Decl) in two places, because it might have
2166         changed.
2167         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
2168         involving 'Input on (not visibly) derived types.
2170 2017-10-09  Hristian Kirtchev  <kirtchev@adacore.com>
2172         * atree.adb: Add new soft link Rewriting_Proc.
2173         (Rewrite): Invoke the subprogram attached to the rewriting soft link.
2174         (Set_Rewriting_Proc): New routine.
2175         * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
2176         (Set_Rewriting_Proc): New routine.
2177         * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
2178         for *E*laboration flag to maintain consistency with other elaboration
2179         flag generating subprograms.
2180         * debug.adb: Document the new usage of flag -gnatdL.
2181         * einfo.adb: Node19 is now used as Receiving_Entry.  Node39 is now used
2182         as Protected_Subprogram.  Flag148 is now used as
2183         Is_Elaboration_Checks_OK_Id.  Flag302 is now used as
2184         Is_Initial_Condition_Procedure.
2185         (Is_Elaboration_Checks_OK_Id): New routine.
2186         (Is_Initial_Condition_Procedure): New routine.
2187         (Protected_Subprogram): New routine.
2188         (Receiving_Entry): New routine.
2189         (SPARK_Pragma): Update assertion.
2190         (SPARK_Pragma_Inherited): Update assertion.
2191         (Suppress_Elaboration_Warnings): Removed.
2192         (Set_Is_Elaboration_Checks_OK_Id): New routine.
2193         (Set_Is_Initial_Condition_Procedure): New routine.
2194         (Set_Protected_Subprogram): New routine.
2195         (Set_Receiving_Entry): New routine.
2196         (Set_SPARK_Pragma): Update assertion.
2197         (Set_SPARK_Pragma_Inherited): Update assertion.
2198         (Write_Entity_Flags): Update the output for Flag148 and Flag302.
2199         (Write_Field19_Name): Add output for Receiving_Entry.
2200         (Write_Field39_Name): Add output for Protected_Subprogram.
2201         (Write_Field40_Name): Update the output for SPARK_Pragma.
2202         * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
2203         Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
2204         Remove attribute Suppress_Elaboration_Warnings.  Update the stricture
2205         of various entities.
2206         (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
2207         (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
2208         (Protected_Subprogram): New routine along with pragma Inline.
2209         (Receiving_Entry): New routine along with pragma Inline.
2210         (Suppress_Elaboration_Warnings): Removed.
2211         (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
2212         Inline.
2213         (Set_Is_Initial_Condition_Procedure): New routine along with pragma
2214         Inline.
2215         (Set_Protected_Subprogram): New routine along with pragma Inline.
2216         (Set_Receiving_Entry): New routine along with pragma Inline.
2217         (Set_Suppress_Elaboration_Warnings): Removed.
2218         * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
2219         consistency with other finalizer generating subprograms.
2220         (Default_Initialize_Object): Mark the block which wraps the call to
2221         finalize as being part of initialization.
2222         * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
2223         Initial_Condition.
2224         (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
2225         (Next_Suitable_Statement): Update the comment on usage. Skip over call
2226         markers generated by the ABE mechanism.
2227         * exp_ch9.adb (Activation_Call_Loc): New routine.
2228         (Add_Accept): Link the accept procedure to the original entry.
2229         (Build_Protected_Sub_Specification): Link the protected or unprotected
2230         version to the original subprogram.
2231         (Build_Task_Activation_Call): Code cleanup. Use a source location which
2232         is very close to the "begin" or "end" keywords when generating the
2233         activation call.
2234         * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
2235         * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
2236         process loops.
2237         (Expand_SPARK_N_Loop_Statement): New routine.
2238         (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
2239         call to the Default_Initial_Condition procedure.
2240         (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
2241         * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
2242         effect.
2243         (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
2244         (Insert_Actions): Add processing for N_Call_Marker.
2245         (Kill_Dead_Code): Explicitly kill an elaboration scenario.
2246         * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
2247         * frontend.adb: Initialize Sem_Elab. Process all saved top level
2248         elaboration scenarios for ABE issues.
2249         * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
2250         nodes.
2251         * lib.adb (Earlier_In_Extended_Unit): New variant.
2252         * sem.adb (Analyze): Ignore N_Call_Marker nodes.
2253         (Preanalysis_Active): New routine.
2254         * sem.ads (Preanalysis_Active): New routine.
2255         * sem_attr.adb (Analyze_Access_Attribute): Save certain
2256         elaboration-related attributes. Save the scenario for ABE processing.
2257         * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
2258         effect. Save certain elaboration-related attributes.
2259         * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
2260         attributes. Save the scenario for ABE processing.
2261         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
2262         mode in effect. Save certain elaboration-related attributes.
2263         (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
2264         locating the first real statement.
2265         (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
2266         certain elaboration-related attributes.
2267         * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
2268         elaboration warnings.
2269         * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
2270         generated for purposes of wrapping an attribute used as a generic
2271         actual.
2272         (Find_Direct_Name): Save certain elaboration-related attributes. Save
2273         the scenario for ABE processing.
2274         (Find_Expanded_Name): Save certain elaboration-related attributes. Save
2275         the scenario for ABE processing.
2276         * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
2277         elaboration-related attributes.
2278         (Analyze_Requeue): Save certain elaboration-related attributes. Save
2279         the scenario for ABE processing.
2280         (Analyze_Single_Task_Declaration): Save certain elaboration-related
2281         attributes.
2282         (Analyze_Task_Type_Declaration): Save certain elaboration-related
2283         attributes.
2284         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
2285         elaboration-related attributes.
2286         (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
2287         effect. Save certain elaboration-related attributes.
2288         (Analyze_Package_Instantiation): Save certain elaboration-related
2289         attributes.  Save the scenario for ABE processing. Create completing
2290         bodies in case the instantiation results in a guaranteed ABE.
2291         (Analyze_Subprogram_Instantiation): Save certain elaboration-related
2292         attributes Save the scenario for ABE processing. Create a completing
2293         body in case the instantiation results in a guaranteed ABE.
2294         (Provide_Completing_Bodies): New routine.
2295         * sem_elab.ads: Brand new implementation.
2296         * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
2297         Elaborate_Body): Do not suppress elaboration warnings.
2298         * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
2299         operator.
2300         (Resolve_Call): Save certain elaboration-related attributes. Save the
2301         scenario for ABE processing.
2302         (Resolve_Entity_Name): Do not perform any ABE processing here.
2303         (Resolve_Entry_Call): Inherit certain attributes from the original call.
2304         * sem_util.adb (Begin_Keyword_Location): New routine.
2305         (Defining_Entity): Update the parameter profile. Add processing for
2306         concurrent subunits that are rewritten as null statements.
2307         (End_Keyword_Location): New routine.
2308         (Find_Enclosing_Scope): New routine.
2309         (In_Instance_Visible_Part): Code cleanup.
2310         (In_Subtree): Update the parameter profile. Add new version.
2311         (Is_Preelaborable_Aggregate): New routine.
2312         (Is_Preelaborable_Construct): New routine.
2313         (Mark_Elaboration_Attributes): New routine.
2314         (Scope_Within): Update the parameter profile.
2315         (Scope_Within_Or_Same): Update the parameter profile.
2316         * sem_util.ads (Begin_Keyword_Location): New routine.
2317         (Defining_Entity): Update the parameter profile and the comment on
2318         usage.
2319         (End_Keyword_Location): New routine.
2320         (Find_Enclosing_Scope): New routine.
2321         (In_Instance_Visible_Part): Update the parameter profile.
2322         (In_Subtree): Update the parameter profile. Add new version.
2323         (Is_Preelaborable_Aggregate): New routine.
2324         (Is_Preelaborable_Construct): New routine.
2325         (Mark_Elaboration_Attributes): New routine.
2326         (Scope_Within): Update the parameter profile and the comment on usage.
2327         (Scope_Within_Or_Same): Update the parameter profile and the comment on
2328         usage.
2329         * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
2330         to determine whether a loop has meaningful condition actions.
2331         (Has_Condition_Actions): New routine.
2332         * sinfo.adb (ABE_Is_Certain): Removed.
2333         (Is_Declaration_Level_Node): New routine.
2334         (Is_Dispatching_Call): New routine.
2335         (Is_Elaboration_Checks_OK_Node): New routine.
2336         (Is_Initialization_Block): New routine.
2337         (Is_Known_Guaranteed_ABE): New routine.
2338         (Is_Recorded_Scenario): New routine.
2339         (Is_Source_Call): New routine.
2340         (Is_SPARK_Mode_On_Node): New routine.
2341         (No_Elaboration_Check): Removed.
2342         (Target): New routine.
2343         (Was_Attribute_Reference): New routine.
2344         (Set_ABE_Is_Certain): Removed.
2345         (Set_Is_Declaration_Level_Node): New routine.
2346         (Set_Is_Dispatching_Call): New routine.
2347         (Set_Is_Elaboration_Checks_OK_Node): New routine.
2348         (Set_Is_Initialization_Block): New routine.
2349         (Set_Is_Known_Guaranteed_ABE): New routine.
2350         (Set_Is_Recorded_Scenario): New routine.
2351         (Set_Is_Source_Call): New routine.
2352         (Set_Is_SPARK_Mode_On_Node): New routine.
2353         (Set_No_Elaboration_Check): Removed.
2354         (Set_Target): New routine.
2355         (Set_Was_Attribute_Reference): New routine.
2356         * sinfo.ads: Remove attribute ABE_Is_Certain.  Attribute
2357         Do_Discriminant_Check now utilizes Flag3.  Attribute
2358         No_Side_Effect_Removal now utilizes Flag17.  Add new node
2359         N_Call_Marker.  Update the structure of various nodes.
2360         (ABE_Is_Certain): Removed along with pragma Inline.
2361         (Is_Declaration_Level_Node): New routine along with pragma Inline.
2362         (Is_Dispatching_Call): New routine along with pragma Inline.
2363         (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
2364         (Is_Initialization_Block): New routine along with pragma Inline.
2365         (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2366         (Is_Recorded_Scenario): New routine along with pragma Inline.
2367         (Is_Source_Call): New routine along with pragma Inline.
2368         (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2369         (No_Elaboration_Check): Removed along with pragma Inline.
2370         (Target): New routine along with pragma Inline.
2371         (Was_Attribute_Reference): New routine along with pragma Inline.
2372         (Set_ABE_Is_Certain): Removed along with pragma Inline.
2373         (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
2374         (Set_Is_Dispatching_Call): New routine along with pragma Inline.
2375         (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
2376         Inline.
2377         (Set_Is_Initialization_Block): New routine along with pragma Inline.
2378         (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2379         (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
2380         (Set_Is_Source_Call): New routine along with pragma Inline.
2381         (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2382         (Set_No_Elaboration_Check): Removed along with pragma Inline.
2383         (Set_Target): New routine along with pragma Inline.
2384         (Set_Was_Attribute_Reference): New routine along with pragma Inline.
2385         * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
2387 2017-10-09  Bob Duff  <duff@adacore.com>
2389         * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
2391 2017-10-09  Bob Duff  <duff@adacore.com>
2393         * freeze.ads: Minor comment fixed.
2395 2017-10-09  Bob Duff  <duff@adacore.com>
2397         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
2398         care of unchecked conversions in addition to regular conversions. This
2399         takes care of a case where a type is derived from a private untagged
2400         type that is completed by a tagged controlled type.
2402 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2404         * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
2405         rewriting a class-wide condition, handle properly the case where the
2406         controlling argument of the operation to which the condition applies is
2407         an access to a tagged type, and the condition includes a dispatching
2408         call with an implicit dereference.
2410 2017-10-09  Bob Duff  <duff@adacore.com>
2412         * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
2413         the code at the end of this procedure that was setting the type of a
2414         class-wide object to the specific type returned by a function call.
2415         Treat this case as indefinite instead.
2417 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2419         * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
2420         Suppress spurious ambiguity error when two traversals of the homonym
2421         chain (first directly, and then through an examination of relevant
2422         interfaces) retrieve the same operation, when other irrelevant homonyms
2423         of the operatioh are also present.
2425 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2427         * sem_util.adb (Object_Access_Level): If the object is the return
2428         statement of an expression function, return the level of the function.
2429         This is relevant when the object involves an implicit conversion
2430         between access types and the expression function is a completion, which
2431         forces the analysis of the expression before rewriting it as a body, so
2432         that freeze nodes can appear in the proper scope.
2434 2017-10-09  Bob Duff  <duff@adacore.com>
2436         * atree.adb: Make nnd apply to everything "interesting", including
2437         Rewrite.  Remove rrd.
2439 2017-10-09  Javier Miranda  <miranda@adacore.com>
2441         * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
2442         processing the declaration of the dummy object internally created by
2443         Make_DT to compute the offset to the top of components referencing
2444         secondary dispatch tables.
2445         (Initialize_Tag): Do not initialize the offset-to-top field if it has
2446         been initialized initialized.
2447         * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
2448         * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
2449         (Make_DT): Create a dummy constant object if we can statically build
2450         secondary dispatch tables.
2451         (Make_Secondary_DT): For statically allocated secondary dispatch tables
2452         use the dummy object to compute the offset-to-top field value by means
2453         of the attribute 'Position.
2455 2017-10-09  Bob Duff  <duff@adacore.com>
2457         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
2458         code so if BIPAlloc is not passed in, it will likely raise
2459         Program_Error instead of cause miscellaneous chaos.
2460         (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
2461         as for the other Is_B-I-P... functions.
2462         * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
2463         aggregate whose ancestor part is a build-in-place call returning a
2464         nonlimited type, transform the assignment to the ancestor part to use a
2465         temp.
2466         * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
2467         creating an Itype for a library unit entity.
2468         (Check_Initialization): Avoid spurious error message on
2469         internally-generated call.
2470         * sem_ch5.adb (Analyze_Assignment): Handle the case where the
2471         right-hand side is a build-in-place call. This didn't happen when b-i-p
2472         was only for limited types.
2473         * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
2474         implies >= Ada 2005.
2475         * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
2476         repeatedly.
2477         * sem_util.adb (Next_Actual): Handle case of build-in-place call.
2479 2017-10-09  Arnaud Charlet  <charlet@adacore.com>
2481         * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
2483 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
2485         * libgnarl/s-taprob.adb: Minor whitespace fix.
2487 2017-10-09  Bob Duff  <duff@adacore.com>
2489         * namet.ads: Minor comment fix.
2491 2017-10-09  Piotr Trojanek  <trojanek@adacore.com>
2493         * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
2494         just like other program units listed in Ada RM 10.1(1).
2496 2017-10-09  Justin Squirek  <squirek@adacore.com>
2498         * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
2500 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2502         * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
2503         actual for a formal package is an instantiation of a child unit, create
2504         a freeze node for the instance of the parent if it appears in the same
2505         scope and is not frozen yet.
2507 2017-10-09  Pierre-Marie de Rodat  <derodat@adacore.com>
2509         * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
2510         in-source documentation for tagged types's Offset_To_Top.
2512 2017-10-09  Bob Duff  <duff@adacore.com>
2514         * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
2515         confusing.  Same for N_Loc.  Remove assumption that b-i-p implies
2516         limited.  This is for the case of a function call that occurs as the
2517         default for a record component.
2518         (Expand_N_Object_Declaration): Deal with the case where expansion has
2519         created an object declaration initialized with something like
2520         F(...)'Reference.
2521         * exp_ch3.adb: Minor reformatting.
2523 2017-10-09  Ed Schonberg  <schonberg@adacore.com>
2525         * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
2526         the attribute is an object, but it may appear within a conversion. The
2527         object itself must be retrieved when generating the range test that
2528         implements the validity check on a scalar type.
2530 2017-10-05  Eric Botcazou  <ebotcazou@adacore.com>
2532         PR ada/82393
2533         * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
2534         * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
2536 2017-10-02  Eric Botcazou  <ebotcazou@adacore.com>
2537             Pierre-Marie de Rodat  <derodat@adacore.com>
2539         PR ada/82384
2540         * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
2541         (time_t): Change from derived type to subtype.
2542         (timeval): Use suseconds_t for tv_usec.
2543         * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
2545 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
2547         * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
2548         handling the form (plus/mult (convert @0) @1).
2550 2017-09-29  Bob Duff  <duff@adacore.com>
2552         * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
2553         what we had before.
2554         (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
2555         change. Set the Etype in the class-wide case. This fixes a regression
2556         in the libadalang test suite.
2558 2017-09-29  Joel Brobecker  <brobecker@adacore.com>
2560         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2561         doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
2562         in comment markup.
2563         * gnat_ugn.texi: Regenerate.
2565 2017-09-29  Justin Squirek  <squirek@adacore.com>
2567         * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
2568         fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
2569         gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
2570         sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
2571         for checking source file status and error message and/or call to
2572         Read_Source_File.
2573         * libgnat/s-os_lib.ads: Add new potential value constant for
2574         uninitialized file descriptors.
2575         * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
2576         return result of IO to encompass a read access failure in addition to a
2577         file-not-found error.
2579 2017-09-29  Bob Duff  <duff@adacore.com>
2581         * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
2582         functions returning nonlimited types. Allow for qualified expressions
2583         and type conversions.
2584         (Expand_N_Extended_Return_Statement): Correct the computation of
2585         Func_Bod to allow for child units.
2586         (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
2587         limited (initialization of In_Place_Expansion), and implies >= Ada
2588         2005.
2589         (Is_Build_In_Place_Result_Type): New function to accompany
2590         Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
2591         sometimes we just have the type on our hands, not the function.  For
2592         now, does the same thing as the old version, so build-in-place is
2593         disabled for nonlimited types, except that you can use -gnatd.9 to
2594         enable it.
2595         * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
2596         accompany Is_Build_In_Place_Function and
2597         Is_Build_In_Place_Function_Call, because sometimes we just have the
2598         type on our hands, not the function.
2599         (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
2600         cases.
2601         (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
2602         questionable code at the end that was setting the Etype.
2603         * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
2604         determine whether "return (...agg...);" is returning from a
2605         build-in-place function.
2606         (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
2607         Remove assumption that b-i-p implies limited (initialization of
2608         In_Place_Expansion).
2609         (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
2610         an unchecked conversion.  Add assertions.
2611         (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
2612         secondary stack here, just because the type needs finalization.  That
2613         code is obsolete.
2614         (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
2615         For "return (...agg...);" don't assume b-i-p implies limited.
2616         Needs_Finalization does not imply secondary stack.
2617         (Expand_Array_Aggregate): Named notation.  Reverse the sense of
2618         Component_OK_For_Backend -- more readability with fewer double
2619         negatives.
2620         * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
2621         b-i-p implies >= Ada 2005.
2622         * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
2623         b-i-p implies >= Ada 2005.  Remove Adjust if we're building the return
2624         object of an extended return statement in place.
2625         * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
2626         Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
2627         b-i-p implies >= Ada 2005.
2628         * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
2629         b-i-p implies >= Ada 2005.
2630         * exp_ch7.adb: Comment fix.
2631         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
2632         assumptions that b-i-p implies >= Ada 2005.
2633         * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
2634         b-i-p implies >= Ada 2005.
2635         * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
2636         (Expr), in case Pool_Id is not set.
2637         (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
2638         qualified or converted.
2639         (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
2640         (Param)) = N_Identifier; that's all it could be.
2641         * sinfo.ads: Comment fixes.
2642         * snames.ads-tmpl: Comment fixes.
2643         * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
2645 2017-09-29  Justin Squirek  <squirek@adacore.com>
2647         * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
2648         all cases related to marking entity identifiers.
2650 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
2652         * adaint.c (win32_wait): Properly handle error and take into account
2653         the WIN32 limitation on the number of simultaneous wait objects.
2655 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
2657         * cal.c: Minor proofreading.
2659 2017-09-29  Vasiliy Fofanov  <fofanov@adacore.com>
2661         * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
2662         * gnat_ugn.texi: Regenerate.
2664 2017-09-29  Bob Duff  <duff@adacore.com>
2666         * lib-xref.ads: Comment fix.
2668 2017-09-29  Bob Duff  <duff@adacore.com>
2670         * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
2671         Discriminants can't need finalization.
2673 2017-09-29  Ed Schonberg  <schonberg@adacore.com>
2675         * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
2676         for types in expression if the function is within a generic unit.
2677         * sem_res.adb (Resolve): In a generic context do not freeze an
2678         expression, unless it is an entity. This exception is solely for the
2679         purpose of detecting illegal uses of deferred constants in generic
2680         units.
2681         * sem_res.adb: Minor reformatting.
2683 2017-09-29  Justin Squirek  <squirek@adacore.com>
2685         * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
2686         redundant warnings.
2688 2017-09-29  Yannick Moy  <moy@adacore.com>
2690         * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
2692 2017-09-29  Eric Botcazou  <ebotcazou@adacore.com>
2694         * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
2695         * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
2696         Document the effect of pragma Optimize_Alignment (Space) on non-packed
2697         record types.
2698         * gnat_rm.texi: Regenerate.
2700 2017-09-25  Justin Squirek  <squirek@adacore.com>
2702         * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
2703         exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
2704         gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
2705         gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
2706         libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
2707         libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
2708         libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
2709         libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
2710         libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
2711         libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
2712         put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
2713         sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
2714         Removal of ineffective use-clauses.
2715         * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
2716         constant folded barriers.
2717         * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
2718         Subtype_Marks and Names list in use-clause nodes to their new singular
2719         counterparts (e.g. Subtype_Mark, Name).
2720         * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
2721         Prev_Ids and More_Ids in use-clause nodes.
2722         (P_Use_Clause): Modify to take a list as a parameter.
2723         (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
2724         subtype_marks within an aggregate use-clauses into individual clauses.
2725         * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
2726         P_Use_Clause to match its new behavior.
2727         * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
2728         * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
2729         errors.
2730         * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
2731         Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
2732         the declarative region.
2733         * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
2734         after analysis (Analyze_Package_Specification): Update use clause chain
2735         when there is no body.
2736         * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
2737         parameter to determine weither the installation of scopes should also
2738         propagate on the use-clause "chain".
2739         (Mark_Use_Clauses): Created to traverse use-clause chains and determine
2740         what constitutes a valid "use" of a clause.
2741         (Update_Use_Clause_Chain): Created to aggregate common machinary used
2742         to clean up use-clause chains (and warn on ineffectiveness) at the end
2743         of declaritive regions.
2744         * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
2745         package name from a use-package clause.
2746         (Analyze_Package_Name_List): Created to perform analysis on a list of
2747         package names (similar to Analyze_Package_Name).
2748         (Find_Most_Prev): Created to traverse to the beginning of a given
2749         use-clause chain.
2750         (Most_Decendant_Use_Clause): Create to identify which clause from a
2751         given set is highest in scope (not always the most prev).
2752         (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
2753         handle the new chaining algorithm, also many changes related to
2754         redundant clauses. A new parameter has also been added to force
2755         installation to handle certain cases.
2756         * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
2757         Analyze_Task_Body): Mark use clauses on relevant entities.
2758         * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
2759         Install_Parents): Add parameter to determine weither the installation
2760         of scopes should also propagate on the use-clause "chain".
2761         * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
2762         Install_Context to avoid redundant chaining of use-clauses.
2763         * sem_ch13.adb: Minor reformatting.
2764         * sem_res.adb (Resolve): Mark use clauses on operators.
2765         (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
2766         entities.
2767         * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
2768         Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
2769         represent any given clause's usage/reference/necessity.
2770         (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
2771         nodes to allow loose chaining of redundant clauses.
2772         (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
2773         Set_More_Ids, Set_Name): Modify set procedure calls to reflect
2774         reorganization in node fields.
2775         * types.ads (Source_File_Index): Adjust index bounds.
2776         (No_Access_To_Source_File): New constant.
2778 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2780         * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
2781         the expression to be used in the generated attribute specification
2782         (rather than relocating it) to avoid resolving a potentially malformed
2783         tree when the expression is resolved through an ASIS-specific call to
2784         Resolve_Aspect_Expressions.  This manifests itself as a crash on a
2785         function with parameter associations.
2787 2017-09-25  Yannick Moy  <moy@adacore.com>
2789         * exp_spark.adb (Expand_SPARK_Indexed_Component,
2790         Expand_SPARK_Selected_Component): New procedures to insert explicit
2791         dereference if required.
2792         (Expand_SPARK): Call the new procedures.
2794 2017-09-25  Patrick Bernardi  <bernardi@adacore.com>
2796         * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
2797         libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
2798         libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
2799         libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
2800         libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
2802 2017-09-25  Vasiliy Fofanov  <fofanov@adacore.com>
2804         * adaint.c (win32_wait): Properly handle error and take into account
2805         the WIN32 limitation on the number of simultaneous wait objects.
2807 2017-09-25  Yannick Moy  <moy@adacore.com>
2809         * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
2810         invariant procedure in GNATprove mode.
2811         * sem_ch5.adb (Analyze_Assignment): Likewise.
2813 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
2815         * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
2816         "back-end" in comments.
2818 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2820         * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
2821         call that appears in a classwide precondition and that mentions an
2822         access formal of the subprogram, must use the accessibility level of
2823         the actual in the call. This is one case in which a reference to a
2824         formal parameter appears outside of the body of the subprogram.
2826 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2828         * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
2829         for GNATprove.
2830         (Resolve_Entry): Clean up predicate
2832 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2834         * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
2835         than Program_Error because U_E is more in line with respect to the
2836         intended behavior.
2838 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2840         * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
2841         Storage_Size does not freeze, and thus can include references to
2842         deferred constants.
2844 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2846         * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
2847         reference when it appears within a pragma of no significance to SPARK.
2848         (In_Insignificant_Pragma): New routine.
2849         * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
2851 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2853         * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
2854         actual is a renaming, indicate that it is the renamed package that must
2855         be frozen before the instantiation.
2857 2017-09-25  Yannick Moy  <moy@adacore.com>
2859         * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
2860         of dimensionality system in GNAT UG.
2861         * gnat_ugn.texi: Regenerate.
2863 2017-09-25  Yannick Moy  <moy@adacore.com>
2865         * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
2866         GNATprove_Mode when switch -gnatdF used.
2868 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
2870         * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
2871         the backend.
2873 2017-09-25  Javier Miranda  <miranda@adacore.com>
2875         * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
2876         expansion of user-defined enumeration types when the generation of
2877         names for enumeration literals is suppressed.
2879 2017-09-25  Gary Dismukes  <dismukes@adacore.com>
2881         * libgnarl/s-taprop__linux.adb: Minor reformatting.
2883 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2885         * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
2886         that appear as selector names of parameter associations, as these are
2887         never resolved by visibility.
2889 2017-09-25  Justin Squirek  <squirek@adacore.com>
2891         * sem_res.adb (Resolve_Entry): Generate reference for index entities.
2893 2017-09-25  Doug Rupp  <rupp@adacore.com>
2895         * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
2897 2017-09-25  Javier Miranda  <miranda@adacore.com>
2899         * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
2900         (Expand_User_Defined_Enumeration_Image): New subprogram.
2901         (Expand_Image_Attribute): Enable speed-optimized expansion of
2902         user-defined enumeration types when we are compiling with optimizations
2903         enabled.
2905 2017-09-25  Piotr Trojanek  <trojanek@adacore.com>
2907         * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
2908         routine is already provided by Einfo.
2909         * einfo.adb (Has_Null_Abstract_State): Replace with the body from
2910         Sem_Util, which had better comments and avoided double calls to
2911         Abstract_State.
2913 2017-09-25  Bob Duff  <duff@adacore.com>
2915         * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
2917 2017-09-25  Doug Rupp  <rupp@adacore.com>
2919         * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
2920         (Compute_Base_Monotonic_Clock): New function.
2921         (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
2922         (Timed_Delay): Likewise.
2923         (Monotonic_Clock): Likewise.
2924         * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
2926 2017-09-25  Ed Schonberg  <schonberg@adacore.com>
2928         * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
2929         previous change.
2931 2017-09-25  Hristian Kirtchev  <kirtchev@adacore.com>
2933         * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
2934         Minor reformatting.
2936 2017-09-20  Alexandre Oliva <aoliva@redhat.com>
2938         * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
2940 2017-09-18  Bob Duff  <duff@adacore.com>
2942         * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
2943         reference types in the access-to-access case.
2945 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
2947         * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
2948         of the "aliased" keyword on the prefix from here to...
2949         (Resolve_Attribute) <Attribute_Access>: ...here.  Remove useless call
2950         to Check_No_Implicit_Aliasing.
2951         * sinfo.ads (Non_Aliased_Prefix): Delete.
2952         (Set_Non_Aliased_Prefix): Likewise.
2953         * sinfo.adb (Non_Aliased_Prefix): Delete.
2954         (Set_Non_Aliased_Prefix): Likewise.
2956 2017-09-18  Bob Duff  <duff@adacore.com>
2958         * exp_ch5.adb (Build_Formal_Container_Iteration,
2959         Expand_Formal_Container_Element_Loop): Convert the container to the
2960         root type before passing it to the iteration operations, so it will be
2961         of the right type.
2963 2017-09-18  Bob Duff  <duff@adacore.com>
2965         * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
2967 2017-09-18  Bob Duff  <duff@adacore.com>
2969         * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
2970         and it's a bit-packed array, pass False to the Consider_IS parameter of
2971         Needs_Simple_Initialization.
2973 2017-09-18  Hristian Kirtchev  <kirtchev@adacore.com>
2975         * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
2976         the preexisting body.
2977         * sem_prag.adb (Check_Inline_Always_Placement): New routine.
2978         (Process_Inline): Verify the placement of pragma Inline_Always. The
2979         pragma must now appear on the initial declaration of the related
2980         subprogram.
2982 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
2984         * sem_ch3.adb (Analyze_Declarations): In ASIS mode,  At the end of the
2985         declarative list in a subprogram body, analyze aspext specifications to
2986         provide basic semantic information, because otherwise the aspect
2987         specifications might only be snalyzed during expansion, when related
2988         subprograms are generated.
2990 2017-09-18  Bob Duff  <duff@adacore.com>
2992         * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
2993         validity checks have rewritten the tree.
2995 2017-09-18  Bob Duff  <duff@adacore.com>
2997         * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
2999 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
3001         * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
3002         qualified exxpression for an aggregate in a generic unit, verify that
3003         the scope of the type is itself visible and not hidden, so that the
3004         qualified expression is correctly resolved in any instance.
3006 2017-09-18  Bob Duff  <duff@adacore.com>
3008         * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
3009         mark refers to the current instance. Set the type to Any_Type in that
3010         case, to avoid later crashes.
3012 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
3014         * exp_ch3.adb (Replace_Discriminant_References): New procedure,
3015         subsidiary of Build_Assignment, used to handle the initialization code
3016         for a mutable record component whose default value is an aggregate that
3017         sets the values of the discriminants of the components.
3019 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
3021         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
3022         the entity as being volatile for an overlay that toggles the scalar
3023         storage order.
3025 2017-09-18  Fedor Rybin  <frybin@adacore.com>
3027         * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
3028         options -U main and --harness-only are not compatible.
3030 2017-09-18  Hristian Kirtchev  <kirtchev@adacore.com>
3032         * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
3034 2017-09-18  Piotr Trojanek  <trojanek@adacore.com>
3036         * einfo.ads (Is_Imported): Update comment, as this
3037         routine also applies to constants.
3039 2017-09-18  Yannick Moy  <moy@adacore.com>
3041         * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
3042         holding state.
3044 2017-09-18  Justin Squirek  <squirek@adacore.com>
3046         * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
3047         constant indication for Pragma_Linker_Section.
3049 2017-09-18  Bob Duff  <duff@adacore.com>
3051         Alternate fix for PR ada/71358
3052         * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
3053         Instead, make a local copy of Config, and if it's null, allocate an
3054         empty Command_Line_Configuration_Record, so we won't crash on null
3055         pointer dereference.
3057 2017-09-16  Eric Botcazou  <ebotcazou@adacore.com>
3059         * libgnarl/a-intnam__rtems.ads: Update copyright date.
3060         * libgnarl/s-interr__hwint.adb: Likewise.
3061         * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
3062         * libgnarl/s-osinte__rtems.adb: Likewise.
3063         * libgnarl/s-osinte__rtems.ads: Likewise.
3065 2017-09-13  Nicolas Roche  <roche@adacore.com>
3067         * Make-lang.in: In the fallback mechanim, parse the associated .ali
3068         file and try to guess the locations of dependencies.
3070 2017-09-13  Eric Botcazou  <ebotcazou@adacore.com>
3072         * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
3073         the suppression status of Alignment_Check on the current scope.
3074         (Alignment_Checks_Suppressed): New function to use the saved instead of
3075         the current suppression status of Alignment_Check.
3076         (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
3077         (Analyze_Attribute_Definition_Clause): Instead of manually appending to
3078         the table, call Register_Address_Clause_Check.
3079         (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
3080         recorded address clause instead of its entity.
3082 2017-09-13  Jerome Guitton  <guitton@adacore.com>
3084         * libgnarl/s-tpopsp__vxworks-tls.adb,
3085         libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
3086         (Self): Register thread if task id is null.
3088 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
3090         * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
3092 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
3094         * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
3095         from an entity to only scope index, as a mapping from an entity to the
3096         same entity was useless.
3097         (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
3098         to E.
3099         (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
3100         to E.
3101         (Is_Constant_Object_Without_Variable_Input): remove local "Result"
3102         variable, just use return statements.
3104 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
3106         * libgnarl/s-vxwext__kernel-smp.adb,
3107         libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
3108         New file.
3110 2017-09-13  Hristian Kirtchev  <kirtchev@adacore.com>
3112         * einfo.adb: Flag42 is now Is_Controlled_Active.
3113         (Is_Controlled): This attribute is now synthesized.
3114         (Is_Controlled_Active): This attribute is now an explicit flag rather
3115         than a synthesized attribute.   (Set_Is_Controlled): Removed.
3116         (Set_Is_Controlled_Active): New routine.
3117         (Write_Entity_Flags): Update the output for Flag42.
3118         * einfo.ads: Update the documentation of the following attributes:
3119         Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
3120         and Is_Controlled_Active have swapped their functionality.
3121         (Is_Controlled): Renamed to Is_Controlled_Active.
3122         (Is_Controlled_Active): Renamed to Is_Controlled.
3123         (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
3124         * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
3125         Is_Controlled.
3126         * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
3127         (Needs_Finalization): Code clean up. Remove the tests for
3128         Disable_Controlled because a) they were incorrect as they would reject
3129         a type which is sublect to the aspect, but may contain controlled
3130         components, and b) they are no longer necessary.
3131         * exp_util.ads (Needs_Finalization): Update comment on documentation.
3132         * freeze.adb (Freeze_Array_Type): Restore the original use of
3133         Is_Controlled.
3134         (Freeze_Record_Type): Restore the original use of Is_Controlled.
3135         * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
3136         Is_Controlled.
3137         (Array_Type_Declaration): Restore the original use of Is_Controlled.
3138         (Build_Derived_Private_Type): Restore the original use of
3139         Is_Controlled.
3140         (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
3141         type derived from Ada.Finalization.[Limited_]Controlled.
3142         (Build_Derived_Type): Restore the original use of Is_Controlled.
3143         (Record_Type_Definition): Restore the original use of Is_Controlled.
3144         * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
3145         Is_Controlled.
3146         * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
3147         (Analyze_Aspect_Specifications): Use routine
3148         Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
3150 2017-09-13  Vincent Celier  <celier@adacore.com>
3152         * clean.adb (Gnatclean): Fix error when looking for target
3153         of <target>-gnatclean
3155 2017-09-13  Javier Miranda  <miranda@adacore.com>
3156             Ed Schonberg  <schonberg@adacore.com>
3158         * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
3159         expanded name that designates the current instance of a child unit in
3160         its own body and appears as the prefix of a reference to an entity
3161         local to the child unit.
3163 2017-09-12  Bob Duff  <duff@adacore.com>
3165         * sem_warn.adb: Minor comment.
3167 2017-09-12  Bob Duff  <duff@adacore.com>
3169         * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
3170         libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
3171         be Default_Initialized_Item, and apply pragma Unmodified to it,
3172         to suppress the warning.
3174 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
3176         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
3177         for access types.
3179 2017-09-12  Yannick Moy  <moy@adacore.com>
3181         * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
3182         together with Global when ignoring one in CodePeer mode.
3184 2017-09-12  Javier Miranda  <miranda@adacore.com>
3186         * sem_ch3.adb (Analyze_Declarations): In nested
3187         package declarations that have a private part enable missing check
3188         of the RM rule 13.1.1(11/3): usage names in aspect definitions are
3189         resolved at the end of the immediately enclosing declaration list.
3191 2017-09-12  Bob Duff  <duff@adacore.com>
3193         * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
3194         Empty.
3196 2017-09-12  Georges-Axel Jaloyan  <jaloyan@adacore.com>
3198         * debug.adb: Reserving flag -gnatdF for safe pointer checking.
3199         * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
3200         dF flag.
3201         * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
3202         in preparation for the evolution of the SPARK language that
3203         includes a pointer analysis for checking non-aliasing of access
3204         types. The Check_Safe_Pointers function is the entry point, and
3205         will traverse the AST and raise compile-time errors everytime
3206         it detects non-begign aliasing.  Detailed comments are present
3207         in the sem_spark.ads file.
3208         * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
3209         functions to iterate over the list of globals of a subprogram.
3210         * libgnat/system.ads: Add restriction No_Finalization.
3211         * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
3212         dependency on g-dynhta.adb.
3214 2017-09-12  Bob Duff  <duff@adacore.com>
3216         * sem_ch6.adb (Analyze_Expression_Function): Call
3217         Check_Dynamically_Tagged_Expression.
3218         * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
3219         "and then Is_Tagged_Type (Typ)" because there is an earlier
3220         "Assert (Is_Tagged_Type (Typ))".
3222 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
3224         * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
3226 2017-09-11  Arnaud Charlet  <charlet@adacore.com>
3228         * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
3229         * doc/gnat_ugn/platform_specific_information.rst: Remove doc
3230         for no longer supported platforms.
3231         * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
3232         description of the semantics for dimensionality analysis.
3233         * gnat_ugn.texi: Regenerated.
3235 2017-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3237         * freeze.adb (Has_Incomplete_Compoent): Delete.
3238         (Freeze_Profile):
3239         Do not inhibit the freezing of the profile of an expression
3240         function here.
3241         (Freeze_Subprogram): Do not re-create extra formals.
3242         * sem_ch6.adb (Analyze_Expression_Function): Always
3243         pre-analyze the expression if the function is not a completion.
3244         (Analyze_Subprogram_Body_Helper): For the body generated
3245         from an expression function that is not a completion, do
3246         not freeze the profile and temporary mask the types declared
3247         outside the expression that are not yet frozen.
3248         * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
3249         during the pre-analysis of an expression function.
3251 2017-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3253         * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
3254         (gigi): Likewise.
3256 2017-09-11  Yannick Moy  <moy@adacore.com>
3258         * lib-xref-spark_specific.adb: Minor rewrite.
3260 2017-09-11  Jerome Lambourg  <lambourg@adacore.com>
3262         * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
3263         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
3264         renaming into account.
3266 2017-09-11  Jerome Lambourg  <lambourg@adacore.com>
3268         * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
3269         * gcc-interface/Makefile.in: Take this renaming into account.
3271 2017-09-11  Arnaud Charlet  <charlet@adacore.com>
3273         * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
3274         longer used.
3276 2017-09-11  Yannick Moy  <moy@adacore.com>
3278         * sem_util.adb (Check_Result_And_Post_State):
3279         Do not issue a warning about missing reference to an outcome if
3280         the subprogram is ghost and has no outputs.
3281         * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
3282         reformatting.
3284 2017-09-11  Yannick Moy  <moy@adacore.com>
3286         * gnat1drv.adb (Adjust_Global_Switches): Set
3287         Check_Validity_Of_Parameters to False in GNATprove mode.
3288         * opt.ads (Check_Validity_Of_Parameters): Document switch to
3289         set option.
3291 2017-09-09  Pierre-Marie de Rodat  <derodat@adacore.com>
3293         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
3294         generate debug info for inner record types if -fgnat-encodings=minimal.
3295         (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
3296         type as the debug type.
3298 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3300         * gcc-interface/decl.c (components_to_record): Do not reorder in non-
3301         packed record types if pragma Optimize_Alignment (Space) is enabled.
3303 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3305         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
3306         limits for expression functions.
3307         (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
3309 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3311         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
3312         layout of the record from the parent type only if both are or are not
3313         unchecked unions.
3314         (is_stored_discriminant): Return false for an unchecked union.
3316 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3318         * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
3319         return NULL_EXPR.
3321 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3323         * gcc-interface/decl.c (promote_object_alignment): New function taken
3324         from...
3325         (gnat_to_gnu_entity) <E_Variable>: ...here.  Invoke it.
3326         (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
3327         create a padding type on success before doing the atomic check.
3329 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3331         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
3332         promotion to static memory earlier in the processing.
3334 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3336         * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
3337         and TYPE_BY_REFERENCE_P flags on types after various promotions.
3338         * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
3339         Consider all kinds of entities.
3341 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3343         * gcc-interface/utils.c (convert): When converting to a padding type,
3344         reuse an existing CONSTRUCTOR if it has got the right size.
3346 2017-09-08  Nicolas Roche  <roche@adacore.com>
3348         * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
3349         source in libgnat/
3350         * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
3351         a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
3352         i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
3353         a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
3354         a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
3355         s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
3356         a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
3357         s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
3358         a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
3359         a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
3360         a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
3361         a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
3362         a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
3363         s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
3364         a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
3365         s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
3366         s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
3367         a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
3368         a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
3369         system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
3370         a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
3371         a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
3372         s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
3373         g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
3374         g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
3375         g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
3376         a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
3377         calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
3378         a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
3379         a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
3380         a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
3381         a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
3382         directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
3383         system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
3384         system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
3385         a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
3386         system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
3387         g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
3388         a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
3389         s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
3390         s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
3391         g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
3392         a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
3393         a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
3394         g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
3395         a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
3396         a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
3397         a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
3398         g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
3399         a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
3400         a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
3401         s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
3402         a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
3403         s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
3404         s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
3405         s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
3406         a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
3407         system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
3408         s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
3409         g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
3410         g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
3411         s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
3412         s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
3413         g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
3414         g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
3415         g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
3416         system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
3417         g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
3418         g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
3419         s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
3420         i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
3421         g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
3422         s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
3423         g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
3424         s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
3425         a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
3426         a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
3427         g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
3428         s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
3429         g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
3430         g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
3431         a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
3432         a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
3433         s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
3434         s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
3435         a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
3436         a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
3437         a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
3438         s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
3439         s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
3440         s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
3441         a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
3442         a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
3443         s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
3444         a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
3445         a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
3446         s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
3447         a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
3448         g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
3449         a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
3450         a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
3451         s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
3452         a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
3453         g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
3454         a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
3455         s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
3456         system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
3457         a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
3458         a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
3459         s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
3460         s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
3461         g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
3462         s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
3463         g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
3464         system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
3465         g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
3466         g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
3467         a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
3468         a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
3469         g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
3470         a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
3471         system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
3472         s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
3473         g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
3474         a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
3475         a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
3476         a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
3477         s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
3478         s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
3479         g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
3480         a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
3481         a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
3482         a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
3483         a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
3484         g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
3485         g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
3486         a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
3487         g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
3488         a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
3489         s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
3490         a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
3491         s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
3492         s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
3493         a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
3494         s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
3495         a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
3496         s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
3497         g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
3498         g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
3499         a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
3500         s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
3501         a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
3502         a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
3503         a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
3504         s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
3505         s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
3506         a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
3507         a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
3508         system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
3509         s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
3510         a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
3511         a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
3512         s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
3513         s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
3514         a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
3515         a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
3516         i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
3517         s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
3518         a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
3519         s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
3520         g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
3521         s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
3522         a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
3523         a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
3524         a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
3525         a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
3526         s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
3527         a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
3528         a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
3529         a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
3530         g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
3531         s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
3532         g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
3533         a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
3534         system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
3535         a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
3536         s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
3537         a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
3538         g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
3539         i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
3540         s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
3541         a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
3542         g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
3543         s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
3544         s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
3545         a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
3546         a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
3547         a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
3548         a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
3549         a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
3550         g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
3551         s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
3552         a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
3553         a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
3554         a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
3555         s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
3556         s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
3557         s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
3558         s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
3559         g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
3560         a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
3561         s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
3562         a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
3563         a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
3564         a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
3565         s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
3566         a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
3567         s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
3568         a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
3569         g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
3570         i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
3571         s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
3572         s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
3573         a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
3574         s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
3575         s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
3576         s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
3577         s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
3578         a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
3579         s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
3580         a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
3581         s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
3582         s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
3583         s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
3584         s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
3585         s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
3586         a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
3587         g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
3588         a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
3589         s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
3590         system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
3591         g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
3592         a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
3593         a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
3594         a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
3595         s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
3596         a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
3597         g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
3598         a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
3599         s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
3600         a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
3601         a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
3602         a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
3603         a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
3604         s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
3605         g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
3606         g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
3607         system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
3608         s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
3609         s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
3610         a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
3611         g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
3612         a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
3613         s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
3614         s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
3615         s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
3616         unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
3617         s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
3618         g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
3619         a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
3620         s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
3621         a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
3622         a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
3623         to libgnat subdirectory.
3625 2017-09-08  Yannick Moy  <moy@adacore.com>
3627         * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
3628         return the entity associated with the call.
3629         * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
3630         Replace the internal Get_Function_Id with the new
3631         Sem_Aux.Get_Called_Entity.
3632         (Iterate_Call_Parameters): New
3633         procedure to iterate on formals and actuals at the same time.
3634         * sem_ch12.adb (Analyze_Subprogram_Instantiation):
3635         Set SPARK_Mode from spec when set, for analysis
3636         of instance. Restore after analysis of instance.
3637         (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
3638         set, for analysis of body instance. Restored automatically at
3639         the end of the subprogram.
3640         * gnat1drv.adb (Adjust_Global_Switches): Set
3641         Check_Validity_Of_Parameters to False in GNATprove mode.
3642         * opt.ads (Check_Validity_Of_Parameters): Document switch to
3643         set option.
3645 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3647         * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
3648         (New_Copy_Tree): ...there.  Reset the hash tables only if they
3649         were used in the previous invocation.
3650         * s-htable.adb: Fix typo.
3652 2017-09-08  Bob Duff  <duff@adacore.com>
3654         * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
3656 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3658         * sem_aggr.adb: minor style fix.
3660 2017-09-08  Bob Duff  <duff@adacore.com>
3662         * sprint.adb (Write_Corresponding_Source): Ignore if there is
3663         no current source file.
3664         (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
3665         Print something helpful in case N is invalid.
3666         * sprint.ads: Minor comment fix.
3668 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3670         * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
3671         access types.
3673 2017-09-08  Bob Duff  <duff@adacore.com>
3675         * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
3676         Ada_2020, along the same lines as the other Ada version pragmas.
3678 2017-09-08  Gary Dismukes  <dismukes@adacore.com>
3680         * sem_ch12.adb: Minor typo fixes and reformatting.
3682 2017-09-08  Yannick Moy  <moy@adacore.com>
3684         * sem_aggr.adb (Resolve_Record_Aggregate):
3685         Rewrite bounds of aggregate subexpressions which may depend on
3686         discriminants of the enclosing aggregate.
3688 2017-09-08  Yannick Moy  <moy@adacore.com>
3690         * sem_ch5.adb: Prevent assertion failure on illegal code.
3692 2017-09-08  Yannick Moy  <moy@adacore.com>
3694         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
3695         calling Renamed_Entity on an entity which cannot be a renaming.
3697 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3699         * exp_aggr.adb: Add with & use clause for Urealp.
3700         (Aggr_Assignment_OK_For_Backend): Accept (almost all)
3701         elementary types instead of just discrete types.
3702         * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
3703         * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
3704         Be prepared for the FP zero value in the memset case.  Add small
3705         guard.
3707 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3709         * s-htable.adb (Static_HTable.Reset): Use aggregate instead
3710         of loop.
3712 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
3714         * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
3715         of New_Copy because the latter leaves the syntactic structure of
3716         the tree inconsistent (a child is accessible through two parents)
3717         and prevents proper replication of itypes by subsequent calls
3718         to New_Copy_Tree.
3719         * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
3720         New_Copy because the latter leaves the syntactic structure of the
3721         tree inconsistent (a child is accessible through two parents)
3722         and prevents proper replication of itypes by subsequent calls
3723         to New_Copy_Tree.
3724         * sem_util.adb (In_Subtree): New routine.
3725         (New_Copy_Tree): Reimplemented.
3726         * sem_util.ads (In_Subtree): New routine.
3727         (New_Copy_Tree): Reimplemented.
3729 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3731         * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
3732         for aspect Default_Value is a static scalar value, but it does
3733         not freeze the type. Yhis allows for subsequent representation
3734         clauses for the type.
3736 2017-09-08  Javier Miranda  <miranda@adacore.com>
3738         * sem_ch8.adb (Find_Direct_Name.Undefined): Do
3739         not add entries into the undefined reference table when we are
3740         compiling with errors ignored.
3742 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3744         * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
3745         check if the instance is within an enclosing instance body. The
3746         formal package was legal in the enclosing generic, and is
3747         legal in the enclosing instantiation.  This optimisation may be
3748         applicable elsewhere, and it also removes spurious errors that
3749         may arise with on-the-fly processing  of instantiations that
3750         contain Inline_Always subprograms.
3752 2017-09-08  Vincent Celier  <celier@adacore.com>
3754         * gnatcmd.adb: Disregard empty argument of GNAT driver.
3756 2017-09-08  Justin Squirek  <squirek@adacore.com>
3758         * checks.adb (Insert_Valid_Check): Manually decorate
3759         the generated temporary for range valdity checks.
3761 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3763         * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
3765 2017-09-08  Justin Squirek  <squirek@adacore.com>
3767         * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
3768         case to handle underscore flags.
3769         * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
3770         new procedure to handle underscores.
3772 2017-09-08  Javier Miranda  <miranda@adacore.com>
3774         * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
3775         divisions with fixed point results to avoid generating twice
3776         the runtime check on divide by zero.
3777         * checks.adb (Apply_Divide_Checks): Ensure that operands are
3778         not evaluated twice (once for their runtime checks and once for
3779         their regular computation).
3781 2017-09-08  Yannick Moy  <moy@adacore.com>
3783         * sem_prag.adb (Analyze_Part_Of): Add missing
3784         return statements after issuing errors.  Add detection of
3785         out-of-order item and single concurrent type.
3787 2017-09-08  Nicolas Roche  <roche@adacore.com>
3789         * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
3790         s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
3791         s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
3792         s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
3793         a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
3794         a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
3795         s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
3796         s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
3797         a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
3798         s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
3799         s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
3800         s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
3801         s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
3802         s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
3803         s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
3804         s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
3805         s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
3806         s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
3807         a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
3808         s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
3809         s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
3810         s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
3811         s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
3812         s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
3813         s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
3814         s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
3815         s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
3816         a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
3817         s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
3818         s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
3819         s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
3820         a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
3821         s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
3822         s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
3823         s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
3824         a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
3825         s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
3826         s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
3827         s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
3828         s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
3829         s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
3830         a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
3831         g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
3832         a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
3833         g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
3834         s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
3835         s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
3836         g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
3837         s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
3838         s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
3839         s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
3840         s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
3841         a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
3842         a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
3844 2017-09-08  Arnaud Charlet <charlet@adacore.com>
3846         * doc/share/conf.py, doc/share/latex_elements.py,
3847         doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
3848         highlighting.
3850 2017-09-08  Arnaud Charlet <charlet@adacore.com>
3852         * gnat_rm.texi, gnat_ugn.texi,
3853         doc/gnat_ugn/the_gnat_compilation_model.rst,
3854         doc/gnat_ugn/getting_started_with_gnat.rst,
3855         doc/gnat_ugn/inline_assembler.rst,
3856         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3857         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
3858         doc/gnat_ugn/about_this_guide.rst,
3859         doc/gnat_ugn/platform_specific_information.rst,
3860         doc/gnat_ugn/example_of_binder_output.rst,
3861         doc/gnat_ugn/gnat_and_program_execution.rst,
3862         doc/gnat_ugn/gnat_utility_programs.rst,
3863         doc/gnat_rm/implementation_of_specific_ada_features.rst,
3864         doc/gnat_rm/interfacing_to_other_languages.rst,
3865         doc/gnat_rm/implementation_defined_aspects.rst,
3866         doc/gnat_rm/intrinsic_subprograms.rst,
3867         doc/gnat_rm/implementation_defined_characteristics.rst,
3868         doc/gnat_rm/implementation_advice.rst,
3869         doc/gnat_rm/implementation_defined_attributes.rst,
3870         doc/gnat_rm/compatibility_and_porting_guide.rst,
3871         doc/gnat_rm/standard_library_routines.rst,
3872         doc/gnat_rm/the_gnat_library.rst,
3873         doc/gnat_rm/implementation_defined_pragmas.rst,
3874         doc/gnat_rm/representation_clauses_and_pragmas.rst,
3875         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3876         doc/gnat_rm/obsolescent_features.rst,
3877         doc/gnat_rm/about_this_guide.rst,
3878         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
3879         doc/gnat_rm/implementation_of_ada_2012_features.rst,
3880         doc/gnat_ugn.rst,
3881         doc/gnat_rm.rst: Update documentation.
3883 2017-09-08  Arnaud Charlet <charlet@adacore.com>
3885         * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
3886         s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
3887         * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
3889 2017-09-08  Bob Duff  <duff@adacore.com>
3891         * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
3892         New routine to read the Tag robustly.
3893         * exp_attr.adb (Input): Change the expansion of 'Input,
3894         in the class-wide case, to call String_Input_Tag instead of
3895         String_Input_Blk_IO.
3897 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3899         * s-rident.ads (Restriction_Id): reorder enum
3900         literals, so that Pure_Barriers is no longer in range of the
3901         Cunit_Boolean_Restrictions subtype.
3903 2017-09-08  Nicolas Roche  <roche@adacore.com>
3905         * a-taster.ads, a-taster.adb: Move to libgnarl
3906         * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
3907         Add support for files in libgnarl.
3909 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3911         * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
3912         accessibility check to an interface conversion, whose purpose
3913         is to perform a pointer adjustment in a dispatching call.
3914         * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
3915         when the actual is a construct that involves a dereference of an
3916         expression that includes a formal of the enclosing subprogram,
3917         In such cases, the accessibility level of the actual is that of
3918         the corresponding formal, which is passed in as an additional
3919         actual in the outer call.
3921 2017-09-08  Bob Duff  <duff@adacore.com>
3923         * exp_intr.adb (Add_Source_Info): Do not decode
3924         file names; they were not encoded in the first place.
3926 2017-09-08  Bob Duff  <duff@adacore.com>
3928         * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
3929         exceptions instead of crashes. Check for absurdly long strings
3930         and empty strings. Empty strings cause trouble because they can
3931         have super-null ranges (e.g. 100..10), which causes Ext_Copy to
3932         be empty, which causes an array index out of bounds.
3933         * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
3934         instead of crashes.
3936 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3938         * sem_util.adb (Is_CCT_Instance): allow use in
3939         the context of protected types.
3941 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3943         * a-tigeli.adb: minor remove extra whitespace.
3945 2017-09-08  Gary Dismukes  <dismukes@adacore.com>
3947         * par-ch4.adb: Reformatting of an error message.
3949 2017-09-08  Javier Miranda  <miranda@adacore.com>
3951         * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
3952         identifiers to ensure their correct decoration of names on
3953         aspect expressions.
3955 2017-09-08  Yannick Moy  <moy@adacore.com>
3957         * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
3958         not skip a loop coming from source which is rewritten into a loop.
3960 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3962         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
3963         wrapper has convention Ada, to prevent spurious warnings on
3964         unconstrained array parameters.
3966 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3968         * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
3969         (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
3971 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3973         * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
3975 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
3977         * exp_intr.adb (Append_Entity_Name): Move to ...
3978         * sem_util.ads, sem_util.adb: ... here to share it.
3979         (Subprogram_Name): New subprogram, to compute the name of the enclosing
3980         subprogram/entity.
3981         * errutil.adb (Error_Msg): Fill new field Node.
3982         * erroutc.ads (Subprogram_Name_Ptr): New.
3983         (Error_Msg_Object): New field Node.
3984         * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
3985         * errout.adb (Error_Msg): New variant with node id parameter.
3986         Fill new parameter Node when emitting messages. Revert previous
3987         changes for Include_Subprogram_In_Messages.
3988         * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
3989         generating warning message.
3991 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
3993         * par-ch4.adb (P_Iterated_Component_Association): Place construct
3994         under -gnat2020 flag, given that it is a future feature of
3995         the language.
3996         * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
3997         defining identifier as referenced to prevent spurious warnings:
3998         corresponding loop is expanded into one or more loops whose
3999         variable has the same name, and the expression uses those names
4000         and not the original one.
4002 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4004         * sem_elab.adb (Check_A_Call): Do not consider
4005         references to internal variables for SPARK semantics.
4007 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4009         * inline.adb (In_Package_Spec): refine type of
4010         the parameter from Node_Id to Entity_Id.
4012 2017-09-08  Justin Squirek  <squirek@adacore.com>
4014         * exp_ch5.adb (Expand_Formal_Container_Loop):
4015         Reset the scope of the loop parameter after it is reanalyzed.
4017 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4019         * sem_util.ads (Set_Rep_Info): New inline procedure.
4020         * sem_util.adb (Set_Rep_Info): Implement it.
4021         * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
4022         always copy the representation aspects onto the subtype.
4024 2017-09-08  Georges-Alex Jaloyan  <jaloyan@adacore.com>
4026         * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
4027         Correction of the return type from access type to option type.
4028         (Simple_HTable): Moving the Instance_Data to ads file.
4030 2017-09-08  Yannick Moy  <moy@adacore.com>
4032         * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
4034 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4036         * opt.ads (Include_Subprogram_In_Messages): New variable.
4037         * errout.ads (Current_Subprogram_Ptr): New variable.
4038         * errout.adb (Error_Msg): Prepend current subprogram info
4039         in messages if Include_Subprogram_In_Messages is set.
4040         * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
4041         Current_Subprogram.
4042         * gnat1drv.adb (Adjust_Global_Switches): Set
4043         Include_Subprogram_In_Messages when -gnatdJ is set.
4044         * debug.adb: Document and reserve -gnatdJ.
4046 2017-09-08  Georges-Axel Jaloyan  <jaloyan@adacore.com>
4048         * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
4049         functions to iterate over simple hastables.
4050         (Load_Factor_HTable): Remove obsolete and inefficient implementation.
4052 2017-09-08  Javier Miranda  <miranda@adacore.com>
4054         * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
4055         missing checks on the presence of Entity() before checking the
4056         entity attributes.
4058 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4060         * sem_ch6.adb (Analyze_Expression_Function): Reorder some
4061         statements, use local variable and remove unnecessary processing.
4063 2017-09-08  Javier Miranda  <miranda@adacore.com>
4065         * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
4066         subprogram.
4067         (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
4068         (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4069         subprogram.
4070         (Unqual_BIP_Iface_Function_Call): New subprogram.
4071         * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
4072         subprogram containing code that was previously inside
4073         Make_Build_In_Place_Call_In_Object_Declaration since it is also
4074         required for one of the new subprograms.
4075         (Expand_Actuals):
4076         Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
4077         (Expand_N_Extended_Return_Statement): Extend the
4078         cases covered by an assertion on expected BIP object
4079         declarations.
4080         (Make_Build_In_Place_Call_In_Assignment):
4081         Removing unused code; found working on this ticket.
4082         (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
4083         that replaces the internal name of the renaming declaration
4084         into the new subprogram Replace_Renaming_Declaration_Id.
4085         (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
4086         (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
4087         New subprogram.
4088         (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4089         subprogram.
4090         (Unqual_BIP_Iface_Function_Call): New subprogram.
4091         * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
4092         subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
4093         * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
4094         subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4095         * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
4096         subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
4097         (Expand_N_Indexed_Component): Invoke the new subprogram
4098         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4099         (Expand_N_Selected_Component): Invoke the new subprogram
4100         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4101         (Expand_N_Slice): Invoke the new subprogram
4102         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4103         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
4104         Invoke the new subprogram
4105         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4107 2017-09-08  Javier Miranda  <miranda@adacore.com>
4109         * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
4110         access to interface types.  Remove also the accessibility check.
4112 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4114         * sem_ch6.adb (Freeze_Expr_Types): Really freeze
4115         all the types that are referenced by the expression.
4116         (Analyze_Expression_Function): Call Freeze_Expr_Types for
4117         a completion instead of manually freezing the type of the
4118         expression.
4119         (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
4121 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4123         * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
4124         New procedure, auxiliary to Expand_Pragma_Check, to handle
4125         references to the discriminants of a protected type within a
4126         precondition of a protected operation. This is needed because
4127         the original precondition has been analyzed in the context of
4128         the protected declaration, but in the body of the operation
4129         references to the discriminants have been replaved by references
4130         to the discriminants of the target object, and these references
4131         are only created when expanding the protected body.
4133 2017-09-08  Yannick Moy  <moy@adacore.com>
4135         * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
4136         Loop_Variant.
4138 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4140         * exp_attr.adb (Build_Record_VS_Func): If the record is an
4141         unchecked union, do not emit checks for its (non-existent)
4142         discriminants, or for variant parts that depend on them.
4144 2017-09-08  Justin Squirek  <squirek@adacore.com>
4146         * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
4147         Find_Comparison_Type.Try_One_Interp): Add check for generic
4148         instances.
4150 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4152         * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
4153         exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
4154         repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
4155         exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
4156         remaining references to AAMP_On_Target.
4158 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4160         * style.adb: Fix typo.
4162 2017-09-08  Javier Miranda  <miranda@adacore.com>
4164         * einfo.adb (Underlying_Type): Add missing support for class-wide
4165         types that come from the limited view.
4166         * exp_attr.adb (Attribute_Address): Check class-wide type
4167         interfaces using the underlying type to handle limited-withed
4168         types.
4169         (Attribute_Tag): Check class-wide type interfaces using
4170         the underlying type to handle limited-withed types.
4172 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4174         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
4175         over a subtype of a type with a static predicate, taking into
4176         account the predicate function of the parent type and the bounds
4177         given in the loop specification.
4178         * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
4179         a loop specification that is a subtype indication whose type mark
4180         is a type with a static predicate, inherit predicate function,
4181         used to build case statement for rewritten loop.
4183 2017-09-08  Justin Squirek  <squirek@adacore.com>
4185         * lib-load.adb: Modify printing of error message to exclude file
4186         line number.
4188 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4190         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
4191         don't inline subprograms declared in both visible and private
4192         parts of a package.
4193         (In_Package_Spec): previously In_Package_Visible_Spec; now
4194         detects subprograms declared both in visible and private parts
4195         of a package spec.
4197 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4199         * exp_util.adb (Build_Invariant_Procedure_Declaration): If
4200         the type is an anonymous array in an object declaration, whose
4201         component type has an invariant, use the object declaration
4202         as the insertion point for the invariant procedure, given that
4203         there is no explicit type declaration for an anonymous array type.
4205 2017-09-08  Bob Duff  <duff@adacore.com>
4207         * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
4209 2017-09-08  Bob Duff  <duff@adacore.com>
4211         * a-strfix.adb (Trim): Compute Low and High only if needed.
4213 2017-09-08  Justin Squirek  <squirek@adacore.com>
4215         * lib-load.adb (Load_Main_Source): Add error output in the case a
4216         source file is missing.
4218 2017-09-08  Bob Duff  <duff@adacore.com>
4220 PR ada/80888
4221         * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
4222         Default_WCEM by default (i.e. if the encoding is not specified
4223         by the Form string).
4225 2017-09-08  Bob Duff  <duff@adacore.com>
4227         * s-trasym.ads (Hexa_Traceback): If
4228         Suppress_Hex is True, print "..." instead of a hexadecimal
4229         address.
4230         * s-trasym.adb: Ignore No_Hex in this version.
4231         Misc cleanup.
4233 2017-09-08  Bob Duff  <duff@adacore.com>
4235         * debug.adb: Minor reformatting.
4237 2017-09-08  Bob Duff  <duff@adacore.com>
4239         * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
4240         code so it doesn't trigger an "uninit var" warning.
4242 2017-09-08  Nicolas Roche  <roche@adacore.com>
4244         * s-hibaen.ads: Remove obsolete file.
4246 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4248         * a-locale.ads: Add comment explaining the state of this package.
4250 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4252         * sem_util.adb (Is_CCT_Instance): Allow calls in the context
4253         of packages.
4254         * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
4255         allow calls in the context of package spec (for pragma
4256         Initializes) and bodies (for pragma Refined_State).
4258 2017-09-08  Bob Duff  <duff@adacore.com>
4260         * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
4261         new Exp.
4263 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4265         * debug.adb (dA): Adjust comment.
4266         * gnat1drv.adb (Gnat1drv): Likewise.
4267         * opt.ads (List_Representation_Info_Extended): New variable.
4268         * repinfo.adb (List_Record_Info): Split implementation into...
4269         (Compute_Max_Length): ...this.  Recurse on records if requested.
4270         (List_Record_Layout): Likewise.
4271         * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
4272         statement, accept '0' and set List_Representation_Info_Extended
4273         on 'e'.
4274         * usage.adb (Usage): Document new -gnatRe variant.
4276 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4278         * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
4279         Do not save the given entity in the global variable Default_Pool
4280         if the pragma appears within a generic unit.
4282 2017-09-08  Bob Duff  <duff@adacore.com>
4284         * errout.adb (Delete_Warning): Do not
4285         decrement Warnings_Treated_As_Errors. This is called before
4286         Warnings_Treated_As_Errors has been incremented to account for
4287         this warning. Decrementing it here can lead to negative values
4288         of Warnings_Treated_As_Errors, raising Constraint_Error in
4289         checks-on builds, and causing the compiler to return an error
4290         code in checks-off builds.
4292 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4294         * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
4295         entities of named concurrent types as Ref_Id and not of anonymous
4296         concurrent objects (because callers already know when a conversion
4297         is necessary and can easily do it); also, do not expect protected
4298         types or protected objects as Context_Id (because no flow-related
4299         SPARK pragmas are attached there); reflect these changes in a
4300         more precise comment.
4302 2017-09-08  Olivier Hainque  <hainque@adacore.com>
4304         * g-altive.ads: Add documentation.
4306 2017-09-08  Bob Duff  <duff@adacore.com>
4308         * sem_util.ads, debug.adb: Minor comment fix.
4309         * erroutc.ads: Comment fix.
4311 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4313         * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
4314         for compatibility of component types of formal and actual in an
4315         instantiation of a child unit,  when the component type of the
4316         formal is itself a formal of an enclosing generic.
4318 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4320         * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
4321         sem_prag.adb to make it available for GNATprove; for concurrent
4322         types replace custom scope climbing with Scope_Same_Or_Within; for
4323         single concurrent objects add scope climbing (with Scope_Within),
4324         which was not there (that's the primary semantic change of this
4325         commit); also, when comparing a single concurrent object with
4326         its corresponding concurrent type rely on equality of types,
4327         not of objects (because that's simpler to code).
4328         * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
4329         (Analyze_Global_Item): adjust special-casing of references to the
4330         current instance of a concurrent unit in the Global contracts
4331         of task types and single tasks objects; similar for references
4332         in the protected operations and entries of protected types and
4333         single protected objects (in all these cases the current instance
4334         behaves as an implicit parameter and must not be mentioned in
4335         the Global contract).
4337 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
4339         * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
4340         function calls returning a record within a subprogram call,
4341         for C generation.
4343 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4345         * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
4346         name that designates the current instance of a child unit in its
4347         own body and appears as the prefix of a reference to an entity
4348         local to the child unit.
4349         * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
4350         Minor reformatting.
4352 2017-09-08  Yannick Moy  <moy@adacore.com>
4354         * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
4355         may be intentional.
4357 2017-09-08  Tristan Gingold  <gingold@adacore.com>
4359         * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
4360         warnings on internal units in configurable run time mode.
4362 2017-09-08  Bob Duff  <duff@adacore.com>
4364         * sem_ch3.adb (Build_Derived_Private_Type): Inherit
4365         representation items from interfaces that the derived type
4366         implements, not just from the parent type.
4367         * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
4368         this to return an empty list when there are no interfaces.
4369         * einfo.ads, sem_ch13.adb: Minor comment fixes.
4370         * sem_attr.adb: Minor comment fix.
4372 2017-09-08  Doug Rupp  <rupp@adacore.com>
4374         * sigtramp-vxworks.c [i386]: Adjust the kernel context for
4375         x86-vx7.
4377 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4379         * exp_ch4.adb (Expand_N_Allocator): Generate a
4380         call to Allocate_Any_Controlled when the allocation does not
4381         require any initialization.
4383 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4385         * sem_util.adb (Copy_Node_With_Replacement):
4386         Update the Renamed_Object field of a replicated object renaming
4387         declaration.
4389 2017-09-08  Patrick Bernardi  <bernardi@adacore.com>
4391         * exp_ch9.adb (Is_Pure_Barrier): Allow type
4392         conversions and components of objects. Simplified the detection
4393         of the Count attribute by identifying the corresponding run-time
4394         calls.
4396 2017-09-08  Yannick Moy  <moy@adacore.com>
4398         * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
4399         sem_type.adb, sinfo.ads: Minor reformatting.
4401 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4403         * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
4404         of Freeze_Profile, used to inhibit the freezing of the profile
4405         of an expression function declared within a nested package, when
4406         some type in the profile depends on a private type declared in
4407         an enclosing package.
4409 2017-09-08  Bob Duff  <duff@adacore.com>
4411         * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
4412         the subunit case. It's still OK to set it in the "missing subunits"
4413         case, because that won't cause the obsolete .ali files that cause
4414         confusion.
4416 2017-09-08  Bob Duff  <duff@adacore.com>
4418         * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
4419         unclear why this didn't cause a warning.
4420         * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
4421         pragmas. It's unclear why this didn't cause an error.
4423 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4425         * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
4426         Reimplemented.
4427         (Expand_SPARK_Potential_Renaming): Code clean up.
4428         * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
4429         the item does not have a proper entity.
4430         (Analyze_Input_Item): Add a guard in case the item does not have a
4431         proper entity.
4432         (Collect_States_And_Objects): Include object renamings in the
4433         items being collected.
4434         (Resolve_State): Update the documentation of this routine.
4435         * sem_util.adb (Entity_Of): Add circuitry to handle
4436         renamings of function results.
4437         (Remove_Entity): New routine.
4438         (Remove_Overloaded_Entity): Take advantage of factorization.
4439         * sem_util.ads (Entity_Of): Update the documentation
4440         of this routine.
4441         (Remove_Entity): New routine.
4442         (Remove_Overloaded_Entity): Update the documentation of this
4443         routine.
4445 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4447         * repinfo.adb (List_Record_Info): During first loop,
4448         do not override the normalized position and first bit
4449         if they have already been set.  Move fallback code
4450         for the packed case to the case where it belongs.
4451         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
4452         Also adjust the normalized position of components.
4453         (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
4455 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4457         * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
4458         the placement of a primitive operation O that renames an operation
4459         R declared in an inner package, and which is thus not a primitive
4460         of the dispatching type of O. In this case O is a new primitive
4461         and does not inherit its dispatch table position from R (which
4462         has none).
4464 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4466         * sem_dim.adb (Analyze_Dimension_If_Expression,
4467         Analyze_Dimension_Case_Expression): new subprograms to verify
4468         the dimensional correctness of Ada2012 conditional expressions,
4469         and set properly the dimensions of the construct.
4470         * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
4471         call Analyze_Dimension.
4473 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4475         * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
4476         loop on an interface declared as a private extension of another
4477         synchronized interface.
4479 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4481         * sem_ch12.adb (Check_Generic_Parent): New procedure within
4482         Analyze_Associations, to handle actual packages that depend on
4483         previous instances.  If a package IAP that is an instantiation is
4484         used as an actual in a subsequent instantiation SI in the same
4485         scope, and IAP has a body, IAP must be frozen before SI. If
4486         the generic parent of IAP is itself declared in a previous
4487         instantiation in the same scope, that instantiation must also
4488         be frozen before SI.
4489         (Install_Body): Prevent double insertion of freeze node for
4490         instance.
4492 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
4494         * sem_prag.adb (Resolve_State): Update the
4495         comment on documentation. Generate a reference to the state once
4496         resolution takes place.
4498 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4500         * sem_ch13.adb (Analyze_Aspect_Specifications, case
4501         Linker_Section): If the aspect applies to an object declaration
4502         with explicit initialization, do not delay the freezing of the
4503         object, to prevent access-before-elaboration in the generated
4504         initialization code.
4506 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
4508         * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
4509         (Integer_Value (Item)) when the size of the fixed decimal type
4510         is larger than Integer.
4512 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4514         PR ada/82127
4515         * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
4516         in order of increasing position in more cases.
4518 2017-09-07  Yannick Moy  <moy@adacore.com>
4520         * a-exetim-mingw.ads: Add contract Global=>null
4521         on all operations that are modeled as having no read or write
4522         of global variables in SPARK.
4524 2017-09-07  Raphael Amiard  <amiard@adacore.com>
4526         * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
4527         to Hmaps.Generic_Ops.
4528         * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
4529         cursors.
4530         * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
4531         cursors.
4532         * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
4533         position in cursors.
4535 2017-09-07  Javier Miranda  <miranda@adacore.com>
4537         * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
4538         allow disabling the generation of implicit pragma Elaborate_All
4539         on task bodies.
4541 2017-09-07  Javier Miranda  <miranda@adacore.com>
4543         * exp_disp.adb (Make_Tags): Avoid suffix counter
4544         in the external name of the elaboration flag. Required to fix
4545         the regressions introduced by the initial version of this patch.
4547 2017-09-07  Bob Duff  <duff@adacore.com>
4549         * sem_ch6.adb (Analyze_Function_Return): Do not
4550         insert an explicit conversion to force the displacement of the
4551         "this" pointer to reference the secondary dispatch table in the
4552         case where the return statement is returning a raise expression,
4553         as in "return raise ...".
4555 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4557         * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
4558         * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
4559         procedure from sem_disp.adb.
4560         * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
4561         with Unit.
4562         * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
4563         return the instantiation node for subprograms. Update references
4564         to Get_Unit_Instantiation_Node.
4565         * sem_ch7.adb (Install_Parent_Private_Declarations): update
4566         reference to Get_Unit_Instantiation_Node.
4567         * exp_dist.adb (Build_Package_Stubs): update reference to
4568         Get_Unit_Instantiation_Node.
4569         * sem_ch9.adb: minor typo in comment.
4570         * lib-xref-spark_specific.adb
4571         (Traverse_Declaration_Or_Statement): traverse into task type
4572         definition.
4574 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4576         * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
4577         to handle properly various cases of type conversions where the
4578         target type and/or the expression carry dimension information.
4579         (Dimension_System_Root); If a subtype carries dimension
4580         information, obtain the source parent type that carries the
4581         Dimension aspect.
4583 2017-09-07  Dmitriy Anisimkov  <anisimko@adacore.com>
4585         * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
4587 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4589         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
4590         If the prefix is a reference to an object, rewrite it as an
4591         explicit dereference, as required by 3.7.2 (2) and as is done
4592         with most other attributes whose prefix is an access value.
4594 2017-09-07  Bob Duff  <duff@adacore.com>
4596         * par-ch13.adb: Set the Inside_Depends flag if we are inside a
4597         Refined_Depends aspect.
4598         * par-ch2.adb: Set the Inside_Depends flag if we are inside a
4599         Refined_Depends pragma.
4600         * scans.ads: Fix documentation of Inside_Depends flag.
4601         * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
4603 2017-09-07  Hristian Kirtchev  <kirtchev@adacore.com>
4605         * exp_ch7.adb (Insert_Actions_In_Scope_Around):
4606         Account for the case where the are no lists to insert, but the
4607         secondary stack still requires management.
4608         * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
4609         comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
4610         lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
4611         sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
4612         Minor reformatting.
4614 2017-09-07  Vincent Celier  <celier@adacore.com>
4616         * clean.adb: Do not get the target parameters before calling
4617         gprclean.
4619 2017-09-07  Nicolas Roche  <roche@adacore.com>
4621         * s-osinte-solaris-posix.ads: Removed.
4623 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4625         * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
4626         single concurrent objects.
4628 2017-09-07  Javier Miranda  <miranda@adacore.com>
4630         * s-regexp.ads: Fix documentation of the globbing grammar.
4632 2017-09-07  Gary Dismukes  <dismukes@adacore.com>
4634         * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
4636 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4638         * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
4639         in CodePeer mode, to support more legacy code automatically.
4641 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4643         * exp_disp.adb (Replace_Formals): If thr formal is classwide,
4644         and thus not a controlling argument, preserve its type after
4645         rewriting because it may appear in an nested call with a classwide
4646         parameter.
4648 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4650         * comperr.adb (Delete_SCIL_Files): Handle case of
4651         N_Package_Instantiation.
4653 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4655         * sem_ch10.adb (Remove_Private_With_Clause): If a private with
4656         clause for a unit U appears in a context that includes a regular
4657         with_clause on U, rewrite the redundant private clause into a null
4658         statement, rather than removing it altogether from the context,
4659         so that ASIS tools can reconstruct the original source.
4661 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4663         * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
4664         for aspect Small can be of any real type (not only a universal
4665         real literal) as long as it is a static constant.
4667 2017-09-07  Thomas Quinot  <quinot@adacore.com>
4669         * par_sco.adb: Minor reformatting.
4671 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4673         * s-parame-ae653.ads: Removed.
4675 2017-09-07  Nicolas Roche  <roche@adacore.com>
4677         * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
4678         s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
4679         s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
4680         s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
4681         s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
4682         s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
4684 2017-09-07  Yannick Moy  <moy@adacore.com>
4686         * a-ngelfu.ads Add preconditions to all functions
4687         listed in Ada RM A.5.1(19-33) as having constraints on inputs.
4689 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4691         * lib-xref.adb (Generate_Reference): ignore
4692         references to entities which are Part_Of single concurrent
4693         objects.
4695 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4697         * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
4698         comment.
4700 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4702         * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
4703         Null_Task_Id is passed.
4705 2017-09-07  Javier Miranda  <miranda@adacore.com>
4707         * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
4708         attribute. Defined for record types and subtypes.
4709         * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
4710         (Init_Tags_List) to facilitate generating separate code in the
4711         IP routine to initialize the object components and for completing
4712         the elaboration of dispatch tables.
4713         * exp_ch3.adb (Build_Init_Procedure): Improve the code
4714         generated in the IP routines by means of keeping separate
4715         the initialization of the object components from the
4716         initialization of its dispatch tables.  (Init_Secondary_Tags):
4717         Adding new formal (Init_Tags_List) and adjusting calls to
4718         Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
4719         adjusting also calls to Ada.Tags.Register_Interface_Offset
4720         because the type of one of its formals has been changed.
4721         * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
4722         modified. Instead of receiving a pointer to an object this
4723         routine receives now a primary tag.
4724         (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
4725         additional formal: the tag of the primary dispatch table.
4726         * exp_disp.ads (Elab_Flag_Needed): New subprogram.
4727         * exp_disp.adb (Elab_Flag_Needed): New subprogram.
4728         (Make_Tags): Adding the declaration of the elaboration flag (if needed).
4729         * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
4730         formal in calls to Init_Secondary_Tags.
4732 2017-09-07  Javier Miranda  <miranda@adacore.com>
4734         * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
4735         subprogram.
4736         * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
4737         applied to generic subprograms.
4739 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4741         * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
4742         (because it refers to the anonymous concurrent object, not its type);
4743         fix condition for emitting error message about task/protected type,
4745 2017-09-07  Bob Duff  <duff@adacore.com>
4747         * binde.adb (Debug_Flag_Old): If both -do and -dp
4748         are specified, behave as if just -do was specified, rather than
4749         using a mixture.
4751 2017-09-07  Nicolas Roche  <roche@adacore.com>
4753         * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
4754         system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
4756 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4758         * sem_prag.adb (Find_Role): The Global_Seen flag
4759         is now consulted not only for abstract states and variables,
4760         but for all kinds of items.
4761         (Collect_Subprogram_Inputs_Outputs): Do not process formal
4762         generic parameters, because unlike ordinary formal parameters,
4763         generic formals only act as input/ outputs if they are explicitly
4764         mentioned in a Global contract.
4766 2017-09-07  Yannick Moy  <moy@adacore.com>
4768         * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
4769         predicate procedure. Check predicate pragma/aspect with Ghost entity.
4770         * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
4771         reformatting.
4773 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4775         * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
4776         (code cleanup);
4777         * sem_ch3.adb (Build_Derived_Record_Type):i Call
4778         Copy_Dimensions_Of_Components after creating the copy of the
4779         record declaration.
4780         * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
4781         derived recor type, copy the dikensions if any of each component
4782         of the parent record to the corresponding component declarations
4783         of the derived record. These expressions are used among other
4784         things as default values in aggregates with box associations.
4785         * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
4786         repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
4787         Minor reformatting.
4789 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
4791         * sem_util.adb: Remove extra space after THEN.
4793 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4795         * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
4796         also mark the renamed subprogram as referenced.
4798 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4800         * par-ch6.adb (P_Subprogram): Improve error message on null
4801         procedure with misplaced aspect specification, which the parser
4802         first attempts to interpret as a malformed expression function.
4804 2017-09-07  Gary Dismukes  <dismukes@adacore.com>
4806         * sem_attr.adb (Analyze_Attribute_Old_Result):
4807         Allow attributes Result and Old in the case of an expression
4808         function.
4810 2017-09-07  Justin Squirek  <squirek@adacore.com>
4812         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
4813         Volatile to subcomponents.
4815 2017-09-07  Bob Duff  <duff@adacore.com>
4817         * exp_ch7.adb (Find_Last_Init): Check for the
4818         case where a build-in-place function call has been replaced by a
4819         'Reference attribute reference.
4821 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4823         * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
4824         nodes.
4826 2017-09-07  Bob Duff  <duff@adacore.com>
4828         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
4829         Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
4830         secondary stack for all functions that return limited tagged
4831         types -- just do it for dispatching calls.  Misc cleanup.
4832         * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
4833         remove qualifications and type conversions. Fix various bugs
4834         where only a single level of qualification or conversion was
4835         removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
4836         instead of "X".
4837         * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
4838         cleanup.
4840 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
4842         * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
4843         do not create actual subtypes that may generate further predicate
4844         functions.
4845         * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
4846         of body is a predicate function as well.
4847         (Resolve_Aspect_Expressions, Resolve_Name): For a component
4848         association, only the expression needs resolution, not the name.
4849         (Resolve_Aspect_Expressions, case Predicates): Construct and
4850         analyze the predicate function declaration in the scope of the
4851         type, before making the type and its discriminants visible.
4853 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4855         * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
4856         only if the record type itself comes from source.
4858 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
4860         * sem_ch5.adb: Minor reformatting and a typo fix
4862 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4864         * sinput-l.ads: minor remove extra period at the end of comment
4866 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4868         * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
4869         E_Discriminant.
4870         (Find_Role): remove support for E_Discriminant.
4872 2017-09-06  Javier Miranda  <miranda@adacore.com>
4874         * exp_ch6.adb (Expand_Simple_Function_Return):
4875         Add missing implicit type conversion to force displacement of the
4876         "this" pointer.
4878 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
4880         * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
4882 2017-09-06  Yannick Moy  <moy@adacore.com>
4884         * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
4885         global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
4887 2017-09-06  Bob Duff  <duff@adacore.com>
4889         * sem_ch8.adb: Change Assert to be consistent with
4890         other similar ones.
4892 2017-09-06  Bob Duff  <duff@adacore.com>
4894         * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
4895         requested. Previously, the -do switch meant "run Elab_New and
4896         Elab_Old and use the order chosen by Elab_Old, possibly with
4897         debugging printouts comparing the two orders."  Now it means
4898         "do not run Elab_New." This is of use if there are bugs that
4899         cause Elab_New to crash.
4900         (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
4901         type conversions.
4902         * ali.ads (Elab_Position): Change type to Nat, to avoid various
4903         type conversions.
4905 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
4907         * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
4908         reference to SPARK RM.
4910 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4912         * layout.adb: Use SSU short hand consistently throughout the file.
4914 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4916         * freeze.adb (Freeze_Record_Type)
4917         <Sized_Component_Total_Round_RM_Size>: New local variable to
4918         accumulate the rounded RM_Size of components.  Update it for
4919         every component whose RM_Size is statically known.  Add missing
4920         guard to check that bit packing is really required before issuing
4921         the error about packing.  Swap condition for clarity's sake.
4922         * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
4924 2017-09-06  Fedor Rybin  <frybin@adacore.com>
4926         * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
4927         mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
4928         mlib-tgt-specific.adb, mlib-tgt-specific.ads,
4929         mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
4930         mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
4931         mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
4932         mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
4933         mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
4934         prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
4935         prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
4936         prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
4937         prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
4938         prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
4939         prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
4940         prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
4941         project manager sources.
4943 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4945         * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
4946         entity of a mutable type and the right-hand side is a conditional
4947         expression, resolve the alternatives of the conditional using
4948         the base type of the target entity, because the alternatives
4949         may have distinct subtypes. This is particularly relevant if
4950         the alternatives are aggregates.
4952 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4954         * checks.adb (Apply_Predicate_Check): If the expression is an
4955         aggregate that is the RHS of an assignment, apply the check to
4956         the LHS after the assignment, rather than to the aggregate. This
4957         is more efficient than creating a temporary for the aggregate,
4958         and prevents back-end crashes when the aggregate includes a
4959         dynamic "others' association.
4961 2017-09-06  Yannick Moy  <moy@adacore.com>
4963         * sem_ch12.adb (Analyze_Instance_And_Renamings):
4964         Set variable to ignore SPARK_Mode in instance before the analysis
4965         of the generated package declaration.
4967 2017-09-06  Yannick Moy  <moy@adacore.com>
4969         * sem_res.adb (Resolve_Call): Do not issue a
4970         message for calls inside expression function, unless body was
4971         seen and is candidate for inlining.
4973 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
4975         * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
4976         * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
4977         body. do not freeze the formals of the generic unit.
4979 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
4981         * errout.adb (Error_Msg): Separate the
4982         treatment for warning vs. style messages in inlinings and
4983         instantiations. Prevents blowups on calls to Warn_Insertion for
4984         style messages, which should not be called in that case because
4985         Warning_Msg_Char is not set.
4987 2017-09-06  Justin Squirek  <squirek@adacore.com>
4989         * sem_prag.adb (Check_VFA_Conflicts): Created
4990         to group all Volatile_Full_Access checks relating to other
4991         representation pragmas (Mark_Component_Or_Object): Created
4992         to centeralize the flagging of attributes for the record type
4993         component case, a pragma applied individually to a component, and
4994         the object case.
4995         (Process_Atomic_Independent_Shared_Volatile):
4996         Add propagation of certain pragmas to record components and move
4997         evaluation of VFA checks
4999 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5001         * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
5002         Do not warn on conditions that are not obeyed for Inline_Always
5003         subprograms, when assertions are not enabled.
5005 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
5007         * sem_util.adb (Unique_Entity): For abstract states return their
5008         non-limited view.
5010 2017-09-06  Bob Duff  <duff@adacore.com>
5012         * sem_ch12.adb (Copy_Generic_Node): When we copy a node
5013         that is a proper body corresponding to a stub, we defer the
5014         adjustment of the sloc until after the correct adjustment has
5015         been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
5016         the adjustment, because it will be outside the range in (the old,
5017         incorrect) S_Adjustment.
5018         * inline.adb: Use named notation for readability and uniformity.
5019         * sinput-l.adb: Minor improvements to debugging output printed
5020         for Debug_Flag_L.
5021         * sinput-l.ads (Create_Instantiation_Source): Minor comment
5022         correction.
5024 2017-09-06  Vincent Celier  <celier@adacore.com>
5026         * make.adb: Do not invoke gprbuild for -bargs -P.
5028 2017-09-06  Sylvain Dailler  <dailler@adacore.com>
5030         * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
5031         case when Op is of kind N_Qualified_Expression. In this case,
5032         the function is called recursively on the subexpression like in
5033         other cases.
5034         * make.adb: Minor reformatting
5036 2017-09-06  Justin Squirek  <squirek@adacore.com>
5038         * einfo.adb (Set_Linker_Section_Pragma): Modify
5039         Set_Linker_Section_Pragma to be consistant with the "getter"
5040         Linker_Section_Pragma.
5041         * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
5042         checking for container loops so that the index cursor is not
5043         directly changable by the user with the use of E_Loop_Parameter.
5044         * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
5045         * sem_warn.adb (Check_References): Revert previous change.
5047 2017-09-06  Bob Duff  <duff@adacore.com>
5049         * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
5050         calls and the like.
5052 2017-09-06  Yannick Moy  <moy@adacore.com>
5054         * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
5055         declarations to only consider valid uses of Global/Depends those on
5056         single concurrent objects.
5058 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5060         * sem_ch13.adb (Check_Record_Representation_Clause): Give an
5061         error as soon as one of the specified components overlaps the
5062         parent field.
5064 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
5066         * sem_prag.ads: minor fix typo in comment.
5068 2017-09-06  Justin Squirek  <squirek@adacore.com>
5070         * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
5071         from source before checking source references.
5072         * sem_warn.adb (Check_References): Add check for internal block
5073         before recursing.
5075 2017-09-06  Vincent Celier  <celier@adacore.com>
5077         * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
5078         make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
5079         gnatname.adb: Remove the Project Manager from the GNAT tools.
5080         * gcc-interface/Makefile.in: ditto.
5082 2017-09-06  Bob Duff  <duff@adacore.com>
5084         * sem_util.ads: Minor comment fix.
5086 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5088         * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
5089         Generate a freeze node for the actual of a formal package, if
5090         the actual is declared in the same unit and has a corresponding
5091         body, to prevent the current instance from being frozen before
5092         the actual is.
5094 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5096         * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
5098 2017-09-06  Yannick Moy  <moy@adacore.com>
5100         * sem_warn.adb: Minor refactoring.
5102 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5104         * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
5105         to retrieve the inherited classwide precondition/postcondition
5106         of a subprogram.
5107         * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
5108         freezing a subprogram, to complete the generation of the
5109         corresponding checking code.
5111 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5113         * exp_util.adb (Is_Controlled_Indexing): New routine.
5114         (Is_Displace_Call): Use routine Strip to remove indirections.
5115         (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
5116         missing case of controlled generalized indexing.
5117         (Is_Source_Object): Use routine Strip to remove indirections.
5118         (Strip): New routine.
5120 2017-09-06  Bob Duff  <duff@adacore.com>
5122         * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
5123         we include the proper header. Otherwise, we just declare the necessary
5124         things from the capabilities library. This is so we can build on
5125         machines without that library, while still enabling that library.
5126         At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
5127         simply return 0 if the library is not present, or not included
5128         in the link.
5130 2017-09-06  Pierre-Marie de Rodat  <derodat@adacore.com>
5132         * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
5133         for renamings that involve function calls in prefix form.
5135 2017-09-06  Bob Duff  <duff@adacore.com>
5137         * sem_ch3.adb (Analyze_Subtype_Declaration):
5138         Set Has_Delayed_Freeze on a subtype of an incomplete type.
5140 2017-09-06  Pierre-Marie de Rodat  <derodat@adacore.com>
5142         * par_sco.adb (Extend_Statement_Sequence): When the accept statement
5143         has no parameter specification and no entry index, use the entry name
5144         as the end of the generated SCO statement.
5146 2017-09-06  Steve Baird  <baird@adacore.com>
5148         * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
5149         uses of 'Image and related attributes as having side effects in
5150         order to avoid replicating such uses.
5151         * pprint.ads (Expression_Image) Add new generic formal flag
5152         Hide_Temp_Derefs.  The flag defaults to False; CodePeer will
5153         (eventually) override the default.
5154         * pprint.adb (Expression_Image) If the new flag is set, then
5155         suppress the ".all" suffix when displaying a dereference whose
5156         prefix is a use of a value-capturing compiler temp of the sort
5157         generated by Expr_Util.Remove_Side_Effects .
5158         * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
5159         sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
5160         Minor reformatting.
5161         * inline.adb: Minor wording change.
5163 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5165         * sem_ch7.adb: Update comment.
5167 2017-09-06  Yannick Moy  <moy@adacore.com>
5169         * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
5170         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
5171         * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
5172         with slight modification from Is_Subp_Or_Entry_Inside_Protected,
5173         so that applies to any entity.
5175 2017-09-06  Yannick Moy  <moy@adacore.com>
5177         * sem_ch3.adb (Derived_Type_Declaration): Use
5178         Incomplete_Or_Partial_View rather than local Find_Partial_View.
5180 2017-09-06  Javier Miranda  <miranda@adacore.com>
5182         * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
5183         following ISO-8861.
5185 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5187         * sem_dim.adb (Analyze_Dimension): In an instance, a type
5188         conversion takes its dimensions from the expression, not from
5189         the context type.
5190         (Dimensions_Of_Operand): Ditto.
5192 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5194         * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
5195         null procedures when GNAT coverage is used, so that their (empty)
5196         bodies are properly covered.
5198 2017-09-06  Bob Duff  <duff@adacore.com>
5200         * sem_ch13.adb (Resolve_Aspect_Expressions): If
5201         the entity is a type with discriminants, make the discriminants
5202         directly visible in aspect clauses.
5204 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5206         * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
5207         Universal_Real and the context is a floating-point type, resolve
5208         both operands to the target type.
5210 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5212         * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
5213         sem_ch3.adb, sem_util.adb: Minor reformatting.
5215 2017-09-06  Yannick Moy  <moy@adacore.com>
5217         * freeze.adb (Check_Inherited_Conditions): Rewriting
5218         of inherited preconditions and postconditions should only occur
5219         in GNATprove mode, that is, when GNATprove_Mode is True, not to
5220         be confused with SPARK_Mode being On.
5222 2017-09-06  Yannick Moy  <moy@adacore.com>
5224         * sem_warn.adb (Check_References): Take into
5225         account possibility of attribute reference as original node.
5227 2017-09-06  Yannick Moy  <moy@adacore.com>
5229         * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
5230         use of attribute.
5232 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5234         * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
5235         on the procedure created to encapsulate the body.
5236         * sem_ch7.adb: Add with clause for GNAT.HTable.
5237         (Entity_Table_Size): New constant.
5238         (Entity_Hash): New function.
5239         (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
5240         (Is_Subprogram_Ref): Rename into...
5241         (Scan_Subprogram_Ref): ...this. Record references to subprograms in
5242         the table instead of bailing out on them. Scan the value of constants
5243         if it is not known at compile time.
5244         (Contains_Subprograms_Refs): Rename into...
5245         (Scan_Subprogram_Refs): ...this.
5246         (Has_Referencer): Scan the body of all inlined subprograms. Reset the
5247         Is_Public flag on subprograms if they are not actually referenced.
5248         (Hide_Public_Entities): Beef up comment on the algorithm.
5249         Reset the table of subprograms on entry.
5251 2017-09-06  Yannick Moy  <moy@adacore.com>
5253         * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
5255 2017-09-06  Javier Miranda  <miranda@adacore.com>
5257         * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
5258         cannot handle a type conversion of an array as an aggregate
5259         component.
5261 2017-09-06  Bob Duff  <duff@adacore.com>
5263         * g-comlin.adb (Try_Help): Remove ".exe" so we
5264         get the same results on windows and unix.
5266 2017-09-06  Justin Squirek  <squirek@adacore.com>
5268         * exp_imgv.adb (Expand_Image_Attribute),
5269         (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
5270         Added case to handle new-style 'Image expansion
5271         (Rewrite_Object_Image): Moved from exp_attr.adb
5272         * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5273         attribute cases so that the relevant subprograms in exp_imgv.adb
5274         handle all expansion.
5275         (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
5276         * sem_attr.adb (Analyze_Attribute): Modified Image attribute
5277         cases to call common function Analyze_Image_Attribute.
5278         (Analyze_Image_Attribute): Created as a common path for all
5279         image attributes (Check_Object_Reference_Image): Removed
5280         * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5281         Removed and refactored into Is_Object_Image (Is_Object_Image):
5282         Created as a replacement for Is_Image_Applied_To_Object
5284 2017-09-06  Yannick Moy  <moy@adacore.com>
5286         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
5287         message for missing input.
5289 2017-09-06  Yannick Moy  <moy@adacore.com>
5291         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
5292         of protected subprograms and entries.
5293         * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
5294         New function to detect when a subprogram of entry is defined
5295         inside a protected object.
5297 2017-09-06  Bob Duff  <duff@adacore.com>
5299         * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
5300         whether the current process has the CAP_SYS_NICE capability.
5301         * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
5302         ceiling priorities if the current process has the CAP_SYS_NICE
5303         capability.
5305 2017-09-06  Bob Duff  <duff@adacore.com>
5307         * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
5308         check back to the body, because SPARK is not yet ready for
5309         "or else raise Constraint_Error".
5311 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5313         * exp_ch6.adb (Expand_Call_Helper): Replace call to null
5314         procedure by a single null statement, after evaluating the
5315         actuals that require it.
5317 2017-09-06  Javier Miranda  <miranda@adacore.com>
5319         * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
5320         Generating C code improve the code that checks the use of nested
5321         aggregates to initialize object declarations.
5323 2017-09-06  Yannick Moy  <moy@adacore.com>
5325         * sem_ch3.adb (Derived_Type_Declaration): Detect
5326         violations of new rule SPARK RM 3.4(1).  Also refactor existing
5327         check to use the new function Find_Partial_View.
5329 2017-09-06  Vincent Celier  <celier@adacore.com>
5331         * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P...  The code
5332         from the Prj hierarchy has been removed from the GNAT driver.
5334 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5336         * sem_type.adb (Interface_Present_In_Ancestor): Within an
5337         expression function, or within a spec expression (default value,
5338         etc) a reference to an incomplete type is legal: legality of
5339         the operation will be checked when some related entity (type,
5340         object or subprogram) is frozen.
5342 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
5344         * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
5345         adjustments and a typo fix.
5347 2017-09-06  Yannick Moy  <moy@adacore.com>
5349         * sem_res.adb (Resolve_Call): Do not issue info
5350         message about inlining of calls to functions in assertions,
5351         for functions whose body has not been seen yet.
5353 2017-09-06  Bob Duff  <duff@adacore.com>
5355         * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
5356         we can use modern Ada in this package.
5357         * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
5358         Move Ada.Command_Line.Response_File to System.Response_File,
5359         and make Ada.Command_Line.Response_File into a rename of
5360         System.Response_File. This is to avoid having gnatbind depend
5361         Ada.Command_Line, which would damage the bootstrap process now
5362         that Ada.Command_Line contains modern Ada (the raise expression).
5363         * gnatbind.adb: Avoid dependence on
5364         Ada.Command_Line. Depend on System.Response_File instead
5365         of Ada.Command_Line.Response_File. Change one call to
5366         Ada.Command_Line.Command_Name to use Fill_Arg.  Change one call
5367         to Ada.Command_Line.Argument_Count to use Arg_Count.
5368         * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
5370 2017-09-06  Bob Duff  <duff@adacore.com>
5372         * frontend.adb (Frontend): Skip -gnatec=gnat.adc
5373         switch, because we've already read gnat.adc by default.
5375 2017-09-06  Bob Duff  <duff@adacore.com>
5377         * exp_ch5.adb (Get_Default_Iterator): Replace
5378         "Assert(False)" with "return Iter", because if an iterable
5379         type is derived from a noniterable one, then we won't find an
5380         overriding or inherited default iterator.
5382 2017-09-06  Yannick Moy  <moy@adacore.com>
5384         * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
5385         literal index used to access a string is null or negative.
5387 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5389         * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
5390         allowed on loop parameters.
5391         (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
5392         on loop parameters.
5393         (Write_Field15_Name): Update the output for
5394         Status_Flag_Or_Transient_Decl.
5395         * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
5396         to loop parameters. Update the documentation of the attribute
5397         and the E_Loop_Parameter entity.
5398         * exp_ch7.adb (Process_Declarations): Remove the bogus guard
5399         which assumes that cursors can never be controlled.
5400         * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
5401         guard which assumes that cursors can never be controlled.
5403 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5405         * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
5406         sem_warn.adb: Minor reformatting.
5408 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5410         * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
5411         fix and preserve older GNAT warning on overlapping actuals that
5412         are not elementary types.
5414 2017-09-06  Justin Squirek  <squirek@adacore.com>
5416         * sem_attr.adb: Comment correction.
5418 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
5420         * sem_util.adb: Minor reformatting.
5422 2017-09-06  Yannick Moy  <moy@adacore.com>
5424         * a-comlin.ads (Argument): Add precondition for analysis.
5426 2017-09-06  Yannick Moy  <moy@adacore.com>
5428         * sem_res.adb (Resolve): Update message for function call as statement.
5430 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5432         * sem_ch6.adb (Check_Returns): Clean up warnings coming from
5433         generated bodies for renamings that are completions, when renamed
5434         procedure is No_Return.
5435         * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5436         rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
5437         with No_Return, the renamed entity must be No_Return as well.
5439 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5441         * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
5442         Minor reformatting.
5444 2017-09-06  Justin Squirek  <squirek@adacore.com>
5446         * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5447         attribute cases (Rewrite_Object_Reference_Image): Created to
5448         aid the rewriting of new-style 'Image attributes.
5449         * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
5450         (Check_Object_Reference_Image): Created to handle verification of
5451         'Image with object-references as prefixes.
5452         * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5453         Create predicate to identify cases where an 'Image attribute's
5454         prefix applies to an object reference.
5456 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5458         * freeze.adb (Freeze_Entity): Do not generate a freeze
5459         node for a generic unit, even if it includes delayed aspect
5460         specifications. Freeze nodes for generic entities must never
5461         appear in the tree that reaches the back-end of the compiler.
5463 2017-09-06  Yannick Moy  <moy@adacore.com>
5465         * treepr.adb (Print_Entity_Info): Do not print empty Elist.
5467 2017-09-06  Yannick Moy  <moy@adacore.com>
5469         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
5470         to subprograms in other units as possibly inlined.
5472 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5474         * freeze.adb (Freeze_Entity): For a derived type that has no
5475         explicit delayed aspects but may inherit delayed aspects from its
5476         parent type, analyze aspect at freeze point for proper capture
5477         of an inherited aspect.
5479 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
5481         * lib-xref.adb (Get_Through_Renamings): Get through subprogram
5482         renamings; also, avoid repeated calls to Renamed_Object when getting
5483         through object renamings.
5485 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5487         * sem_ch3.adb (Array_Type_Declaration): Handle properly an
5488         array type declaration in a private part, when an index is a
5489         subtype indication of a discrete type with a private partial view.
5491 2017-09-06  Javier Miranda  <miranda@adacore.com>
5493         * exp_ch4.adb (Expand_Modular_Op): Force generating
5494         temporary to improve the generated code.
5496 2017-09-06  Tristan Gingold  <gingold@adacore.com>
5498         * s-fatgen.adb: Minor typo fix in comment.
5500 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5502         * exp_ch5.adb (Make_Field_Assign): If the type
5503         of the right-hand side has stored constraint, use its values
5504         (except for those that are renamings of parent discriminants)
5505         to produce additional assignments for the discriminants of the
5506         left-hand side, which are invisible in the righ-hand side and
5507         not retrievable as selected components.
5509 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5511         * sem_util.adb (Needs_One_Formal): The first formal of such a
5512         function must be a controlling formal, so that Obj.F (X, Y)
5513         can have the interpretation F(Obj)(X, Y).
5514         * sem_util.ads: Clarify documentation.
5516 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5518         * table.ads, table.adb: Restore original implementation.
5519         * namet.h (Names_Ptr): Adjust back.
5520         (Name_Chars_Ptr): Likewise.
5521         * uintp.h (Uints_Ptr): Likewise.
5522         (Udigits_Ptr): Likewise.
5523         * g-table.ads: Remove pragma Compiler_Unit_Warning.
5524         * par_sco.adb: Do not with GNAT.Table and use Table consistently.
5525         * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
5526         * spark_xrefs.ads: Likewise.
5527         * scos.h: Undo latest changes.
5529 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5531         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
5532         No_Return flag to instance if pragma applies to generic unit. This
5533         must be done explicitly because the pragma does not appear
5534         directly in the generic declaration (unlike the corresponding
5535         aspect specification).
5537 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5539         * sem_ch7.adb (Has_Referencer): Move up and expand comment
5540         explaining the test used to detect inlining.  Use same test
5541         in second occurrence.
5542         (Analyze_Package_Body_Helper): Minor formatting fixes.
5544 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5546         * exp_ch4.adb (Handle_Changed_Representation): For an untagged
5547         derived type with a mixture of renamed and constrained parent
5548         discriminants, the constraint for the target must obtain the
5549         discriminant values from both the operand and from the stored
5550         constraint for it, given that the constrained discriminants are
5551         not visible in the object.
5552         * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
5553         side may be derived from that of the left-hand side (as in the
5554         case of an assignment with a change of representation) so the
5555         discriminant to be used in the retrieval of the value of the
5556         component must be the entity in the type of the right-hand side.
5558 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5560         * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
5561         sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5562         * exp_util.adb (Is_Source_Object): Account for
5563         the cases where the source object may appear as a dereference
5564         or within a type conversion.
5565         * exp_ch6.adb: Fix missing space in error message.
5567 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5569         * sem_prag.adb: Update description of Eliminate.
5571 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5573         * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
5574         properly an attribute reference 'Loop_Entry that appears in the
5575         list of indices of an indexed expression, to prevent an infinite
5576         loop in the compiler.
5578 2017-09-06  Bob Duff  <duff@adacore.com>
5580         * s-fileio.adb (Name): Do not raise Use_Error for temp files.
5582 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5584         * sem_ch4.adb (Analyze_Set_Membership):  If an alternative
5585         in a set membership is an overloaded enumeration literal, and
5586         the type of the alternative is resolved from a previous one,
5587         replace the entity of the alternative as well as the type,
5588         to prevent inconsistencies between the entity and the type.
5590 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5592         * ali.ads (ALIs_Record): Add No_Component_Reordering component.
5593         (No_Component_Reordering_Specified): New switch.
5594         * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
5595         (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
5596         * bcheck.adb (Check_Consistent_No_Component_Reordering):
5597         New check.
5598         (Check_Configuration_Consistency): Invoke it.
5599         * debug.adb (d.r): Toggle the effect of the switch.
5600         (d.v): Change to no-op.
5601         * einfo.ads (Has_Complex_Representation):
5602         Restrict to record types.
5603         (No_Reordering): New alias for Flag239.
5604         (OK_To_Reorder_Components): Delete.
5605         (No_Reordering): Declare.
5606         (Set_No_Reordering): Likewise.
5607         (OK_To_Reorder_Components): Delete.
5608         (Set_OK_To_Reorder_Components): Likewise.
5609         * einfo.adb (Has_Complex_Representation): Expect record types.
5610         (No_Reordering): New function.
5611         (OK_To_Reorder_Components): Delete.
5612         (Set_Has_Complex_Representation): Expect base record types.
5613         (Set_No_Reordering): New procedure.
5614         (Set_OK_To_Reorder_Components): Delete.
5615         (Write_Entity_Flags): Adjust to above change.
5616         * fe.h (Debug_Flag_Dot_R): New macro and declaration.
5617         * freeze.adb (Freeze_Record_Type): Remove conditional code setting
5618         OK_To_Reorder_Components on record types with convention Ada.
5619         * lib-writ.adb (Write_ALI): Deal with NC marker.
5620         * opt.ads (No_Component_Reordering): New flag.
5621         (No_Component_Reordering_Config): Likewise.
5622         (Config_Switches_Type): Add No_Component_Reordering component.
5623         * opt.adb (Register_Opt_Config_Switches): Copy
5624         No_Component_Reordering onto No_Component_Reordering_Config.
5625         (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
5626         (Save_Opt_Config_Switches): Save No_Component_Reordering.
5627         (Set_Opt_Config_Switches): Set No_Component_Reordering.
5628         * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
5629         * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
5630         No_Reordering flag from the default.
5631         (Build_Derived_Private_Type): Likewise.
5632         (Build_Derived_Record_Type): Likewise.  Then inherit it
5633         for untagged types and clean up handling of similar flags.
5634         (Record_Type_Declaration): Likewise.
5635         * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
5636         remove redundant test on Is_Tagged_Type.
5637         * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
5638         (Sig_Flags): Likewise.
5639         * snames.ads-tmpl (Name_No_Component_Reordering): New name.
5640         (Pragma_Id): Add Pragma_No_Component_Reordering value.
5641         * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
5642         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
5643         Copy the layout of the parent type only if the No_Reordering
5644         settings match.
5645         (components_to_record): Reorder record types with
5646         convention Ada by default unless No_Reordering is set or -gnatd.r
5647         is specified and do not warn if No_Reordering is set in GNAT mode.
5649 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5651         * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
5652         new predicate to reject declarations that can be completions,
5653         when there is a visible prior homograph that is a null procedure.
5654         * sem_ch6.adb (Analyze_Null_Procedure): use it.
5655         * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
5657 2017-09-06  Thomas Quinot  <quinot@adacore.com>
5659         * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
5660         run of 253 characters or more.
5662 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5664         * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
5665         properly incomplete subtypes that may be created by explicit or
5666         implicit declarations.
5667         (Is_Base_Type): Take E_Incomplete_Subtype into account.
5668         (Subtype_Kind): Ditto.
5669         * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
5670         Ekind of a subtype of a discriminated incomplete type.
5671         (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
5672         incomplete types, to preserve error reporting.
5673         (Process_Incomplete_Dependents): Do not create a subtype
5674         declaration for an incomplete subtype that is created internally.
5675         * sem_ch7.adb (Analyze_Package_Specification): Handle properly
5676         incomplete subtypes that do not require a completion, either
5677         because they are limited views, of they are generic actuals.
5679 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5681         * checks.adb (Insert_Valid_Check): Remove the
5682         suspicious manipulation of the Do_Range_Check flag as ths is
5683         no linger needed. Suppress validity check when analysing the
5684         validation variable.
5686 2017-09-06  Philippe Gil  <gil@adacore.com>
5688         * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
5689         GNATCOLL.Memory
5691 2017-09-06  Bob Duff  <duff@adacore.com>
5693         * sem_elim.adb: Minor comment fix.
5695 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5697         * sem_util.adb (Is_Object_Reference): A function call is an
5698         object reference, and thus attribute references for attributes
5699         that are functions (such as Pred and Succ) as well as predefined
5700         operators are legal in contexts that require an object, such as
5701         the prefix of attribute Img and the Ada2020 version of 'Image.
5703 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
5705         * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
5706         exp_ch3.adb, xoscons.adb: Minor reformatting.
5708 2017-09-06  Raphael Amiard  <amiard@adacore.com>
5710         * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
5711         Position parameter. If supplied, use it to provide efficient iteration.
5712         * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
5713         a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
5714         iteration.
5716 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5718         * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
5719         designated type is class-wide and the expression is an unchecked
5720         conversion, preserve the conversion when checking the tag of the
5721         designated object, to prevent spurious semantic errors when the
5722         expression in the conversion has an untagged type (for example
5723         an address attribute).
5725 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5727         * sem_res.adb (Resolve_Entry_Call): Check whether a protected
5728         operation is subject to a pragma Eliminate.
5730 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
5732         * sem_elim.ads, exp_ch4.adb: Minor reformatting.
5734 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
5736         * fe.h (Eliminate_Error_Msg): Remove.
5738 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5740         * gcc-interface/utils.c (make_packable_type): Update call to
5741         mode_for_size_tree.
5743 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5745         * gcc-interface/utils2.c (build_load_modify_store):
5746         Use int_mode_for_size.
5748 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5750         PR ada/62235
5751         * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5752         for Itypes that are E_Record_Subtype with a cloned subtype.
5753         <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
5755 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5757         * gcc-interface/trans.c (convert_with_check): Use a custom base type
5758         if the base type of the expression has a different machine mode.
5759         Rename a couple of parameters and local variable.
5761 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5763         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
5764         conversions around prefixes that are not references.
5766 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5768         * gcc-interface/utils.c (unchecked_convert): When the result type is a
5769         non-biased integral type with size 0, set the result to 0 directly.
5771 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5773         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
5774         (renaming_from_instantiation_p): ...this.
5775         * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
5776         instead of explicit tests on kind of entities.  Adjust for renaming.
5777         (gnat_to_gnu_profile_type): Likewise.
5778         (gnat_to_gnu_subprog_type): Likewise.
5779         * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
5780         (Case_Statement_to_gnu): Likewise.
5781         (gnat_to_gnu): Likewise.
5782         (process_freeze_entity): Likewise.
5783         (process_type): Likewise.
5784         (add_stmt_with_node): Adjust for renaming.
5785         * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
5786         (renaming_from_generic_instantiation_p): Rename to...
5787         (renaming_from_instantiation_p): ...this.  Use inline predicate.
5788         (pad_type_hasher::keep_cache_entry): Fold.
5790 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5792         * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
5793         (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
5794         (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
5795         (N_Slice): Likewise.
5796         (N_Selected_Component): Likewise.  Do not try again to translate it.
5797         (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
5799 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5801         * repinfo.ads: Document new treatment of dynamic values.
5802         (TCode): Bump upper bound to 29.
5803         (Dynamic_Val): New constant set to 29.
5804         * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
5805         (Rep_Value)  <Dynamic_Val>: Likewise.
5806         * repinfo.h (Dynamic_Val): New macro.
5807         * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
5808         DECL_P nodes too.
5809         <INTEGER_CST>: Set TCODE instead of recursing.
5810         <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
5811         <VAR_DECL>: New case.
5812         <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
5813         <BIT_AND_EXPR>: Adjust.
5814         <CALL_EXPR>: Do not fall through.
5816 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5818         * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
5819         there is no target, do not create a temporary for the return value for
5820         an allocator either.
5822 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
5824         * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
5825         unconstrained array type.
5827 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5828             Alan Hayward  <alan.hayward@arm.com>
5829             David Sherwood  <david.sherwood@arm.com>
5831         * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
5832         instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
5834 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5835             Alan Hayward  <alan.hayward@arm.com>
5836             David Sherwood  <david.sherwood@arm.com>
5838         * gcc-interface/decl.c (check_ok_for_atomic_type): Use
5839         is_a <scalar_int_mode>.
5840         * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
5841         * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
5843 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5844             Alan Hayward  <alan.hayward@arm.com>
5845             David Sherwood  <david.sherwood@arm.com>
5847         * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
5848         instead of mode_for_size.
5849         (gnat_to_gnu_subprog_type): Likewise.
5850         * gcc-interface/utils.c (make_type_from_size): Likewise.
5852 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5853             Alan Hayward  <alan.hayward@arm.com>
5854             David Sherwood  <david.sherwood@arm.com>
5856         * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
5857         (fp_size_to_prec): Likewise.
5859 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5860             Alan Hayward  <alan.hayward@arm.com>
5861             David Sherwood  <david.sherwood@arm.com>
5863         * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
5864         <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
5866 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5867             Alan Hayward  <alan.hayward@arm.com>
5868             David Sherwood  <david.sherwood@arm.com>
5870         * gcc-interface/decl.c (validate_size): Update use of
5871         GET_MODE_WIDER_MODE, forcing a wider mode to exist.
5873 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
5874             Alan Hayward  <alan.hayward@arm.com>
5875             David Sherwood  <david.sherwood@arm.com>
5877         * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
5878         (fp_size_to_prec): Likewise.
5880 2017-08-29  Martin Liska  <mliska@suse.cz>
5882         PR other/39851
5883         * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
5885 2017-08-08  Martin Liska  <mliska@suse.cz>
5887         * gcc-interface/trans.c: Include header files.
5889 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
5891         * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
5892         as new argument to the imported_module_or_decl debug hook.
5894 2017-07-25  Javier Miranda  <miranda@adacore.com>
5896         * checks.adb (Apply_Divide_Checks): Ensure that operands are not
5897         evaluated twice. 
5899 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
5901         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
5902         TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
5903         (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
5905 2017-07-18  Mike Frysinger  <vapier@chromium.org>
5907         * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
5908         (../../gnatlink$(exeext)): Likewise.
5910 2017-07-15  John Paul Adrian Glaubitz  <glaubitz@physik.fu-berlin.de>
5912         PR ada/81446
5913         * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
5914         (Backend_Overflow_Checks): Set to True.
5916 2017-06-23  Jakub Jelinek  <jakub@redhat.com>
5918         * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
5920 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
5922         * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
5923         notice.  New macro.
5924         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
5925         as a definition.
5926         (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
5927         definition.
5928         * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
5929         imported subprograms for the current compilation unit as
5930         definitions.  Disable debug info for references to variables.
5931         * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
5932         * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
5933         not built-in functions to their binding scope.
5934         (create_subprog_decl): Add a DEFINITION parameter.  If it is true, tag
5935         the function as a definition.  Update all callers.
5936         (gnat_write_global_declarations): Emit debug info for imported
5937         functions.  Filter out external variables for which debug info
5938         is disabled.
5940 2017-06-15  Nicolas Boulenguez  <nicolas.boulenguez@free.fr>
5942         PR ada/81105
5943         * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
5944         (i[3456]86-pc-gnu): Likewise.
5945         (x86_64 kfreebsd): Likewise.
5947 2017-06-12  Eric Botcazou  <ebotcazou@adacore.com>
5949         PR bootstrap/80897
5950         * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
5952 2017-06-12  Eric Botcazou  <ebotcazou@adacore.com>
5954         PR ada/81070
5955         * s-interr-hwint.adb: Reinstate.
5956         * gcc-interface/Makefile.in (RTEMS): Use it again.
5958 2017-06-08  Olivier Hainque  <hainque@adacore.com>
5960         * vx_crtbegin_auto.c: Update year in copyright notice.
5961         * vx_crtbegin.c: Likewise.
5962         * vx_crtbegin.inc: Likewise. 
5963         * vx_crtend.c:  Likewise.
5965 2017-06-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5967         * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
5968         * s-tpopsp-rtems.adb: Delete.
5970 2017-06-02  Olivier Hainque  <hainque@adacore.com>
5972         * vx_crtbegin_auto.c: New file.
5973         * vx_crtbegin.c: New file.
5974         * vx_crtbegin.inc: New file.
5975         * vx_crtend.c: New file.
5977 2017-05-25  Jonathan Wakely  <jwakely@redhat.com>
5979         * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
5980         const qualifiers that cause -Wignored-qualifiers warnings.
5982 2017-05-22  Eric Botcazou  <ebotcazou@adacore.com>
5984         * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5985         for Itypes that are E_Access_Subtype.
5986         <E_Access_Subtype>: Use the DECL of the base type directly.
5988 2017-05-22  Ed Schonberg  <schonberg@adacore.com>
5989             Eric Botcazou  <ebotcazou@adacore.com>
5991         * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
5992         limited view may appear in the profile of a function, and a call to
5993         that function in another unit in which the full view is available must
5994         use this full view to spurious type errors at the point of call.
5995         * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
5996         of parent body with a with clause for the main unit.
5997         * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
5998         (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
5999         types declared in external units like types from limited with clauses.
6000         Adjust final processing of defer_limited_with_list accordingly.
6001         * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
6002         again to translate the prefix after the field if it is incomplete.
6004 2017-05-22  Eric Botcazou  <ebotcazou@adacore.com>
6006         * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
6007         alignment for simple volatile fields and remove associated errors.
6009 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6011         * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
6012         * gcc-interface/trans.c (get_elaboration_procedure): Make static.
6014 2017-05-15  Pierre-Marie de Rodat  <derodat@adacore.com>
6016         * gcc-interface/utils.c (can_materialize_object_renaming_p):
6017         Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
6018         process Original_Node instead of expanded names.
6020 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6022         * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
6023         addressability check in the constrained case.
6025 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6027         * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
6028         types not coming from a limited context.
6030 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6032         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
6033         the inlined list that are not public.
6034         * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
6035         there is a pragma Inline_Always on the subprogram.
6037 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6039         * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
6040         <N_Allocator>: Use properly typed constants.
6041         (extract_values): Move around.
6042         (pos_to_constructor): Minor tweaks.
6043         (Sloc_to_locus): Fix formatting.
6044         * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
6045         * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
6046         (Gigi_Equivalent_Type): Adjust head comment.
6047         * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
6049 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
6051         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
6052         is a representation clause on an extension, propagate the alignment of
6053         the parent type only if the platform requires strict alignment.
6055 2017-05-12  Eric Botcazou  <ebotcazou@adacore.com>
6057         * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
6058         instead of Word_Size.
6060         Revert
6061         2017-03-28  Andreas Schwab  <schwab@suse.de>
6063         PR ada/80117
6064         * system-linux-aarch64-ilp32.ads: New file.
6065         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6066         from LIBGNAT_TARGET_PAIRS.
6067         (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6068         (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6069         LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6070         or -mabi=ilp32, resp.
6072 2017-05-10  H.J. Lu  <hongjiu.lu@intel.com>
6074         PR ada/80626
6075         * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
6076         instead of Word_Size.
6078 2017-05-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6080         * raise-gcc.c (exception_class_eq): Make ec parameter const.
6082 2017-05-02  Richard Biener  <rguenther@suse.de>
6084         * gcc-interface/misc.c (gnat_post_options): Do not set
6085         -fstrict-overflow.
6087 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6089         * gcc-interface/trans.c (assoc_to_constructor): Make sure
6090         Corresponding_Discriminant is only called on discriminants.
6091         Skip the saving of the result only for them.
6092         (gnat_to_gnu) <N_Selected_Component>: Likewise.
6093         <N_Unchecked_Type_Conversion>: Translate the result type first.
6094         (gigi): Set TREE_NOTHROW on Begin_Handler.
6095         (stmt_list_cannot_raise_p): New predicate.
6096         (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
6097         a cleanup if the statements of the handler cannot raise.
6098         (process_freeze_entity): Use Is_Record_Type.
6099         (process_type): Likewise.
6101 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6103         * einfo.ads (Corresponding_Record_Component): New alias
6104         for Node21 used for E_Component and E_Discriminant.
6105         * einfo.adb (Corresponding_Record_Component): New function.
6106         (Set_Corresponding_Record_Component): New procedure.
6107         (Write_Field21_Name): Handle Corresponding_Record_Component.
6108         * sem_ch3.adb (Inherit_Component): Set
6109         Corresponding_Record_Component for every component in
6110         the untagged case.  Clear it afterwards for non-girder
6111         discriminants.
6112         * gcc-interface/decl.c (gnat_to_gnu_entity)
6113         <E_Record_Type>: For a derived untagged type with discriminants
6114         and constraints, apply the constraints to the layout of the
6115         parent type to deduce the layout.
6116         (field_is_aliased): Delete.
6117         (components_to_record): Test DECL_ALIASED_P directly.
6118         (annotate_rep): Check that fields are present except for
6119         an extension.
6120         (create_field_decl_from): Add DEBUG_INFO_P
6121         parameter and pass it in recursive and other calls.  Add guard
6122         for the manual CSE on the size.
6123         (is_stored_discriminant): New predicate.
6124         (copy_and_substitute_in_layout): Consider only
6125         stored discriminants and check that original fields are present
6126         in the old type.  Deal with derived types.  Adjust call to
6127         create_variant_part_from.
6129 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6131         * exp_ch6.adb (Expand_Call_Helper): When locating the
6132         accessibility entity created for an access parameter, handle
6133         properly a reference to a formal of an enclosing subprogram. if
6134         the reference appears in an inherited class-wide condition, it
6135         is the rewriting of the reference in the ancestor expression,
6136         but the accessibility entity must be that of the current formal.
6138 2017-05-02  Javier Miranda  <miranda@adacore.com>
6140         * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
6141         (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
6142         Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
6143         Call Expand_Non_Binary_Modular_Op.
6145 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6147         * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
6148         has discriminants, do not override the Stored_Constraint list of
6149         the full view of the derived type with that of the derived type.
6151 2017-05-02  Bob Duff  <duff@adacore.com>
6153         * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
6155 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
6157         * s-os_lib.ads: Minor typo fix.
6159 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
6161         * gnatls.adb: Merge and refactor code from Prj.Env and remove
6162         this deprecated dependency.
6164 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6166         * exp_util.ads: minor comment addition.
6168 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6170         * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
6171         pastos in part #3 of the head comment.
6173 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6175         * exp_ch3.adb (Freeze_Type): Do not generate an invariant
6176         procedure body for a local (sub)type declaration within a
6177         predicate function. Invariant checks do not apply to these, and
6178         the expansion of the procedure will happen in the wrong scope,
6179         leading to misplaced freeze nodes.
6181 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6183         * exp_util.adb (Insert_Library_Level_Action): Use proper scope
6184         to analyze generated actions.  If the main unit is a body,
6185         the required scope is that of the corresponding unit declaration.
6187 2017-05-02  Arnaud Charlet  <charlet@adacore.com>
6189         * einfo.adb (Declaration_Node): flip branches of
6190         an IF statement to avoid repeated negations in its condition;
6191         no change in semantics, only to improve readability.
6193 2017-05-02  Arnaud Charlet  <charlet@adacore.com>
6195         * sem_case.adb: Remove extra spaces in parameter declarations.
6197 2017-05-02  Justin Squirek  <squirek@adacore.com>
6199         * usage.adb: Replace space with hyphen ("run time" -> "run-time")
6200         in usage line for new -gnatwE switch.
6202 2017-05-02  Claire Dross  <dross@adacore.com>
6204         * a-cofuve.ads (Remove): Remove unnecessary
6205         conditions in precondition.
6207 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
6209         * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
6210         sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
6212 2017-05-02  Justin Squirek  <squirek@adacore.com>
6214         * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6215         alternative expression.
6216         * sem_res.adb (Resolve_Case_Expression): Ditto.
6218 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6220         * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
6221         Refine predicate for the case where the primitive operation
6222         is a renaming of equality.  An overriding operation that is
6223         a user-defined renaming of predefined equality inherits its
6224         slot from the overridden operation. Otherwise it is treated
6225         as a predefined op and occupies the same predefined slot as
6226         equality. A call to it is transformed into a call to its alias,
6227         which is the predefined equality. A dispatching call thus uses
6228         the proper slot if operation is further inherited and called
6229         with class-wide arguments.
6231 2017-05-02  Justin Squirek  <squirek@adacore.com>
6233         * errout.adb (Set_Msg_Text): Add a case to switch the message
6234         type when the character '[' is detected signifying a warning
6235         about a run-time exception.
6236         * opt.ads Add a new Warning_Mode value for new switch
6237         * switch-b.adb (Scan_Binder_Switches): Add case for the binder
6238         to handle new warning mode
6239         * usage.adb (Usage): Add usage entry for -gnatwE
6240         * warnsw.adb (Set_Warning_Switch): Add case for the new switch
6242 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6244         * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
6245         declaration that operates on some fixed point type.
6247 2017-05-02  Justin Squirek  <squirek@adacore.com>
6249         * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
6251 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6253         * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
6255 2017-05-02  Justin Squirek  <squirek@adacore.com>
6257         * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6258         expression (Analyze_If_Expression): Add check for valid condition
6259         * sem_eval.adb (Eval_Case_Expression): Add check for error posted
6260         on case-expression
6261         * sem_res.adb (Resolve_If_Expression): Add check for valid
6262         condition and then-expression.
6264 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6266         * exp_ch3.adb (Build_Initialization_Call): Generate a null
6267         statement if the initialization call is a null procedure, as
6268         can happen with a controlled type with no explicit Initialize
6269         procedure, or an array of such.
6270         * exp_ch7.adb (Process_Object_Declaration): For a type with
6271         controlled components that has a trivial Initialize procedure,
6272         insert declaration for finalization counter after object
6273         declaration itself.
6274         (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
6275         finalization block and attendant declarations if component has
6276         a trivial Initialize procedure.
6277         (Make_Init_Call): Do not generate a call if controlled type has
6278         a trivial Initialize procedure.
6280 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6282         * g-forstr.ads (Data): Move Format component last.
6283         * g-forstr.adb ("+"): Adjust for above change.
6284         * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
6285         * g-sechas.ads (Context): Move Key last.
6286         * g-socket.ads (Service_Entry_Type): Move Aliases last.
6287         * s-fileio.adb (Temp_File_Record): Move Name last.
6288         * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
6289         * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
6291 2017-05-02  Jerome Lambourg  <lambourg@adacore.com>
6293         * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
6294         switch introduced recently. finally not needed.
6296 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6298         * sem_ch6.adb (Analyze_Null_Procedure): Set the
6299         Corresponding_Body link for a null procedure declaration.
6301 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6303         * atree.h (Flag290): Add missing terminating parenthesis.
6304         * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
6305         (Set_Is_Class_Wide_Clone): Likewise.
6306         * einfo.ads (Is_Class_Wide_Clone): Likewise.
6308 2017-05-02  Gary Dismukes  <dismukes@adacore.com>
6310         * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
6311         parameter Array_Comp to indicate the case of an array object
6312         with null-excluding components.
6313         * checks.adb (Null_Exclusion_Static_Checks):
6314         Call Compile_Time_Constraint_Error instead of
6315         Apply_Compile_Time_Constraint_Error in the component case. Also
6316         call that when Array_Comp is True, with an appropriate warning for
6317         the array component case. Only create an explicit initialization
6318         by null in the case of an object of a null-excluding access type
6319         (and no longer do that in the component case).
6320         * sem_ch3.adb (Check_Component): Add a Boolean parameter
6321         Array_Comp defaulted to False.  Pass Empty for the Comp
6322         actual when calling Null_Exclusion_Static_Checks in the case
6323         where Comp_Decl matches Object_Decl, because we don't have a
6324         component in that case. In the case of an object or component
6325         of an array type, pass True for Array_Comp on the recursive call
6326         to Check_Component.
6328 2017-05-02  Bob Duff  <duff@adacore.com>
6330         * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
6331         compute the linux priority from the Ada priority. Call this everywhere
6332         required. In particular, the previous version was not doing this
6333         computation when setting the ceiling priority in various places. It
6334         was just converting to C.int, which results in a ceiling that is off
6335         by 1.
6337 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6339         * sem_ch3.adb: Comment predicate inheritance.
6341 2017-05-02  Tristan Gingold  <gingold@adacore.com>
6343         * s-trasym.ads: Add comment.
6345 2017-05-02  Bob Duff  <duff@adacore.com>
6347         * sem_elab.adb, sem_elab.ads: Minor comment fixes.
6348         * sem_ch4.adb: Minor reformatting.
6349         * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
6350         * s-taspri-posix-noaltstack.ads: Minor refactoring.
6351         * sinput.ads: Minor typo fix.
6353 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6355         * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
6356         * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
6357         here from exp_ch9, to recognize objects whose creation requires
6358         dynamic allocation, so that the proper warning can be emitted
6359         when restriction No_Implicit_Heap_Allocation is in effect.
6360         * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
6361         to emit proper warning when an object that requires dynamic
6362         allocation is declared.
6364 2017-05-02  Tristan Gingold  <gingold@adacore.com>
6366         * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
6368 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6370         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
6371         visibility rules for equality operators that apply within an
6372         instantiation apply within an inlined body.
6373         * sem_type.adb (Add_One_Interp): ditto.
6375 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6377         * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
6378         procedures.
6380 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6382         * snames.ads-tmpl
6383         (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
6384         Name_No_Tagged_Streams): Move to regular pragmas.  Add
6385         placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
6386         and Secondary_Stack_Size.
6387         (Pragma_Id): Move Pragma_Assume,
6388         Pragma_Attribute_Definition, Pragma_Loop_Optimize and
6389         Pragma_No_Tagged_Streams to second part.
6391 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6393         * exp_attr.adb: Minor reformatting.
6395 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6397         * sem_ch4.adb (Analyze_Selected_Component): Improve error
6398         detection for illegal references to private components or
6399         operations of a protected type in the body of the type.
6401 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6403         * opt.ads: Add missing GNAT markers in comments.
6404         * opt.adb (Set_Opt_Config_Switches): Do not override earlier
6405         settings of Optimize_Alignment at the end.
6407 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6409         * checks.adb (Apply_Constraint_Check): Do not apply
6410         a discriminant check when the associated type is a constrained
6411         subtype created for an unconstrained nominal type.
6412         * exp_attr.adb: Minor reformatting.
6414 2017-05-02  Bob Duff  <duff@adacore.com>
6416         * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
6417         the N_Raise_Expression case.
6418         * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
6419         and add assertions.
6421 2017-05-02  Yannick Moy  <moy@adacore.com>
6423         * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
6424         optimize length comparison in GNATprove mode.
6425         * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
6426         operator /= into negation of operator = when needed.
6427         (Expand_SPARK): Call new
6428         function to expand operator /=.
6430 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6432         * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
6433         Simplify the expression for a fixed-fixed division to remove
6434         divisions by constants whenever possible, as an optimization
6435         for restricted targets.
6437 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
6439         * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
6441 2017-05-02  Bob Duff  <duff@adacore.com>
6443         * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
6444         to find primitive ops, instead of using an Identifier that will
6445         later be looked up. This is necessary because these ops are not
6446         necessarily visible at all places where we need to call them.
6447         * exp_util.ads: Minor comment fix.
6449 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6451         * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
6452         references are fully conformant if they are both expansions
6453         of the discriminant of a protected type, within one of the
6454         protected operations. One occurrence may be expanded into a
6455         constant declaration while the other is an input parameter to
6456         the corresponding generated subprogram.
6458 2017-05-02  Justin Squirek  <squirek@adacore.com>
6460         * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
6461         recursivly searching composite-types for null-excluding access
6462         types and verifying them.
6463         (Analyze_Object_Declaration): Add a
6464         call to Check_Null_Excluding_Components for static verification
6465         of non-initialized objects.
6466         * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
6467         a parameter for a composite-type's component and an extra case
6468         for printing component information.
6470 2017-05-02  Yannick Moy  <moy@adacore.com>
6472         * sem_ch10.adb (Analyze_Subunit): Take
6473         configuration pragma into account when restoring appropriate
6474         pragma for analysis of subunit.
6476 2017-05-02  Justin Squirek  <squirek@adacore.com>
6478         * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
6479         s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
6480         g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
6481         clauses from the runtime.
6483 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
6485         * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
6486         array components specially.
6488 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
6490         * sem_ch8.adb (Premature_Usage): If the premature usage of
6491         an entity is as the expression in its own object decaration,
6492         rewrite the reference as Any_Id to prevent cascaded errors or
6493         compiler loops when such an entity is used in an address clause.
6495 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
6497         * gcc-interface/decl.c (components_to_record): Add missing guard.
6499 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
6501         * gcc-interface/decl.c (components_to_record): Add more comments.
6502         Put back pending fields onto the regular list if the misalignment
6503         happens to cancel itself.
6505 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6507         * sem_ch4.adb (Complete_Object_Operation): When rewriting the
6508         controlling actual in a prefixed call, preserve the original node
6509         information if the prefix itself has been rewritten, for ASIS use.
6511 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6513         * exp_ch6.adb (Insert_Post_Call_Actions):
6514         Code clean up. Insert the post-call actions after an enclosing
6515         procedure call when N denotes a function call and appears as an
6516         actual parameter in the procedure call.
6518 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6520         * freeze.adb (Check_Component_Storage_Order): If there is a clause
6521         for the component, also reject the attribute if the component
6522         doesn't end on a byte boundary and its scalar storage order is
6523         different from that of the enclosing record type.
6525 2017-04-28  Javier Miranda  <miranda@adacore.com>
6527         * atree.ads (Info_Messages): Removed.
6528         (Warning_Info_Messages): New counter.
6529         (Report_Info_Messages): New counter.
6530         * err_vars.ads Update documentation.
6531         * errout.adb (Delete_Warning_And_Continuations): Update
6532         Info_Message occurrences.
6533         (Error_Msg_Internal): Update Info_Message occurrences.
6534         (Delete_Warning): Update Info_Message occurrences.
6535         (Write_Error_Summary): Update Info_Message occurrences.
6536         (Output_Messages): Update Info_Message occurrences.
6537         (To_Be_Removed): Update Info_Message occurrences.
6538         (Reset_Warnings): Update Info_Message occurrences.
6539         * errutil.adb (Error_Msg): Update Info_Message occurrences.
6540         (Finalize): Update Info_Message occurrences.
6541         (Initialize): Update Info_Message occurrences.
6542         * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
6543         (Compilation_Errors): Update Info_Message_Occurences.
6545 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6547         * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
6548         * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
6549         * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
6550         * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
6551         * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
6552         * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
6553         Y_Size.
6554         * sem_eval.adb (Why_Not_Static): Initialize Typ.
6555         * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
6557 2017-04-28  Bob Duff  <duff@adacore.com>
6559         * sem_util.ads, sem_util.adb (Might_Raise): New function
6560         that replaces Is_Exception_Safe, but has the opposite
6561         sense. Is_Exception_Safe was missing various cases -- calls inside
6562         a pragma Debug, calls inside an 'if' or assignment statement,
6563         etc. Might_Raise now walks the entire subtree looking for things
6564         that can raise.
6565         * exp_ch9.adb (Is_Exception_Safe): Remove.
6566         (Build_Protected_Subprogram_Body): Replace call to
6567         Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
6568         constants where possible).
6569         * exp_ch7.adb: Rename Is_Protected_Body -->
6570         Is_Protected_Subp_Body. A protected_body is something different
6571         in the grammar.
6573 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6575         * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
6576         * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
6577         (P_Discrete_Choice_List): Initialize Expr_Node variable.
6578         * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
6579         (P_Protected): Likewise.
6580         * sem_case.adb (Check_Duplicates):
6581         Add pragma Warnings on variable.
6582         * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
6583         * sem_ch4.adb (List_Operand_Interps):  Add pragma Warnings on variable.
6584         * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
6585         (Analyze_Exit_Statement): Initialize Scope_Id variable.
6586         (Analyze_Iterator_Specification): Initialize Bas variable.
6587         * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
6588         Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
6589         (Analyze_Accept_Statement): Initialize Task_Nam.
6591 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6593         * checks.adb (Install_Primitive_Elaboration_Check):
6594         Do not generate an elaboration check if all checks have been
6595         suppressed.
6597 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6599         * sem_ch13.adb (Analyze_Aspect_Specifications, case
6600         Interrupt_Handler and Attach_Handler): Generate reference
6601         to protected operation to prevent spurious warnings about
6602         unreferenced entities. Previous scheme failed with style checks
6603         enabled.
6605 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6607         * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
6608         that follows an expression function must not be relocated to
6609         the generated body, because it applies to the code that follows.
6611 2017-04-28  Gary Dismukes  <dismukes@adacore.com>
6613         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
6614         Relaxed_RM_Semantics to avoid having CodePeer issue errors on
6615         code that might violate the more stringent checking for 'Access
6616         introduced in Ada 2005.
6618 2017-04-28  Arnaud Charlet  <charlet@adacore.com>
6620         * a-cforse.adb: minor style fix in comment.
6622 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6624         * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
6625         initialize Block_Decls variable.
6626         (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
6627         (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
6628         * exp_disp.adb (Expand_Interface_Actuals): Initialize
6629         Formal_DDT and Actual_DDT variables.
6630         (Expand_Interface_Thunk): Initialize Iface_Formal.
6631         (Make_DT): Initialize Size_Comp.
6632         (Make_Select_Specific_Data_Table): Initialize Decls.
6633         * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
6634         Also initialize more RPC_Receiver_* variables.
6635         (Build_To_Any_Function): Initialize Cstr_Formal.
6636         * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
6638 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6640         * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
6641         node between access types, freeze the designated type as well,
6642         so that dispatch table pointers are created in the proper scope,
6643         and not in the constructed body of the expression function.
6645 2017-04-28  Bob Duff  <duff@adacore.com>
6647         * alloc.ads (Nodes_Initial): Go back to previous value. The large
6648         value makes large compilations faster, but small compilations slower.
6650 2017-04-28  Arnaud Charlet  <charlet@adacore.com>
6652         * sem_util.adb: minor typos in Is_Child_Or_Sibling.
6654 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6656         * erroutc.adb (Compilation_Errors): Do not consider info messages
6657         as suitable warnings when warnings must be treated as errors.
6658         * sem_ch7.adb (Analyze_Package_Specification): Do not consider
6659         internally-generated packages when outputting completion
6660         information.
6661         * errout.adb (Output_Messages): Do not consider info messages as
6662         suitable warnings when warnings must be treated as errors.
6663         * errutil.adb (Finalize): Do not consider info messages as
6664         suitable warnings when warnings must be treated as errors.
6666 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
6668         * warnsw.ads: Minor fix for incorrect wording in comment.
6670 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6672         * sem_res.adb (In_Instance_Code): New predicate in
6673         Valid_Conversion, to determine whether a type conversion appears
6674         as (or within) an actual for a formal object.  Type conversions
6675         in instances are not rechecked in Valid_Conversion because
6676         visibility changes between generic location andi instance may
6677         lead to spurious errors, but conversions within an actual must be
6678         fully checked, and they are not fully resolved when pre-analyzing
6679         the actuals.
6681 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6683         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
6684         New_Copy_Tree instead of Relocate_Node as any subsequent copies
6685         of the relocated node will have mangled Parent pointers.
6686         * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
6687         tables used in conjunction with entity and itype replication.
6688         (Visit_Entity): Rewrite the restriction on which entities
6689         require duplication.  The restriction now includes all types.
6691 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6693         * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
6694         a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
6695         a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
6696         cleanups.
6698 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
6700         * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
6701         gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
6703 2017-04-28  Gary Dismukes  <dismukes@adacore.com>
6705         * exp_util.adb: Minor reformatting.
6707 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
6709         * sem_ch4.adb: Fix copy/pasto.
6711 2017-04-27  Tristan Gingold  <gingold@adacore.com>
6713         * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
6714         raise-gcc.c. Fix include search path for raise-gcc.c
6716 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
6718         * fe.h (Warn_On_Questionable_Layout): Declare.
6719         * warnsw.ads (Warn_On_Record_Holes): Move down.
6720         (Warn_On_Questionable_Layout): New boolean variable.
6721         (Warning_Record): Add Warn_On_Questionable_Layout field.
6722         * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
6723         (Restore_Warnings): Likewise.
6724         (Save_Warnings): Likewise.
6725         (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
6726         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
6727         components_to_record.
6728         (gnu_field_to_gnat): New function.
6729         (warn_on_field_placement): Likewise.
6730         (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
6731         parameters.  Rename local variables and adjust recursive call.
6732         Rework final scan of the field list and implement warnings on the
6733         problematic placement of specific sorts of fields.
6735 2017-04-27  Bob Duff  <duff@adacore.com>
6737         * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
6738         * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
6739         * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
6740         * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
6741         * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
6742         * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
6743         For efficiency, cache results of Is_Internal_File_Name and
6744         Is_Predefined_File_Name in the Units table. This avoids a lot
6745         of repeated text processing.
6747 2017-04-27  Emmanuel Briot  <briot@adacore.com>
6749         * g-comlin.adb (Sort_Sections): remove useless test.
6751 2017-04-27  Claire Dross  <dross@adacore.com>
6753         * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
6754         allow the use of regular equality over elements in contracts.
6755         (Formal_Model): Ghost package containing model functions that are
6756         used in subprogram contracts.
6757         (Current_To_Last): Removed, model functions should be used instead.
6758         (First_To_Previous): Removed, model functions should be used instead.
6759         (Strict_Equal): Removed, model functions should be used instead.
6760         (No_Overlap): Removed, model functions should be used instead.
6761         (Equivalent_Keys): Functions over cursors are removed. They were
6762         awkward with explicit container parameters.
6763         * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
6764         allow the use of regular equality over elements in contracts.
6765         (Formal_Model): Ghost package containing model functions that
6766         are used in subprogram contracts.
6767         (Current_To_Last): Removed, model functions should be used instead.
6768         (First_To_Previous): Removed, model functions should be used instead.
6769         (Strict_Equal): Removed, model functions should be used instead.
6770         (No_Overlap): Removed, model functions should be used instead.
6772 2017-04-27  Yannick Moy  <moy@adacore.com>
6774         * gnat1drv.adb: Code cleanup.
6776 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6778         * exp_util.adb (Replace_Entity): The prefix of a 'Result
6779         attribute reference in a post- condition is the subprogram to
6780         which the condition applies. If the condition is inherited
6781         by a type extension, the prefix becomes a reference to the
6782         inherited operation, but there is no need to create a wrapper
6783         for this operation, because 'Result is expanded independently
6784         when elaborating the postconditions.
6786 2017-04-27  Bob Duff  <duff@adacore.com>
6788         * sinput.adb: Minor code cleanup.
6789         * namet.adb (Append): Create faster versions of
6790         Append(String) and Append(Name_Id) by using slice assignment
6791         instead of loops.
6792         * sem_util.adb (In_Instance): Speed this up by removing
6793         unnecessary tests; Is_Generic_Instance is defined for all
6794         entities.
6795         * sem_util.ads, sem_util.adb (In_Parameter_Specification):
6796         Remove unused function.
6797         * alloc.ads (Nodes_Initial): Use a much larger value, because
6798         the compiler was spending a lot of time copying the nodes table
6799         when it grows. This number was chosen in 1996, so is rather out
6800         of date with current memory sizes. Anyway, it's virtual memory.
6801         Get rid of Orig_Nodes_...; use Node_... instead.
6802         * atree.adb (Lock): Do not release the Nodes tables; it's a
6803         waste of time.
6804         Orig_Nodes_ ==> Nodes_
6805         * nlists.adb: Orig_Nodes_ ==> Nodes_
6806         * g-table.adb: Remove unused "with" clause.
6807         * g-table.ads, table.ads: Remove Big_Table_Type, which should
6808         not be used by clients.
6809         * g-dyntab.adb (Last_Allocated): New function
6810         to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
6812 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6814         * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
6815         check.
6816         (Subtypes_Statically_Match): Remove duplicate check.
6817         * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
6819 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6821         * exp_aggr.adb (Replace_Type): Remove the special processing
6822         for selected components.
6823         * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
6824         processing for attributes Fixed_Value and Integer_Value.
6825         * exp_util.adb (Side_Effect_Free): Merge the processing for
6826         qualified expressions, type conversions, and unchecked type
6827         conversions.
6828         * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
6829         and Optional.
6830         * par-ch3.adb (P_Declarative_Items): Merge the processing for
6831         tokens function, not, overriding, and procedure.
6832         * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
6833         for qualified expressions, type conversions, and unchecked
6834         type conversions.
6835         * sem_util.adb (Compile_Time_Constraint_Error): Merge the
6836         processing for Ada 83 and instances.
6837         (Object_Access_Level): Merge the processing for indexed components
6838         and selected components.
6839         * uname.adb (Add_Node_Name): Merge the processing for stubs.
6841 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6843         * checks.adb (Install_Primitive_Elaboration_Check):
6844         Do not generate the check when restriction No_Elaboration_Code
6845         is in effect.
6847 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6849         * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
6850         of Expand_Dispatching_Call. If the denoted subprogram has a
6851         class-wide precondition, this is the only precondition that
6852         applies to the call, rather that the class-wide preconditions
6853         that may apply to the body that is executed. (This is specified
6854         in AI12-0195).
6856 2017-04-27  Yannick Moy  <moy@adacore.com>
6858         * gnat1drv.adb (Adjust_Global_Switches): Issue
6859         a warning in GNATprove mode if the runtime library does not
6860         support IEEE-754 floats.
6862 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6864         * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
6865         is itself inherited it does not carry any contract information,
6866         so examine its parent operation which is its Alias.
6868 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
6870         * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
6871         prefix can be an object reference in which case Obj'Image (X)
6872         can only be interpreted as an indexing of the parameterless
6873         version of the attribute.
6874         * par-ch4.adb (P_Name): An attribute reference can be the prefix of
6875         an indexing or a slice operation if the attribute does not require
6876         parameters. In Ada2012 'Image also belongs in this category,
6877         and A'Image (lo .. hi) is legal and must be parsed as a slice.
6879 2017-04-27  Yannick Moy  <moy@adacore.com>
6881         * exp_ch4.adb: Minor reformatting.
6882         * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
6883         disable the CodePeer and C generation modes. Similar to the
6884         opposite actions done in CodePeer mode.
6886 2017-04-27  Yannick Moy  <moy@adacore.com>
6888         * sem_res.adb: Remove duplicate code.
6889         * sem_attr.adb: Delete duplicate code.
6891 2017-04-27  Bob Duff  <duff@adacore.com>
6893         * g-dyntab.adb: Reduce the amount of copying in
6894         Release. No need to copy items past Last.
6896 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6898         * checks.adb Add with and use clauses for Sem_Disp.
6899         (Install_Primitive_Elaboration_Check): New routine.
6900         * checks.ads (Install_Primitive_Elaboration_Check): New routine.
6901         * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
6902         processing of 'Elaborated.
6903         * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
6904         elaboration check.
6906 2017-04-27  Bob Duff  <duff@adacore.com>
6908         * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
6909         If the table grows and then shrinks back to empty, we won't necessarily
6910         point back to the empty array. Code cleanups.
6911         * sinput.ads: Add 'Base to Size clause to match the declared
6912         component subtypes.
6914 2017-04-27  Claire Dross  <dross@adacore.com>
6916         * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
6917         allow the use of regular equality over elements in contracts.
6918         (Formal_Model): Ghost package containing model functions that
6919         are used in subprogram contracts.
6920         (Current_To_Last): Removed, model functions should be used instead.
6921         (First_To_Previous): Removed, model functions should be used instead.
6922         (Strict_Equal): Removed, model functions should be used instead.
6923         (No_Overlap): Removed, model functions should be used instead.
6924         * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
6925         Boolean generic parameter to disable contracts for equivalence
6926         between keys.
6927         (Witness): Create a witness of a key that is used for handling of
6928         equivalence between keys.
6929         (Has_Witness): Check whether a witness is contained in a map.
6930         (W_Get): Get the element associated to a witness.
6931         (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
6932         directly.
6933         * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
6934         Boolean generic parameter to disable contracts for equivalence
6935         between keys.
6936         * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
6937         of equivalence on functional maps.
6938         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
6939         of equivalence on functional maps.
6941 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6943         * exp_ch9.adb (Expand_Entry_Barrier): Code
6944         cleanup. Do not perform the optimization which removes the
6945         declarations of the discriminant and component renamings when
6946         validity checks on operands and attributes are in effect.
6948 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6950         * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
6951         freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
6952         a-cfhama.ads, a-cofove.ads: Minor reformatting.
6954 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6956         * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
6957         pointer dereference.
6958         * g-spipat.adb (Dump): Code clean up. Protect against a possible
6959         null pointer dereference.
6961 2017-04-27  Bob Duff  <duff@adacore.com>
6963         * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
6964         Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
6965         Free renames Init, since they do the same thing.
6966         * g-table.ads: Default for Table_Low_Bound.
6967         * table.ads: Default for Table_Low_Bound, Table_Initial, and
6968         Table_Increment.
6970 2017-04-27  Bob Duff  <duff@adacore.com>
6972         * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
6973         can reallocate.
6974         * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
6975         * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
6976         Reorder code so that above assertions do not fail.
6977         * table.ads: Remove obsolete comment on Locked.
6979 2017-04-27  Claire Dross  <dross@adacore.com>
6981         * a-cfdlli.ads: Code cleanup.
6983 2017-04-27  Yannick Moy  <moy@adacore.com>
6985         * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
6986         when needed for proof.  (Expand_SPARK): Call the new procedure.
6987         * exp_util.ads Fix typo.
6989 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
6991         * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
6992         fixes.
6994 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
6996         * sem_elab.adb Add new type Visited_Element
6997         and update the contents of table Elab_Visited.  Various code clean up.
6998         (Check_Elab_Call): Determine whether a prior call to
6999         the same subprogram was already examined within the same context.
7000         (Check_Internal_Call_Continue): Register the subprogram being
7001         called as examined within a particular context. Do not suppress
7002         elaboration warnings.
7004 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7006         * xoscons.adb, osint.ads: Minor reformatting.
7008 2017-04-27  Bob Duff  <duff@adacore.com>
7010         * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
7011         Table_Count_Type --> Table_Last_Type, because the name
7012         was confusing (a "count" usually starts at zero).  Add
7013         functionality supported or needed by other tables packages
7014         (Move, Release_Threshold).
7015         * g-table.ads, g-table.adb: This is now just a thin wrapper
7016         around g-dyntab.ads/g-dyntab.adb.  Add functionality supported
7017         or needed by other tables packages (Save, Restore).
7018         * table.ads, table.adb: This is now just a thin wrapper around
7019         * g-table.ads/g-table.adb.
7020         * namet.h, scos.h, uintp.h: These files are reaching into the
7021         private data of some instances of g-table, whose names changed,
7022         so the above change requires some adjustment here. It now uses
7023         public interfaces.
7025 2017-04-27  Bob Duff  <duff@adacore.com>
7027         * namet.adb, namet.ads: Minor: remove unused procedures.
7029 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
7031         * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
7032         (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
7033         Add pragma Warnings on Rtype variable in nested block.  *
7034         * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
7035         * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
7036         (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
7037         * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
7038         (Process_Component_List_For_Finalize): Initialize Counter_Id.
7039         (Build_Finalize_Statements): Initialize Bod_Stmts.
7040         * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
7042 2017-04-27  Claire Dross  <dross@adacore.com>
7044         * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
7045         allow the use of regular equality over elements in contracts.
7046         (Formal_Model): Ghost package containing model functions that are
7047         used in subprogram contracts.
7048         (Current_To_Last): Removed, model
7049         functions should be used instead.
7050         (First_To_Previous): Removed, model functions should be used instead.
7051         (Strict_Equal): Removed, model functions should be used instead.
7052         (No_Overlap): Removed, model functions should be used instead.
7053         (Equivalent_Keys): Functions over cursors are removed. They were
7054         awkward with explicit container parameters.
7055         * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
7056         (proof only) procedure to help GNATprove when equivalence over
7057         keys is not equality.
7059 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7061         * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
7062         sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
7063         Minor reformatting and code cleanups.
7065 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7067         * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
7068         subsidiary of Check_Inherited_Conditions, to build pragmas for an
7069         operation whose ancestor has classwide pre/postconditions. This
7070         is used both to check the legality of the inheritance in Ada
7071         and in SPARK, and to determine whether a wrapper is needed for
7072         an inherited operation.
7073         * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
7074         Improve placement of error message for inherited classwide
7075         conditions that become illegal on type derivation.
7077 2017-04-27  Yannick Moy  <moy@adacore.com>
7079         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
7080         SPARK_Mode from context on generic package.
7081         * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
7082         useless test.
7084 2017-04-27  Claire Dross  <dross@adacore.com>
7086         * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
7087         overflows in computations.
7088         * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
7089         overflows in computations.
7090         (Insert): Rewrite precondition to avoid overflows in computations.
7091         * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
7092         overflows in computations.
7093         (Insert): Rewrite precondition to avoid overflows in computations.
7095 2017-04-27  Steve Baird  <baird@adacore.com>
7097         * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
7098         flag when it is declared in order to avoid confusing CodePeer about
7099         the possibility of an uninitialized variable read.
7101 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7103         * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
7104         no dimensionality error if the subtype of the expression is
7105         identical to the nominal subtype in the declaration, even though
7106         the expression itself may have been constant-folded and lack a
7107         dimension vector.
7108         * sem_dim.ads: Add comments on setting of dimension vectors and
7109         its interaction with node rewritings and side-effect removal.
7111 2017-04-27  Bob Duff  <duff@adacore.com>
7113         * debug.adb: Minor comment correction.
7114         * sem_dim.ads: Minor reformatting and typo fixes.
7116 2017-04-27  Bob Duff  <duff@adacore.com>
7118         * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
7119         Last of the tables via function calls, rather than relying on layout
7120         of data structures.
7122 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7124         * exp_util.adb: No wrapper in GNATprove mode.
7126 2017-04-27  Yannick Moy  <moy@adacore.com>
7128         * sem_res.adb (Resolve_Comparison_Op): Always
7129         evaluate comparisons between values of universal types.
7131 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7133         * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
7134         an elaboration counter nor a check when in GNATprove mode.
7135         * sem_util.adb (Build_Elaboration_Entity): Do not create an
7136         elaboration counter when in GNATprove mode.
7138 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7140         * freeze.adb: copy-paste typo.
7142 2017-04-27  Yannick Moy  <moy@adacore.com>
7144         * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
7145         Use correct test to detect call in GNATprove mode instead of
7146         compilation.
7148 2017-04-27  Claire Dross  <dross@adacore.com>
7150         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
7151         New property function expressing that the element of a
7152         sequence are contained in the union of two sequences.
7153         (Formal_Model.M_Elements_Included): New property function
7154         expressing that the element of a sequence are another sequence.
7155         (Generic_Sorting): Use new property functions to state that
7156         elements are preserved by Sort and Merge.
7157         * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
7158         allow the use of regular equality over elements in contracts.
7159         (Formal_Model): Ghost package containing model functions
7160         that are used in subprogram contracts.  (Capacity):
7161         On unbounded containers, return the maximal capacity.
7162         (Current_To_Last): Removed, model functions should be used instead.
7163         (First_To_Previous): Removed, model functions should be used instead.
7164         (Append): Default parameter value replaced
7165         by new wrapper to allow more precise contracts.
7166         (Insert): Subprogram restored, it seems it was useful to users even if
7167         it is inefficient.
7168         (Delete): Subprogram restored, it seems it was useful to users even if
7169         it is inefficient.
7170         (Prepend): Subprogram restored, it seems it was useful to users even
7171         if it is inefficient.
7172         (Delete_First): Subprogram restored, it seems it
7173         was useful to users even if it is inefficient.  (Delete_Last):
7174         Default parameter value replaced by new wrapper to allow more
7175         precise contracts.
7176         (Generic_Sorting.Merge): Subprogram restored.
7177         * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
7178         allow the use of regular equality over elements in contracts.
7179         (Formal_Model): Ghost package containing model functions
7180         that are used in subprogram contracts.  (Capacity):
7181         On unbounded containers, return the maximal capacity.
7182         (Current_To_Last): Removed, model functions should be used
7183         instead.
7184         (First_To_Previous): Removed, model functions should be used instead.
7185         (Append): Default parameter value replaced
7186         by new wrapper to allow more precise contracts.
7187         (Insert): Subprogram restored, it seems it was useful to users even if
7188         it is inefficient.
7189         (Delete): Subprogram restored, it seems it was useful to users even if
7190         it is inefficient.
7191         (Prepend): Subprogram restored, it seems it was useful to users even
7192         if it is inefficient.
7193         (Delete_First): Subprogram restored, it seems it
7194         was useful to users even if it is inefficient.  (Delete_Last):
7195         Default parameter value replaced by new wrapper to allow more
7196         precise contracts.
7197         (Generic_Sorting.Merge): Subprogram restored.
7198         (Vector): Do not reuse formal vectors, as it is no longer possible
7199         to supply them with an equality function over elements.
7201 2017-04-27  Bob Duff  <duff@adacore.com>
7203         * g-dyntab.adb (Release): When allocating the new
7204         table, use the correct slice of the old table to initialize it.
7206 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
7208         * einfo.ads: Minor fixes in comments.
7210 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7212         * sem_prag.adb: disable clones in SPARK_Mode.
7214 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7216         * sem_util.ads, contracts.adb: Minor reformatting.
7218 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7220         * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
7221         Build body of subprogram that has a class-wide condition that
7222         contains calls to other primitives.
7223         (Build_Class_Wide_Clone_Call); Build a call to the common
7224         class-wide clone of a subprogram with classwide conditions. The
7225         body of the subprogram becomes a wrapper for a call to the
7226         clone. The inherited operation becomes a similar wrapper to which
7227         modified conditions apply, and the call to the clone includes
7228         the proper conversion in a call the parent operation.
7229         (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
7230         subprogram that has a classwide condition that contains calls to
7231         other primitives, build an internal subprogram that is invoked
7232         through a type-specific wrapper for all inherited subprograms
7233         that may have a modified condition.
7234         * sem_prag.adb (Check_References): If subprogram has a classwide
7235         condition, create entity for corresponding clone, to be invoked
7236         through wrapper subprograns.
7237         (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
7238         message about placement if pragma isi internally generated.
7239         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
7240         a classwide clone, build body of clone as copy of original body,
7241         and rewrite original body as a wrapper as a wrapper for a call to
7242         the clone, so that it incorporates the original pre/postconditions
7243         of the subprogram.
7244         * freeze.adb (Check_Inherited_Conditions): For an inherited
7245         subprogram that inherits a classwide condition, build spec and
7246         body of corresponding wrapper so that call to inherited operation
7247         gets the modified conditions.
7248         * contracts.adb (Analyze_Contracts): If analysis of classwide
7249         condition has created a clone for a primitive operation, analyze
7250         declaration of clone.
7252 2017-04-27  Steve Baird  <baird@adacore.com>
7254         * exp_util.adb (Build_Allocate_Deallocate_Proc):
7255         Add "Suppress => All_Checks" to avoid generating unnecessary
7256         checks.
7258 2017-04-27  Yannick Moy  <moy@adacore.com>
7260         * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
7261         * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
7262         inlining body in GNATprove mode when switch -gnatdm used.
7263         * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
7264         in GNATprove mode when switch -gnatdm used.
7266 2017-04-27  Arnaud Charlet  <charlet@adacore.com>
7268         * sem_ch13.adb (Analyze_Attribute_Definition_Clause
7269         [Attribute_Address]): Call Set_Address_Taken when ignoring rep
7270         clauses, so that we keep an indication of the address clause
7271         before removing it from the tree.
7273 2017-04-27  Yannick Moy  <moy@adacore.com>
7275         * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
7276         of expression being qualified, when not an object name, or else
7277         evaluate the underlying name.
7279 2017-04-27  Jerome Lambourg  <lambourg@adacore.com>
7281         * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
7283 2017-04-27  Justin Squirek  <squirek@adacore.com>
7285         * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
7286         Process_Component_List_For_Finalization as a local variable.
7287         (Process_Component_For_Finalize): Add an extra parameter to avoid
7288         global references.
7289         (Process_Component_List_For_Finalization): Correct calls to
7290         Process_Component_For_Finalize to take Num_Comps as a parameter.
7292 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7294         * sem_ch8.adb (Find_Direct_Name): Account for the case where
7295         a use-visible entity is defined within a nested scope of an
7296         instance when giving priority to entities which were visible in
7297         the original generic.
7298         * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
7300 2017-04-27  Tristan Gingold  <gingold@adacore.com>
7302         * raise-gcc.c: Don't use unwind.h while compiling
7303         for the frontend, but mimic host behavior.
7305 2017-04-27  Javier Miranda  <miranda@adacore.com>
7307         * sem_ch3.adb (Build_Discriminated_Subtype):
7308         Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
7310 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7312         * sem_prag.adb (Analyze_Global_Item):
7313         Do not consider discriminants because they are not "entire
7314         objects". Remove the discriminant-related checks because they are
7315         obsolete.
7316         (Analyze_Input_Output): Do not consider discriminants
7317         because they are not "entire objects".
7319 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7321         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
7322         perform check if the current scope does not come from source,
7323         as is the case for a rewritten task body, because check has
7324         been performed already, and may not be doable because of changed
7325         visibility.
7327 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7329         * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
7330         a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
7331         Minor reformatting.
7333 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7335         * sem_ch4.adb (Analyze_Call): If the return type of a function
7336         is incomplete in an context in which the full view is available,
7337         replace the type of the call by the full view, to prevent spurious
7338         type errors.
7339         * exp_disp.adb (Check_Premature_Freezing): Disable check on an
7340         abstract subprogram so that compiler does not reject a parameter
7341         of a primitive operation of a tagged type being frozen, when
7342         the untagged type of that parameter cannot be frozen.
7344 2017-04-27  Bob Duff  <duff@adacore.com>
7346         * sem_attr.adb (Compute_Type_Key): Don't walk
7347         representation items for irrelevant types, which could be in a
7348         different source file.
7350 2017-04-27  Steve Baird  <baird@adacore.com>
7352         * exp_attr.adb (Expand_N_Attribute_Reference):
7353         Don't expand Image, Wide_Image, Wide_Wide_Image attributes
7354         for CodePeer.
7356 2017-04-27  Yannick Moy  <moy@adacore.com>
7358         * exp_unst.ads: Fix typos in comments.
7360 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7362         * sem_eval.adb (Choice_Matches): Handle properly a real literal
7363         whose type has a defined static predicate.
7365 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7367         * exp_ch4.adb (Insert_Dereference_Action):
7368         Do not adjust the address of a controlled object when the
7369         associated access type is subject to pragma No_Heap_Finalization.
7370         Code reformatting.
7372 2017-04-27  Pierre-Marie de Rodat  <derodat@adacore.com>
7374         * gcc-interface/utils.c (gnat_type_for_size): Set
7375         TYPE_ARTIFICIAL on created types.
7377 2017-04-27  Claire Dross  <dross@adacore.com>
7379         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7380         modifications in functional containers.
7381         * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7382         to improve readablity. Subprograms are separated between basic
7383         operations, constructors and properties. Universally quantified
7384         formulas in contracts are factorized in independant functions
7385         with a name and a comment.  Names of parameters are improved.
7387 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7389         * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7391 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7393         * sem_res.adb (Resolve_Type_Conversion): Do not
7394         install a predicate check here since this is already done during
7395         the expansion phase. Verify whether the operand satisfies the
7396         static predicate (if any) of the target type.
7397         * sem_ch3.adb (Analyze_Object_Declaration): Do
7398         not install a predicate check if the object is initialized by
7399         means of a type conversion because the conversion is subjected
7400         to the same check.
7402 2017-04-27  Tristan Gingold  <gingold@adacore.com>
7404         * raise.c (__gnat_builtin_longjmp): Remove.
7405         (__gnat_bracktrace):
7406         Add a dummy definition for the compiler (__gnat_eh_personality,
7407         __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
7408         __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
7409         __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
7410         * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
7411         * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
7412         and a-except-2005.adb.
7413         * raise-gcc.c: Allow build in compiler, compiled as a C++
7414         file.
7415         (__gnat_Unwind_ForcedUnwind): Adjust prototype.
7416         (db): Constify msg_format.
7417         (get_call_site_action_for): Don't use void arithmetic.
7418         * system.ads (Frontend_Exceptions): Set to False.
7419         (ZCX_By_Default): Set to True.
7420         (GCC_ZC_Support): Set to True.
7421         * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
7422         a-except.ad[sb].
7423         * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
7424         in gnat1 and gnatbind.
7425         * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
7426         s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
7427         * s-excmac.ads, s-excmac.adb: Copy of variants.
7428         * a-except.o: Adjust preequisites.
7429         Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
7431 2017-04-27  Claire Dross  <dross@adacore.com>
7433         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7434         modifications in functional containers.
7435         * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7436         to improve readablity. Subprograms are separated between basic
7437         operations, constructors and properties. Universally quantified
7438         formulas in contracts are factorized in independant functions
7439         with a name and a comment.  Names of parameters are improved.
7441 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7443         * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7445 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7447         * sem_res.adb (Resolve_Type_Conversion): Do not
7448         install a predicate check here since this is already done during
7449         the expansion phase. Verify whether the operand satisfies the
7450         static predicate (if any) of the target type.
7451         * sem_ch3.adb (Analyze_Object_Declaration): Do
7452         not install a predicate check if the object is initialized by
7453         means of a type conversion because the conversion is subjected
7454         to the same check.
7456 2017-04-27  Tristan Gingold  <gingold@adacore.com>
7458         * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
7459         replaced by their variants).
7461 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7463         * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
7464         cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
7465         a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
7467 2017-04-27  Tristan Gingold  <gingold@adacore.com>
7469         * s-excmac-gcc.ads, s-excmac-gcc.adb,
7470         s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
7471         Ada95.
7473 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7475         * exp_ch7.adb (Establish_Transient_Scope): Rewrite
7476         the loop which detects potential enclosing transient scopes. The
7477         loop now terminates much earlier as transient scopes are bounded
7478         by packages and subprograms.
7480 2017-04-27  Claire Dross  <dross@adacore.com>
7482         * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
7483         allow the use of regular equality over elements in contracts.
7484         (Cursor): Type is now public so that it can be used in
7485         model functions.
7486         (Formal_Model): Ghost package containing
7487         model functions that are used in subprogram contracts.
7488         (Current_To_Last): Removed, model functions should be used
7489         instead.
7490         (First_To_Previous): Removed, model functions should
7491         be used instead.
7492         (Strict_Equal): Removed, model functions
7493         should be used instead.
7494         (Append): Default parameter value
7495         replaced by new wrapper to allow more precise contracts.
7496         (Insert): Default parameter value replaced by new wrapper to
7497         allow more precise contracts.
7498         (Delete): Default parameter
7499         value replaced by new wrapper to allow more precise contracts.
7500         (Prepend): Default parameter value replaced by new wrapper to
7501         allow more precise contracts.
7502         (Delete_First): Default parameter
7503         value replaced by new wrapper to allow more precise contracts.
7504         (Delete_Last): Default parameter value replaced by new wrapper
7505         to allow more precise contracts.
7507 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7509         * exp_spark.adb (Expand_SPARK): Perform specialized expansion
7510         for object declarations.
7511         (Expand_SPARK_N_Object_Declaration): New routine.
7512         * sem_elab.adb (Check_A_Call): Include calls to the
7513         Default_Initial_Condition procedure of a type under the SPARK
7514         elaboration checks umbrella.
7516 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7518         * sem.adb (Analyze): Diagnose an illegal iterated component
7519         association.
7520         * sem_util.ads, sem_util.adb
7521         (Diagnose_Iterated_Component_Association): New routine.
7523 2017-04-27  Bob Duff  <duff@adacore.com>
7525         * adaint.c (__gnat_get_current_dir): Return 0 in length if
7526         getcwd fails.
7527         * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
7528         exception if getcwd failed.
7530 2017-04-27  Yannick Moy  <moy@adacore.com>
7532         * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
7533         entities with special prefix.
7535 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7537         * debug.adb Change the documentation of switch -gnatd.s.
7538         * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
7539         to manage the secondary stack when an enclosing scope already
7540         performs this functionality (aka relaxed management). Switch
7541         -gnatd.s may be used to force strict management in which case
7542         the block will manage the secondary stack unconditionally. Add
7543         a guard to stop the traversal when encountering a package or a
7544         subprogram scope.
7546 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7548         * sem_res.adb (Resolve_Call): Refine further the handling of
7549         limited views of return types in function calls. If the function
7550         that returns a limited view appears in the current unit,
7551         we do not replace its type by the non-limited view because
7552         this transformation is performed int the back-end. However,
7553         the type of the call itself must be the non-limited view, to
7554         prevent spurious resolution errors.
7556 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7558         * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
7559         Removed, proposed implementation using generics for class-wide
7560         preconditions proved impractical.
7561         (Class_Wide_Clone): New attribute of subprogram. Designates
7562         subprogram created for primitive operations with class-wide
7563         pre/postconditions that contain calls to other primitives. The
7564         clone holds the body of the original primitive, but the
7565         pre/postonditions do not apply to it. The original body is
7566         rewritten as a wrapper for a call to the clone.
7567         (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
7568         the flag is set, no code for the corresponding pre/postconditions
7569         is inserted into its body.
7571 2017-04-27  Bob Duff  <duff@adacore.com>
7573         * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
7574         Scalar_Storage_Order if -gnatI is given.
7575         * sem_prag.adb (Analyze_Pragma): Ignore
7576         Default_Scalar_Storage_Order if -gnatI is given.
7578 2017-04-27  Claire Dross  <dross@adacore.com>
7580         * a-cofuba.ads (Add): Take as an additional input parameter
7581         the position where the element should be inserted.
7582         (Remove): New function that removes an element from the container.
7583         * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
7584         * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
7585         (Remove): New function that removes an element from a set.
7586         * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
7587         (Remove): New function that removes an element from a sequence.
7588         (Insert): New function that adds anywhere in a sequence.
7590 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7592         * checks.adb (Generate_Range_Check): Revert previous change.
7594 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7596         * sem_util.adb: Minor reformatting/rewording.
7598 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7600         * lib-xref.adb (Generate_Reference): The use
7601         of attribute 'Result is not considered a violation of pragma
7602         Unreferenced.
7604 2017-04-27  Justin Squirek  <squirek@adacore.com>
7606         * cstand.adb (Create_Standard): Correctly set
7607         Directly_Designated_Type for Any_Access.
7608         * sem_type.adb (Covers): Minor grammar fixes.
7610 2017-04-27  Bob Duff  <duff@adacore.com>
7612         * sem_attr.adb: Minor cleanup.
7614 2017-04-27  Claire Dross  <dross@adacore.com>
7616         * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
7617         private child of Ada.Containers used to implement all functional
7618         containers.
7619         * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
7620         child of Ada.Containers. It provides functional indefinite unbounded
7621         maps which can be used as high level models for specification
7622         of data structures.
7623         * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
7624         child of Ada.Containers. It provides functional indefinite unbounded
7625         sets which can be used as high level models for specification
7626         of data structures.
7627         * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
7628         child of Ada.Containers.  It provides functional indefinite unbounded
7629         vectors which can be used as high level models for specification
7630         of data structures.
7631         * Makefile.rtl: Add new packages.
7632         * impunit.adb: Add new packages.
7634 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7636         * sem_ch4.adb: Minor reformatting.
7638 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7640         * sem_ch12.adb (Analyze_Associations): minor reformatting.
7641         (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
7642         point type actual that has user-defined arithmetic primitives,
7643         when there is a previous actual for a formal package that defines
7644         a fixed-point type with the parent user-defined operator.
7646 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7648         * checks.adb (Generate_Range_Check): Reinstate part of previous change.
7649         * sem_attr.adb (Resolve_Attribute): Generate a range check when
7650         the component type allows range checks.
7652 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7654         * sem_aux.adb (Is_Generic_Formal): Use original node to locate
7655         corresponding declaration, because formal derived types are
7656         rewritten as private extensions.
7658 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
7660         * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
7661         dimensions of operands if node has been analyzed already, because
7662         previous analysis and dimension checking will have removed the
7663         dimension information from the operands.
7665 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7667         * debug.adb: Document the use of switch -gnatd.s.
7668         * einfo.ads Update the documentation on attribute
7669         Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
7670         the uses of these attributes from certain entities.
7671         * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
7672         which determines whether the block should continue to manage
7673         the secondary stack.
7674         (Manages_Sec_Stack): New routine.
7676 2017-04-27  Bob Duff  <duff@adacore.com>
7678         * atree.ads: Minor edit.
7680 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
7682         * sinfo.ads: Update the section on Ghost mode. Add
7683         a section on SPARK mode. Update the placement of section on
7684         expression functions.
7686 2017-04-27  Bob Duff  <duff@adacore.com>
7688         * sinput.adb (Get_Source_File_Index): Don't
7689         assert that S is in the right range in the case where this is
7690         a .dg file under construction.
7692 2017-04-27  Yannick Moy  <moy@adacore.com>
7694         * sem_util.adb (Check_Result_And_Post_State):
7695         Handle more precisely each conjunct in expressions formed by
7696         and'ing sub-expressions.
7698 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
7700         * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
7702 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7704         * gnat_rm.texi, gnat_ugn.texi,
7705         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7706         doc/gnat_ugn/platform_specific_information.rst,
7707         doc/gnat_ugn/gnat_and_program_execution.rst,
7708         doc/gnat_ugn/gnat_utility_programs.rst,
7709         doc/gnat_ugn/the_gnat_compilation_model.rst,
7710         doc/gnat_rm/implementation_defined_attributes.rst,
7711         doc/gnat_rm/the_gnat_library.rst,
7712         doc/gnat_rm/implementation_defined_pragmas.rst,
7713         doc/gnat_rm/representation_clauses_and_pragmas.rst,
7714         doc/gnat_rm/implementation_of_specific_ada_features.rst,
7715         doc/gnat_rm/implementation_defined_aspects.rst,
7716         doc/gnat_rm/implementation_defined_characteristics.rst: Update
7717         documentation.
7719 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7721         * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
7722         generating C code on complex case expressions.
7724 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7726         * sem_prag.adb (Analyze_Pragma): Generate a warning instead
7727         of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
7728         * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
7729         Ada_2012 instead of Ada_2005 to be compatible with the above
7730         change.
7731         * bindgen.adb: Silence new warning on pragma Ada_95.
7733 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7735         * checks.adb (Generate_Range_Check): Revert part of previous change.
7737 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7739         * sem_ch4.adb (Try_Container_Indexing): Handle properly a
7740         container indexing operation that appears as a an actual in a
7741         parameter association in a procedure call.
7743 2017-04-25  Olivier Ramonat  <ramonat@adacore.com>
7745         * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
7746         Fix spelling mistakes.
7748 2017-04-25  Bob Duff  <duff@adacore.com>
7750         * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
7751         * sinput-p.adb: Use regular fat pointers, with bounds checking,
7752         for source buffers.  Fix misc obscure bugs.
7753         * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
7754         checking, for source buffers.  Modify representation clause for
7755         Source_File_Record as appropriate.  Move Source_File_Index_Table
7756         from spec to body, because it is not used outside the body.
7757         Move Set_Source_File_Index_Table into the private part, because
7758         it is used only in the body and in children.  Use trickery to
7759         modify the dope in the generic instantiation case.  It's ugly,
7760         but not as ugly as the previous method.  Fix documentation.
7761         Remove obsolete code.
7762         * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
7763         indexing in source buffers.
7764         * fmap.adb: Avoid conversions from one string type to another.
7765         Remove a use of global name buffer.
7766         * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
7767         fixes.
7769 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
7771         * exp_util.adb, exp_ch4.adb: Minor reformatting.
7773 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7775         * checks.adb: Code clean up in various routines.
7776         (Generate_Range_Check): Do not generate a range check when the
7777         expander is not active or when index/range checks are suppressed
7778         on the target type.
7779         (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
7780         Remove variants that include a Supress parameter. These routines
7781         are never used, and were introduced before the current scope-based
7782         check suppression method.
7784 2017-04-25  Vasiliy Fofanov  <fofanov@adacore.com>
7786         * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
7787         code and some subprogram calls that are now noop.
7789 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
7791         * exp_ch4.adb (Expand_N_Case_Expression): Take
7792         Minimize_Expression_With_Actions into account when possible.
7794 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7796         * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
7797         (Known_Null): Moved to Sem_Util.
7798         * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
7799         (Known_Null): Moved to Sem_Util.
7800         * sem_util.adb Add new enumeration type Null_Status_Kind.
7801         (Known_Non_Null): Moved from Exp_Util. Most of the logic in
7802         this routine is now carried out by Null_Status.
7803         (Known_Null): Moved from Exp_Util. Most of the logic in this routine
7804         is now carried out by Null_Status.
7805         (Null_Status): New routine.
7806         * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
7807         (Known_Null): Moved from Exp_Util.
7809 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7811         * sem_ch6.adb (Analyze_Expression_Function): Do not report an
7812         error on the return type of an expression function that is a
7813         completion, if the type is derived from a generic formal type.
7815 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7817         * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
7818         conversion are those of the target type.
7820 2017-04-25  Bob Duff  <duff@adacore.com>
7822         * a-clrefi.adb: Minor cleanup.
7824 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
7826         * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
7828 2017-04-25  Bob Duff  <duff@adacore.com>
7830         * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
7831         types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
7832         errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
7833         scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
7834         the Internal_Source buffer. This removes the incorrect call to "="
7835         the customer noticed.
7836         Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
7837         eventually need to eliminate them altogether. Or else get rid
7838         of zero-origin addressing.
7840 2017-04-25  Claire Dross  <dross@adacore.com>
7842         * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
7843         function used in GNATprove to know if an expression contains
7844         non-dispatching calls on primitives of a tagged type.
7846 2017-04-25  Bob Duff  <duff@adacore.com>
7848         * rtsfind.adb (Initialize): Initialize
7849         First_Implicit_With. Building the compiler with Normalize_Scalars
7850         and validity checking finds this being used as an uninitialized
7851         variable.
7853 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
7855         * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
7856         Add a warning about SPARK mode management. The routine now
7857         saves and restores both the mode and associated pragma.
7858         (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
7859         SPARK mode management. The routine now saves and restores both
7860         the mode and associated pragma.
7861         (Analyze_Object_Contract):
7862         Add a warning about SPARK mode management. The routine
7863         now saves and restores both the mode and associated pragma.
7864         (Analyze_Package_Body_Contract): Add a warning about SPARK mode
7865         management.  The routine now saves and restores both the mode
7866         and associated pragma.  (Analyze_Package_Contract): Add a warning
7867         about SPARK mode management. The routine now saves and restores
7868         both the mode and associated pragma.
7869         (Analyze_Task_Contract):
7870         Add a warning about SPARK mode management. The routine now saves
7871         and restores both the mode and associated pragma.
7872         * expander.adb (Expand): Change the way the Ghost mode is saved
7873         and restored.
7874         * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
7875         saved and restored.
7876         * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
7877         and restored.
7878         * exp_util.adb (Build_DIC_Procedure_Body):
7879         Change the way the Ghost mode is saved and restored.
7880         (Build_DIC_Procedure_Declaration): Change the way the Ghost
7881         mode is saved and restored.
7882         (Build_Invariant_Procedure_Body):
7883         Change the way the Ghost mode is saved and restored.
7884         (Build_Invariant_Procedure_Declaration): Change the way the Ghost
7885         mode is saved and restored.
7886         (Make_Predicate_Call): Change the
7887         way the Ghost mode is saved and restored.
7888         * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
7889         saved and restored.
7890         * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7891         and its assignment.
7892         (Mark_And_Set_Ghost_Body): Remove parameter
7893         Mode and its assignment.
7894         (Mark_And_Set_Ghost_Completion):
7895         Remove parameter Mode and its assignment.
7896         (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
7897         assignment.
7898         (Mark_And_Set_Ghost_Instantiation): Remove parameter
7899         Mode and its assignment.
7900         (Mark_And_Set_Ghost_Procedure_Call):
7901         Remove parameter Mode and its assignment.
7902         (Set_Ghost_Mode):
7903         Remove parameter Mode and its assignment.
7904         * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7905         and update the comment on usage.
7906         (Mark_And_Set_Ghost_Body):
7907         Remove parameter Mode and update the comment on usage.
7908         (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
7909         update the comment on usage.
7910         (Mark_And_Set_Ghost_Declaration):
7911         Remove parameter Mode and update the comment on usage.
7912         (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
7913         update the comment on usage.
7914         (Mark_And_Set_Ghost_Procedure_Call):
7915         Remove parameter Mode and update the comment on usage.
7916         (Set_Ghost_Mode): Remove parameter Mode and update the comment
7917         on usage.
7918         * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
7919         types.
7920         * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
7921         of obsolete field SPARK_Mode_Pragma.
7922         (Load_Main_Source): Remove
7923         the assignment of obsolete field SPARK_Mode_Pragma.
7924         (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
7925         * lib-writ.adb (Add_Preprocessing_Dependency): Remove
7926         the assignment of obsolete field SPARK_Mode_Pragma.
7927         (Ensure_System_Dependency): Remove the assignment of obsolete
7928         field SPARK_Mode_Pragma.
7929         * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
7930         mode management. Change the way Ghost and SPARK modes are saved
7931         and restored.
7932         * sem.adb (Analyze): Change the way the Ghost mode is saved
7933         and restored.
7934         * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
7935         Ghost mode is saved and restored.
7936         (Process_Full_View): Change
7937         the way the Ghost mode is saved and restored.
7938         * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
7939         mode is saved and restored.
7940         * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
7941         mode is saved and restored.
7942         (Analyze_Subprogram_Body_Helper):
7943         Change the way the Ghost mode is saved and restored.
7944         * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
7945         Ghost mode is saved and restored.
7946         * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
7947         management. Save the SPARK mode-related data prior to any changes
7948         to the scope stack and contexts. The mode is then reinstalled
7949         before the subunit is analyzed in order to restore the original
7950         view of the subunit.
7951         * sem_ch12.adb (Analyze_Package_Instantiation): Update the
7952         warning on region management.  Change the way the Ghost and
7953         SPARK modes are saved and restored.
7954         (Inline_Instance_Body):
7955         Add a warning about SPARK mode management. Code clean up.
7956         (Analyze_Subprogram_Instantiation): Update the warning on region
7957         management.  Change the way the Ghost and SPARK modes are saved
7958         and restored.
7959         (Instantiate_Package_Body): Update the warning
7960         on region management. Change the way the Ghost and SPARK modes
7961         are saved and restored.
7962         (Instantiate_Subprogram_Body): Update
7963         the warning on region management. Change the way the Ghost and
7964         SPARK modes are saved and restored.
7965         (Set_Instance_Env): Add a
7966         warning about SPARK mode management. Change the way SPARK mode
7967         is saved and restored.
7968         * sem_ch13.adb (Build_Predicate_Functions):
7969         Change the way the Ghost mode is saved and restored.
7970         (Build_Predicate_Function_Declaration): Change the way the Ghost
7971         mode is saved and restored.
7972         * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
7973         mode management. Change the way SPARK mode is saved and restored.
7974         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
7975         Change the way the Ghost mode is saved and restored.
7976         (Analyze_Initial_Condition_In_Decl_Part): Change the way
7977         the Ghost mode is saved and restored.
7978         (Analyze_Pragma):
7979         Change the way the Ghost mode is saved and restored.
7980         (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
7981         Ghost mode is saved and restored.
7982         * sem_util.adb (Install_SPARK_Mode): New routine.
7983         (Restore_SPARK_Mode): New routine.
7984         (Save_SPARK_Mode_And_Set): Removed.
7985         (Set_SPARK_Mode): New routine.
7986         * sem_util.ads (Install_SPARK_Mode): New routine.
7987         (Restore_SPARK_Mode): New routine.
7988         (Save_SPARK_Mode_And_Set): Removed.
7989         (Set_SPARK_Mode): New routine.
7991 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
7993         * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
7994         to determine whether a type is declared in a local package that
7995         has not yet been frozen.
7996         * freeze.adb (Freeze_Before): Use new predicate to determine
7997         whether a local package must be installed on the scope stack
7998         in order to evaluate in the proper scope actions generated by
7999         aspect specifications, such as Predicate
8000         * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
8001         using new predicate.
8003 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8005         * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
8006         comparisons between non- scalar expressions expressions because
8007         their values cannot be invalidated.
8008         * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
8009         comment on usage.
8011 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8013         * par_sco.adb: Minor reformatting.
8015 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8017         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
8018         is a type from an unfrozen local package, install package to
8019         complete the analysis of delayed aspects of the type.
8021 2017-04-25  Tristan Gingold  <gingold@adacore.com>
8023         * bingen.adb (System_Version_Control_Used): New variable.
8024         (Resolve_Binder_Options): Set the above variable.
8025         (Gen_Output_File_Ada): Conditionally call Gen_Versions.
8026         (Gen_Elab_Order): Emit blank line before.
8028 2017-04-25  Justin Squirek  <squirek@adacore.com>
8030         * sem_cat.adb (Validate_RT_RAT_Component): Added
8031         an extra check to ignore incomplete types.
8033 2017-04-25  Thomas Quinot  <quinot@adacore.com>
8035         * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
8036         bogus circuitry for the case where Name is Predicate.
8038 2017-04-25  Thomas Quinot  <quinot@adacore.com>
8040         * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
8041         Create SCOs for Predicate aspects in disabled
8042         state initially, to be enabled later on by...
8043         * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
8044         SCO for predicate as enabled.
8046 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8048         * comperr.adb (Compiler_Abort): Remove now obsolete pair of
8049         pragmas Warnings Off / On.
8050         * namet.adb (Finalize): Remove now obsolete pair of pragmas
8051         Warnings Off / On.
8052         * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
8053         * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
8054         consider comparisons between static expressions because their
8055         values cannot be invalidated.
8056         * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
8057         Warnings Off / On.
8058         (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
8059         * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
8061 2017-04-25  Bob Duff  <duff@adacore.com>
8063         * sem_elab.adb (In_Task_Activation): Trace internal calls in
8064         task bodies.
8066 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8068         * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
8069         typo fixes.
8071 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8073         * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
8074         On/Off to defend against a spurious warning in conditional
8075         compilation.
8076         * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
8077         * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
8078         defend against a spurious warning in conditional compilation.
8079         * output.adb Add a pair of pragma Warnings On/Off to defend
8080         against a spurious warning in conditional compilation.
8081         * sem_eval.adb (Eval_Relational_Op): Major code clean up.
8082         (Fold_General_Op): New routine.
8083         (Fold_Static_Real_Op): New routine.
8084         (Test_Comparison): New routine.
8085         * sem_eval.ads (Test_Comparison): New routine.
8086         * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
8087         (Warn_On_Constant_Valid_Condition): New routine.
8088         (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
8089         to detect a specific case.
8090         * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
8091         * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
8092         to defend against a spurious warning in conditional compilation.
8093         (Tree_Write): Add a pair of pragma Warnings On/Off to defend
8094         against a spurious warning in conditional compilation.
8095         * usage.adb Add a pair of pragma Warnings On/Off to defend
8096         against a spurious warning in conditional compilation.
8098 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
8100         * sinfo.ads, sem_ch13.adb: Update comment.
8102 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8104         * sem_util.adb (Is_Post_State): A reference to a
8105         generic in out parameter is considered a change in the post-state
8106         of a subprogram.
8108 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8110         * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
8111         declaration of a subprogram instance within its wrapper package,
8112         skip over null statements that may result from the rewriting of
8113         ignored pragmas.
8115 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8117         * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
8118         If the type is an unchecked_union, replace the attribute with
8119         a Raise_Program_Error (rather than inserting such before the
8120         attribute reference) to handle properly the case where we are
8121         processing a component of a larger record, and we need to prevent
8122         further expansion for the unchecked union.
8123         (Expand_Attribute_Reference, case 'Write): If the type is
8124         an unchecked_union, check whether enclosing scope is a Write
8125         subprogram. Replace attribute with a Raise_Program_Error if the
8126         discriminants of the unchecked_union type have not default values
8127         because such a use is erroneous..
8129 2017-04-25  Tristan Gingold  <gingold@adacore.com>
8131         * exp_ch9.adb (Expand_N_Task_Type_Declaration):
8132         Add relative_deadline to task record on edf profile.
8133         (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
8134         (Make_Task_Create_Call): Pass relative_deadline value.
8135         * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
8136         * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
8137         (Profile_Info): Add info for GNAT_Ravenscar_EDF.
8138         * sem_prag.adb (Set_Ravenscar_Profile): Handle
8139         GNAT_Ravenscar_EDF (set scheduling policy).
8140         (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
8141         pragma.
8142         (Sig_Flags): Add choice for Pragma_Deadline_Floor.
8143         * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
8144         New names.
8145         (Pragma_Deadline_Floor): New pragma.
8146         * targparm.adb (Get_Target_Parameters): Recognize
8147         GNAT_Ravenscar_EDF profile.
8149 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
8151         * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
8153 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8155         * sem_aux.adb (Nearest_Ancestor): Use original node of type
8156         declaration to locate nearest ancestor, because derived
8157         type declarations for record types are rewritten as record
8158         declarations.
8159         * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
8160         properly derivations that are completions of private types.
8161         (Add_Predicates): If type is private, examine rep. items of full
8162         view, which may include inherited predicates.
8163         (Build_Predicate_Functions): Ditto.
8165 2017-04-25  Javier Miranda  <miranda@adacore.com>
8167         * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
8168         to generate new entities for subtype declarations located in
8169         Expression_With_Action nodes.
8171 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8173         * sem_elab.adb (Check_A_Call): Remove
8174         local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
8175         need for Elaborate_All when SPARK elaboration checks are
8176         required. Update the checks for instances, variables, and calls
8177         to Default_Initial_Condition procedures.
8179 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8181         * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
8182         into a boolean aspect, in analogy with the Ada aspect No_Return.
8184 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8186         * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
8188 2017-04-25  Bob Duff  <duff@adacore.com>
8190         * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
8191         Is_True_Constant for an array variable that is passed to a
8192         foreign function as an 'in' parameter.
8193         * debug.adb: Document -gnatd.q.
8195 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8197         * sem_ch6.adb (Analyze_Expression_Function): If expression function
8198         is completion and return type is an access type do not freeze
8199         designated type: this will be done in the process of freezing
8200         the expression if needed.
8201         (Freeze_Expr_Types): Check whether type is complete before
8202         creating freeze node, to provide a better error message if
8203         reference is premature.
8204         * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
8205         functions created by type derivations.
8207 2017-04-25  Pascal Obry  <obry@adacore.com>
8209         * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
8211 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8213         * sem_res.adb (Resolve_Type_Conversion):
8214         When resolving against any fixed type, set the type of the
8215         operand as universal real when the operand is a multiplication
8216         or a division where both operands are of any fixed type.
8217         (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
8218         placement of an error message by pointing to the operand of a
8219         type conversion rather than the conversion itself.
8221 2017-04-25  Thomas Quinot  <quinot@adacore.com>
8223         * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
8224         Needs_Debug_Info when producing SCOs.
8226 2017-04-25  Thomas Quinot  <quinot@adacore.com>
8228         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
8229         Always pass a null finalization master for a library level named access
8230         type to which a pragme No_Heap_Finalization applies.
8232 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
8234         PR ada/78845
8236         * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
8237         set to A'First(2) and vice versa.
8239 2017-04-25  Yannick Moy  <moy@adacore.com>
8241         * freeze.adb (Freeze_Record_Type): Remove obsolete
8242         rule on volatile tagged record restriction on SPARK code.
8244 2017-04-25  Yannick Moy  <moy@adacore.com>
8246         * sem_prag.adb (minor) Fix SPARK RM reference.
8248 2017-04-25  Yannick Moy  <moy@adacore.com>
8250         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
8251         comment to reflect which entity is chosen as unique entity.
8252         (Unique_Entity): Return full view instead of private spec for
8253         protected type or task type. Fix possible incorrect access when
8254         called on entry.
8256 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8258         * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
8259         array types only instead of all packed array types.
8261 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8263         * sem_ch6.adb (Conforming_Types): If type of formal as a specified
8264         dimension system, verify that dimensions of both match.
8265         (Check_Conformance): Add error message in case of dimension
8266         mismatch.
8267         * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
8268         predicate.
8270 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
8272         * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
8273         confusing.
8275 2017-04-25  Yannick Moy  <moy@adacore.com>
8277         * sem_util.adb: Minor refactoring.
8278         * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
8280 2017-04-25  Claire Dross  <dross@adacore.com>
8282         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
8283         ultimate alias when accessing overridden operation. Indeed, if the
8284         overridden operation is itself inherited, it won't have any explicit
8285         contract.
8287 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8289         * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
8290         overlap if the two formals have different types, because formally
8291         the corresponding actuals cannot designate the same objects.
8293 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8295         * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
8296         dimensions are present from context, use them.  b) If operand is
8297         a static constant rewritten as a literal, obtain the dimensions
8298         from the original declaration, otherwise use dimensions of type
8299         established from context.
8301 2017-04-25  Yannick Moy  <moy@adacore.com>
8303         * sem_util.adb (Is_Effectively_Volatile): Protect against base type
8304         of array that is private.
8306 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8308         * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
8309         reformatting.
8311 2017-04-25  Yannick Moy  <moy@adacore.com>
8313         * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
8314         on body.
8316 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8318         * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
8319         the check that recognizes a call to a private overridding and
8320         replaces the called subprogram with its alias.
8322 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8324         * exp_util.adb: Minor reformatting.
8326 2017-04-25  Justin Squirek  <squirek@adacore.com>
8328         * exp_ch3.adb (Freeze_Type): Add condition to always treat
8329         interface types as a partial view of a private type for the
8330         generation of invariant procedure bodies.
8331         * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
8332         Add a condition to get the Corresponding_Record_Type for
8333         concurrent types, add condition to return in the absence of a
8334         class in the pragma, remove call to Replace_Type_References,
8335         and add call to Replace_References.
8336         (Add_Interface_Invariatns),
8337         (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
8338         to including the working type T.
8339         (Add_Own_Invariants): Remove
8340         legacy condition for separate units, remove dispatching for ASIS
8341         and save a copy of the expression in the pragma expression.
8342         (Build_Invariant_Procedure_Body): Default initalize vars,
8343         remove return condition on interfaces, always use the
8344         private type for interfaces, and move the processing of types
8345         until after the processing of invariants for the full view.
8346         (Build_Invariant_Procedure_Declaration): Remove condition
8347         to return if an interface type is encountered and add
8348         condition to convert the formal parameter to its class-wide
8349         counterpart if Work_Typ is abstract.
8350         (Replace_Type): Add call to Remove_Controlling_Arguments.
8351         (Replace_Type_Ref): Remove class-wide dispatching for the current
8352         instance of the type.
8353         (Replace_Type_References): Remove parameter "Derived"
8354         (Remove_Controlling_Arguments): Created in order to removing
8355         the controlliong argument from calls to primitives in the case
8356         of the formal parameter being an class-wide abstract type.
8357         * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
8358         to the change made to Freeze_Type in exp_ch3. Add a condition
8359         to treat interface types as a partial view.
8360         * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
8361         to Build_Invariant_Procedure_Declaration to properly generate a
8362         "partial" invariant procedure when Typ is an interface.
8364 2017-04-25  Bob Duff  <duff@adacore.com>
8366         * a-numeri.ads: Go back to using brackets encoding for the Greek
8367         letter pi.
8369 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8371         * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
8372         (10-15): if derived type T with progenitors is abstract,
8373         and primitive P of this type inherits non-trivial classwide
8374         preconditions from both a parent operation and from an interface
8375         operation, then the inherited operation is abstract if the parent
8376         operation is not null.
8377         * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
8378         with Covered_Interface_Op to yield the actual interface operation
8379         that is implemented by a given inherited operation.
8381 2017-04-25  Javier Miranda  <miranda@adacore.com>
8383         * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
8384         and right operands after performing the validity checks. Required
8385         because validity checks may remove side effects from the operands.
8387 2017-04-25  Javier Miranda  <miranda@adacore.com>
8389         * exp_attr.adb (Attribute_Unrestricted_Access):
8390         Do not disable implicit type conversion.  Required to generate
8391         code that displaces the pointer to reference the secondary
8392         dispatch table.
8394 2017-04-25  Pascal Obry  <obry@adacore.com>
8396         * prj-attr.adb, snames.ads-tmpl: Add package Install's
8397         Required_Artifacts attribute.
8399 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8401         * sem_util.adb (Same_Value): String literals are compile-time
8402         values, and comparing them must use Expr_Value_S.
8404 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8406         * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
8407         dereference is introduced for the object, and the object is
8408         overloaded, do not check whether it is aliased, because it may
8409         include an implicit dereference.
8410         * sem_type.adb (Disambiguate): If two interpretations are access
8411         attribute types with the same designated type keep either of
8412         them and do not report an ambiguity.  A true ambiguity will be
8413         reported elsewhere.
8415 2017-04-25  Bob Duff  <duff@adacore.com>
8417         * a-numeri.ads: Change the encoding of Greek letter Pi from
8418         brackets encoding to UTF-8.  Use pragma Wide_Character_Encoding
8419         to indicate the encoding. We considered using a byte order mark
8420         (BOM), but that causes various trouble (misc software eats the
8421         BOM, if you have a patch with a BOM, then it's not at the start
8422         of the patch, so it's not a BOM, the BOM affects with-ing files,
8423         etc.).
8424         * scng.adb, s-wchcnv.adb: Minor.
8426 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8428         * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
8429 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8431         * sem_ch3.adb (Add_Internal_Interface_Entities): Move
8432         Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
8433         Improve error message on operations that inherit non-conforming
8434         classwide preconditions from ancestor and progenitor.
8435         * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
8436         moved here from sem_ch3.
8437         * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
8438         check given in RM 6.1.1 (17) concerning renamings of overriding
8439         operations that inherits class-wide preconditions from ancestor
8440         or progenitor.
8442 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8444         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
8445         (Build_Adjust_Statements): Code cleanup.
8446         (Build_Finalizer): Update the initialization of
8447         Exceptions_OK.
8448         (Build_Finalize_Statements): Code cleanup.
8449         (Build_Initialize_Statements): Code cleanup.
8450         (Make_Deep_Array_Body): Update the initialization of
8451         Exceptions_OK.
8452         (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
8453         (Process_Object_Declaration): Generate a null exception handler only
8454         when exceptions are allowed.
8455         (Process_Transients_In_Scope): Update the initialization of
8456         Exceptions_OK.
8457         * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
8458         routine.
8459         * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
8460         restrictions when the handler is internally generated and the
8461         mode is warnings.
8463 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8465         * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
8466         enforce legality rule on classwide preconditions inherited from
8467         both an ancestor and a progenitor (RM 6.1.1 (10-13).
8468         * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
8469         subprogram need not be dispatching if it appears in a precondition
8470         for an abstract or null subprogram.
8472 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8474         * sem_ch10.adb: Minor typo fix.
8476 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
8478         * gcc-interface/Makefile.in: Cleanup VxWorks targets.
8480 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8482         * fname.adb (Is_Internal_File_Name): Arrange for the slices to
8483         have a length which is a power of 2.
8484         (Is_Predefined_File_Name): Likewise. Adjust comment.
8486 2017-04-25  Bob Duff  <duff@adacore.com>
8488         * exp_aggr.adb (Component_Count): Protect the
8489         arithmetic from attempting to convert a value >= 2**31 to Int,
8490         which would otherwise raise Constraint_Error.
8492 2017-04-25  Bob Duff  <duff@adacore.com>
8494         * opt.ads (Locking_Policy): Fix incorrect documentation. The
8495         first character of the policy name is not unique.
8497 2017-04-25  Bob Duff  <duff@adacore.com>
8499         * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
8500         * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
8501         about this flag not being used. It was already used, and it is
8502         now used more.
8504 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8506         * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
8507         (Ignore_SPARK_Mode_Pragmas): New routine.
8508         (Set_Ignore_SPARK_Mode_Pragmas): New routine.
8509         (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
8510         * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
8511         related entities.
8512         (Ignore_SPARK_Mode_Pragmas): New routine
8513         along with pragma Inline.
8514         (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
8515         * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
8516         Ignore_SPARK_Mode_Pragmas_In_Instance.
8517         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8518         Save and restore the value of global flag
8519         Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
8520         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
8521         the corresponding spec or the body must ignore all SPARK_Mode
8522         pragmas found within.
8523         (Analyze_Subprogram_Declaration): Mark
8524         the spec when it needs to ignore all SPARK_Mode pragmas found
8525         within to allow the body to infer this property in case it is
8526         instantiated or inlined later.
8527         * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
8528         value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8529         the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8530         when the corresponding spec also ignored all SPARK_Mode pragmas
8531         found within.
8532         (Analyze_Package_Declaration): Mark the spec when
8533         it needs to ignore all SPARK_Mode pragmas found within to allow
8534         the body to infer this property in case it is instantiated or
8535         inlined later.
8536         * sem_ch12.adb (Analyze_Formal_Package_Declaration):
8537         Save and restore the value of flag
8538         Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8539         formal spec when it needs to ignore all SPARK_Mode
8540         pragmas found within to allow the body to infer this
8541         property in case it is instantiated or inlined later.
8542         (Analyze_Package_Instantiation): Save and restore the value
8543         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
8544         the instance spec when it needs to ignore all SPARK_Mode
8545         pragmas found within to allow the body to infer this
8546         property in case it is instantiated or inlined later.
8547         (Analyze_Subprogram_Instantiation): Save and restore the value
8548         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8549         instance spec and anonymous package when they need to ignore
8550         all SPARK_Mode pragmas found within to allow the body to infer
8551         this property in case it is instantiated or inlined later.
8552         (Instantiate_Package_Body): Save and restore the value of global
8553         flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
8554         global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
8555         corresponding instance spec also ignored all SPARK_Mode pragmas
8556         found within.
8557         (Instantiate_Subprogram_Body): Save and restore the
8558         value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8559         the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8560         when the corresponding instance spec also ignored all SPARK_Mode
8561         pragmas found within.
8562         * sem_prag.adb (Analyze_Pragma): Update the reference to
8563         Ignore_Pragma_SPARK_Mode.
8564         * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
8565         all SPARK_Mode pragmas defined within yields mode "off".
8567 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8569         * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
8571 2017-04-25  Bob Duff  <duff@adacore.com>
8573         * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
8574         All_Checks" to avoid generating unnecessary checks.
8575         * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
8576         All_Checks".
8577         * sem.ads: Fix comment.
8578         * expander.ads: Fix comment.
8579         * exp_atag.ads: Fix comment: "Index = 0" should be
8580         "Index >= 0".
8582 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8584         * s-taprop-linux.adb: Minor editorial fixes.
8586 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8588         * sem_util.adb (New_Copy_Tree): Put back the declarations of the
8589         hash tables at library level.  Reinstate the NCT_Hash_Tables_Used
8590         variable and set it to True whenever the main hash table is
8591         populated.  Short- circuit the Assoc function if it is false
8592         and add associated guards.
8594 2017-04-25  Olivier Hainque  <hainque@adacore.com>
8596         * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
8597         specs without elaboration code that have an elaboration counter
8598         nevertheless, e.g.  when compiled with -fpreserve-control-flow.
8599         * sem_ch10.adb (Analyze_Compilation_Unit):
8600         Set_Elaboration_Entity_Required when requested to preserve
8601         control flow, to ensure the unit elaboration is materialized at
8602         bind time, resulting in the inclusion of the unit object file
8603         in the executable closure at link time.
8605 2017-04-25  Pierre-Marie de Rodat  <derodat@adacore.com>
8607         * exp_dbug.adb: In Debug_Renaming_Declaration,
8608         when dealing with indexed component, accept to produce a renaming
8609         symbol when the index is an IN parameter or when it is a name
8610         defined in an outer scope.
8612 2017-04-25  Yannick Moy  <moy@adacore.com>
8614         * errout.adb (Error_Msg): Adapt continuation
8615         message in instantiations and inlined bodies for info messages.
8617 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8619         * fname.adb (Has_Internal_Extension): Add pragma Inline.
8620         Use direct 4-character slice comparisons.
8621         (Has_Prefix): Add
8622         pragma Inline.  (Has_Suffix): Delete.
8623         (Is_Internal_File_Name):
8624         Test Is_Predefined_File_Name first.
8625         (Is_Predefined_File_Name):
8626         Use direct slice comparisons as much as possible and limit all
8627         comparisons to at most 8 characters.
8629 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8631         * checks.adb (Insert_Valid_Check): Code cleanup.
8632         * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
8633         (Expand_Actuals): Generate proper copy-back for a validation
8634         variable when it acts as the argument of a type conversion.
8635         * sem_util.adb (Is_Validation_Variable_Reference): Augment the
8636         predicate to operate on type qualifications.
8638 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8640         * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
8641         Minor reformatting.
8643 2017-04-25  Bob Duff  <duff@adacore.com>
8645         * sem_prag.adb (No_Return): Give an error if the pragma applies
8646         to a body. Specialize the error for the specless body case,
8647         as is done for (e.g.) pragma Convention.
8648         * debug.adb: Add switch -gnatd.J to disable the above legality
8649         checks. This is mainly for use in our test suite, to avoid
8650         rewriting a lot of illegal (but working) code.  It might also
8651         be useful to customers. Under this switch, if a pragma No_Return
8652         applies to a body, and the procedure raises an exception (as it
8653         should), the pragma has no effect. If the procedure does return,
8654         execution is erroneous.
8656 2017-04-25  Bob Duff  <duff@adacore.com>
8658         * exp_ch6.adb (Expand_Actuals): This is the
8659         root of the problem. It took N as an 'in out' parameter, and in
8660         some cases, rewrote N, but then set N to Original_Node(N). So
8661         the node returned in N had no Parent. The caller continued
8662         processing of this orphaned node. In some cases that caused a
8663         crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
8664         and trips over the Empty Parent). The solution is to make N an
8665         'in' parameter.  Instead of rewriting it, return the list of
8666         post-call actions, so the caller can do the rewriting later,
8667         after N has been fully processed.
8668         (Expand_Call_Helper): Move most of Expand_Call here. It has
8669         too many premature 'return' statements, and we want to do the
8670         rewriting on return.
8671         (Insert_Post_Call_Actions): New procedure to insert the post-call
8672         actions in the appropriate place. In the problematic case,
8673         that involves rewriting N as an Expression_With_Actions.
8674         (Expand_Call): Call the new procedures Expand_Call_Helper and
8675         Insert_Post_Call_Actions.
8677 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8679         * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
8680         properly type derived from generic formal types, to handle
8681         properly modified version of ACATS 4.1B B611017.
8683 2017-04-25  Javier Miranda  <miranda@adacore.com>
8685         * exp_unst.adb (Subp_Index): Adding missing
8686         support for renamings and functions that return a constrained
8687         array type (i.e. functions for which the frontend built a
8688         procedure with an extra out parameter).
8690 2017-04-25  Pascal Obry  <obry@adacore.com>
8692         * s-string.adb: Minor code clean-up.
8694 2017-04-25  Bob Duff  <duff@adacore.com>
8696         * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
8697         procedure.
8698         * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
8699         function for Non_Blocking_Wait_Process.
8701 2017-04-25  Bob Duff  <duff@adacore.com>
8703         * prep.adb (Preprocess): Remove incorrect
8704         Assert. Current character can be ASCII.CR.
8706 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8708         * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
8709         convention Stdcall, which has a number of exceptions. Convention
8710         is legal on a component declaration whose type is an anonymous
8711         access to subprogram.
8713 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8715         * sem_ch4.adb: sem_ch4.adb Various reformattings.
8716         (Try_One_Prefix_Interpretation): Use the base type when dealing
8717         with a subtype created for purposes of constraining a private
8718         type with discriminants.
8720 2017-04-25  Javier Miranda  <miranda@adacore.com>
8722         * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
8723         * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
8724         dispatching primitives (Restore_Warnings): Restore warning on
8725         late dispatching primitives (Save_Warnings): Save warning on late
8726         dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
8727         to enable/disable this warning.
8728         (WA_Warnings): Set warning on late dispatching primitives.
8729         * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
8730         that its parent type has a private extension.
8731         * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
8732         New subprogram.
8733         * usage.adb: Document -gnatw.j and -gnatw.J.
8735 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8737         * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
8738         reformatting.
8740 2017-04-25  Bob Duff  <duff@adacore.com>
8742         * binde.adb (Validate): Do not pass dynamic strings
8743         to pragma Assert, because older compilers do not support that.
8745 2017-04-25  Bob Duff  <duff@adacore.com>
8747         * s-fileio.adb (Close): When a temp file is
8748         closed, delete it and clean up its Temp_File_Record immediately,
8749         rather than waiting until later.
8750         (Temp_File_Record): Add File
8751         component, so Close can know which Temp_File_Record corresponds
8752         to the file being closed.
8753         (Delete): Don't delete temp files,
8754         because they are deleted by Close.
8755         (Open): Set the File component
8756         of Temp_File_Record. This requires moving the creation of the
8757         Temp_File_Record to the end, after the AFCB has been created.
8759 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8761         * checks.adb (Insert_Valid_Check): Do not generate
8762         a validity check when inside a generic.
8764 2017-04-25  Yannick Moy  <moy@adacore.com>
8766         * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
8768 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
8770         * snames.ads-tmpl (Snames): More names for detecting predefined
8771         potentially blocking subprograms.
8773 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8775         * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
8776         concerning inheritance of class-wide preconditions do not apply
8777         to postconditions.
8779 2017-04-25  Bob Duff  <duff@adacore.com>
8781         * s-ficobl.ads: Minor comment fix.
8783 2017-04-25  Yannick Moy  <moy@adacore.com>
8785         * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
8786         conversions from float to integer in GNATprove mode.
8787         (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
8788         to call Apply_Type_Conversion_Checks, so that range checks
8789         are properly positioned when needed on conversions, including
8790         when converting from float to integer.  (Determine_Range): In
8791         GNATprove mode, take into account the possibility of conversion
8792         from float to integer.
8793         * sem_res.adb (Resolve_Type_Conversion): Only enforce range
8794         check on conversions from fixed-point to integer, not anymore
8795         on conversions from floating-point to integer, when in GNATprove
8796         mode.
8798 2017-04-25  Yannick Moy  <moy@adacore.com>
8800         * checks.adb (Determine_Range_R): Special case type conversions
8801         from integer to float in order to get bounds in that case too.
8802         * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
8803         mode, for computations involved in interval checking.
8805 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8807         * checks.adb (Insert_Valid_Check): Partially reimplement validity
8808         checks.
8809         * einfo.adb Node36 is now used as Validated_Object.
8810         (Validated_Object): New routine.
8811         (Set_Validated_Object): New routine.
8812         (Write_Field36_Name): Add an entry for Validated_Object.
8813         * einfo.ads Add new attribute Validated_Object along with
8814         usage in entities.
8815         (Validated_Object): New routine along with pragma Inline.
8816         (Set_Validated_Object): New routine along with pragma Inline.
8817         * exp_attr.adb (Make_Range_Test): Add processing for validation
8818         variables to avoid extra reads and copies of the prefix.
8819         * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
8820         variables in order to reflect any changes done in the variable
8821         back into the original object.
8822         * sem_util.adb (Is_Validation_Variable_Reference): New routine.
8823         * sem_util.ads (Is_Validation_Variable_Reference): New routine.
8825 2017-04-25  Steve Baird  <baird@adacore.com>
8827         * exp_ch7.adb (Build_Array_Deep_Procs,
8828         Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
8829         generate Finalize_Address routines for CodePeer.
8831 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8833         * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
8834         Analyze_Pre_Post_Condition, to implement the legality checks
8835         mandated by AI12-0131: Pre'Class shall not be specified for an
8836         overriding primitive subprogram of a tagged type T unless the
8837         Pre'Class aspect is specified for the corresponding primitive
8838         subprogram of some ancestor of T.
8840 2017-04-25  Bob Duff  <duff@adacore.com>
8842         * sem_ch8.adb (Use_One_Type): If a use_type_clause
8843         is redundant, set its Used_Operations to empty. This is only
8844         necessary for use clauses that appear in the parent of a generic
8845         child unit, because those use clauses get reanalyzed when we
8846         instantiate the generic, and we don't want the Used_Operations
8847         carried over from the original context (where it was probably
8848         not redundant).
8850 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8852         * exp_ch6.adb: Minor reformatting.
8854 2017-04-25  Bob Duff  <duff@adacore.com>
8856         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
8857         Use Source_Index (Current_Sem_Unit) to find the correct casing.
8858         * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
8859         (Current_Sem_Unit) to find the correct casing.
8860         * par.adb (Par): Null out Current_Source_File, to ensure that
8861         the above bugs won't rear their ugly heads again.
8863 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8865         * sem_ch8.adb (Find_Type): For an attribute reference
8866         'Class, if prefix type is synchronized and previous errors
8867         have suppressed the creation of the corresponding record type,
8868         create a spurious class-wide for the synchonized type itself,
8869         to catch other misuses of the attribute
8871 2017-04-25  Steve Baird  <baird@adacore.com>
8873         * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
8874         is True, then don't generate the accessibility check for the
8875         tag of a tagged result.
8876         * exp_intr.adb (Expand_Dispatching_Constructor_Call):
8877         if CodePeer_Mode is True, then don't generate the
8878         tag checks for the result of call to an instance of
8879         Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
8880         descendant of" check and the accessibility check).
8882 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8884         * sem_ch13.adb: Code cleanups.
8885         * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
8886         * sem_ch8.ads: Minor comment fix.
8888 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8890         * exp_ch4.adb (Library_Level_Target): New function.
8891         (Expand_Concatenate): When optimization is enabled, also expand
8892         the operation out-of-line if the concatenation is present within
8893         the expression of the declaration of a library-level object and
8894         not only if it is the expression of the declaration.
8896 2017-04-25  Bob Duff  <duff@adacore.com>
8898         * freeze.adb (Freeze_Object_Declaration): Do
8899         not Remove_Side_Effects if there is a pragma Linker_Section,
8900         because in that case we want static initialization in the
8901         appropriate section.
8903 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
8905         * exp_dbug.adb: Minor rewording and reformatting.
8907 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8909         * sem_attr.adb (Statically_Denotes_Object): New predicate, to
8910         handle the proposed changes to rules concerning potentially
8911         unevaluated expressions, to include selected components that
8912         do not depend on discriminants, and indexed components with
8913         static indices.
8914         * sem_util.adb (Is_Potentially_Unevaluated): Add check for
8915         predicate in quantified expression, and fix bugs in the handling
8916         of case expressions and membership test.
8917         (Analyze_Attribute_Old_Result): use new predicate.
8918         (Analyze_Attribute, case Loop_Entry): ditto.
8920 2017-04-25  Bob Duff  <duff@adacore.com>
8922         * s-secsta.adb (SS_Info): Add a comment
8923         explaining why we don't need to walk all the chunks in order to
8924         compute the total size.
8926 2017-04-25  Bob Duff  <duff@adacore.com>
8928         * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
8929         of the global name buffer to 4*Max_Line_Length.
8931 2017-04-25  Javier Miranda  <miranda@adacore.com>
8933         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
8934         renaming entity for debug information, mark the entity as needing debug
8935         info if it comes from sources.
8937 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8939         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
8940         restriction converning the use of 'Address where the prefix is
8941         of a controlled type.
8943 2017-04-25  Pierre-Marie de Rodat  <derodat@adacore.com>
8945         * exp_dbug.adb: In Debug_Renaming_Declaration,
8946         skip slices that are made redundant by an indexed component
8947         access.
8948         * atree.h: New definition for Original_Node.
8950 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
8952         * sem_prag.adb, sem_prag.ads: Minor reformatting.
8954 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8956         * sem_ch3.adb (Check_Entry_Contract): Call
8957         Preanalyze_Spec_Expression so that resolution takes place as well.
8958         * sem_util.adb (Check_Internal_Protected_Use): Reject properly
8959         internal calls that appear in preconditions of protected
8960         operations, in default values for same, and in contract guards
8961         for contract cases in SPARK.
8963 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8965         * a-numaux.ads: Fix description of a-numaux-darwin
8966         and a-numaux-x86.
8967         (Double): Define to Long_Float.
8968         * a-numaux-vxworks.ads (Double): Likewise.
8969         * a-numaux-darwin.ads
8970         (Double): Likewise.
8971         * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
8972         * a-numaux-x86.ads: Fix package description.
8973         * a-numaux-x86.adb (Is_Nan): Minor tweak.
8974         (Reduce): Adjust and complete description. Call Is_Nan instead of
8975         testing manually. Use an integer temporary to hold rounded value.
8976         * a-numaux-darwin.adb (Reduce): Likewise.
8977         (Is_Nan): New function.
8979 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8981         * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
8982         on analysis of prefix whose type is a current instance of a
8983         synchronized type, but where the prefix itself is an entity that
8984         is an object.
8986 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
8988         * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
8989         the identity of callable entities therein, because they have been
8990         properly resolved, and prefixed calls may have been rewritten
8991         as normal calls.
8993 2017-04-25  Patrick Bernardi  <bernardi@adacore.com>
8995         * exp_ch3.adb (Build_Init_Statements): Convert
8996         the expression of the pragma/aspect Secondary_Stack_Size to
8997         internal type System.Parameters.Size_Type before assigning
8998         it to the Secondary_Stack_Size component of the task type's
8999         corresponding record.
9001 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
9003         * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
9004         (etc) optimizations when the type is modular and the offsets
9005         are equal.
9007 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
9009         * s-osinte-freebsd.ads: Minor comment tweaks
9011 2017-04-25  Javier Miranda  <miranda@adacore.com>
9013         * urealp.adb (UR_Write): Reverse previous patch
9014         adding documentation on why we generate multiplications instead
9015         of divisions (needed to avoid expressions whose computation with
9016         large numbers may cause division by 0).
9018 2017-04-25  Bob Duff  <duff@adacore.com>
9020         * erroutc.adb (Set_Specific_Warning_Off,
9021         Set_Warnings_Mode_Off): Use the correct source file for
9022         Stop. Was using Current_Source_File, which is only valid during
9023         parsing. Current_Source_File will have a leftover value from
9024         whatever file happened to be parsed last, because of a with_clause
9025         or something.
9027 2017-04-25  Bob Duff  <duff@adacore.com>
9029         * lib.ads, lib.adb (In_Internal_Unit): New functions similar
9030         to In_Predefined_Unit, but including GNAT units.
9031         * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
9032         with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
9033         because Should_Ignore_Pragma was not working reliably outside
9034         the parser, because Current_Source_File is not valid.
9035         * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
9036         * par-prag.adb: Call Should_Ignore_Pragma_Par.
9038 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
9040         * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
9041         codepeer mode.
9043 2017-04-25  Javier Miranda  <miranda@adacore.com>
9045         * urealp.adb (UR_Write): Fix output of constants with a base other
9046         that 10.
9048 2017-04-25  Justin Squirek  <squirek@adacore.com>
9050         * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
9051         * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
9052         Add extra parameter for Process_Interface_Name.
9053         (Process_Interface_Name): Add parameter for pragma to analyze
9054         corresponding aspect.
9055         * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
9056         from sem_ch13.adb
9058 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
9060         * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
9061         correction.
9063 2017-04-25  Yannick Moy  <moy@adacore.com>
9065         * sem_res.adb (Resolve_Comparison_Op): Do not
9066         attempt evaluation of relational operations inside assertions.
9068 2017-04-25  Justin Squirek  <squirek@adacore.com>
9070         * exp_util.adb (Add_Interface_Invariants):
9071         Restored, code moved back from Build_Invariant_Procedure_Body.
9072         (Add_Parent_Invariants): Restored, code moved back from
9073         Build_Invariant_Procedure_Body.
9074         (Build_Invariant_Procedure_Body):
9075         Remove refactored calls and integrated code from
9076         Add_Parent_Invariants and Add_Interface_Invariants.
9078 2017-04-25  Johannes Kanig  <kanig@adacore.com>
9080         * errout.adb (Output_Messages): Adjust computation of total
9081         errors
9082         * erroutc.adb (Error_Msg): In statistics counts, deal
9083         correctly with informational messages that are not warnings.
9084         * errutil.adb (Finalize): adjust computation of total errors.
9086 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
9088         * terminals.c (__gnat_terminate_pid): New.
9089         * g-exptty.ads (Terminate_Process): New. Update comments.
9091 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
9093         * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
9095 2017-04-25  Justin Squirek  <squirek@adacore.com>
9097         * sem_ch3.adb (Analyze_Declarations): Minor
9098         correction to comments, move out large conditional and scope
9099         traversal into a predicate.
9100         (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
9101         logic.
9103 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9105         * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
9106         of prefix whose type is a current instance of a synchronized
9107         type. If the prefix is an object this is an external call (or
9108         requeue) that can only access public operations of the object. The
9109         previous predicate was too restrictive, and did not allow public
9110         protected operations, only task entries.
9112 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9114         * sem_ch5.adb, fname.adb: Minor reformatting.
9116 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9118         * einfo.adb (Is_Anonymous_Access_Type): New routine.
9119         * einfo.ads Update the placement of
9120         E_Anonymous_Access_Subprogram_Type along with all subtypes that
9121         mention the ekind.
9122         (Is_Anonymous_Access_Type): New routine.
9123         * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
9124         master for an access type subject to pragma No_Heap_Finalization.
9125         * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
9126         allocated or deallocated does not finalization actions if the
9127         associated access type is subject to pragma No_Heap_Finalization.
9128         * opt.ads Add new global variable No_Heap_Finalization_Pragma.
9129         * par-prag.adb Pragma No_Heap_Finalization does not need special
9130         processing from the parser.
9131         * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
9132         ??? comments. Use the new predicate Is_Anonymous_Access_Type.
9133         * sem_prag.adb Add an entry in table Sig_Flags for pragma
9134         No_Heap_Finalization.
9135         (Analyze_Pragma): Add processing for
9136         pragma No_Heap_Finalization. Update various error messages to
9137         use Duplication_Error.
9138         * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
9139         * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
9140         and corresponding pragma id.
9142 2017-04-25  Bob Duff  <duff@adacore.com>
9144         * freeze.adb (Freeze_Record_Type): Use the
9145         underlying type of the component type to determine whether it's
9146         elementary. For representation clause purposes, a private type
9147         should behave the same as its full type.
9148         * fname.ads, fname.adb (Is_Predefined_File_Name):
9149         Make sure things like "system.ali" are recognized as predefined.
9151 2017-04-25  Javier Miranda  <miranda@adacore.com>
9153         * debug.adb: Update documentation of -gnatd.6.
9155 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9157         * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
9158         element iterator when the name is an overloaded function call,
9159         one of whose interpretations yields an array.
9161 2017-04-25  Bob Duff  <duff@adacore.com>
9163         * uname.ads, uname.adb (Is_Predefined_Unit_Name,
9164         Is_Internal_Unit_Name): New functions for operating on unit
9165         names, as opposed to file names. There's some duplicated code
9166         with fname.adb, which is unfortunate, but it seems like we don't
9167         want to add dependencies here.
9168         * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
9169         to Is_Predefined_Unit_Name; the former was wrong, because Uname
9170         is not a file name at all.
9171         * fname.ads, fname.adb: Document the fact that
9172         Is_Predefined_File_Name and Is_Internal_File_Name can be called
9173         for ALI files, and fix the code so it works properly for ALI
9174         files. E.g. these should return True for "system.ali".
9176 2017-04-25  Justin Squirek  <squirek@adacore.com>
9178         * exp_util.adb (Add_Invariant): Removed,
9179         code moved to Add_Invariant_Check, Add_Inherited_Invariant,
9180         and Add_Own_Invariant.  (Add_Invariant_Check): Used
9181         for adding runtime checks from any kind of invariant.
9182         (Add_Inherited_Invariant): Generates invariant checks for
9183         class-wide invariants (Add_Interface_Invariants): Removed, code
9184         moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
9185         Create a types own invariant procedure (Add_Parent_Invariants):
9186         Removed, code moved to Build_Invariant_Procedure_Body
9187         (Build_Invariant_Procedure_Body): Add refactored calls
9188         and integrated code from Add_Parent_Invariants and
9189         Add_Interface_Invariants.
9190         (Process_Type): Removed, the
9191         relavant code was inlined into both Add_Own_Invariant and
9192         Add_Inherited_Invariant.
9194 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9196         * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
9197         scn.adb, osint.adb, fname.adb: Minor reformatting.
9199 2017-04-25  Pascal Obry  <obry@adacore.com>
9201         * s-taprop-mingw.adb: Do not check for CloseHandle in
9202         Finalize_TCB.
9204 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9206         * sem_util.adb (Check_Part_Of_Reference):
9207         Continue to examine the context if the reference appears within
9208         an expression function.
9210 2017-04-25  Justin Squirek  <squirek@adacore.com>
9212         * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
9213         and Build_Invariant_Procedure_Declaration.
9214         * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
9215         and Build_Invariant_Procedure_Declaration from exp_ch7
9216         and break-out Is_Untagged_Private_Derivation from
9217         Build_Invariant_Procedure_Body.
9218         (Replace_Type_References):
9219         Append an extra parameter to allow for dispatching replacements
9220         and add the corrasponding logic.
9221         (Type_Invariant): Remove
9222         Replace_Typ_Refs and replace its references with calls to
9223         Replace_Type_References.
9224         * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
9226 2017-04-25  Bob Duff  <duff@adacore.com>
9228         * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
9229         that returns True when appropriate.
9230         * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
9231         when compiling predefined files.
9232         * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
9233         "gnat.adc" should not be considered a predefined file name.
9234         That required (or at least encouraged) a lot of cleanup of global
9235         variable usage. We shouldn't be communicating information via
9236         the global name buffer.
9237         * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
9238         * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
9239         required by the above-mentioned cleanup.
9241 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9243         * osint.adb (Find_File): Handle properly a request for a
9244         configuration file whose name is a directory.
9246 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9248         * sem_attr.adb, sem_ch5.adb: Minor reformatting.
9250 2017-04-25  Bob Duff  <duff@adacore.com>
9252         * types.ads: Minor: Fix '???' comment.
9253         * sem_ch8.adb: Minor comment fix.
9255 2017-04-25  Bob Duff  <duff@adacore.com>
9257         * sem_prag.adb: Remove suspicious uses of Name_Buf.
9258         * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
9259         Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
9260         Add String_To_Name with no side effects.
9262 2017-04-25  Justin Squirek  <squirek@adacore.com>
9264         * sem_ch3.adb (Analyze_Declarations): Add
9265         additional condition for edge case.
9267 2017-04-25  Bob Duff  <duff@adacore.com>
9269         * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
9270         reserved words inside pragmas. This is necessary to allow the
9271         pragma name Interface to be used in pragma Ignore_Pragma.
9272         * par.adb: Minor comment fix.
9274 2017-04-25  Javier Miranda  <miranda@adacore.com>
9276         * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
9277         * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
9278         * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
9279         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
9280         occurrences of RE_Type_Is_Abstract
9282 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9284         * exp_util.adb (Build_Chain): Account for ancestor
9285         subtypes while traversing the derivation chain.
9287 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9289         * sem_attr.adb: minor reformatting.
9291 2017-04-25  Doug Rupp  <rupp@adacore.com>
9293         * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
9295 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9297         * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
9298         the first pass over an assignment statement with target names,
9299         to prevent the generation of subtypes (such as discriminated
9300         record components)that may carry the target name outside of the
9301         tree for the assignment. The subtypes will be generated when
9302         the assignment is reanalyzed in full.
9303         (Analyze_Target_Name): Handle properly class-wide types.
9305 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9307         * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
9308         * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9309         the purposes of freezing.
9310         * exp_util.adb Update the documentation and structure of the
9311         type map used in class-wide semantics of assertion expressions.
9312         (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9313         and resolve the triaged expression because all substitutions
9314         refer to the proper entities.  Update the replacement of
9315         references.
9316         (Build_DIC_Procedure_Body): Add formal parameter
9317         For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9318         are now only processed when freezing occurs.  Build a body only
9319         when one is needed.
9320         (Entity_Hash): Removed.
9321         (Map_Types): New routine.
9322         (Replace_Object_And_Primitive_References): Removed.
9323         (Replace_References): New routine.
9324         (Replace_Type_References): Moved to the library level of Exp_Util.
9325         (Type_Map_Hash): New routine.
9326         (Update_Primitives_Mapping): Update the mapping call.
9327         (Update_Primitives_Mapping_Of_Types): Removed.
9328         * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9329         parameter For_Freeze and update the comment on usage.
9330         (Map_Types): New routine.
9331         (Replace_References): New routine.
9332         (Replace_Type_References): Moved to the library level of Exp_Util.
9333         (Update_Primitives_Mapping_Of_Types): Removed.
9334         * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9335         properties of the private type to the full view in case the full
9336         view derives from a parent type and inherits a DIC pragma.
9337         * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9338         DIC pragma is placed at the top of a declarative region.
9340 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
9342         * a-tasatt.adb: Complete previous change and use an unsigned
9343         int to avoid overflow checks.
9345 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9347         * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
9348         the error message when the attribute reference is an actual in
9349         a call to a subprogram inherited from a generic formal type with
9350         unknown discriminants, which makes the subprogram and its formal
9351         parameters intrinsic (see RM 6.3.1 (8) and (13)).
9353 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9355         * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
9356         sem_prag.adb: Minor reformatting.
9358 2017-04-25  Bob Duff  <duff@adacore.com>
9360         * sem_attr.adb (Type_Key): Add code in the
9361         recursive Compute_Type_Key to protect against fetching the source
9362         code for Standard, in case a component of the type is declared
9363         in Standard. There was already code to do this for the original
9364         type, but not for its components.
9366 2017-04-25  Javier Miranda  <miranda@adacore.com>
9368         * exp_ch3.adb (Build_Initialization_Call): Handle
9369         subtypes of private types when searching for the underlying full
9370         view of a private type.
9372 2017-04-25  Javier Miranda  <miranda@adacore.com>
9374         * sem_res.adb (Set_Mixed_Mode_Operand): A universal
9375         real conditional expression can appear in a fixed-type context
9376         and must be resolved with that context to facilitate the code
9377         generation to the backend.
9379 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9381         * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
9382         to indicate whether during inline processing, when some unit U1
9383         appears in the context of a unit U2 compiled for instantiation
9384         or inlining purposes, the body of U1 needs to be compiled as well.
9385         * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
9386         context is a package declaration.
9387         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
9388         Analyze_Generic_Package_Declaration): ditto.
9389         * inline.adb (Analyze_Inlined_Bodies): Check
9390         Body_Needed_For_Inlining.
9392 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9394         * par.adb (Current_Assign_Node): Global variable use to record
9395         the presence of a target_name in the right hand side of the
9396         assignment being parsed.
9397         * par-ch4.adb (P_Name): If the name is a target_name, mark the
9398         enclosing assignment node accordingly.
9399         * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
9400         appropriately.
9401         * sem_ch5.adb (Analyze_Assignment): Disable expansion before
9402         analyzing RHS if the statement has target_names.
9403         * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
9404         properly choices that are subtype marks.
9405         * exp_ch5.adb: Code cleanup.
9407 2017-04-25  Bob Duff  <duff@adacore.com>
9409         * s-memory.adb: Add a comment regarding efficiency.
9410         * atree.adb: Fix the assertion, and combine 2 assertions into one,
9411         "the source has an extension if and only if the destination does."
9412         * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
9414 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
9416         * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
9417         conversion.
9419 2017-04-25  Doug Rupp  <rupp@adacore.com>
9421         * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
9422         handling for ppc64-vx7.
9423         * sigtramp-vxworks-target.inc
9424         [SIGTRAMP_BODY]: Add section for ppc64-vx7.
9426 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
9428         * ada_get_targ.adb: New file.
9430 2017-04-25  Bob Duff  <duff@adacore.com>
9432         * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
9433         Direct_Val (Right), instead of the incorrect Direct_Val (Left).
9434         (UI_GCD): Remove ??? comment involving possible efficiency
9435         improvements. This just isn't important after all these years.
9436         Also minor cleanup.
9437         * uintp.ads: Minor cleanup.
9439 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9441         * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
9442         Revert previous changes.
9443         * scng.adb: Minor reformatting.
9444         * s-stratt.ads: Fix unbalanced parens in comment.
9446 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9448         * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
9449         Minor reformatting.
9451 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9453         * scng.adb (Scan): Handle '@' appropriately.
9454         * sem_ch5.adb: Code cleanup.
9456 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9458         * freeze.adb (Check_Expression_Function): Do not check for the
9459         use of deferred constants if the freezing of the expression
9460         function is triggered by its generated body, rather than a
9461         premature use.
9463 2017-04-25  Javier Miranda  <miranda@adacore.com>
9465         * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
9466         subtypes of private types when performing the view conversion.
9468 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9470         * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9471         the purposes of freezing.
9472         * exp_util.adb Update the documentation and structure of the
9473         type map used in class-wide semantics of assertion expressions.
9474         (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9475         and resolve the triaged expression because all substitutions
9476         refer to the proper entities.  Update the replacement of
9477         references.
9478         (Build_DIC_Procedure_Body): Add formal parameter
9479         For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9480         are now only processed when freezing occurs.  Build a body only
9481         when one is needed.
9482         (Entity_Hash): Removed.
9483         (Map_Types): New routine.
9484         (Replace_Object_And_Primitive_References): Removed.
9485         (Replace_References): New routine.
9486         (Replace_Type_References): Moved to the library level of Exp_Util.
9487         (Type_Map_Hash): New routine.
9488         (Update_Primitives_Mapping): Update the mapping call.
9489         (Update_Primitives_Mapping_Of_Types): Removed.
9490         * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9491         parameter For_Freeze and update the comment on usage.
9492         (Map_Types): New routine.
9493         (Replace_References): New routine.
9494         (Replace_Type_References): Moved to the library level of Exp_Util.
9495         (Update_Primitives_Mapping_Of_Types): Removed.
9496         * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9497         properties of the private type to the full view in case the full
9498         view derives from a parent type and inherits a DIC pragma.
9499         * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9500         DIC pragma is placed at the top of a declarative region.
9502 2017-04-25  Tristan Gingold  <gingold@adacore.com>
9504         * s-mmap.ads (Data): Add pragma Inline.
9506 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
9508         * checks.adb (Insert_Valid_Check): Do not use
9509         a renaming to alias a volatile name because this will lead to
9510         multiple evaluations of the volatile name. Use a constant to
9511         capture the value instead.
9513 2017-04-25  Doug Rupp  <rupp@adacore.com>
9515         * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
9517 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9519         * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
9520         Add out parameter to indicate to caller that a wrapper must
9521         be constructed for an inherited primitive whose inherited
9522         pre/postcondition has called to overridden primitives.
9523         * freeze.adb (Check_Inherited_Conditions): Build wrapper body
9524         for inherited primitive that requires it.
9525         * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
9526         legal primitive operations and belong to the list of bodies
9527         generated after the freeze point of a type.
9528         * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
9529         of Build_Class_Wide_Expression.
9530         * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
9531         to construct the specification of the wrapper subprogram created
9532         for an inherited operation.
9534 2017-04-25  Bob Duff  <duff@adacore.com>
9536         * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
9537         pthread_mutexattr_setprioceiling): Add new interfaces for these
9538         pthread operations.
9539         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
9540         protocols as appropriate for Locking_Policy 'C' and 'I'.
9541         * s-taprop-posix.adb: Minor reformatting to make it more similar
9542         to s-taprop-linux.adb.
9544 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
9546         * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
9547         Handle properly a multi- level derivation involving both renamed
9548         and constrained parent discriminants, when the type to be
9549         constrained has fewer discriminants that the ultimate ancestor.
9551 2017-04-25  Bob Duff  <duff@adacore.com>
9553         * sem_util.adb (Is_Object_Reference): In the
9554         case of N_Explicit_Dereference, return False if it came from a
9555         conditional expression.
9557 2017-04-25  Bob Duff  <duff@adacore.com>
9559         * par-ch4.adb (P_Case_Expression): If a semicolon
9560         is followed by "when", assume that ";" was meant to be ",".
9562 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
9564         * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
9565         fixes.
9567 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
9569         * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
9570         loading of an entity.
9571         * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
9572         previously repeated in the analysis.
9573         * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
9574         procedure SPARK_Implicit_Load.  (Analyze_Task_Type_Declaration):
9575         use new procedure SPARK_Implicit_Load.
9576         * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
9577         SPARK_Implicit_Load.
9579 2017-04-25  Javier Miranda  <miranda@adacore.com>
9581         * sem_util.adb (New_Copy_Tree): By default
9582         copying of defining identifiers is prohibited because
9583         this would introduce an entirely new entity into the
9584         tree. This patch introduces an exception to this general
9585         rule: the declaration of constants and variables located in
9586         Expression_With_Action nodes.
9587         (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
9588         (In_Map): New subprogram.
9589         (Visit_Entity): New subprogram.
9590         (Visit_Node): Handle EWA_Level,
9591         EWA_Inner_Scope_Level, and take care of defining entities defined
9592         in Expression_With_Action nodes.
9594 2017-04-25  Thomas Quinot  <quinot@adacore.com>
9596         * exp_ch6.adb: minor comment edit.
9597         * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
9598         procedure specifications that come from source.
9599         * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
9600         Null_Statement attribute.
9601         * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
9602         procedure, generate statement SCO for the generated NULL statement.
9603         * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
9604         parser, if available.
9606 2017-04-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9608         * system-linux-s390.ads: Use Long_Integer'Size to define
9609         Memory_Size.
9611 2017-04-04  Eric Botcazou  <ebotcazou@adacore.com>
9613         * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
9615 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
9617         * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
9618         * g-socket.adb (To_Host_Entry): Fix typo in comment.
9619         * gnat_ugn.texi: Fix typo.
9620         * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
9621         * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
9622         * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
9623         * sem_util.adb (Mark_Coextensions): Likewise.
9624         * sem_util.ads (Available_Full_View_Of_Component): Likewise.
9626 2017-03-28  Andreas Schwab  <schwab@suse.de>
9628         PR ada/80117
9629         * system-linux-aarch64-ilp32.ads: New file.
9630         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
9631         from LIBGNAT_TARGET_PAIRS.
9632         (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
9633         (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
9634         LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
9635         or -mabi=ilp32, resp.
9637 2017-03-14  James Cowgill  <James.Cowgill@imgtec.com>
9639         * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
9641 2017-03-08  Thanassis Tsiodras  <ttsiodras@gmail.com>
9643         PR ada/79903
9644         * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
9646 2017-03-08  Eric Botcazou  <ebotcazou@adacore.com>
9648         PR ada/79945
9649         * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
9651         * system-linux-arm.ads (Default_Bit_Order): Likewise.
9652         * system-linux-mips.ads (Default_Bit_Order): Likewise.
9653         * system-linux-armeb.ads: Delete.
9654         * system-linux-mipsel.ads: Likewise.
9655         * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
9656         (ARM/Linux): Likewise.
9658 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
9660         PR c/79677
9661         * gcc-interface/misc.c (gnat_handle_option): Pass true to
9662         handle_generated_option GENERATED_P.
9664 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9666         * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
9667         around a justified modular type if it doesn't have the same scalar
9668         storage order as the enclosing record type.
9670 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9672         * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
9673         of boolean rvalues to function calls.
9675 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9677         * gcc-interface/utils.c (fold_bit_position): New function.
9678         (rest_of_record_type_compilation): Call it instead of bit_position to
9679         compute the field position and remove the call to remove_conversions.
9680         (compute_related_constant): Factor out the multiplication in both
9681         operands, if any, and streamline the final test.
9683 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9685         * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
9687 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9689         * gcc-interface/decl.c: Include demangle.h.
9690         (is_cplusplus_method): Return again true for a primitive operation
9691         only if it is dispatching.  For a subprogram with an interface name,
9692         call the demangler to get the number of C++ parameters and compare it
9693         with the number of Ada parameters.
9695 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9697         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
9698         there is no end label, put the location of the At_End procedure on
9699         the call to the procedure.
9701 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9703         * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
9704         value for array types with TYPE_INDEX_TYPE set on their domain type.
9705         * gcc-interface/utils.c (max_size): For operations and expressions, do
9706         not build a new node if the operands have not changed or are missing.
9708 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
9710         * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
9711         argument when recursing on TRUTH_NOT_EXPR.
9713 2017-02-12  John Marino  <gnugcc@marino.st>
9715         * system-freebsd-x86.ads: Rename into...
9716         * system-freebsd.ads: ...this.
9717         (Default_Bit_Order): Define using Standard'Default_Bit_Order.
9718         * gcc-interface/Makefile.in: Support aarch64-freebsd.
9719         (x86-64/FreeBSD): Adjust to above renaming.
9720         (i386/FreeBSD): Likewise.
9722 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
9724         * comperr.adb: Update FSF bug reporting URL.
9726 2017-02-01  Eric Botcazou  <ebotcazou@adacore.com>
9727             Jakub Jelinek  <jakub@redhat.com>
9729         PR ada/79309
9730         * adaint.c (__gnat_killprocesstree): Fix broken string handling.
9732 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
9734         PR lto/79061
9735         * gcc-interface/utils.c (get_global_context): Pass main_input_filename
9736         to build_translation_unit_decl.
9738 2017-01-23  Javier Miranda  <miranda@adacore.com>
9740         * sem_util.adb (New_Copy_Tree): Code cleanup:
9741         removal of the internal map (ie. variable Actual_Map, its
9742         associated local variables, and all the code handling it).
9743         * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
9744         force loading of the System package when processing a task type.
9745         (Analyze_Protected_Type_Declaration): in GNATprove mode force
9746         loading of the System package when processing a protected type.
9747         * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
9748         force loading of the System package when processing compilation
9749         unit with a main-like subprogram.
9750         * frontend.adb (Frontend): remove forced loading of the System
9751         package.
9753 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9755         * sem_prag.adb (Default_Initial_Condition): If the desired type
9756         declaration is a derived type declaration with discriminants,
9757         it is rewritten as a private type declaration.
9758         * sem_ch13.adb (Replace_Type_References_Generic,
9759         Visible_Component): A discriminated private type with descriminnts
9760         has components that must be rewritten as selected components
9761         if they appear as identifiers in an aspect expression such as
9762         a Default_Initial_Condition.
9763         * sem_util.adb (Defining_Entity): support N_Iterator_Specification
9764         nodes.
9766 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9768         * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
9769         * gnat1drv.adb Generate an empty object file for an ignored
9770         Ghost compilation unit.
9771         * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
9773 2017-01-23  Yannick Moy  <moy@adacore.com>
9775         * sem_ch4.adb (Analyze_Indexed_Component_Form):
9776         Adapt to inlined prefix with string literal subtype.
9777         * inline.adb (Expand_Inlined_Call): Keep unchecked
9778         conversion inside inlined call when formal type is constrained.
9780 2017-01-23  Javier Miranda  <miranda@adacore.com>
9782         * sem_util.adb (New_Copy_Tree): Code cleanup:
9783         removal of global variables. All the global variables, global
9784         functions and tables of this subprogram are now declared locally.
9786 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
9788         * exp_strm.ads: Minor reformatting and typo fixes.
9790 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9792         * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
9793         exp_aggr.adb: Minor reformatting.
9794         * g-diopit.adb: minor grammar/punctuation fix in comment.
9795         * g-byorma.ads: minor fix of unbalanced parens in comment.
9797 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9799         * par.adb: Update the documentation of component Labl.
9800         * par-ch6.adb (P_Return_Statement): Set the expected label of
9801         an extended return statement to Error.
9803 2017-01-23  Tristan Gingold  <gingold@adacore.com>
9805         * s-boustr.ads, s-boustr.adb (Is_Full): New function.
9807 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9809         * expander.adb: Handle N_Delta_Aggregate.
9811 2017-01-23  Javier Miranda  <miranda@adacore.com>
9813         * exp_ch6.adb (Expand_Call): Improve the code that
9814         checks if some formal of the called subprogram is a class-wide
9815         interface, to handle subtypes of class-wide interfaces.
9817 2017-01-23  Javier Miranda  <miranda@adacore.com>
9819         * checks.adb (Apply_Parameter_Aliasing_Checks):
9820         Remove side effects of the actuals before generating the overlap
9821         check.
9823 2017-01-23  Justin Squirek  <squirek@adacore.com>
9825         * exp_strm.ads, exp_strm.ads
9826         (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
9827         as to avoid getting the underlying type by default.
9828         * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
9829         underlying type in the Iiput and output attribute cases when
9830         building their respective functions.
9832 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
9834         * scng.adb: Minor reformatting of error message.
9836 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9838         * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
9839         to freeze the return type of an expression funxtion that is a
9840         completion, if the type is a limited view and the non-limited
9841         view is available.
9843 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9845         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
9846         aggregate construct.
9847         (P_Record_Or_Array_Component_Association): An array aggregate
9848         can start with an Iterated_Component_Association.
9849         * scng.adb: Modify error message on improper use of @ in earlier
9850         versions of the language.
9851         * sinfo.ads: New node kind N_Delta_Aggregate.
9852         * sinfo.adb: An N_Delta_Aggregate has component associations and
9853         an expression.
9854         * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
9855         * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
9856         Create a new index for each one of the choices in the association,
9857         to prevent spurious homonyms in the scope.
9858         (Resolve_Delta_Aggregate): New.
9859         * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
9860         * exp_util.adb (Insert_Actions): Take into account
9861         N_Delta_Aggregate.
9862         * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
9863         * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
9864         and local procedures Expand_Delta_Array_Aggregate and
9865         expand_Delta_Record_Aggregate.
9866         * sprint.adb: Handle N_Delta_Aggregate.
9868 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9870         * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
9871         empty name when the exception declaration is subject to pragma
9872         Discard_Names.
9873         (Null_String): New routine.
9875 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9877         * par-ch9.adb (P_Protected_Definition): Parse
9878         any optional and potentially illegal pragmas which appear in
9879         a protected operation declaration list.
9880         (P_Task_Items): Parse
9881         any optional and potentially illegal pragmas which appear in a
9882         task item list.
9884 2017-01-23  Pascal Obry  <obry@adacore.com>
9886         * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
9887         is needed when a foreign thread call a Win32 API using a thread handle
9888         like GetThreadTimes() for example.
9890 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9892         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9893         allow an 'Address clause to be specified on a prefix of a
9894         class-wide type.
9896 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9898         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9899         attribute 'Valid is a renaming of the original expression when
9900         the expression denotes a name. For all other kinds of expression,
9901         use a constant to capture the value.
9902         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9903         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9905 2017-01-23  Justin Squirek  <squirek@adacore.com>
9907         * sem_eval.adb (Eval_Integer_Literal): Add special
9908         case to avoid optimizing out check if the literal appears in
9909         an if-expression.
9911 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9913         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9914         allow an 'Address clause to be specified on a prefix of a
9915         class-wide type.
9917 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9919         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9920         attribute 'Valid is a renaming of the original expression when
9921         the expression denotes a name. For all other kinds of expression,
9922         use a constant to capture the value.
9923         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9924         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9926 2017-01-23  Justin Squirek  <squirek@adacore.com>
9928         * sem_eval.adb (Eval_Integer_Literal): Add special
9929         case to avoid optimizing out check if the literal appears in
9930         an if-expression.
9932 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9934         * sem_ch4.adb (Try_Primitive_Operations,
9935         Is_Valid_First_Argument_Of): argument is valid if it is a derived
9936         type with unknown discriminants that matches its underlying
9937         record view.
9938         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
9939         expression if its type is derived from a limited type with
9940         unknown discriminants, because the expansion (which is a call)
9941         must be expanded in the enclosing context to add the proper build-
9942         in-place parameters to the call.
9943         * lib.ads, exp_ch9.adb: Minor fixes in comments.
9945 2017-01-23  Yannick Moy  <moy@adacore.com>
9947         * frontend.adb (Frontend): Do not load runtime
9948         unit for GNATprove when parsing failed.
9949         * exp_ch9.adb: minor removal of extra whitespace
9950         * exp_ch6.adb: minor typo in comment
9951         * sem_util.adb: Code cleanup.
9952         * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
9953         * a-ngcefu.adb: minor style fix in whitespace
9955 2017-01-23  Thomas Quinot  <quinot@adacore.com>
9957         * scos.ads: Document usage of 'd' as default SCO kind for
9958         declarations.
9959         * par_sco.adb (Traverse_Declarations_Or_Statements.
9960         Traverse_Degenerate_Subprogram): New supporting routine for expression
9961         functions and null procedures.
9962         (Traverse_Declarations_Or_Statements.Traverse_One): Add
9963         N_Expression_Function to the subprogram case; add required
9964         support for null procedures and expression functions.
9966 2017-01-23  Bob Duff  <duff@adacore.com>
9968         * namet.ads (Bounded_String): Decrease the size of type
9969         Bounded_String to avoid running out of stack space.
9970         * namet.ads (Append): Don't ignore buffer overflow; raise
9971         Program_Error instead.
9973 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
9975         * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
9976         sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
9977         reformatting.
9978         * exp_ch9.adb: minor style fix in comment.
9980 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
9982         * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
9983         for a limited record extension with unknown discriminants whose
9984         full view has no discriminants.
9986 2017-01-23  Yannick Moy  <moy@adacore.com>
9988         * exp_spark.adb: Alphabetize with clauses.
9990 2017-01-23  Yannick Moy  <moy@adacore.com>
9992         * sem_util.adb (Has_Enabled_Property): Treat
9993         protected objects and variables differently from other variables.
9995 2017-01-23  Thomas Quinot  <quinot@adacore.com>
9997         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
9998         Split original Ada 95 part off into new subprogram
9999         below. Call that subprogram (instead of proceeding with
10000         AI95-0133 behaviour) if debug switch -gnatd.p is in use.
10001         (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
10002         * debug.adb Document new switch -gnatd.p
10003         * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
10004         record for reverse bit order if an error has already been posted
10005         on the record type.  This avoids generating extraneous "info:"
10006         messages for illegal code.
10008 2017-01-23  Justin Squirek  <squirek@adacore.com>
10010         * sem_ch3.adb (Analyze_Declarations): Correct comments
10011         * freeze.adb (Find_Constant): Add detection of deferred constants
10012         so they are not incorrectly flagged as premature.
10014 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
10016         * scans.ads: New token At_Sign. Remove '@' from list of illegal
10017         characters for future version of the language. '@' is legal name.
10018         * scng.ads, scng.adb (Scan):  Handle '@' appropriately.
10019         * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
10020         denotes a Target_Name.
10021         * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
10022         * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
10023         (Has_Target_Names): New flag on N_Assignment_Statement, to
10024         indicate that RHS has occurrences of N_Target_Name.
10025         * sem.adb: Call Analyze_Target_Name.
10026         * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
10027         (urrent_LHS): Global variable that denotes LHS of assignment,
10028         used in the analysis of Target_Name nodes.
10029         * sem_res.adb (Resolve_Target_Name): New procedure.
10030         * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
10031         N is an assignment statement whose RHS contains occurences of @
10032         that designate the value of the LHS of the assignment. If the
10033         LHS is side-effect free the target names can be replaced with
10034         a copy of the LHS; otherwise the semantics of the assignment
10035         is described in terms of a procedure with an in-out parameter,
10036         and expanded as such.
10037         (Expand_N_Assignment_Statement): Call
10038         Expand_Assign_With_Target_Names when needed.
10039         * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
10040         * sprint.adb: Handle N_Target_Name.
10042 2017-01-23  Eric Botcazou  <ebotcazou@adacore.com>
10044         * checks.adb: Minor fix in comment.
10046 2017-01-23  Philippe Gil  <gil@adacore.com>
10048         * g-debpoo.adb (Do_Report) remove freed chunks from chunks
10049         count in Sort = Memory_Usage or Allocations_Count
10051 2017-01-23  Justin Squirek  <squirek@adacore.com>
10053         * sem_ch3.adb: Code cleanup.
10055 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
10057         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
10058         variables to the local variable section. Update the profile
10059         of various nested routine that previously had visibility
10060         of those globals. One the matching phase has completed,
10061         remove certain classes of clauses which are considered noise.
10062         (Check_Dependency_Clause): Properly detect a match between two
10063         'Result attributes. Update the various post-match cases to use
10064         Is_Already_Matched as this routine now automatically recognizes
10065         a previously matched 'Result attribute.
10066         (Is_Already_Matched): New routine.
10067         (Remove_Extra_Clauses): New routine.
10068         (Report_Extra_Clauses): Remove the detection of ... => null
10069         clauses as this is now done in Remove_Extra_Clauses.
10071 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
10073         * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
10074         report on spurious overlaps between values involving a subtype
10075         with a static predicate, because the expansion of such a subtype
10076         into individual ranges in inhibited in ASIS mode.
10078 2017-01-23  Justin Squirek  <squirek@adacore.com>
10080         * sem_ch3.adb (Analyze_Declarations): Add detection
10081         of an edge case and delay freezing if it is present.
10083 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
10085         * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
10086         sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
10088 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
10090         * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
10091         access-to-subprogram types inherit the convention of the
10092         associated subprogram.  (Set_Profile_Convention): New routine.
10093         * sem_ch6.adb (Check_Conformance): Do not compare the conventions
10094         of the two entities directly, use Conventions_Match to account
10095         for anonymous access-to-subprogram and subprogram types.
10096         (Conventions_Match): New routine.
10098 2017-01-23  Claire Dross  <dross@adacore.com>
10100         * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
10101         which return Universal_Integer, force the overflow check flag for
10102         Length and Range_Length for types as big as Long_Long_Integer.
10104 2017-01-23  Claire Dross  <dross@adacore.com>
10106         * exp_spark.adb (Expand_SPARK_Attribute_Reference):  For
10107         attributes which return Universal_Integer, introduce a conversion
10108         to the expected type with the appropriate check flags set.
10109         * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
10110         base type if the range is null. It may still be invalid if it
10111         is higher than the lower bound. This is checked later in the
10112         context in which the range appears.
10114 2017-01-23  Pierre-Marie de Rodat  <derodat@adacore.com>
10116         * scos.ads: Introduce a constant to represent ignored
10117         dependencies in SCO_Unit_Table_Entry.
10119 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
10121         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
10122         spaces from error messages.
10124 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
10126         * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
10127         subsidiary to Expand_N_Object_ Declaration, to compute a guard on
10128         an object declaration for an array type with a modular index type
10129         with the size of Long_Long_Integer. Special processing is needed
10130         in this case to compute reliably the size of the object, and
10131         eventually  to raise Storage_Error, when wrap-around arithmetic
10132         might compute a meangingless size for the object.
10134 2017-01-23  Justin Squirek  <squirek@adacore.com>
10136         * a-wtenau.adb, par-endh.adb, sem_prag.adb,
10137         sem_type.adb: Code cleanups.
10139 2017-01-23  Bob Duff  <duff@adacore.com>
10141         * sem_res.adb (Resolve_Call): In the part of the code where
10142         it is deciding whether to turn the call into an indexed
10143         component, avoid doing so if the call is to an instance of
10144         Unchecked_Conversion. Otherwise, the compiler turns it into an
10145         indexed component, and resolution of that turns it back into a
10146         function call, and so on, resulting in infinite recursion.
10147         * sem_util.adb (Needs_One_Actual): If the first formal has a
10148         default, then return False.
10150 2017-01-21  Eric Botcazou  <ebotcazou@adacore.com>
10152         * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
10153         optimizations when the type is modular and the offsets are equal.
10155 2017-01-20  Thomas Quinot  <quinot@adacore.com>
10157         * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
10158         message.
10160 2017-01-20  Nicolas Roche  <roche@adacore.com>
10162         * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
10164 2017-01-20  Bob Duff  <duff@adacore.com>
10166         * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
10167         (etc) optimizations when the type is modular.
10169 2017-01-20  Yannick Moy  <moy@adacore.com>
10171         * sem_ch6.adb (Move_Pragmas): move some pragmas,
10172         but copy the SPARK_Mode pragma instead of moving it.
10173         (Build_Subprogram_Declaration): Ensure that the generated spec
10174         and original body share the same SPARK_Pragma aspect/pragma.
10175         * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
10176         procedure to copy SPARK_Mode aspect.
10178 2017-01-20  Bob Duff  <duff@adacore.com>
10180         * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
10181         even in ASIS mode.
10182         * sem_ch13.adb (Resolve_Name): Enable setting the entity to
10183         Empty even in ASIS mode.
10185 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10187         * exp_ch9.adb: minor style fixes in comments.
10188         * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
10189         relative statement introduces an implicit dependency on
10190         Ada.Real_Time.Clock_Time.
10191         * sem_util.adb: Minor reformatting.
10193 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10195         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
10196         must be treated as delayed aspect even if the expression is
10197         a literal, because the aspect affects the freezing and the
10198         elaboration of the object to which it applies.
10200 2017-01-20  Tristan Gingold  <gingold@adacore.com>
10202         * s-osinte-vxworks.ads (Interrup_Range): New subtype.
10204 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10206         * lib-xref.adb (Generate_Reference): Do not warn about the
10207         presence of a pragma Unreferenced if the entity appears as the
10208         actual in a procedure call that does not come from source.
10210 2017-01-20  Pascal Obry  <obry@adacore.com>
10212         * expect.c, terminals.c: Fix some warnings about unused variables.
10213         * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
10214         of the runtime.
10216 2017-01-20  Bob Duff  <duff@adacore.com>
10218         * exp_attr.adb (Constrained): Apply an access check (check that
10219         the prefix is not null) when the prefix denotes an object of an
10220         access type; that is, when there is an implicit dereference.
10222 2017-01-20  Gary Dismukes  <dismukes@adacore.com>
10224         * s-rident.ads (constant Profile_Info): Remove
10225         No_Calendar from GNAT_Extended_Ravenscar restrictions.
10227 2017-01-20  Tristan Gingold  <gingold@adacore.com>
10229         *  s-maccod.ads: Add pragma No_Elaboration_Code_All
10231 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10233         * ghost.adb (Mark_Ghost_Clause): New routine.
10234         (Prune_Node): Do not prune compilation unit nodes.
10235         (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
10236         This does not touch the node itself, but does prune all its fields.
10237         * ghost.ads (Mark_Ghost_Clause): New routine.
10238         * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
10239         package clause mentions Ghost and non-Ghost packages. Mark a
10240         use package clause as Ghost when it mentions a Ghost package.
10241         (Analyze_Use_Type): Emit an error when a use type clause mentions
10242         Ghost and non-Ghost types. Mark a use type clause as Ghost when
10243         it mentions a Ghost type.
10244         * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
10245         Ghost when it withs a Ghost unit.
10247 2017-01-20  Javier Miranda  <miranda@adacore.com>
10249         * sem_res.adb (Resolve_Call): If a function call
10250         returns a limited view of a type and at the point of the call the
10251         function is not declared in the extended main unit then replace
10252         it with the non-limited view, which must be available. If the
10253         called function is in the extended main unit then no action is
10254         needed since the back-end handles this case.
10256 2017-01-20  Eric Botcazou  <ebotcazou@adacore.com>
10258         * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
10259         (Contains_Subprograms_Refs): ...this.  Adjust comment
10260         for constants.  (Is_Subp_Or_Const_Ref): Rename into...
10261         (Is_Subprogram_Ref): ...this.
10262         (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
10263         Has_Non_Subprograms_Referencer and adjust comment.  Remove
10264         incorrect shortcut for package declarations and bodies.
10266 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10268         * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
10269         base type differs from that of the completion and the private
10270         subtype is an itype (created for a constraint on an access
10271         type e.g.), set Delayed_Freeze on both to prevent out-of-scope
10272         anomalies in gigi.
10274 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10276         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10277         When inheriting the SPARK_Mode of a prior expression function,
10278         look at the properly resolved entity rather than the initial
10279         candidate which may denote a homonym.
10281 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10283         * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
10284         Precondition or Postcondition, and the context is pragma
10285         Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
10286         and suggest the standard names Assertion_Policy /Pre /Post
10287         instead.
10289 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10291         * sem_ch10.adb, sem_cat.adb: Minor reformatting.
10293 2017-01-20  Javier Miranda  <miranda@adacore.com>
10295         * sem_ch3.adb (Access_Type_Declaration): Protect access to the
10296         Entity attribute.
10297         * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
10298         * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
10299         malformed trees.
10301 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10303         * sem_ch13.adb (Analyze_Aspect_Specification, case
10304         Dynamic_Predicate): If the entity E is a subtype that inherits
10305         a static predicate for its parent P,, the inherited and the
10306         new predicate combine in the generated predicate function,
10307         and E only has a dynamic predicate.
10309 2017-01-20  Tristan Gingold  <gingold@adacore.com>
10311         * s-boustr.ads, s-boustr.adb: New package.
10312         * Makefile.rtl: Add s-boustr.
10314 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10316         * inline.adb (Process_Formals): Qualify the
10317         expression of a return statement when it yields a universal type.
10319 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10321         * freeze.adb (Freeze_All): Freeze the default
10322         expressions of all eligible formal parameters that appear in
10323         entries, entry families, and protected subprograms.
10325 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10327         * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
10328         for illegal inherited Implicit_Dereference aspects with renamed
10329         discriminants.
10331 2017-01-20  Javier Miranda  <miranda@adacore.com>
10333         * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
10334         * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
10335         * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
10336         (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
10337         Set_Prev, Tree_Read): Adding assertion.
10338         * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
10339         * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
10340         (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
10341         Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
10342         Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
10343         Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
10344         Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
10345         Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
10346         Set_ListN_With_Parent): Adding assertion.
10348 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10350         * sem_prag.adb (Process_Convention): Diagnose properly a pragma
10351         import that applies to several homograph subprograms. when one
10352         of them is declared by a subprogram body.
10354 2017-01-20  Justin Squirek  <squirek@adacore.com>
10356         * exp_ch6.adb (Expand_Call): Remove optimization
10357         that nulls out calls to null procedures.
10359 2017-01-20  Yannick Moy  <moy@adacore.com>
10361         * inline.adb (Expand_Inlined_Call): Keep more
10362         precise type of actual for inlining whenever possible. In
10363         particular, do not switch to the formal type in GNATprove mode in
10364         some case where the GNAT backend might require it for visibility.
10366 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10368         * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
10369         aspect Implicit_Dereference can be inherited by a full view if
10370         the partial view has no discriminants, because there is no way
10371         to apply the aspect to the partial view.
10372         (Build_Derived_Record_Type): If derived type renames discriminants
10373         of the parent, the new discriminant inherits the aspect from
10374         the old one.
10375         * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
10376         call through an access discriminant designating a subprogram.
10377         * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
10378         properly a parameterless call through an access discriminant on
10379         the left-hand side of an assignment.
10380         * sem_res.adb (resolve): If an interpreation involves a
10381         discriminant with an implicit dereference and the expression is an
10382         entity, resolution takes place later in the appropriate routine.
10383         * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
10384         access discriminants that designate a subprogram type.
10386 2017-01-20  Pascal Obry  <obry@adacore.com>
10388         * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
10390 2017-01-20  Yannick Moy  <moy@adacore.com>
10392         * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
10393         on implicitly with'ed units in GNATprove mode.
10394         * sinfo.ads (Implicit_With): Document use of flag for implicitly
10395         with'ed units in GNATprove mode.
10397 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
10399         * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
10400         unit Do not report an error on a non-static entity that appears
10401         in the context of a spec expression, such as an aspect expression.
10403 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
10405         * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
10406         (Is_Underlying_Full_View): New routine.
10407         (Set_Is_Underlying_Full_View): New routine.
10408         (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
10409         * einfo.ads Add new attribute Is_Underlying_Full_View.
10410         (Is_Underlying_Full_View): New routine along with pragma Inline.
10411         (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
10412         * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
10413         class-wide types and underlying full views. The first subtype
10414         is used as the working type for all Itypes, not just array base types.
10415         (Build_DIC_Procedure_Declaration): Do not consider
10416         class-wide types and underlying full views. The first subtype
10417         is used as the working type for all Itypes, not just array
10418         base types.
10419         * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
10420         view or an underlying full view without clobbering the attributes
10421         of a previous freeze node.
10422         (Inherit_Freeze_Node): New routine.
10423         * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
10424         full view as such.
10425         (Build_Underlying_Full_View): Mark an underlying full view as such.
10426         * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
10427         full view as such.
10429 2017-01-20  Yannick Moy  <moy@adacore.com>
10431         * sinfo.ads: Document lack of Do_Division_Check flag
10432         on float exponentiation.
10434 2017-01-19  Javier Miranda  <miranda@adacore.com>
10436         * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
10437         identifier attribute of a block-statement node. Required to avoid
10438         assertion failure when building the new containers library.
10440 2017-01-19  Bob Duff  <duff@adacore.com>
10442         * exp_ch3.adb: Update comment.
10444 2017-01-19  Vincent Celier  <celier@adacore.com>
10446         * gprep.adb (Gnatprep): Parse the definition file without
10447         "replace in comments" even when switch -C is used.
10449 2017-01-19  Justin Squirek  <squirek@adacore.com>
10451         * exp_ch9.adb (Is_Pure_Barrier): Create function
10452         Is_Count_Attribute to identify an expansion of the 'Count
10453         attribute.
10455 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10457         * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
10458         statements within an element iterator loop are only analyzed
10459         agter the loop is rewritten. Within a generic the analysis must
10460         be performed in any case to complete name capture.
10462 2017-01-19  Bob Duff  <duff@adacore.com>
10464         * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
10465         before checking for unrecognized pragmas.
10466         Initialize Pname on its declarations; that's always good style.
10468 2017-01-19  Claire Dross  <dross@adacore.com>
10470         * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
10471         body into the tree for GNATprove by setting its Parent field. The
10472         components invariants of composite types are not checked by
10473         the composite type's invariant procedure in GNATprove mode.
10474         (Build_Invariant_Procedure_Declaration): Semi-insert the
10475         declaration into the tree for GNATprove by setting its Parent
10476         field.
10477         * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
10478         the component invariants to the array type  invariant procedure
10479         so that the procedure can be used to  check the array type
10480         invariants if any.
10481         (Freeze_Record_Type): In GNATprove mode, do
10482         not add the component invariants to the record type  invariant
10483         procedure so that the procedure can be used to  check the record
10484         type invariants if any.
10486 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10488         * lib-xref-spark_specific.adb: Minor reformatting.
10489         * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
10491 2017-01-19  Javier Miranda  <miranda@adacore.com>
10493         * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
10494         Build_Back_End_Aggregate.
10495         (Generate_Aggregate_For_Derived_Type): Code cleanup.
10496         (Prepend_Stored_Values): Code cleanup.
10498 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10500         * sem_ch6.adb (Analyze_Expression_Function): Check for an
10501         incomplete return type after attempting to freeze it, so that
10502         other freeze actiona are generated in the proper order.
10504 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10506         * sem_aggr.adb (Resolve_Aggregate): If the type is a string
10507         type, ie. a type whose component is a character type, and the
10508         aggregate is positional, do not convert into a string literal
10509         if the index type is not an integer type, because the original
10510         type may be required in an enclosing operation.
10512 2017-01-19  Bob Duff  <duff@adacore.com>
10514         * binde.adb, debug.adb: Enable new elaboration order algorithm
10515         by default. -dp switch reverts to the old algorithm.
10517 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10519         * sem_ch3.adb Add with and use clauses for Exp_Ch7.
10520         (Analyze_Declarations): Create the DIC and Invariant
10521         procedure bodies s after all freezing has taken place.
10522         (Build_Assertion_Bodies): New routine.
10523         * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
10524         and Exp_Util.
10525         (Analyze_Package_Specification): Remove the
10526         generation of the DIC and Invariant procedure bodies. This is
10527         now done by Analyze_Declarations.
10528         * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
10529         procedures are never treated as primitives.
10531 2017-01-19  Yannick Moy  <moy@adacore.com>
10533         * frontend.adb: Analyze inlined bodies and check elaboration
10534         rules in GNATprove mode too.
10535         * sem_elab.adb (Delay_Element): Add Boolean component to save
10536         indication that call is in SPARK code.  (Check_Elab_Calls):
10537         Check elaboration rules in GNATprove mode, and correctly set
10538         the current value of SPARK_Mode.
10539         * lib-xref-spark_specific.adb
10540         (Add_SPARK_Xrefs): Simplify iteration over dereferences.
10542 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10544         * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
10545         checks on the expression for the high bound of concatenation
10546         when checks are disabled, to suppress warnings about potential
10547         constraint errors in restricted runtimes.
10549 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10551         * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
10552         representation-to-position function as inlined.
10553         * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
10554         the purity of an internally generated entity if it has been
10555         explicitly marked as pure for optimization purposes.
10556         * exp_aggr.adb: Minor reformatting.
10558 2017-01-19  Javier Miranda  <miranda@adacore.com>
10560         * exp_ch6.adb (Expand_Call): Remove side effects on
10561         actuals that are allocators with qualified expression since the
10562         initialization of the object is performed by means of individual
10563         statements (and hence it must be done before the call).
10565 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10567         * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
10568         (Build_Derived_Enumeration_Type): If the derived type inherits a
10569         dynamic predicate from its parent, the bounds of the type must
10570         freeze because an explicit constraint is constructed for the
10571         type and the corresponding range is elaborated now.
10573 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
10575         * sem_attr.ads: minor fix of inconsistent casing in comment
10576         * lib-writ.ads: minor align comments in columns
10577         * sem_ch3.adb: Minor reformatting.
10578         * spark_xrefs.ads: minor fix typo in SPARK-related comment
10579         * table.ads: minor style fix in comment
10580         * lib-xref-spark_specific.adb
10581         (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
10582         * sem_ch12.adb: minor whitespace fix
10583         * freeze.adb: Add comment.
10584         * sem_util.adb (Unique_Name): for instances of
10585         generic subprograms ignore the name of the wrapper package.
10587 2017-01-19  Javier Miranda  <miranda@adacore.com>
10589         * exp_aggr.adb (Resolve_Record_Aggregate):
10590         Factorize code needed for aggregates of limited and unlimited
10591         types in a new routine.
10592         (Pass_Aggregate_To_Back_End): New subprogram.
10594 2017-01-19  Yannick Moy  <moy@adacore.com>
10596         * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
10598 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10600         * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
10601         public, for use elsewhere.
10602         * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
10603         an Inlined_body, recognize a call that uses object notation
10604         and has not been rewritten as a regular call because regular
10605         expansion has not taken place.
10607 2017-01-19  Bob Duff  <duff@adacore.com>
10609         * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
10610         in case of generic formal discrete types, because it causes crashes in
10611         the compiler when built with assertions on.
10613 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10615         * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
10616         sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
10618 2017-01-19  Bob Duff  <duff@adacore.com>
10620         * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
10621         Increment Warnings_Detected.  It was decrementing, which is
10622         wrong since we just issued a warning message.
10623         * binderr.ads (Errors_Detected, Warnings_Detected): Declare
10624         these variables to be of subtype Nat instead of Int, because
10625         they should never be negative.
10627 2017-01-19  Javier Miranda  <miranda@adacore.com>
10629         * contracts.adb (Build_Postconditions_Procedure): Replace
10630         Generate_C_Code by Modify_Tree_For_C.
10631         * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
10632         Replace Generate_C_Code by Modify_Tree_For_C.
10633         * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
10634         Modify_Tree_For_C.
10635         * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
10636         Generate_C_Code by Modify_Tree_For_C.
10637         * exp_ch4.adb (Expand_Allocator_Expression): Replace
10638         Generate_C_Code by Modify_Tree_For_C.
10639         * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
10640         by Modify_Tree_For_C.
10641         * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
10642         Generate_C_Code by Modify_Tree_For_C.
10643         * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
10644         by Modify_Tree_For_C.
10645         * sinfo.ads (Modify_Tree_For_C): Adding documentation.
10647 2017-01-19  Javier Miranda  <miranda@adacore.com>
10649         * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
10650         subprogram.
10651         (Is_Inlinable_Expression_Function): New subprogram.
10652         * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
10653         to Sem_Util.
10654         (Is_Inlinable_Expression_Function): Moved to Sem_Util.
10656 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10658         * sem_ch4.adb (Diagnose_Call): Improve error message when a
10659         selected component has a prefix that might be interpreted
10660         as a parameterless function call, but none of the candidate
10661         interpretations is parameterless, and there is a hidden homonym
10662         of the prefix that is a package.
10663         * sem_ch8.adb (Find_Selected_Component): If the prefix might be
10664         interpreted as a parameterless function call and its analysis
10665         fails, do not call Analyze_Selected_Component.
10667 2017-01-19  Steve Baird  <baird@adacore.com>
10669         * sem_util.ads: Add new Use_Full_View Boolean parameter to
10670         Get_Index_Bounds.
10671         * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
10672         calls to a newly-defined Scalar_Range_Of_Right_View function.
10674 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
10676         * gnat1drv.adb: minor fix of unbalanced parens in comment
10677         * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
10678         to visible part of the package to allow re-use in GNATprove.
10679         * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
10680         from repeated code of Traverse_Compilation_Unit.
10681         (Traverse_Declaration_Or_Statement): fixed detection of
10682         generic subprograms and packages; also, iteration over case
10683         statement alternatives rewritten to avoid testing if the first
10684         alternative is present (since it must be present due to Ada
10685         syntax restrictions).
10687 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
10689         * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
10690         returning by reference not just for subprogram body stubs,
10691         but for all subprogram cases.
10692         * sem_util.adb: Code reformatting.
10693         (Requires_Transient_Scope): Update the call to Results_Differ.
10694         (Results_Differ): Update the parameter profile and the associated
10695         comment on usage.
10697 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
10699         * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
10700         identifier nodes that do not come from source, to handle properly
10701         dimensionality check within an inlined body which inclddes both
10702         original operands and rewritten operands. This removes spurious
10703         dimensionality errors in the presence of front-end inlining,
10704         as well as in SPARK mode.
10706 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
10708         PR driver/49726
10709         * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
10711 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10713         * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
10715 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
10717         * doc/gnat_ugn/getting_started_with_gnat.rst,
10718         doc/gnat_ugn/inline_assembler.rst,
10719         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
10720         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
10721         doc/gnat_ugn/about_this_guide.rst,
10722         doc/gnat_ugn/platform_specific_information.rst,
10723         doc/gnat_ugn/example_of_binder_output.rst,
10724         doc/gnat_ugn/gnat_and_program_execution.rst,
10725         doc/gnat_ugn/gnat_utility_programs.rst,
10726         doc/gnat_ugn/the_gnat_compilation_model.rst,
10727         doc/gnat_rm/implementation_defined_attributes.rst,
10728         doc/gnat_rm/compatibility_and_porting_guide.rst,
10729         doc/gnat_rm/standard_library_routines.rst,
10730         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
10731         doc/gnat_rm/implementation_defined_pragmas.rst,
10732         doc/gnat_rm/the_gnat_library.rst,
10733         doc/gnat_rm/obsolescent_features.rst,
10734         doc/gnat_rm/about_this_guide.rst,
10735         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
10736         doc/gnat_rm/implementation_of_ada_2012_features.rst,
10737         doc/gnat_rm/interfacing_to_other_languages.rst,
10738         doc/gnat_rm/implementation_defined_aspects.rst,
10739         doc/gnat_rm.rst: Update documentation.
10740         * gnat_rm.texi, gnat_ugn.texi: Regenerated.
10742 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10744         * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
10745         * scil_ll.adb: Minor style fix in comment.
10746         * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
10747         even if entity is already set, because the node may be renalyzed
10748         after inlining transformations.
10750 2017-01-13  Javier Miranda  <miranda@adacore.com>
10752         * sem_res.adb (Resolve_Call): Do not establish a transient scope
10753         for a call to inlinable expression function (since the call will
10754         be replaced by its returned object).
10755         * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
10756         * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
10757         (Expand_Call): For inlinable expression function call replace the
10758         call by its returned object.
10759         (Is_Inlinable_Expression_Function): New subprogram.
10761 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10763         * checks.adb: Minor typo fix and reformatting.
10765 2017-01-13  Javier Miranda  <miranda@adacore.com>
10767         * contracts.adb (Contract_Only_Subprograms): Remove formal.
10768         (Copy_Original_Specification): Removed.
10769         (Skip_Contract_Only_Subprogram): Move here checks previously
10770         located in the caller of this routine (to leave the code more clean).
10771         (Build_Contract_Only_Subprogram): Code cleanup.
10772         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
10773         (Get_Contract_Only_Missing_Body_Name): Removed.
10775 2017-01-13  Javier Miranda  <miranda@adacore.com>
10777         * sem_ch6.adb (Cloned_Expression): New subprogram.
10778         (Freeze_Expr_Types): Complete previous patch since the expression
10779         of an expression-function may have iterators and loops with
10780         defining identifiers which, as part of the preanalysis of the
10781         expression, may be left decorated with itypes that will not be
10782         available in the tree passed to the backend.
10784 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10786         * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
10787         conversion to Integer of an expression that is an attribute
10788         reference 'Pos on an enumeration type.
10790 2017-01-13  Bob Duff  <duff@adacore.com>
10792         * atree.ads: Minor comment fix.
10794 2017-01-13  Justin Squirek  <squirek@adacore.com>
10796         * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
10797         calls in accessibility check on return statement.
10799 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10801         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10802         Ensure that the input body is a subprogram body before trying to
10803         determine whether it denoted an expression function.  Note that
10804         subprogram body stubs cannot denote expression functions.
10806 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10808         * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
10809         and typo fixes.
10811 2017-01-13  Javier Miranda  <miranda@adacore.com>
10813         * einfo.ads (Component_Bit_Offset): Fix documentation.
10814         * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
10815         on record holes for components with unknown compile-time offsets.
10817 2017-01-13  Bob Duff  <duff@adacore.com>
10819         * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
10820         * g-locfil.ads: Minor comment fix.
10822 2017-01-13  Bob Duff  <duff@adacore.com>
10824         * binde.adb (Elab_New): New elaboration order algorithm
10825         that is expected to cause fewer ABE issues. This is a work in
10826         progress. The new algorithm is currently disabled, and can be
10827         enable by the -dp switch, or by modifying the Do_Old and Do_New
10828         etc. flags and rebuilding. Experimental code is included to
10829         compare the results of the old and new algorithms.
10830         * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
10831         can have multiple of these tables, so the old and new algorithms
10832         can coexist.
10833         * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
10834         parameter of type array. This avoids the global variable, and
10835         allows bounds checking (which is normally defeated by the tables
10836         packages). It also ensures that the Elab_Order is read-only
10837         to Bindgen.
10838         * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
10839         subprograms that need it, as above.
10840         * debug.adb: Document new -dp switch. Modify doc of old -do
10841         switch.
10842         * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
10843         and Bindgen.  Move writing of closure (-R and -Ra switches)
10844         to Binde; that's more convenient.
10846 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10848         * sem_ch6.adb (Analyze_Expression_Function): If the expression
10849         function is a completion, all entities referenced in the
10850         expression are frozen. As a consequence, a reference to an
10851         uncompleted private type from an enclosing scope is illegal.
10853 2017-01-13  Javier Miranda  <miranda@adacore.com>
10855         * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
10856         (Analyze_Subprogram_Body_Helper): At the occurrence of an
10857         expression function declaration that is a completion, its
10858         expression causes freezing (AI12-0103).
10860 2017-01-13  Vadim Godunko  <godunko@adacore.com>
10862         * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
10863         Reference functions of Ada.Containers.Indefinite_Holders.
10865 2017-01-13  Bob Duff  <duff@adacore.com>
10867         * s-os_lib.ads: Minor comment fixes.
10869 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10871         * exp_ch3.adb (Default_Initialize_Object): Do not default
10872         initialize an object when it is of a task type and restriction
10873         No_Tasking is in effect because the initialization is obsolete.
10874         * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
10875         restriction No_Tasking is in effect.
10876         (Build_Master_Renaming): Do not rename a master when restriction
10877         No_Tasking is in effect.
10879 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10881         * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
10882         the legality of An others clause applies as well to a choice in
10883         an Iterated_component_ association.
10884         (Resolve_Iterated_Component_Association): An others choice
10885         is legal.
10886         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
10887         Iterated_Component_Association is not static.
10889 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10891         * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
10892         control is passed to the expresion handler before the new mode
10893         is set.
10894         * sem_ch12.adb (Analyze_Package_Instantiation,
10895         Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
10896         in case control is passed to the expresion handler before the
10897         new mode is set.
10899 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
10901         * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
10902         exp_aggr.adb: Minor reformatting.
10904 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10906         * inline.adb: Minor reformatting and typo fix.
10908 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10910         * sem_util.ads, sem_util.adb (Choice_List): Move function here
10911         from sem_aggr.adb, for use elsewhere.
10912         * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
10913         * sem_aggr.adb (Resolve_Array_Aggregate): Remove
10914         Iterated_Component_Present.
10915         * exp_aggr.adb: Use Choice_List throughout, to handle
10916         Iterated_Component_Associations.
10917         (Gen_Loop): Generate proper loop for an
10918         Iterated_Component_Association: loop variable has the identifier
10919         of the original association. Generate a loop even for a single
10920         component choice, in order to make loop parameter visible in
10921         expression.
10922         (Flatten): An Iterated_Component_Association is not static.
10924 2017-01-13  Yannick Moy  <moy@adacore.com>
10926         * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
10927         float exponentiation for statically known small negative values
10928         is the reciprocal of the exponentiation for the opposite value
10929         of the exponent.
10930         * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
10931         Ensure that the value of float exponentiation for negative values
10932         is the reciprocal of the exponentiation for the opposite value
10933         of the exponent.
10934         * inline.adb (Expand_Inlined_Call): Fix the count
10935         for the number of generated gotos.
10937 2017-01-13  Yannick Moy  <moy@adacore.com>
10939         * inline.adb: Code cleanup.
10940         * sem_util.adb (Is_OK_Volatile_Context): Add
10941         expression in delay statement as OK for volatile context.
10943 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10945         * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
10946         mode a choice that is a subtype with a static predicate is
10947         replaced by the values it covers. This transformation must not
10948         be performed in ASIS mode, to preserve the source for analysis.
10950 2017-01-13  Justin Squirek  <squirek@adacore.com>
10952         * nlists.ads: Correct minor typo.
10954 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
10956         * sem_ch13.adb: Minor reformatting and typo fix.
10958 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10960         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
10961         Iterated_Component_Association is a named association in an
10962         array aggregate.
10963         * sem_aggr.adb (Resolve_Iterated_Component_Association): New
10964         procedure, subsidiary of Resolve_Array_Aggregate, to analyze
10965         and resolve the discrete choices and the expression of the
10966         new construct.
10967         * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
10968         Loop_Actions and Box_Present are attributes of
10969         N_Iterated_Component_Association nodes. Box_Present is always
10970         False in this case.
10971         * sprint.adb (Sprint_Node): An Iterated_Component_Association
10972         has a Discrete_Choices list, as specified in the RM. A
10973         Component_Association for aggregate uses instead a Choices list.
10974         We have to live with this small inconsistency because the new
10975         construct also has a defining identifier, and there is no way
10976         to merge the two node structures.
10978 2017-01-13  Yannick Moy  <moy@adacore.com>
10980         * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
10981         list of pragmas to remove.  Remove pragmas from the list of
10982         statements in the body to inline.
10983         * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
10985 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
10987         * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
10988         Analyze_Declarations, to analyze and resolve the expressions of
10989         aspect specifications in the current declarative list, so that
10990         the expressions have proper entity and type info.  This is needed
10991         for ASIS when there is no subsequent expansion to generate this
10992         semantic information.
10993         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
10994         original expression, to suppress cascaded errors when expression
10995         has been constant-folded.
10996         (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
10997         ASIS mode, because there is no subsequent expansion to decorate
10998         the tree.
11000 2017-01-13  Yannick Moy  <moy@adacore.com>
11002         * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
11003         New function to detect when a call may be inlined or not in
11004         GNATprove mode.
11005         (Expand_Inlined_Call): Ensure that a temporary
11006         is always created in the cases where a type conversion may be
11007         needed on an input parameter in GNATprove mode, so that GNATprove
11008         sees the check to perform.
11009         * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
11010         when not applicable due to actual requiring type conversion
11011         with possible check but no temporary value can be copied for
11012         GNATprove to see the check.
11014 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11016         * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
11017         exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
11018         layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
11019         exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
11020         exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
11021         g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
11022         sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
11023         prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
11024         a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
11025         get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
11026         g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
11027         sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
11028         s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
11029         contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
11030         g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
11031         g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
11032         a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
11033         ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
11034         get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
11035         prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
11036         exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
11037         s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
11038         a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
11039         a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
11040         g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
11041         par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
11042         uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
11043         a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
11044         statements to reflect the new style for case alternatives. Various
11045         code clean up and reformatting.
11047 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
11049         * exp_util.adb: Minor reformatting.
11051 2017-01-13  Yannick Moy  <moy@adacore.com>
11053         * exp_spark.adb: Code cleanup.
11054         * sem_ch9.adb (Analyze_Delay_Until): Resolve
11055         expression so that calls are identified as such inside delay
11056         until.
11058 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
11060         * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
11061         * par-ch3.adb (P_Discrete_Choice_List): An
11062         Iterated_Component_Association is an array aggregate component.
11063         * par-ch4.adb (P_Iterated_Component_Association): New procedure.
11064         (Is_Quantified_Expression): New function that performs a lookahead
11065         to distinguish quantified expressions from iterated component
11066         associations.
11067         (P_Aggregate_Or_Paren_Expr): Recognize iterated component
11068         associations.
11069         (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
11070         * sem.adb (Analyze): Handle Iterated_Component_Association.
11071         * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
11072         component associations.
11073         * sinfo.ads, sinfo.adb: Entries for for
11074         N_Iterated_Component_Association and its fields.
11075         * sprint.adb (Sprint_Node_Actual): Handle
11076         N_Iterated_Component_Association.
11078 2017-01-13  Justin Squirek  <squirek@adacore.com>
11080         * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
11081         of the style check until after preanalysis of acutals.
11083 2017-01-13  Yannick Moy  <moy@adacore.com>
11085         * sem_ch13.adb: Minor reformatting.
11086         * par-ch11.adb: minor style fix in whitespace
11087         * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
11088         reduced to Add_Artificial_ALI_File; style fix in declaration of
11089         Text; grammar fix in comment.
11090         * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
11091         * freeze.adb: Cleanup to pass pragma instead of
11092         expression to call.
11093         * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
11094         replace System'To_Address by equivalent call.
11096 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
11098         * bindusg.adb: Improve usage output for -f switch.
11100 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11102         * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
11103         Minor reformatting.
11105 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
11107         * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
11108         treat comparisons on strings as legal in a Static_Predicate.
11109         (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
11110         a function call that is the expansion of a string comparison.The
11111         function call is built when compiling the corresponding predicate
11112         function, but the expression has been found legal as a static
11113         predicate during earlier analysis.
11114         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
11115         properly a function call that is the expansion of a string
11116         comparison operation, in order to recover the Static_Predicate
11117         expression and apply it to a static argument when needed.
11119 2017-01-13  Tristan Gingold  <gingold@adacore.com>
11121         * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
11122         (Open_Read): Re-implement using Open_Read_No_Exception.
11123         (Open_Write): Raise exception in case of error.
11124         * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
11125         * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
11126         reaise exception.
11127         * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
11129 2017-01-13  Yannick Moy  <moy@adacore.com>
11131         * checks.adb: Code cleanup.
11133 2017-01-13  Yannick Moy  <moy@adacore.com>
11135         * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
11136         expression instead of unanalyzed aspect expression for checking
11137         the validity of inheriting an operation. Also copy the expression
11138         being passing it to Build_Class_Wide_Expression, as this call
11139         modifies its argument.
11140         * sem_util.ads Fix comment to reference correct function name
11141         New_Copy_Tree.
11143 2017-01-13  Javier Miranda  <miranda@adacore.com>
11145         * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
11146         when we propagate information about the indexes back to the original
11147         indexing mode and the prefix of the index is a function call, do not
11148         remove any parameter from such call.
11150 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
11152         * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
11153         * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
11154         a build-in-place function whose result type is tagged.
11156 2017-01-13  Yannick Moy  <moy@adacore.com>
11158         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11159         Do not generate a wrapper when the only candidate is a class-wide
11160         subprogram.
11161         (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
11162         inside a generic context.
11164 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11166         * exp_util.adb (Add_Inherited_Tagged_DIC):
11167         Pass the object parameters of both the parent and the derived
11168         type DIC procedure to the reference replacement circuitry.
11169         (Find_DIC_Type): Modify the circuitry to present the partial
11170         view of a private type in case the private type defines its own
11171         DIC pragma.
11172         (Replace_Object_And_Primitive_References): Add two
11173         optional formal parameters.  Update the comment on usage. Update
11174         the replacement of references to object parameters.
11176 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
11178         * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
11180 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
11182         * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
11183         an out parameter that is a type conversion, independently of th
11184         range check that may apply to the expression of the conversion,
11185         for use in GNATProve.
11187 2017-01-13  Yannick Moy  <moy@adacore.com>
11189         * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
11190         GNATprove_Mode here to Frontend.
11191         * frontend.adb (Frontend): Move the implicit with for System
11192         in GNATprove_Mode here as it ismore correct this way; the old
11193         place only worked by chance, since there were no overloaded names.
11194         * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
11195         * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
11196         four attributes identified in SRM 9(18), add an implicit with
11197         to Ada.Task_Identification.
11198         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11199         Deal specially with the wrapper introduced for AI05-0071 in GNATprove
11200         mode.
11201         * checks.adb (Apply_Discriminant_Check,
11202         Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
11203         In GNATprove mode, we do not apply the checks, but we still
11204         analyze the expression to possibly issue errors on SPARK
11205         code when a run-time error can be detected at compile time.
11206         (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
11207         in GNATprove mode.
11209 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11211         * expander.adb (Expand): Add a warning about using return
11212         statements in Ghost management code.
11213         * exp_ch3.adb (Freeze_Type): Add a warning about using return
11214         statements in Ghost management code.
11215         * exp_ch7.adb (Build_Invariant_Procedure_Body,
11216         Build_Invariant_Procedure_Declaration): Add a warning about
11217         using return statements in Ghost management code.
11218         * exp_disp.adb (Make_DT): Add a warning about using return
11219         statements in Ghost management code.
11220         * exp_util.adb (Build_DIC_Procedure_Body,
11221         Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
11222         warning about using return statements in Ghost management code.
11223         * freeze.adb (Freeze_Entity): Add a warning about using return
11224         statements in Ghost management code.
11225         * sem.adb (Analyze, Do_Analyze): Add a warning about using return
11226         statements in Ghost management code.
11227         * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
11228         a warning about using return statements in Ghost management code.
11229         * sem_ch5.adb (Analyze_Assignment): Add a warning about using
11230         return statements in Ghost management code.
11231         * sem_ch6.adb (Analyze_Procedure_Call,
11232         Analyze_Subprogram_Body_Helper): Add a warning about using return
11233         statements in Ghost management code.
11234         * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
11235         using return statements in Ghost management code.
11236         * sem_ch12.adb (Analyze_Package_Instantiation,
11237         Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
11238         Instantiate_Subprogram_Body): Add a warning about using return
11239         statements in Ghost management code.
11240         * sem_ch13.adb (Build_Predicate_Functions,
11241         Build_Predicate_Function_Declarations): Add a warning about
11242         using return statements in Ghost management code.
11243         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
11244         Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
11245         Analyze_Pre_Post_Condition_In_Decl_Part):  Add a warning about
11246         using return statements in Ghost management code.
11248 2017-01-13  Tristan Gingold  <gingold@adacore.com>
11250         * s-mmosin-mingw.adb: Fix pragma import.
11252 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
11254         * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
11255         codepeer mode.
11257 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
11259         * atree.adb (Allocate_Initialize_Node): A newly created node is
11260         no longer marked as Ghost at this level.
11261         (Mark_New_Ghost_Node): New routine.
11262         (New_Copy): Mark the copy as Ghost.
11263         (New_Entity): Mark the entity as Ghost.
11264         (New_Node): Mark the node as Ghost.
11265         * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
11266         apply to unanalyzed entities.
11267         (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
11268         entities.
11269         (Set_Is_Checked_Ghost_Entity): This attribute now
11270         applies to all entities as well as unanalyzed entities.
11271         (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
11272         all entities as well as unanalyzed entities.
11273         * expander.adb Add with and use clauses for Ghost.
11274         (Expand): Install and revert the Ghost region associated with the node
11275         being expanded.
11276         * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
11277         (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
11278         (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
11279         (Expand_Freeze_Record_Type): Remove all Ghost-related code.
11280         (Freeze_Type): Install and revert the Ghost region associated
11281         with the type being frozen.
11282         * exp_ch5.adb Remove with and use clauses for Ghost.
11283         (Expand_N_Assignment_Statement): Remove all Ghost-related code.
11284         * exp_ch6.adb Remove with and use clauses for Ghost.
11285         (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
11286         (Expand_N_Subprogram_Body): Remove all Ghost-related code.
11287         * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
11288         Ghost region of the working type.
11289         (Build_Invariant_Procedure_Declaration): Install and revert
11290         the Ghost region of the working type.
11291         (Expand_N_Package_Body): Remove all Ghost-related code.
11292         * exp_ch8.adb Remove with and use clauses for Ghost.
11293         (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
11294         code.
11295         (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
11296         (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
11297         (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
11298         code.
11299         * exp_ch13.adb Remove with and use clauses for Ghost.
11300         (Expand_N_Freeze_Entity): Remove all Ghost-related code.
11301         * exp_disp.adb (Make_DT): Install and revert the Ghost region of
11302         the tagged type. Move the generation of various entities within
11303         the Ghost region of the type.
11304         * exp_prag.adb Remove with and use clauses for Ghost.
11305         (Expand_Pragma_Check): Remove all Ghost-related code.
11306         (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
11307         (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
11308         (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
11309         * exp_util.adb (Build_DIC_Procedure_Body): Install
11310         and revert the Ghost region of the working types.
11311         (Build_DIC_Procedure_Declaration): Install and revert the
11312         Ghost region of the working type.
11313         (Make_Invariant_Call): Install and revert the Ghost region of the
11314         associated type.
11315         (Make_Predicate_Call): Reimplemented. Install and revert the
11316         Ghost region of the associated type.
11317         * freeze.adb (Freeze_Entity): Install and revert the Ghost region
11318         of the entity being frozen.
11319         (New_Freeze_Node): Removed.
11320         * ghost.adb Remove with and use clauses for Opt.
11321         (Check_Ghost_Completion): Update the parameter profile
11322         and all references to formal parameters.
11323         (Ghost_Entity): Update the comment on usage.
11324         (Install_Ghost_Mode): New routines.
11325         (Is_Ghost_Assignment): New routine.
11326         (Is_Ghost_Declaration): New routine.
11327         (Is_Ghost_Pragma): New routine.
11328         (Is_Ghost_Procedure_Call): New routine.
11329         (Is_Ghost_Renaming): Removed.
11330         (Is_OK_Declaration): Reimplemented.
11331         (Is_OK_Pragma): Reimplemented.
11332         (Is_OK_Statement): Reimplemented.
11333         (Is_Subject_To_Ghost): Update the comment on usage.
11334         (Mark_And_Set_Ghost_Assignment): New routine.
11335         (Mark_And_Set_Ghost_Body): New routine.
11336         (Mark_And_Set_Ghost_Completion): New routine.
11337         (Mark_And_Set_Ghost_Declaration): New routine.
11338         (Mark_And_Set_Ghost_Instantiation): New routine.
11339         (Mark_And_Set_Ghost_Procedure_Call): New routine.
11340         (Mark_Full_View_As_Ghost): Removed.
11341         (Mark_Ghost_Declaration_Or_Body): New routine.
11342         (Mark_Ghost_Pragma): New routine.
11343         (Mark_Ghost_Renaming): New routine.
11344         (Mark_Pragma_As_Ghost): Removed.
11345         (Mark_Renaming_As_Ghost): Removed.
11346         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
11347         (Prune_Node): Freeze nodes no longer need special pruning, they
11348         are processed by the general ignored Ghost code mechanism.
11349         (Restore_Ghost_Mode): New routine.
11350         (Set_Ghost_Mode): Reimplemented.
11351         (Set_Ghost_Mode_From_Entity): Removed.
11352         * ghost.ads Add with and use clauses for Ghost.
11353         (Check_Ghost_Completion): Update the parameter profile
11354         along with the comment on usage.
11355         (Install_Ghost_Mode): New routine.
11356         (Is_Ghost_Assignment): New routine.
11357         (Is_Ghost_Declaration): New routine.
11358         (Is_Ghost_Pragma): New routine.
11359         (Is_Ghost_Procedure_Call): New routine.
11360         (Mark_And_Set_Ghost_Assignment): New routine.
11361         (Mark_And_Set_Ghost_Body): New routine.
11362         (Mark_And_Set_Ghost_Completion): New routine.
11363         (Mark_And_Set_Ghost_Declaration): New routine.
11364         (Mark_And_Set_Ghost_Instantiation): New routine.
11365         (Mark_And_Set_Ghost_Procedure_Call): New routine.
11366         (Mark_Full_View_As_Ghost): Removed.
11367         (Mark_Ghost_Pragma): New routine.
11368         (Mark_Ghost_Renaming): New routine.
11369         (Mark_Pragma_As_Ghost): Removed.
11370         (Mark_Renaming_As_Ghost): Removed.
11371         (Restore_Ghost_Mode): New routine.
11372         (Set_Ghost_Mode): Redefined.
11373         (Set_Ghost_Mode_From_Entity): Removed.
11374         * sem.adb (Analyze): Install and revert the Ghost region of the
11375         node being analyzed.
11376         (Do_Analyze): Change the way a clean Ghost
11377         region is installed and reverted.
11378         * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
11379         all Ghost-related code.
11380         (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
11381         (Analyze_Number_Declaration): Remove all Ghost-related code.
11382         (Analyze_Object_Declaration): Install and revert the Ghost region of
11383         a deferred object declaration's completion.
11384         (Array_Type_Declaration): Remove all Ghost-related code.
11385         (Build_Derived_Type): Update the comment on
11386         the propagation of Ghost attributes from a parent to a derived type.
11387         (Derive_Subprogram): Remove all Ghost-related code.
11388         (Make_Class_Wide_Type): Remove all Ghost-related code.
11389         (Make_Implicit_Base): Remove all Ghost-related code.
11390         (Process_Full_View): Install and revert the Ghost region of
11391         the partial view.  There is no longer need to check the Ghost
11392         completion here.
11393         * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
11394         region of the left hand side.
11395         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
11396         all Ghost-related code.
11397         (Analyze_Expression_Function): Remove all Ghost-related code.
11398         (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
11399         (Analyze_Procedure_Call): Install and revert the Ghost region of
11400         the procedure being called.
11401         (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
11402         region of the spec or body.
11403         (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
11404         (Build_Subprogram_Declaration): Remove all Ghost-related code.
11405         (Find_Corresponding_Spec): Remove all Ghost-related code.
11406         (Process_Formals): Remove all Ghost-related code.
11407         * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
11408         the Ghost region of the spec.
11409         (Analyze_Package_Declaration): Remove all Ghost-related code.
11410         * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
11411         Ghost when it aliases a Ghost entity.
11412         (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
11413         a Ghost entity.
11414         (Analyze_Object_Renaming): Mark a renaming as Ghost when
11415         it aliases a Ghost entity.
11416         (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
11417         a Ghost entity.
11418         (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
11419         aliases a Ghost entity.
11420         * sem_ch11.adb Remove with and use clauses for Ghost.
11421         (Analyze_Exception_Declaration): Remove all Ghost-related code.
11422         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
11423         Ghost-related code.
11424         (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
11425         code.
11426         (Analyze_Package_Instantiation): Install and revert the Ghost region
11427         of the package instantiation.
11428         (Analyze_Subprogram_Instantiation): Install
11429         and revert the Ghost region of the subprogram instantiation.
11430         (Instantiate_Package_Body): Code clean up. Install and revert the
11431         Ghost region of the package body.
11432         (Instantiate_Subprogram_Body): Code clean up. Install and revert the
11433         Ghost region of the subprogram body.
11434         * sem_ch13.adb (Build_Predicate_Functions): Install
11435         and revert the Ghost region of the related type.
11436         (Build_Predicate_Function_Declaration): Code clean up. Install
11437         and rever the Ghost region of the related type.
11438         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
11439         Install and revert the Ghost region of the pragma.
11440         (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
11441         Ghost region of the pragma.
11442         (Analyze_Pragma): Install and revert the Ghost region of various
11443         pragmas.  Mark a pragma as Ghost when it is related to a Ghost entity
11444         or encloses a Ghost entity.
11445         (Analyze_Pre_Post_Condition): Install and revert the Ghost
11446         region of the pragma.
11447         (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
11448         Ghost region of the pragma.
11449         * sem_res.adb (Resolve): Remove all Ghost-related code.
11450         * sem_util.adb (Is_Declaration): Reimplemented.
11451         (Is_Declaration_Other_Than_Renaming): New routine.
11452         * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
11453         * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
11454         (Is_Ghost_Pragma): Removed.
11455         (Is_Ignored_Ghost_Pragma): New routine.
11456         (Set_Is_Checked_Ghost_Pragma): New routine.
11457         (Set_Is_Ghost_Pragma): Removed.
11458         (Set_Is_Ignored_Ghost_Pragma): New routine.
11459         * sinfo.ads: Update the documentation on Ghost mode and
11460         Ghost regions.  New attributes Is_Checked_Ghost_Pragma
11461         and Is_Ignored_Ghost_Pragma along with usages in nodes.
11462         Remove attribute Is_Ghost_Pragma along with usages in nodes.
11463         (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11464         (Is_Ghost_Pragma): Removed along with pragma Inline.
11465         (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11466         (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11467         (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
11468         (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11470 2017-01-12  Tristan Gingold  <gingold@adacore.com>
11472         * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
11473         s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
11475 2017-01-12  Yannick Moy  <moy@adacore.com>
11477         * errout.adb, errout.ads (Initialize): Factor common treatment
11478         in Reset_Warnings.
11479         (Reset_Warnings): New procedure to reset counts related to warnings.
11480         (Record_Compilation_Errors): New variable to store the presence of an
11481         error, used in gnat2why to allow changing the Warning_Mode.
11482         (Compilation_Errors): Use new variable Record_Compilation_Errors to
11483         store the presence of an error.
11485 2017-01-12  Javier Miranda  <miranda@adacore.com>
11487         * sem_ch13.adb (Analyze_Aspect_Specifications):
11488         For Interrupt_Handler and Attach_ Handler aspects, decorate the
11489         internally built reference to the protected procedure as coming
11490         from sources and force its analysis.
11492 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11494         * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
11495         inherit predicates if any from the first_subtype of the parent,
11496         not from the anonymous parent type.
11497         * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
11498         predicate is not a static subtype.
11500 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11502         * freeze.adb (Check_Suspicious_Convention): New procedure
11503         performing a warning check on discriminated record types with
11504         convention C or C++. Factored out of procedure Freeze_Record_Type,
11505         and changed to only apply to base types (to avoid spurious
11506         warnings on subtypes). Minor improvement of warning messages
11507         to refer to discriminated rather than variant record types.
11508         (Freeze_Record_Type): Remove code for performing a suspicious
11509         convention check.
11510         (Freeze_Entity): Only call Freeze_Record_Type
11511         on types that aren't declared within any enclosing generic units
11512         (rather than just excluding the type when the innermost scope
11513         is generic). Call Check_Suspicious_Convention whether or not
11514         the type is declared within a generic unit.
11515         * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
11516         * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
11517         from Sem_Ch8).
11519 2017-01-12  Tristan Gingold  <gingold@adacore.com>
11521         * sysdep.c, adaint.c, rtinit.c, ming32.h:
11522         (__gnat_current_codepage): Renamed from CurrentCodePage
11523         (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
11525 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11527         * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
11528         quantified expressions, following AI12-050: the loop parameters
11529         of two quantified expressions are conformant if they have the
11530         same identifier.
11532 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
11534         * gcc-interface/Makefile.in: Clean up VxWorks targets.
11536 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11538         * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
11539         Hnadle properly the attribute reference when it appears as part
11540         of an expression in another loop aspect.
11542 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
11544         * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
11545         subsidiary of Build_Initialization_Call, to complete generation
11546         of predicate checks on discriminants whose (sub)types have
11547         predicates, and to add checks on variants that do not have an
11548         others clause.
11549         * sem_util.adb (Gather_Components): A missing Others alternative is
11550         not an error when the type of the discriminant is a static predicate
11551         (and coverage has been checked when analyzing the case statement). A
11552         runtime check is generated to verify that a given discriminant
11553         satisfies the predicate (RM 3.8.1. (21.1/2)).
11555 2017-01-12  Yannick Moy  <moy@adacore.com>
11557         * gnat1drv.adb (Adjust_Global_Switches): Only
11558         perform checking of exception mechanism when generating code.
11560 2017-01-12  Justin Squirek  <squirek@adacore.com>
11562         * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
11563         Remove handling of access component with invariant.
11564         (Build_Invariant_Procedure_Declaration): Remove return on class
11565         wide type.
11566         * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
11567         conditional exception for component or array so Has_Own_Invariants
11568         flag is not falsly set.
11569         * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
11570         wide type to have no invariant flags.
11572 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11574         * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
11575         sem_ch13.adb: Minor reformatting.
11577 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11579         * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
11580         adjustment primitive when the ancestor type was not properly frozen.
11581         (Gen_Assign): Guard against a missing initialization
11582         primitive when the component type was not properly frozen.
11583         (Initialize_Array_Component): Guard against a missing adjustment
11584         primitive when the component type was not properly frozen.
11585         (Initialize_Record_Component): Guard against a missing adjustment
11586         primitive when the component type was not properly frozen.
11587         (Process_Transient_Component_Completion): The transient object may
11588         not be finalized when its associated type was not properly frozen.
11589         * exp_ch3.adb (Build_Assignment): Guard against a missing
11590         adjustment primitive when the component type was not properly frozen.
11591         (Build_Initialization_Call): Guard against a missing
11592         initialization primitive when the associated type was not properly
11593         frozen.
11594         (Expand_N_Object_Declaration): Guard against a missing
11595         adjustment primitive when the base type was not properly frozen.
11596         (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
11597         body when there is no adjustment primitive available. Create an
11598         empty Deep_Finalize body when there is no finalization primitive
11599         available.
11600         * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
11601         missing finalization primitive when the designated type was
11602         not properly frozen.
11603         (Expand_N_Allocator): Guard against a missing initialization primitive
11604         when the designated type was not properly frozen.
11605         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
11606         only when the corresponding adjustment primitive is available.
11607         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
11608         adjustment/finalization statements only when there is an available
11609         primitive to carry out the action.
11610         (Build_Initialize_Statements): Generate the initialization/finalization
11611         statements only when there is an available primitive to carry out the
11612         action.
11613         (Make_Adjust_Call): Do not generate a call when the underlying
11614         type is not present due to a possible missing full view.
11615         (Make_Final_Call): Do not generate a call when the underlying
11616         type is not present due to a possible missing full view.
11617         (Make_Finalize_Address_Stmts): Generate an empty body when the
11618         designated type lacks a finalization primitive.
11619         (Make_Init_Call): Do not generate a call when the underlying type is
11620         not present due to a possible missing full view.
11621         (Process_Component_For_Adjust): Add the adjustment call only when the
11622         corresponding adjustment primitive is available.
11623         (Process_Component_For_Finalize): Add the finalization call only when
11624         the corresponding finalization primitive is available.
11625         (Process_Object_Declaration): Use a null statement to emulate a
11626         missing call to the finalization primitive of the object type.
11627         * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
11628         (Make_Final_Call): Update the comment on usage.
11629         (Make_Init_Call): Update the comment on usage.
11630         * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
11632 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
11634         * einfo.ads: Update documentation of Address_Taken.
11635         * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
11636         [Access_Attribute]): Only consider 'Access/'Unchecked_Access
11637         for subprograms when setting Address_Taken flag.
11639 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
11641         * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
11642         Configurable_Run_Time_Mode off when analysing with'ed predefined
11643         libraries.
11645 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11647         * sem_prag.adb: Minor reformatting.
11648         * sem_util.adb (Unique_Entity): fix result for
11649         bodies of entry families.
11651 2017-01-12  Justin Squirek  <squirek@adacore.com>
11653         * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
11654         Resolve_Suppressible in the pragma Assertion_Policy case.
11655         (Resolve_Suppressible): Created this function to factor out
11656         common code used to resolve Suppress to either Ignore or Check
11657         * snames.ads-tmpl: Add name for Suppressible.
11659 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11661         * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
11662         reformatting.
11663         * debug.adb: Minor comment fixes.
11665 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
11667         * sem_util.adb (Unique_Entity): For concurrent
11668         bodies that are defined with stubs and complete a declaration
11669         of a single concurrent object return the entity of an implicit
11670         concurrent type, not the entity of the anonymous concurrent
11671         object.
11672         * debug.adb: -gnatd.J is no longer used.
11673         * make.adb (Globalize): Removed, no longer used.
11674         * sem_ch9.adb: minor typo in comment for entry index
11676 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
11678         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11679         * exp_ch3.adb (Build_Init_Statements): As part of initialising
11680         the value record of a task, set its _Secondary_Stack_Size field
11681         if present.
11682         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11683         a _Secondary_Stack_Size field in the value record of
11684         the task if a Secondary_Stack_Size rep item is present.
11685         (Make_Task_Create_Call): Include secondary stack size
11686         parameter. If No_Secondary_Stack restriction is in place, passes
11687         stack size of 0.
11688         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11689         Secondary_Stack_Size.
11690         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11691         function to define the overhead of the secondary stack.
11692         * s-tarest.adb (Create_Restricted_Task,
11693         Create_Restricted_Task_Sequential): Functions now include
11694         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11695         * s-tarest.adb (Create_Restricted_Task,
11696         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
11697         include Secondary_Stack_Size parameter.
11698         (Task_Wrapper): Secondary stack now allocated to the size specified by
11699         the Secondary_Stack_Size parameter in the task's ATCB.
11700         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
11701         Secondary_Stack_Size component.
11702         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
11703         Create_Restricted_Task_Sequential): Function now include
11704         Secondary_Stack_Size parameter.
11705         (Task_Wrapper): Secondary stack now allocated to the size
11706         specified by the Secondary_Stack_Size parameter in the task's
11707         ATCB.
11708         * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
11709         to include Secondary_Stack_Size parameter.
11710         * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
11711         Secondary_Stack_Size aspect, turning the aspect into its corresponding
11712         internal attribute.
11713         (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
11714         * snames.adb-tmpl, snames.ads-tmpl: Added names
11715         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
11716         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
11718 2017-01-12  Yannick Moy  <moy@adacore.com>
11720         * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
11721         subtree.
11723 2017-01-12  Justin Squirek  <squirek@adacore.com>
11725         * exp_attr.adb (Expand_N_Attribute_Reference):
11726         Fix Finalization_Size case by properly resolving the type after
11727         rewritting the node.
11729 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11731         * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
11732         the tree.
11733         (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
11734         * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
11735         exp_sel.ads: Minor reformatting.
11737 2017-01-12  Justin Squirek  <squirek@adacore.com>
11739         * exp_ch6.adb (Expand_Call): Add guard to prevent
11740         invariant checks from being created for internally generated
11741         subprograms.
11743 2017-01-12  Bob Duff  <duff@adacore.com>
11745         * lib-writ.ads: Remove incorrect comment.
11747 2017-01-12  Javier Miranda  <miranda@adacore.com>
11749         * debug.adb (-gnatd.K): Enable generation of contract-only
11750         procedures in CodePeer mode.
11751         * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
11752         New subprogram.
11753         (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
11754         set.
11755         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
11756         subprogram.
11757         (Get_Contract_Only_Missing_Body_Name): New subprogram.
11758         (Get_Contract_Only_Body): New subprogram.
11759         (Set_Contract_Only_Body): New subprogram.
11760         (Is_Contract_Only_Body): New subprogram.
11761         (Set_Is_Contract_Only_Body): New subprogram.
11762         (SCIL_Nodes): Replace table by hash-table.
11764 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11766         * exp_ch6.adb: Minor reformatting.
11767         * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
11769 2017-01-12  Bob Duff  <duff@adacore.com>
11771         * binde.adb (Forced): New reason for a dependence.
11772         (Force_Elab_Order): Implementation of the new switch.
11773         * binde.ads: Minor comment fixes.
11774         * bindusg.adb: Add -f switch. Apparently, there was an -f switch
11775         long ago that is no longer supported; removed comment about that.
11776         * opt.ads (Force_Elab_Order_File): Name of file specified for
11777         -f switch.
11778         * switch-b.adb: Parse -f switch.
11780 2017-01-12  Justin Squirek  <squirek@adacore.com>
11782         * exp_ch6.adb (Check_View_Conversion): Created this function
11783         to properly chain calls to check type invariants that may be
11784         present in a subprogram call after the subprogram.
11785         (Expand_Call): Add a conditional to identify when a view conversion
11786         needs to be checked.
11787         * nlists.adb, nlists.ads (Prepend_New): New routine.
11788         (Prepend_New_To): New routine.
11790 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11792         * sinfo.ads: Minor reformatting.
11794 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
11796         * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
11797         reformatting.
11799 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
11801         * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
11802         variable Definite. Create a local object and pass its 'Access to the
11803         BIP function when the result type is either definite or it does not
11804         require any finalization or secondary stack management.
11806 2017-01-12  Bob Duff  <duff@adacore.com>
11808         * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
11809         exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
11810         frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
11811         par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
11812         sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
11813         sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
11814         sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
11815         sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
11816         Change name to Pragma_Name_Unmapped.
11817         (Pragma_Name_Mapped): Change name to Pragma_Name.
11818         This is because the "mapped" version should be the usual case.
11820 2017-01-09  Hristian Kirtchev  <kirtchev@adacore.com>
11822         * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
11823         Is_Default_Init_Cond_Procedure, and
11824         Has_Inherited_Default_Init_Cond.  Add uses of flags
11825         Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
11826         (Default_Init_Cond_Procedure): Removed.
11827         (DIC_Procedure): New routine.
11828         (Has_Default_Init_Cond): Removed.
11829         (Has_DIC): New routine.
11830         (Has_Inheritable_Invariants): The attribute applies to the base type.
11831         (Has_Inherited_Default_Init_Cond): Removed.
11832         (Has_Inherited_DIC): New routine.
11833         (Has_Inherited_Invariants): The attribute applies to the base type.
11834         (Has_Own_DIC): New routine.
11835         (Has_Own_Invariants): The attribute applies to the base type.
11836         (Is_Default_Init_Cond_Procedure): Removed.
11837         (Is_DIC_Procedure): New routine.
11838         (Set_Default_Init_Cond_Procedure): Removed.
11839         (Set_DIC_Procedure): New routine.
11840         (Set_Has_Default_Init_Cond): Removed.
11841         (Set_Has_Inheritable_Invariants): The attribute applies
11842         to the base type.
11843         (Set_Has_Inherited_Default_Init_Cond): Removed.
11844         (Set_Has_Inherited_DIC): New routine.
11845         (Set_Has_Inherited_Invariants): The attribute applies to the base type.
11846         (Set_Has_Own_DIC): New routine.
11847         (Set_Has_Own_Invariants): The attribute applies to the base type.
11848         (Set_Is_Default_Init_Cond_Procedure): Removed.
11849         (Set_Is_DIC_Procedure): New routine.
11850         (Write_Entity_Flags): Update the output of all flags related to
11851         default initial condition.
11852         * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
11853         of the call to the DIC procedure.
11854         (Freeze_Type): Generate the body of the DIC procedure.
11855         * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
11856         all occurrences of Create_Append with Append_New_To. Do
11857         not generate an invariant procedure for a class-wide type.
11858         The generated body acts as a freeze action of the working type.
11859         (Build_Invariant_Procedure_Declaration): Do not generate an
11860         invariant procedure for a class-wide type.
11861         (Create_Append): Removed.
11862         * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
11863         sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
11864         class-wide pre/postcondition description and data structures from
11865         Sem_Prag.
11866         (Build_Class_Wide_Expression): Moved from Sem_Prag.
11867         (Build_DIC_Call): New routine.
11868         (Build_DIC_Procedure_Body): New routine.
11869         (Build_DIC_Procedure_Declaration): New routine.
11870         (Entity_Hash): Moved from Sem_Prag.
11871         (Find_DIC_Type): New routine.
11872         (Update_Primitives_Mapping): Reimplemented.
11873         (Update_Primitives_Mapping_Of_Types): New routine.
11874         * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
11875         (Build_DIC_Call): New routine.
11876         (Build_DIC_Procedure_Body): New routine.
11877         (Build_DIC_Procedure_Declaration): New routine.
11878         (Update_Primitives_Mapping): Moved from Sem_Prag.
11879         (Update_Primitives_Mapping_Of_Types): New routine.
11880         * nlists.adb (Append_New): New routine.
11881         (Append_New_To): New routine.
11882         * nlists.ads (Append_New): New routine.
11883         (Append_New_To): New routine.
11884         * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
11885         of DIC procedures here. This is now done at the end of the
11886         visible declarations, private declarations, and at the freeze
11887         point of a type.
11888         (Analyze_Private_Extension_Declaration):
11889         A private extension inherits the DIC pragma of a parent type.
11890         (Analyze_Subtype_Declaration): No need to propagate invariant
11891         attributes to a subtype as those apply to the base type.
11892         (Build_Derived_Record_Type): No need to inherit invariants here
11893         as this is now done in Build_Derived_Type.
11894         (Build_Derived_Type): Inherit both the DIC pragma and invariants from
11895         a parent type.
11896         (Process_Full_View): Update the propagation of DIC attributes.
11897         (Propagate_Default_Init_Cond_Attributes): Removed.
11898         * sem_ch7.adb Add with and use clauses for Exp_Util.
11899         (Analyze_Package_Specification): Create the body of the DIC
11900         procedure at the end of the visible and private declarations.
11901         (Preserve_Full_Attributes): Propagate DIC attributes.
11902         * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
11903         DIC attributes.
11904         (Analyze_Task_Type_Declaration): Propagate DIC attributes.
11905         * sem_elab.adb (Check_A_Call): Update the call to
11906         Is_Nontrivial_Default_Init_Cond_Procedure.
11907         * sem_prag.adb Remove the with and use clauses for
11908         GNAT.HTable. Move the handling of class- wide pre/postcondition
11909         description and data structures to Exp_Util.
11910         (Analyze_Pragma): Create the declaration of the DIC procedure. There
11911         is no need to propagate invariant-related attributes at this point
11912         as this is done in Build_Invariant_Procedure_Declaration.
11913         (Build_Class_Wide_Expression): Moved to Exp_Util.
11914         (Entity_Hash): Moved to Exp_Util.
11915         (Update_Primitives_Mapping): Moved to Exp_Util.
11916         * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
11917         (Update_Primitives_Mapping): Moved to Exp_Util.
11918         * sem_util.adb: Remove with and use clauses for Ghost
11919         and Sem_Ch13.
11920         (Build_Default_Init_Cond_Call): Removed.
11921         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11922         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11923         (Get_Views): Reimplemented.
11924         (Has_Full_Default_Initialization): Reimplement the section on DIC.
11925         (Inherit_Default_Init_Cond_Procedure): Removed.
11926         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11927         (Is_Nontrivial_DIC_Procedure): New routine.
11928         (Is_Verifiable_DIC_Pragma): New routine.
11929         (Propagate_DIC_Attributes): New routine.
11930         * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
11931         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11932         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11933         (Inherit_Default_Init_Cond_Procedure): Removed.
11934         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11935         (Is_Nontrivial_DIC_Procedure): New routine.
11936         (Is_Verifiable_DIC_Pragma): New routine.
11937         (Propagate_DIC_Attributes): New routine.
11938         * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
11939         on DIC.
11940         * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
11941         usage in nodes.
11942         (Expression_Copy): New routine along with pragma Inline.
11943         (Set_Expression_Copy): New routine along with pragma Inline.
11945 2017-01-06  Bob Duff  <duff@adacore.com>
11947         * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
11948         "Bind_Main_Program" to "not Bind_For_Library", because otherwise
11949         we won't generate the call to s_stalib_adafinal when the main
11950         is not written in Ada.
11952 2017-01-06  Bob Duff  <duff@adacore.com>
11954         * sem_prag.adb: Minor: remove pragma Warnings.
11956 2017-01-06  Tristan Gingold  <gingold@adacore.com>
11958         * Makefile.rtl: Do not compile s-stchop by default.
11960 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
11962         * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
11963         sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
11964         snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
11965         s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
11966         Reverted previous change for now.
11968 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
11970         * exp_ch3.adb (Build_Initialization_Call): Apply predicate
11971         check to default discriminant value if checks are enabled.
11972         (Build_Assignment): If type of component has static predicate,
11973         apply check to its default value, if any.
11975 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
11977         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11978         * exp_ch3.adb (Build_Init_Statements): As part of initialising
11979         the value record of a task, set its _Secondary_Stack_Size field
11980         if present.
11981         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11982         a _Secondary_Stack_Size field in the value record of
11983         the task if a Secondary_Stack_Size rep item is present.
11984         (Make_Task_Create_Call): Include secondary stack size
11985         parameter. If No_Secondary_Stack restriction is in place, passes
11986         stack size of 0.
11987         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11988         Secondary_Stack_Size.
11989         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11990         function to define the overhead of the secondary stack.
11991         * s-tarest.adb (Create_Restricted_Task,
11992         Create_Restricted_Task_Sequential): Functions now include
11993         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11994         * s-tarest.adb (Create_Restricted_Task,
11995         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
11996         now include Secondary_Stack_Size parameter.
11997         (Task_Wrapper):
11998         Secondary stack now allocated to the size specified by the
11999         Secondary_Stack_Size parameter in the task's ATCB.
12000         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
12001         Secondary_Stack_Size component.
12002         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
12003         Create_Restricted_Task_Sequential): Function now include
12004         Secondary_Stack_Size parameter.
12005         (Task_Wrapper): Secondary stack
12006         now allocated to the size specified by the Secondary_Stack_Size
12007         parameter in the task's ATCB.
12008         * sem_ch13.adb (Analyze_Aspect_Specification): Add support
12009         for Secondary_Stack_Size aspect, turning the aspect into its
12010         corresponding internal attribute.
12011         (Analyze_Attribute_Definition):
12012         Process Secondary_Stack_Size attribute.
12013         * snames.adb-tmpl, snames.ads-tmpl: Added names
12014         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
12015         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
12017 2017-01-06  Pascal Obry  <obry@adacore.com>
12019         * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
12020         Sequential_IO and Direct_IO.
12022 2017-01-06  Bob Duff  <duff@adacore.com>
12024         * snames.ads-tmpl (Renamed): New name for the pragma argument.
12025         * par-ch2.adb: Allow the new pragma (with analysis deferred
12026         to Sem_Prag).
12027         * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
12028         Keep a mapping from new pragma names to old names.
12029         * sem_prag.adb: Check legality of pragma Rename_Pragma, and
12030         implement it by calling Map_Pragma_Name.
12031         * checks.adb, contracts.adb, einfo.adb, errout.adb,
12032         * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
12033         * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
12034         * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
12035         * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
12036         * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
12037         * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
12038         as appropriate.
12040 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12042         * exp_ch9.adb: Minor reformatting.
12044 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12046         * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
12047         * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
12048         (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
12049         (unused).
12050         * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
12051         Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
12052         * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
12053         Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
12055 2017-01-06  Bob Duff  <duff@adacore.com>
12057         * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
12058         dummy implementation of Map_Pragma_Name.
12060 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12062         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
12063         entry_body variable constant.
12064         * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
12065         * s-tpoben.ads (Protected_Entry_Body_Access): Now access
12066         to constant.
12067         * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
12068         now access to constant.
12070 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
12072         * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
12073         reformatting and typo fixes.
12075 2017-01-06  Bob Duff  <duff@adacore.com>
12077         * snames.ads-tmpl: New names for pragma renaming.
12078         * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
12079         * par-prag.adb: Add new pragma name to case statement.
12080         * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
12081         of the pragma.
12082         * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
12083         Dummy implementation of Pragma_Name_Mapped.
12085 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12087         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
12088         better detect call within an entry_wrapper.
12089         * sem_res.adb (Resolve_Call): A protected call within an
12090         entity_wrapper is analyzed in the context of the protected
12091         object but corresponds to a pre-analysis and is not an access
12092         before elaboration.
12093         * sem_attr.adb: Minor reformatting.
12095 2017-01-06  Justin Squirek  <squirek@adacore.com>
12097         * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
12098         Finalization_Size to allow a prefix of any non-class-wide type.
12099         * sem_attr.ads Modify comment for Finalization_Size to include
12100         definite type use case.
12102 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12104         * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
12105         on procedures that are wrappers created for entries that have
12106         preconditions.
12107         * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
12108         body is an entry_wrapper, compile it in the context of the
12109         synchronized type, because a precondition may refer to funtions
12110         of the type.
12111         * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
12112         body entity.
12113         * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
12114         within an Entry_Wrapper this is an external call whose target
12115         is the synchronized object that is the actual in the call to
12116         the wrapper.
12118 2017-01-06  Yannick Moy  <moy@adacore.com>
12120         * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
12121         in tree, which means not analyzing the previous prefix if the node has
12122         been rewritten into its prefix.
12124 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
12126         * s-tpobop.adb: Minor reformatting.
12128 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12130         * checks.adb (Ensure_Valid): Do not generate a validity check
12131         within a generated predicate function, validity checks will have
12132         been applied earlier when required.
12134 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12136         * s-tpoben.ads (Protection_Entries): Add comment and reorder
12137         components for performances.
12138         * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
12139         semantic.
12141 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12143         * sem_eval.adb (Check_Expression_Against_Static_Predicate):
12144         If expression is compile-time known and obeys a static predicate
12145         it must be labelled as static, to prevent spurious warnings and
12146         run-time errors, e.g. in case statements. This is relevant when
12147         the expression is the result of constant-folding a type conversion
12148         whose expression is a variable with a known static value.
12150 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12152         * exp_attr.adb, sem_attr.ads: Minor reformatting.
12154 2017-01-06  Justin Squirek  <squirek@adacore.com>
12156         * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
12157         expansion of Finalization_Size attribute.
12158         * sem_attr.adb (Analyze_Attribute): Add entry to check the
12159         semantics of Finalization_Size.
12160         (Eval_Attribute): Add null entry for Finalization_Size.
12161         * sem_attr.ads: Add Finalization_Size to the implementation
12162         dependent attribute list.
12163         * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
12165 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12167         * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
12168         iterator specification with a serious syntactic error, transform
12169         construct into an infinite loop in order to continue analysis
12170         and prevent a compiler abort.
12172 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12174         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
12175         max_queue_lengths_array if unused.
12177 2017-01-06  Bob Duff  <duff@adacore.com>
12179         * errout.adb (Set_Msg_Text): Protect against out-of-bounds
12180         array access, in case "\" is at the end of Text.
12181         * stylesw.adb (Set_Style_Check_Options): Don't include input
12182         characters in the error message template, because they could
12183         be control characters such as "\", which Errout will try to
12184         interpret.
12186 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12188         * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
12189         For a private type examine the visible declarations that follow
12190         the partial view, not just the private declarations that follow
12191         the full view.
12193 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12195         * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
12196         code cleanup.
12198 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12200         * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
12201         alias of the inherited op is the parent iterator, no need to
12202         examine dispatch table positions which might not be established
12203         yet if type is not frozen.
12204         * sem_disp.adb (Check_Controlling_Formals): The formal of a
12205         predicate function may be a subtype of a tagged type.
12206         * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
12207         of representation items for the completion of a type extension
12208         where a predicate applies to the partial view.
12209         * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
12210         parameter that designates function whose actual receives a
12211         predicate check, to improve warning message when the check will
12212         lead to infinite recursion.
12213         * sem_res.adb (Resolve_Actuals): Pass additional parameter to
12214         Apply_Predicate_Check.
12216 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12218         * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
12219         Gnat_Extended_Ravenscar.
12220         * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
12222 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
12224         * sem_util.ads: Minor typo fix and reformatting.
12226 2017-01-06  Yannick Moy  <moy@adacore.com>
12228         * ghost.adb Minor fixing of references to SPARK RM.
12229         (Check_Ghost_Context): Check whether reference is to a lvalue
12230         before issuing an error about violation of SPARK RM 6.9(13)
12231         when declaration has Ghost policy Check and reference has Ghost
12232         policy Ignore.
12233         * sem_util.adb Minor indentation.
12234         * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
12235         Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
12236         * sem_util.ads (Unique_Defining_Entity): Document the result
12237         for package body stubs.
12239 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12241         * raise-gcc.c (abort): Macro to call Abort_Propagation.
12242         * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
12243         constant.
12244         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12245         Do not generate the Entry_Max_Queue_Lengths_Array if all default
12246         values.
12247         * exp_util.adb (Corresponding_Runtime_Package): Consider
12248         Max_Queue_Length pragma.
12250 2017-01-06  Justin Squirek  <squirek@adacore.com>
12252         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12253         Remove declaration generation in the case of
12254         System_Tasking_Protected_Objects_Single_Entry being used,
12255         and add a warning message when this is detected to occur.
12256         (Make_Initialize_Protection): Remove reference pass in the case
12257         of System_Tasking_Protected_Objects_Single_Entry.
12258         * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
12259         * s-tposen.adb (Initialize_Protection_Entry): Remove
12260         Entry_Queue_Max parameter.
12261         * s-tposen.ads: Remove the types use to store the entry queue
12262         maximum.
12263         * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
12265 2017-01-06  Yannick Moy  <moy@adacore.com>
12267         * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
12268         behavior of function, to also accept out of range positions
12269         and raise Constraint_Error in such case, and to copy sloc from
12270         literal if No_Location passed as location.
12271         * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
12272         of functions to raise Constraint_Error in case of value not in
12273         appropriate range.
12275 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12277         * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
12278         Invalidate_Stack_Cache.
12280 2017-01-06  Eric Botcazou  <ebotcazou@adacore.com>
12282         * s-os_lib.adb: Minor fix to the signature of Readlink.
12284 2017-01-06  Javier Miranda  <miranda@adacore.com>
12286         * sem_ch6.adb (Conforming_Types): Handle another
12287         confusion between views in a nested instance with an actual
12288         private type whose full view is not in scope.
12290 2017-01-06  Arnaud Charlet  <charlet@adacore.com>
12292         * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
12293         mark a rewritten if statement as explicit (Comes_From_Source).
12295 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
12297         * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
12299 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12301         * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
12303 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12305         * sem_case.adb: Minor reformatting.
12307 2017-01-06  Thomas Quinot  <quinot@adacore.com>
12309         * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
12311 2017-01-06  Justin Squirek  <squirek@adacore.com>
12313         * aspects.adb: Register aspect in Canonical_Aspect.
12314         * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
12315         into respective tables.
12316         * einfo.ads, einfo.adb: Add a new attribute for
12317         handling the parameters for Pragma_Max_Entry_Queue
12318         (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
12319         for accessing and setting were added as well.
12320         * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
12321         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
12322         declaration for pramga arguments and store them in the protected
12323         type node.
12324         (Make_Initialize_Protection): Pass a reference to
12325         the Entry_Max_Queue_Lengths_Array in the protected type node to
12326         the runtime.
12327         * rtsfind.adb: Minor grammar fix.
12328         * rtsfind.ads: Register new types taken from the
12329         runtime libraries RE_Protected_Entry_Queue_Max and
12330         RE_Protected_Entry_Queue_Max_Array
12331         * s-tposen.adb, s-tpoben.adb
12332         (Initialize_Protection_Entry/Initialize_Protection_Entries):
12333         Add extra parameter and add assignment to local object.
12334         * s-tposen.ads, s-tpoben.ads: Add new types to
12335         store entry queue maximums and a field to the entry object record.
12336         * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
12337         for Aspect_Max_Queue_Length.
12338         (Check_Aspect_At_Freeze_Point):
12339         Add aspect to list of aspects that don't require delayed analysis.
12340         * sem_prag.adb (Analyze_Pragma): Add case statement for
12341         Pragma_Max_Queue_Length, check semantics, and register arugments
12342         in the respective entry nodes.
12343         * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
12344         and Has_Max_Queue_Length
12345         * snames.ads-tmpl: Add constant for the new aspect-name
12346         Name_Max_Queue_Length and corrasponding pragma.
12348 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12350         * exp_util.adb (Is_Controlled_Function_Call):
12351         Reimplemented. Consider any node which has an entity as the
12352         function call may appear in various ways.
12354 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12356         * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
12357         an unchecked type conversion when performing a view conversion
12358         to/from a private type. In all other cases use a regular type
12359         conversion to ensure that any relevant checks are properly
12360         installed.
12362 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
12364         * sem_prag.adb, sem_ch8.adb: Minor reformatting.
12366 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
12368         * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
12369         error on case expression that is an entity, when coverage is
12370         incomplete and entity has a static value obtained by local
12371         propagation.
12372         (Handle_Static_Predicate): New procedure, subsidiary of
12373         Check_Choices, to handle case alternatives that are either
12374         subtype names or subtype indications involving subtypes that
12375         have static predicates.
12377 2017-01-06  Thomas Quinot  <quinot@adacore.com>
12379         * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
12380         (GNAT.Socket): Add support for Busy_Polling and Generic_Option
12382 2017-01-06  Bob Duff  <duff@adacore.com>
12384         * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
12385         Elaborate_All(P) to P itself. That could happen in obscure cases,
12386         and always introduced a cycle (P body must be elaborated before
12387         P body).
12388         * lib-writ.ads: Comment clarification.
12389         * ali-util.ads: Minor comment fix.
12390         * ali.adb: Minor reformatting.
12392 2017-01-06  Tristan Gingold  <gingold@adacore.com>
12394         * a-exexpr-gcc.adb: Improve comment.
12396 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
12398         * s-linux-mips.ads: Use correct signal and errno constants.
12399         (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
12401 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
12403         * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
12404         * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
12405         sections.
12407 2017-01-01  Eric Botcazou  <ebotcazou@adacore.com>
12409         * gnatvsn.ads: Bump copyright year.
12411 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
12413         * gnat_ugn.texi: Bump @copying's copyright year.
12414         * gnat_rm.texi: Likewise.
12416 Copyright (C) 2017 Free Software Foundation, Inc.
12418 Copying and distribution of this file, with or without modification,
12419 are permitted in any medium without royalty provided the copyright
12420 notice and this notice are preserved.