* gcc-interface/misc.c (default_pass_by_ref): Minor tweak.
[gcc.git] / gcc / ada / ChangeLog
1 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
2
3 * gcc-interface/misc.c (default_pass_by_ref): Minor tweak.
4
5 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
6
7 * gcc-interface/trans.c (Call_to_gnu): Set DECL_DISREGARD_INLINE_LIMITS
8 to 0 on the callee if the call is recursive.
9
10 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
11
12 * gcc-interface/decl.c (gnat_to_gnu_field): Do not set the alignment
13 of the enclosing record type if it is not already set.
14
15 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
16
17 * gcc-interface/gigi.h (pad_type_has_rm_size): Declare.
18 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
19 a padding type for the alignment before validating the size.
20 Flip conditional construct and add a comment.
21 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Make sure to
22 apply the exception for padded objects to the type of the object.
23 * gcc-interface/utils.c (hash_pad_type): New static function.
24 (lookup_and_insert_pad_type): Rename into...
25 (canonicalize_pad_type): ...this. Call hash_pad_type, do only one
26 lookup with insertion and always return the canonical type.
27 (maybe_pad_type): Adjust to above changes. Set debug type later.
28 (pad_type_has_rm_size): New predicate.
29 (set_reverse_storage_order_on_pad_type): Adjust to above changes.
30
31 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
32
33 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Initialize locus.
34
35 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
36
37 * gcc-interface/trans.c (process_freeze_entity): Be prepared for a
38 package without body.
39
40 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
41
42 * gcc-interface/decl.c (gnat_to_gnu_entity): Robustify test for types
43 descendant of System.Address.
44 (gnat_to_gnu_subprog_type): Likewise.
45
46 2017-12-08 Jakub Jelinek <jakub@redhat.com>
47
48 * gcc-interface/utils.c (gnat_internal_attribute_table): Add
49 exclusions to the comment.
50
51 2017-12-07 Martin Sebor <msebor@redhat.com>
52
53 PR c/81544
54 * gcc-interface/utils.c (gnat_internal_attribute_table): Initialize
55 new member of struct attribute_spec.
56
57 2017-12-06 Simon Wright <simon@pushface.org>
58
59 PR ada/66205
60 * bindgen.adb (Gen_AdaFinal): If the restriction No_Task_Termination is
61 set, generate a null body.
62
63 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
64
65 * sem_util.adb (Contains_Refined_State): Remove.
66
67 2017-12-05 Ed Schonberg <schonberg@adacore.com>
68
69 * sem_ch13.adb (Analyze_Aspect_Specifications, case Predicate): A
70 predicate cannot apply to a formal type.
71
72 2017-12-05 Arnaud Charlet <charlet@adacore.com>
73
74 * exp_unst.ads: Fix typos.
75
76 2017-12-05 Jerome Lambourg <lambourg@adacore.com>
77
78 * libgnarl/s-taprop__qnx.adb: Better detect priority ceiling bug in
79 QNX. At startup, the first mutex created has a non-zero ceiling
80 priority whatever its actual policy. This makes some tests fail
81 (c940013 for example).
82
83 2017-12-05 Bob Duff <duff@adacore.com>
84
85 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Call
86 Expand_Cleanup_Actions for N_Extended_Return_Statement.
87 * exp_ch7.adb (Expand_Cleanup_Actions): Handle
88 N_Extended_Return_Statement by transforming the statements into a
89 block, and (indirectly) calling Expand_Cleanup_Actions on the block.
90 It's too hard for Expand_Cleanup_Actions to operate directly on the
91 N_Extended_Return_Statement, because it has a different structure than
92 the other node kinds that Expand_Cleanup_Actions.
93 * exp_util.adb (Requires_Cleanup_Actions): Add support for
94 N_Extended_Return_Statement. Change "when others => return False;" to
95 "when others => raise ...;" so it's clear what nodes this function
96 handles. Use named notation where appropriate.
97 * exp_util.ads: Mark incorrect comment with ???.
98
99 2017-12-05 Javier Miranda <miranda@adacore.com>
100
101 * exp_ch9.adb (Install_Private_Data_Declarations): Add missing
102 Debug_Info_Needed decoration of internally generated discriminal
103 renaming declaration.
104
105 2017-12-05 Arnaud Charlet <charlet@adacore.com>
106
107 * exp_unst.adb (Unnest_Subprogram): Add handling of 'Access on
108 nested subprograms.
109
110 2017-12-05 Sergey Rybin <rybin@adacore.com>
111
112 * doc/gnat_ugn/gnat_utility_programs.rst: Add description of '--ignore'
113 option for gnatmetric, gnatpp, gnat2xml, and gnattest.
114
115 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
116
117 * sem_util.adb (Contains_Refined_State): Remove.
118
119 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
120
121 * rtsfind.ads: Add new enumeration literals: RE_Clock_Time (for
122 Ada.Real_Time.Clock_Time) and RO_CA_Clock_Time (for
123 Ada.Calendar.Clock_Time).
124
125 2017-12-05 Ed Schonberg <schonberg@adacore.com>
126
127 * sem_ch4.adb (Is_Private_Overriding): If the candidate private
128 subprogram is overloaded, scan the list of homonyms in the same
129 scope, to find the inherited operation that may be overridden
130 by the candidate.
131 * exp_ch11.adb, exp_ch7.adb: Minor reformatting.
132
133 2017-12-05 Bob Duff <duff@adacore.com>
134
135 * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
136 Init_Assignment is rewritten, we need to set Assignment_OK on the new
137 node. Otherwise, we will get spurious errors when initializing via
138 assignment statement.
139
140 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
141
142 * sem_elab.adb: Update the terminology and switch sections.
143 (Check_SPARK_Model_In_Effect): New routine.
144 (Check_SPARK_Scenario): Verify the model in effect for SPARK.
145 (Process_Conditional_ABE_Call_SPARK): Verify the model in effect for
146 SPARK.
147 (Process_Conditional_ABE_Instantiation_SPARK): Verify the model in
148 effect for SPARK.
149 (Process_Conditional_ABE_Variable_Assignment_SPARK): Verify the model
150 in effect for SPARK.
151
152 2017-12-05 Nicolas Setton <setton@adacore.com>
153
154 * terminals.c (__gnat_setup_child_communication): As documented,
155 __gnat_setup_child_communication should not terminate - it is intended
156 to be used as the child process of a call to fork(). However, execvp
157 might actually return in some cases, for instance when attempting to
158 run a 32-bit binary on a 64-bit Linux distribution when the
159 compatibility packages are not installed. In these cases, exit the
160 program to conform to the documentation.
161
162 2017-12-05 Olivier Hainque <hainque@adacore.com>
163
164 * libgnat/s-tsmona.adb: Fix for oversight in the tsmona interface
165 update.
166
167 2017-12-05 Gary Dismukes <dismukes@adacore.com>
168
169 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Minor typo fix
170 and reformatting.
171 * gnat_ugn.texi: Regenerate.
172
173 2017-12-05 Olivier Hainque <hainque@adacore.com>
174
175 * sem_util.adb (Set_Convention): Always clear Can_Use_Internal_Rep
176 on access to subprogram types with foreign convention.
177
178 2017-12-05 Yannick Moy <moy@adacore.com>
179
180 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix User's
181 Guide description of default settings of warnings.
182
183 2017-12-05 Olivier Hainque <hainque@adacore.com>
184
185 * s-dwalin.adb (Read_And_Execute_Isn): Adjust test checking for the end
186 of section. Add comments explaining the rationale of the computation.
187
188 2017-12-05 Bob Duff <duff@adacore.com>
189
190 * exp_ch11.adb: Minor refactoring.
191
192 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
193
194 * debug.adb: Add debug switches d_a, d_e, and d_p, along with
195 documentation.
196 (Set_Underscored_Debug_Flag): New routine.
197 * debug.ads: Add the flags for all underscore switches.
198 (Set_Underscored_Debug_Flag): New routine.
199 * einfo.adb: Flag303 is now Suppress_Elaboration_Warnings.
200 (Suppress_Elaboration_Warnings): New routine.
201 (Set_Suppress_Elaboration_Warnings): New routine.
202 (Write_Entity_Flags): Add output for Suppress_Elaboration_Warnings.
203 * einfo.ads: Add new flag Suppress_Elaboration_Warnings.
204 (Suppress_Elaboration_Warnings): New routine along with pragma Inline.
205 (Set_Suppress_Elaboration_Warnings): New routine along with pragma
206 Inline.
207 * exp_ch3.adb (Build_Init_Procedure): Restore the behavior of the
208 legacy elaboration model.
209 (Default_Initialize_Object): Restore the behavior of the legacy
210 elaboration model.
211 * exp_ch9.adb: Add with and use clause for Sem_Elab.
212 (Build_Task_Activation_Call): Restore the behavior of the legacy
213 elaboration model.
214 * frontend.adb (Frontend): Restore the behavior of the legacy
215 elaboration model.
216 * opt.ads: Add new flags Legacy_Elaboration_Checks and
217 Relaxed_Elaboration_Checks, along with documentation.
218 * sem_attr.adb (Analyze_Access_Attribute): Restore the behavior of the
219 legacy elaboration model.
220 * sem_ch5.adb (Analyze_Assignment): Restore the behavior of the legacy
221 elaboration model.
222 * sem_ch7.adb (Analyze_Package_Declaration): Restore the behavior of
223 the legacy elaboration model.
224 * sem_ch8.adb (Attribute_Renaming): Restore the behavior of the legacy
225 elaboration model.
226 * sem_ch12.adb (Analyze_Instance_And_Renamings): Restore the behavior
227 of the legacy elaboration model.
228 (Analyze_Package_Instantiation): Restore the behavior of the legacy
229 elaboration model.
230 (Analyze_Subprogram_Instantiation): Restore the behavior of the legacy
231 elaboration model.
232 * sem_elab.adb: Update the documentation of the Processing phase.
233 Update the documentation on elaboration-related compilation
234 switches. Update the documentation on adding a new target. Add
235 Processing_Attributes which represent the state of the Processing
236 phase. Resurrect the previous elaboration model as "legacy elaboration
237 model".
238 (Build_Call_Marker): This routine does not function when the legacy
239 elaboration model is in effect. Do not consider entry calls and requeue
240 statements when debug flag d_e is in effect. Do not consider calls to
241 subprograms which verify the runtime semantics of certain assertion
242 pragmas when debug flag d_p is in effect.
243 (Build_Variable_Reference_Marker): This routine does not function when
244 the legacy elaboration model is in effect.
245 (Check_Elaboration_Scenarios): This routine does not function when the
246 legacy elaboration model is in effect.
247 (Ensure_Prior_Elaboration): The various flags have now been replaced
248 with a state. Do not generate implicit Elaborate[_All] pragmas when
249 their creation has been suppressed.
250 (Ensure_Prior_Elaboration_Static): The with clause is marked based on
251 the requested pragma, not on the nature of the scenario.
252 (In_External_Context): Removed.
253 (Is_Assertion_Pragma_Target): New routine.
254 (Is_Potential_Scenario): Stop the traversal of a task body when
255 reaching an accept or select statement, and debug switch d_a is in
256 effect.
257 (Kill_Elaboration_Scenario): This routine does not function when the
258 legacy elaboration model is in effect.
259 (Process_Activation_Generic): The various flags have now been replaced
260 with a state.
261 (Process_Conditional_ABE): The various flags have now been replaced
262 with a state.
263 (Process_Conditional_ABE_Access): The various flags have now been
264 replaced with a state.
265 (Process_Conditional_ABE_Activation_Impl): The various flags have now
266 been replaced with a state. Do not process an activation call which
267 activates a task whose type is defined in an external instance, and
268 debug switch dL is in effect. Suppress the generation of implicit
269 Elaborate[_All] pragmas once a conditional ABE check has been
270 installed.
271 (Process_Conditional_ABE_Call): The various flags have now been
272 replaced with a state. Do not process a call which invokes a subprogram
273 defined in an external instance, and debug switch dL is in effect.
274 (Process_Conditional_ABE_Call_Ada): The various flags have now been
275 replaced with a state. Suppress the generation of implicit
276 Elaborate[_All] pragmas once a conditional ABE check has been
277 installed.
278 (Process_Conditional_ABE_Call_SPARK): The various flags have now been
279 replaced with a state.
280 (Process_Conditional_ABE_Instantiation): The various flags have now
281 been replaced with a state.
282 (Process_Conditional_ABE_Instantiation_Ada): The various flags have now
283 been replaced with a state. Suppress the generation of implicit
284 Elaborate[_All] pragmas once a conditional ABE check has been
285 installed.
286 (Process_Conditional_ABE_Instantiation_SPARK): The various flags have
287 now been replaced with a state.
288 (Process_Guaranteed_ABE_Activation_Impl): The various flags have now
289 been replaced with a state.
290 (Process_Single_Activation): The various flags have now been replaced
291 with a state.
292 (Record_Elaboration_Scenario): This routine does not function when the
293 legacy elaboration model is in effect.
294 (Traverse_Body): The various flags have now been replaced with a state.
295 * sem_elab.ads: Resurrect the pre-18.x elaboration model as "legacy
296 elaboration model".
297 * sem_prag.adb (Analyze_Pragma): Restore the behavior of the legacy
298 elaboration model.
299 * sem_res.adb (Resolve_Call): Restore the behavior of the legacy
300 elaboration model.
301 (Resolve_Entity_Name): Restore the behavior of the legacy elaboration
302 model.
303 * sem_util.adb (Mark_Elaboration_Attributes): This routine does not
304 function when the legacy elaboration model is in effect.
305 * sinfo.adb (Is_Known_Guaranteed_ABE): Update the assertion check.
306 (No_Elaboration_Check): New routine.
307 (Set_Is_Known_Guaranteed_ABE): Update the assertion check.
308 (Set_No_Elaboration_Check): New routine.
309 * sinfo.ads: Update the documentation of flag Is_Known_Guaranteed_ABE
310 along with occurrences in nodes. Add new flag No_Elaboration_Check
311 along with occurrences in nodes.
312 * switch-c.adb (Scan_Front_End_Switches): Add processing for debug
313 switches with underscores. Add processing for switches -gnatH and
314 -gnatJ.
315 * usage.adb (Usage): Add output for switches -gnatH and -gnatJ.
316 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
317 documentation to include the legacy and relaxed elaboration models.
318 * gnat_ugn.texi: Regenerate.
319
320 2017-12-05 Arnaud Charlet <charlet@adacore.com>
321
322 * doc/gnat_ugn/platform_specific_information.rst: Minor edit.
323 Improve doc on required packages for linux 32bits.
324
325 2017-12-05 Doug Rupp <rupp@adacore.com>
326
327 * tracebak.c (ppc64-vx7): USE_GCC_UNWINDER for 64bit.
328
329 2017-12-05 Javier Miranda <miranda@adacore.com>
330
331 * checks.adb (Generate_Range_Check): Force evaluation of the node in
332 more cases. This patch was written to improve the code generated by
333 the CCG compiler but it is enabled for all targets since double
334 evaluation is always a potential source of inefficiency.
335
336 2017-12-05 Gary Dismukes <dismukes@adacore.com>
337
338 * doc/gnat_ugn/gnat_utility_programs.rst: Remove reference to obsolete
339 -fdump-xref switch.
340
341 2017-12-05 Eric Botcazou <ebotcazou@adacore.com>
342
343 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use the SLOC of the
344 iteration scheme throughout, except for the new loop statement(s).
345
346 2017-12-05 Ed Schonberg <schonberg@adacore.com>
347
348 * exp_aggr.adb (Gen_Assign): Do not analyze the expressionn of the
349 assignment if it is part of an Iterated_Component_Association: the
350 analysis needs to take place once the loop structure is analyzed and
351 the loop parameter made visible, because references to it typically
352 appear in the corresponding expression. This is necessary if the
353 expression is an aggregate, because previous pre-analysis of the
354 expression does not handle nested aggregates properly.
355
356 2017-12-05 Bob Duff <duff@adacore.com>
357
358 * sem_res.adb (Resolve_Allocator): Avoid coextension processing for an
359 allocator that is the expansion of a build-in-place function call.
360
361 2017-12-05 Olivier Hainque <hainque@adacore.com>
362
363 libgnat/
364 * s-trasym__dwarf.adb (spec of Module_Name.Get): Instead of
365 possibly adjusting the lookup address by a load address, expect
366 a extra argument through which the load address can be conveyed
367 separately.
368 (Multi_Module_Symbolic_Traceback): Adjust accordingly. Pass the
369 retrieved load address to Init_Module.
370 * s-tsmona__linux.adb (Get): Honor the new interface.
371 * s-tsmona__mingw.adb (Get): Likewise.
372 * s-dwalin.ads: Adjust comments to be explicit about which
373 addresses are from module info and which are run-time addresses,
374 offsetted by the module load address.
375 * s-dwalin.adb (Set_Load_Address): Simply set C.Load_Slide.
376 Do not alter the module Low and High (relative) addresses.
377 (Is_Inside): Improve documentation regarding the kinds of addresses
378 at hand and correct the test.
379 (Symbolic_Traceback): Use separate variables with explicit names
380 for the address in traceback (run-time value) and the address to
381 lookup within the shared object (module-relative). Adjust the
382 computation of address passed to Symbolic_Address for symbolization.
383
384 2017-12-05 Arnaud Charlet <charlet@adacore.com>
385
386 * opt.ads (Expand_Nonbinary_Modular_Ops): New flag.
387 * exp_ch4.adb (Expand_Nonbinary_Modular_Op): Use
388 Expand_Nonbinary_Modular_Ops instead of Modify_Tree_For_C, so that
389 other back-ends can also benefit from the front-end expansion. Remove
390 test for Modify_Tree_For_C in all callers to better share code.
391 * gnat1drv.adb (Adjust_Global_Switches): Set
392 Expand_Nonbinary_Modular_Ops when generating C code.
393
394 2017-12-05 Ed Schonberg <schonberg@adacore.com>
395
396 * exp_ch5.adb (Expand_Formal_Container_Loop): Ensure that the loop
397 parameter becomes invisible after analyzing the loop, which has been
398 rewritten as a while-loop.
399
400 2017-12-05 Doug Rupp <rupp@adacore.com>
401
402 * vxaddr2line.adb: Revise and enhance for new ports, remove dead ports,
403 and update for 64bit ports.
404
405 2017-12-05 Bob Duff <duff@adacore.com>
406
407 * exp_ch6.adb (Build_In_Place_Formal): Search for the formal by suffix
408 instead of the full name.
409 * sem_ch6.adb (Create_Extra_Formals): Make sure there are extra formals
410 in the case of an instance of a generic.
411
412 2017-12-05 Arnaud Charlet <charlet@adacore.com>
413
414 (Adjust_Global_Switches): Create an alias GNAT_Annotate to map to
415 pragma Annotate.
416
417 2017-12-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
418
419 * gcc-interface/Makefile.in (RTEMS): Define EH_MECHANISM.
420
421 2017-12-04 Sebastian Huber <sebastian.huber@embedded-brains.de>
422
423 * gcc-interface/Makefile.in (RTEMS): Use s-osprim__rtems.adb.
424 * libgnat/s-osprim__rtems.adb: New file.
425 * libgnarl/s-osinte__rtems.adb (pthread_cond_t): Fix alignment.
426 (pthread_mutexattr_t): Likewise.
427 (pthread_rwlockattr_t): Likewise.
428 (pthread_rwlock_t): Likewise.
429 (time_t): Use 64-bit integer.
430
431 2017-12-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
432
433 * libgnarl/s-osinte__rtems.ads (pthread_cond_t): Use correct size and
434 alignment.
435 (pthread_mutex_t): Likewise.
436 (pthread_rwlock_t): Likewise.
437
438 2017-11-28 Jakub Jelinek <jakub@redhat.com>
439
440 * gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR
441 using build2 instead of build3.
442
443 2017-11-23 Eric Botcazou <ebotcazou@adacore.com>
444
445 PR ada/83091
446 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not build a variant
447 type for the implementation type of a packed array.
448
449 2017-11-23 Mike Stump <mikestump@comcast.net>
450 Eric Botcazou <ebotcazou@adacore.com>
451
452 * gcc-interface/trans.c (gnat_gimplify_stmt) <LOOP_STMT>: Pass 3rd
453 operand to ANNOTATE_EXPR and also pass unrolling hints.
454
455 2017-11-20 Eric Botcazou <ebotcazou@adacore.com>
456
457 PR ada/83016
458 * gnatlink.adb (Process_Args): Accept multiple switches for --LINK.
459 (Usage): Adjust.
460 * gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES).
461 (common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in
462 the invocations of $(GNATLINK).
463 (../../gnatdll$(exeext)): Likewise.
464 (../../vxaddr2line$(exeext)): Likewise.
465 (gnatmake-re): Likewise.
466 (gnatlink-re): Likewise.
467
468 2017-11-16 Doug Rupp <rupp@adacore.com>
469
470 * gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
471
472 2017-11-16 Steve Baird <baird@adacore.com>
473
474 * debug.adb: Update another comment to indicate gnat2scil's use of the
475 -gnatd.7 switch.
476
477 2017-11-16 Bob Duff <duff@adacore.com>
478
479 * exp_ch6.adb (Expand_Call_Helper): Avoid creating a transient scope in
480 the case of nested build-in-place calls.
481
482 2017-11-16 Joel Brobecker <brobecker@adacore.com>
483
484 * doc/gnat_ugn/gnat_utility_programs.rst: Document the switches
485 available in gnatsymbolize.
486
487 2017-11-16 Steve Baird <baird@adacore.com>
488
489 * debug.adb: Update comment to indicate gnat2scil's use of the -gnatd.7
490 switch.
491
492 2017-11-16 Gary Dismukes <dismukes@adacore.com>
493
494 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, sem_ch6.adb,
495 sem_elab.adb: Minor editorial corrections.
496 * gnat_ugn.texi: Regenerate.
497
498 2017-11-16 Joel Brobecker <brobecker@adacore.com>
499
500 * doc/gnat_ugn/gnat_utility_programs.rst (GNAT UGN): Add
501 gnatsymbolize documentation.
502 * gnat_ugn.texi: Regenerate.
503
504 2017-11-16 Steve Baird <baird@adacore.com>
505
506 * sem_ch3.adb (Build_Derived_Record_Type): Replace all uses of
507 "Scope (Parent_Type)" with "Scope (Parent_Base)".
508
509 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
510
511 * opt.ads: Elaboration warnings are now on by default. Add a comment
512 explaining why this is needed.
513 * sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration
514 warnings.
515 * sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of
516 elaboration warnings.
517 (Analyze_Subprogram_Instantiation): Preserve the status of elaboration
518 warnings.
519 * sem_elab.adb: Update the structure of Call_Attributes and
520 Instantiation_Attributes.
521 (Build_Call_Marker): Propagate the status of elaboration warnings from
522 the call to the marker.
523 (Extract_Call_Attributes): Extract the status of elaboration warnings.
524 (Extract_Instantiation_Attributes): Extract the status of elaboration
525 warnings.
526 (Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are
527 now dependent on the status of elaboration warnings.
528 (Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now
529 dependent on the status of elaboration warnings.
530 (Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics
531 are now dependent on the status of elaboration warnings.
532 (Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced
533 for formal Call_Attrs. Elaboration diagnostics are now dependent on the
534 status of elaboration warnings.
535 (Process_Guaranteed_ABE_Call): Elaboration diagnostics are now
536 dependent on the status of elaboration warnings.
537 (Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now
538 dependent on the status of elaboration warnings.
539 * sem_prag.adb (Analyze_Pragma): Remove the unjustified warning
540 concerning pragma Elaborate.
541 * sem_res.adb (Resolve_Call): Preserve the status of elaboration
542 warnings.
543 (Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node
544 from the procedure call to the entry call.
545 * sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter
546 Warnings.
547 (Mark_Elaboration_Attributes_Node): Preserve the status of elaboration
548 warnings
549 * sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter
550 Warnings. Update the comment on usage.
551 * sinfo.adb (Is_Dispatching_Call): Update to use Flag6.
552 (Is_Elaboration_Warnings_OK_Node): New routine.
553 (Set_Is_Dispatching_Call): Update to use Flag6.
554 (Set_Is_Elaboration_Warnings_OK_Node): New routine.
555 * sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new
556 attribute Is_Elaboration_Warnings_OK_Node along with occurrences
557 in nodes.
558 (Is_Elaboration_Warnings_OK_Node): New routine along with pragma
559 Inline.
560 (Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma
561 Inline.
562 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various
563 sections to indicate how to suppress elaboration warnings. Document
564 switches -gnatwl and -gnatwL.
565 * gnat_ugn.texi: Regenerate.
566
567 2017-11-16 Sylvain Dailler <dailler@adacore.com>
568
569 * sem_util.adb (Get_Enum_Lit_From_Pos): Add a condition for Pos
570 lower than 0.
571
572 2017-11-16 Bob Duff <duff@adacore.com>
573
574 * sem_ch13.adb (Check_Expr_Constants): Avoid error message in case of
575 System'To_Address.
576
577 2017-11-16 Yannick Moy <moy@adacore.com>
578
579 * sem_elab.adb (Include): Fix mode of parameter Curr to out.
580
581 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
582
583 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Allow calls where
584 Context_Id denotes a record type.
585
586 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
587
588 * sem_ch8.adb (Check_SPARK_Primitive_Operation): Enable the check in
589 instantiations.
590
591 2017-11-16 Doug Rupp <rupp@adacore.com>
592
593 Initial gnat port to aarch64-wrs-vxworks7
594 * libgnarl/s-vxwork__aarch64.ads,
595 libgnat/system-vxworks7-aarch64-rtp-smp.ads,
596 libgnat/system-vxworks7-aarch64.ads: New files
597 * sigtramp-vxworks-target.inc (aarch64): New section.
598 * tracebak.c (USE_ARM_UNWINDING): Disable for ARMARCH8A.
599
600 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
601
602 * sem_elab.adb (Include): Including a node which is also a compilation
603 unit terminates the search because there are no more lists to examine.
604
605 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
606
607 * sem_ch8.adb (Analyze_Subprogram_Renaming): Ensure that a renaming
608 declaration does not define a primitive operation of a tagged type for
609 SPARK.
610 (Check_SPARK_Primitive_Operation): New routine.
611
612 2017-11-16 Arnaud Charlet <charlet@adacore.com>
613
614 * libgnat/a-elchha.adb (Last_Chance_Handler): Display Argv (0) in
615 message when using -E binder switch.
616
617 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
618
619 * errout.ads: Fix minor typo in comment.
620
621 2017-11-16 Ed Schonberg <schonberg@adacore.com>
622
623 * sem_ch3.adb (Process_Subtype): If the subtype indication does not
624 syntactically denote a type, return Any_Type to prevent subsequent
625 compiler crashes or infinite loops.
626
627 2017-11-16 Steve Baird <baird@adacore.com>
628
629 * lib-writ.adb: Fix bug which causes Program_Error to be raised in some
630 cases when writing out a .ali file when a Rename_Pragma pragma is in
631 effect.
632 * lib-writ.adb (Write_Unit_Information): Replace call to
633 Pragma_Name_Unmapped with call to Pragma_Name.
634
635 2017-11-16 Gary Dismukes <dismukes@adacore.com>
636
637 * sem_elab.adb: Minor typo fixes.
638
639 2017-11-16 Justin Squirek <squirek@adacore.com>
640
641 * sem_res.adb (Resolve_Allocator): Correct warning messages and make
642 them more explicit.
643
644 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
645
646 * atree.ads (Nkind_In): Add 10 and 11 parameter versions.
647 * checks.adb (Install_Primitive_Elaboration_Check): Mark the setting of
648 the elaboration flag as elaboration code.
649 * einfo.adb (Contract): Update the comments.
650 (Ignore_SPARK_Mode_Pragmas): Update the comments.
651 (SPARK_Aux_Pragma): Update the comments.
652 (SPARK_Aux_Pragma_Inherited): Update the comments.
653 (SPARK_Pragma): Update the comments. The attribute now applies
654 to all types and abstract states.
655 (SPARK_Pragma_Inherited): Update the comments. The attribute now
656 applies to all types and abstract states.
657 (Set_Contract): Update the comments.
658 (Set_Ignore_SPARK_Mode_Pragmas): Update the comments.
659 (Set_SPARK_Aux_Pragma): Update the comments.
660 (Set_SPARK_Aux_Pragma_Inherited): Update the comments.
661 (Set_SPARK_Pragma): Update the comments. The attribute now applies to
662 all types and abstract states.
663 (Set_SPARK_Pragma_Inherited): Update the comments. The attribute now
664 applies to all types and abstract states.
665 (Write_Field40_Name): Add output for SPARK_Pragma when it appears on a
666 type and abstract states.
667 * einfo.ads: Update the documentation of attributes SPARK_Pragma and
668 SPARK_Pragma_Inherited. Both of them now apply to all types and
669 abstract states.
670 * exp_util.adb (Set_Elaboration_Flag): Mark the setting of the
671 elaboration flag as elaboration code.
672 * sem_ch3.adb: Add with and use clauses for Sem_Elab.
673 (Analyze_Full_Type_Declaration): Set the SPARK_Mode of the type. Record
674 a derived type for later processing by the ABE mechanism.
675 (Analyze_Incomplete_Type_Decl): Set the SPARK_Mode of the type.
676 (Analyze_Private_Extension_Declaration): Set the SPARK_Mode of the
677 type.
678 * sem_ch7.adb (Analyze_Private_Type_Declaration): Set the SPARK_Mode of
679 the type.
680 * sem_elab.adb: Define the term "early call region". Update the
681 terminology for "scenario" and "target". Update the architecture of
682 the ABE mechanism. Update the steps which must be taken when adding a
683 new scenario. Update the section on debugging ABE issues. Add new
684 hash tables Early_Call_Regions and Recorded_SPARK_Scenarios. Add new
685 table SPARK_Scenarios. Hash table Elaboration_Context is now
686 Elaboration_Statuses. The majority of Process_xxx routines have been
687 updated to better reflect their role.
688 (Add_Unit): Reimplemented.
689 (Check_Elaboration_Constituent): New routine.
690 (Check_Elaboration_Scenarios): Verify previously recorded scenarios for
691 conditional ABE issues. Verify previously recorded SPARK scenarios.
692 (Check_SPARK_Derived_Type): New routine.
693 (Check_SPARK_Instantiation): New routine.
694 (Check_SPARK_Scenario): New routine.
695 (Check_SPARK_Refined_State_Pragma): New routine.
696 (Early_Call_Region): New routine.
697 (Elaboration_Status): New routine.
698 (Ensure_Prior_Elaboration): Add new formal parameter Prag_Nam. The
699 implicit Elabotate[_All] pragma is now specified via Prag_Nam.
700 (Find_Early_Call_Region): New routine.
701 (Info_Scenario): Add output for refinement constituents.
702 (Is_Recorded_SPARK_Scenario): New routine.
703 (Is_Suitable_SPARK_Derived_Type): New routine.
704 (Is_Suitable_SPARK_Instantiation): New routine.
705 (Is_Suitable_SPARK_Refined_State_Pragma): New routine.
706 (Is_Visited_Body): New routine.
707 (Kill_Elaboration_Scenario): Reimplemented.
708 (Output_Active_Scenarios): Add output for pragma Refined_State.
709 (Output_SPARK_Refined_State_Pragma): New routine.
710 (Process_Conditional_ABE_Call): Remove the use of -gnatd.v. The effect
711 is now achieved by different means.
712 (Process_Conditional_ABE_Call_SPARK): Verify that a call which precedes
713 the subprogram body appears within the early call region of the body.
714 Either ensure the prior elaboration of external subprograms or verify
715 that the context meets the suitable elaboration requirement.
716 (Process_Conditional_ABE_Instantiation_SPARK): New routine.
717 (Record_Elaboration_Scenario): Reimplement the portion which enforces
718 the level restrictions of the static model. Add support for SPARK
719 scenarios.
720 (Record_SPARK_Elaboration_Scenario): New routine.
721 (Reset_Visited_Bodies): New routine.
722 (Set_Early_Call_Region): New routine.
723 (Set_Elaboration_Status): New routine.
724 (Set_Is_Recorded_SPARK_Scenario): New routine.
725 (Update_Elaboration_Scenario): Reimplemented.
726 * sem_elab.ads: Add new subtype Library_Or_Instantiation_Level.
727 * sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Save the pragma
728 for examination by the ABE Processing phase.
729 (Create_Abstract_State): Save the SPARK_Mode from the context.
730 * sem_util.adb (Is_Non_Preelaborable_Construct): New routine.
731 * sem_util.ads (Is_Non_Preelaborable_Construct): New routine.
732 * sinfo.adb (Is_Elaboration_Code): New routine.
733 (Set_Is_Elaboration_Code): New routine.
734 (Nkind_In): Add 10 and 11 parameter versions.
735 * sinfo.ads: Add new attribute Is_Elaboration_Code along with
736 occurrences in nodes.
737 (Is_Elaboration_Code): New routine along with pragma Inline.
738 (Set_Is_Elaboration_Code): New routine along with pragma Inline.
739 (Nkind_In): Add 10 and 11 parameter versions.
740
741 2017-11-16 Justin Squirek <squirek@adacore.com>
742
743 * sem.adb (Analyze): Remove requirement that the original node of N be
744 an operator in the case that analysis on the node yields the relevant
745 operator - so prefer it instead.
746
747 2017-11-16 Bob Duff <duff@adacore.com>
748
749 * sem_ch6.adb (Create_Extra_Formals): The type of the BIP_Object_Access
750 formal must not have a designated type that is the full view coming
751 from a limited-with'ed package.
752 * sem_util.adb,sem_util.ads (Incomplete_View_From_Limited_With): New
753 function called from sem_ch6.
754 * sem_ch5.adb (Analyze_Assignment): Treat user-defined concatenation
755 specially for b-i-p cases.
756
757 2017-11-10 Martin Sebor <msebor@redhat.com>
758
759 PR c/81117
760 * adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
761 * argv.c (__gnat_fill_arg, __gnat_fill_env): Likewise.
762
763 2017-11-10 Eric Botcazou <ebotcazou@adacore.com>
764
765 * gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
766 not fall through to the next case.
767 <ARRAY_TYPE>: Deal specially with a dereference from another array
768 type with the same element type.
769
770 2017-11-09 Gary Dismukes <dismukes@adacore.com>
771
772 * exp_util.adb, freeze.adb: Minor reformatting.
773
774 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
775
776 * gcc-interface/Makefile.in: Add rules to build aarch64-qnx runtimes.
777
778 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
779
780 * gcc-interface/trans.c (gnat_to_gnu): Add processing for
781 N_Variable_Reference_Marker nodes.
782
783 2017-11-09 Ed Schonberg <schonberg@adacore.com>
784
785 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
786 the pragma Compile_Time_Error when it appears in a generic package
787 declaration and uses an expanded name to denote the current unit.
788
789 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
790
791 * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
792 * tracebak.c: Add support for tracebacks in QNX.
793
794 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
795
796 * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
797
798 2017-11-09 Yannick Moy <moy@adacore.com>
799
800 * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
801 justification.
802
803 2017-11-09 Joel Brobecker <brobecker@adacore.com>
804
805 * doc/gnat_ugn/platform_specific_information.rst: Document packages
806 needed on GNU/Linux by GNAT.
807 * gnat_ugn.texi: Regenerate.
808
809 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
810
811 * contracts.adb (Analyze_Contracts): Remove the three parameter
812 version. This routine now only analyzes contracts and does not perform
813 any freezing actions.
814 (Analyze_Previous_Contracts): Removed.
815 (Freeze_Previous_Contracts): New routine.
816 * contracts.ads (Analyze_Previous_Contracts): Removed.
817 (Freeze_Previous_Contracts): New routine.
818 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
819 enclosing package spec regardless of whether the list denotes the
820 visible or private declarations. Fix the removal of partial state
821 refinements when the context is a package spec.
822 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
823 contracts.
824 * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
825 * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
826 (Analyze_Protected_Body): Freeze previous contracts.
827 (Analyze_Task_Body): Freeze previous contracts.
828 * sem_prag.adb: Comment reformatting.
829
830 2017-11-09 Bob Duff <duff@adacore.com>
831
832 * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
833 Export this so users can use it without importing
834 System.Tasking.Utilities.
835 * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
836 that fails when Make_Independent is called on a user task.
837 * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
838 capitalization style ((style) bad casing of "Master_of_Task").
839
840 2017-11-09 Ed Schonberg <schonberg@adacore.com>
841
842 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
843 uninitialized variable uncovered by Codepeer.
844
845 2017-11-09 Arnaud Charlet <charlet@adacore.com>
846
847 * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
848
849 2017-11-09 Javier Miranda <miranda@adacore.com>
850
851 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
852 (Static_Dispatch_Tables): Minor rewording.
853 * gnat_rm.texi: Regenerate.
854
855 2017-11-09 Justin Squirek <squirek@adacore.com>
856
857 * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
858 use_clauses within instances.
859 (Use_One_Package): Add condition to check for "hidden" open scopes to
860 avoid skipping over packages that have not been properly installed even
861 though they are visible.
862
863 2017-11-09 Ed Schonberg <schonberg@adacore.com>
864
865 * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
866 private operation of a protected type, when the type has no visible
867 operations.
868
869 2017-11-09 Javier Miranda <miranda@adacore.com>
870
871 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
872 * exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
873 if available.
874
875 2017-11-09 Bob Duff <duff@adacore.com>
876
877 * exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
878 sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
879 sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
880 variables.
881
882 2017-11-09 Yannick Moy <moy@adacore.com>
883
884 * exp_disp.adb (Make_DT): Default initialize Ifaces_List and
885 Ifaces_Comp_List.
886
887 2017-11-09 Pascal Obry <obry@adacore.com>
888
889 * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
890 only for foreign threads. We initialize the thread handle only if not
891 yet initialized. This happens in Enter_Task for foreign threads only.
892 But for native threads (Ada tasking) we do want to keep the real
893 handle (from Create_Task) to be able to free the corresponding
894 resources in Finalize_TCB (CloseHandle).
895
896 2017-11-09 Yannick Moy <moy@adacore.com>
897
898 * sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
899 P_Base_Type.
900 (Error_Attr_P): Fix name in pragma No_Return.
901 (Unexpected_Argument): Add pragma No_Return.
902 (Placement_Error): Add pragma No_Return.
903
904 2017-11-09 Javier Miranda <miranda@adacore.com>
905
906 * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
907 dispatch table is statically built.
908 (Make_DT): Declare constant the Interface_Table object associated with
909 an statically built dispatch table. For this purpose the Offset_To_Top
910 value of each interface is computed using the dummy object.
911 * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
912 the Offset_To_Top field of secondary dispatch tables when the dispatch
913 table is statically built.
914 (Initialize_Tag): Do not generate calls to Register_Interface_Offset
915 when the dispatch table is statically built.
916 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
917 Document the new GNAT restriction Static_Dispatch_Tables.
918 * gnat_rm.texi: Regenerate.
919
920 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
921
922 * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
923 to avoid a dormant bug.
924
925 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
926
927 * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
928 as such capability is not available on the OS.
929 * link.c: Make sure linker options for QNX are correct.
930 * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
931 * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
932 in particular a workaround with locks priority ceiling where a higher
933 priority task is allowed to lock a lower ceiling priority lock. This
934 also fixes the scheduling of FIFO tasks when the priority of a task is
935 lowered.
936 * libgnat/system-qnx-aarch64.ads: Fix priority ranges.
937
938 2017-11-09 Yannick Moy <moy@adacore.com>
939
940 * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
941 message.
942 * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
943 condition.
944 * namet.adb (Copy_One_Character): Add assumption for static analysis,
945 as knowledge that Hex(2) is in the range 0..255 is too complex for
946 CodePeer.
947 (Finalize): Add assumption for static analysis, as the fact that there
948 are symbols in the table depends on a global invariant at this point in
949 the program.
950 * set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
951 * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
952 true.
953
954 2017-11-09 Javier Miranda <miranda@adacore.com>
955
956 * libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
957 * exp_disp.adb (Building_Static_DT): Check restriction.
958 (Building_Static_Secondary_DT): Check restriction.
959 (Make_DT): Initialize the HT_Link to No_Tag.
960 * opt.ads (Static_Dispatch_Tables): Rename flag...
961 (Building_Static_Dispatch_Tables): ... into this. This will avoid
962 conflict with the restriction name.
963 * gnat1drv.adb: Update.
964 * exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
965 * exp_ch3.adb (Expand_N_Object_Declaration): Update.
966
967 2017-11-09 Pascal Obry <obry@adacore.com>
968
969 * libgnarl/s-taprop__mingw.adb: Minor code clean-up. Better using a
970 named number.
971
972 2017-11-09 Yannick Moy <moy@adacore.com>
973
974 * binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
975 * checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
976 use. Default initialize Hi, Lo.
977 (Selected_Range_Checks): Retype Num_Checks more precisely.
978 (Determine_Range, Determine_Range_R): Default initialize Hi_Right,
979 Lo_Right.
980 * contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
981 Unmodified.
982 (Process_Postconditions): Mark parameter Stmts as Unmodified.
983 * exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
984 * exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
985 (Expand_Concatenate): Default initialize High_Bound.
986 (Optimize_Length_Comparison): Default initialize Ent, Index.
987 * exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
988 L_Lo.
989 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
990 Return_Stmt.
991 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
992 remove pragma Warnings(Off).
993 * exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
994 * exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
995 * freeze.adb (Check_Component_Storage_Order): Default initialize
996 Comp_Byte_Aligned rather than silencing messages with pragma
997 Warnings(Off), which does not work for CodePeer initialization
998 messages, and given that here the possible read of an unitialized value
999 depends on a proper use of parameters by the caller.
1000 * inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
1001 * sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
1002 * sem_ch3.adb (Build_Derived_Array_Type): Default initialize
1003 Implicit_Base.
1004 * sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
1005 pragma Warnings(Off).
1006 (Analyze_Case_Expression): Rescope checking block within branch where
1007 Others_Present is set by the call to Check_Choices.
1008 * sem_ch5.adb (Analyze_Assignment): Default initialize
1009 Save_Full_Analysis.
1010 * sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
1011 and restructure code to defend against previous errors, so that, in
1012 that case, control does not flow to the elsif condition which read an
1013 uninitialized Obj_Decl.
1014 * sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
1015 (Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
1016 which seem to be left uninitialized and possibly read in some cases.
1017 * sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
1018 precisely. This requires to exchange the test for exiting in case of
1019 too many positions and the increment to Position, inside the loop.
1020 * sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
1021 which cannot be read uninitialized, but the reasons for that are quite
1022 subtle.
1023 * sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
1024 * sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
1025 Spec_Id.
1026 * sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
1027 and test for presence of non-null Opnd_Type before testing its scope,
1028 in a test which would read its value uninitialized, and is very rarely
1029 exercized (it depends on the presence of an extension of System).
1030 * sem_spark.ads: Update comment to fix name of main analysis procedure.
1031 * sem_warn.adb (Warn_On_Known_Condition): Default initialize
1032 Test_Result.
1033 * set_targ.adb (FailN): Mark procedure with No_Return.
1034 * stylesw.adb (Save_Style_Check_Options): Delete useless code to
1035 initialize all array Options to white space, as there is already code
1036 doing the same for the remaining positions in Options at the end of the
1037 procedure.
1038
1039 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1040
1041 * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
1042 generic instantiations either.
1043
1044 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1045
1046 * sem_prag.adb (Analyze_Part_Of): Reword error message.
1047 (Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
1048 SPARK_Mode appears with an illegal mode, treat this as a non-existent
1049 mode.
1050
1051 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1052
1053 * sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
1054 a limited view of a type T declared in unit U1, when the function is
1055 declared in another unit U2 and the call appears in a procedure within
1056 another unit.
1057
1058 2017-11-09 Justin Squirek <squirek@adacore.com>
1059
1060 * sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
1061 when processing generic instances.
1062
1063 2017-11-09 Bob Duff <duff@adacore.com>
1064
1065 * namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
1066 Error_Name and No_Name. Use this (versus Name_Id) to indicate which
1067 objects can have those special values. Valid_Name_Id could usefully be
1068 used all over the compiler front end, but that's too much trouble for
1069 now. If we did that, we might want to rename:
1070 Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
1071 For parameters of type Valid_Name_Id, remove some redundant tests,
1072 including the ones found by CodePeer. Use Is_Valid_Name instead of
1073 membership test when appropriate.
1074 (Error_Name_Or_No_Name): Delete this; it's no longer needed.
1075 * sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
1076 "in Error_Name_Or_No_Name".
1077 (Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
1078 Error_Name_Or_No_Name".
1079
1080 2017-11-09 Arnaud Charlet <charlet@adacore.com>
1081
1082 * gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
1083 mode here unless -gnateC is specified.
1084 * switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
1085 -gnatC here.
1086
1087 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1088
1089 * lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
1090 part of the ALI writing; they are now processed directly from memory
1091 when requested by the backend.
1092 * lib-xref.ads (Collect_SPARK_Xrefs): Remove.
1093 (Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
1094 * lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
1095 (Add_SPARK_File): Remove.
1096 (Add_SPARK_Xref): Refactored from removed code; filters xref entries
1097 that are trivially uninteresting to the SPARK backend.
1098 * spark_xrefs.ads: Remove code that is no longer needed.
1099 * spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
1100
1101 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1102
1103 * sem_elab.adb: Update the documentation on adding a new elaboration
1104 schenario. Add new hash table Recorded_Top_Level_Scenarios.
1105 (Is_Check_Emitting_Scenario): Removed.
1106 (Is_Recorded_Top_Level_Scenario): New routine.
1107 (Kill_Elaboration_Scenario): Reimplemented.
1108 (Record_Elaboration_Scenario): Mark the scenario as recorded.
1109 (Set_Is_Recorded_Top_Level_Scenario): New routine.
1110 (Update_Elaboration_Scenario): Reimplemented.
1111 * sinfo.adb (Is_Recorded_Scenario): Removed.
1112 (Set_Is_Recorded_Scenario): Removed.
1113 * sinfo.ads: Remove attribute Is_Recorded_Scenario along with
1114 occurrences in nodes.
1115 (Is_Recorded_Scenario): Removed along with pragma Inline.
1116 (Set_Is_Recorded_Scenario): Removed along with pragma Inline.
1117
1118 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1119
1120 * sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
1121 error message.
1122
1123 2017-11-09 Justin Squirek <squirek@adacore.com>
1124
1125 * sem_res.adb (Resolve_Allocator): Add warning messages corresponding
1126 to the allocation of an anonymous access-to-controlled object.
1127
1128 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1129
1130 * sigtramp-qnx.c: Fix obvious typo.
1131
1132 2017-11-09 Doug Rupp <rupp@adacore.com>
1133
1134 * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
1135
1136 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1137
1138 * sem_res.adb (Resolve): If expression is an entity whose type has
1139 implicit dereference, generate reference to it, because no reference is
1140 generated for an overloaded entity during analysis, given that its
1141 identity may not be known.
1142
1143 2017-11-09 Javier Miranda <miranda@adacore.com>
1144
1145 * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
1146 offset-to-top field by addition.
1147 (Make_Secondary_DT): Initialize the offset-to-top field with a negative
1148 offset.
1149 * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
1150 return a negative offset-to-top value.
1151 (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
1152 Set_Static_Offset_To_Top passing a negative offet-to-top value;
1153 initialize also the offset-to-top field with a negative offset.
1154 * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
1155 an addition since the offset-to-top field is now a negative value.
1156 (Displace): Displace the pointer to the object means of a substraction
1157 since it is now a negative value.
1158 (Set_Dynamic_Offset_to_top): Displace the pointer to the object by
1159 means of a substraction since it is now a negative value.
1160
1161 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1162
1163 * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
1164 before Errout.Output_Messages also in the case of compilation errors.
1165
1166 2017-11-09 Javier Miranda <miranda@adacore.com>
1167
1168 * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
1169 the Class Level): Fix error interfacing with C strings.
1170 * gnat_ugn.texi: Regenerate.
1171
1172 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1173
1174 * system-qnx-aarch64.ads: Fix the priority constants.
1175 * s-osinte__qnx.ads: Fix constants for handling the locking protocols
1176 and scheduling.
1177 * s-osinte__qnx.adb: New file , prevents the use of priority 0 that
1178 corresponds to an idle priority on QNX.
1179
1180 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1181
1182 * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
1183 comments.
1184
1185 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1186
1187 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
1188 in expression funtions that are expanded into variables.
1189
1190 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1191
1192 * sem_util.adb: Minor whitespace cleanup.
1193
1194 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1195
1196 * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
1197 s-taprop version rather than a custom one.
1198 * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
1199
1200 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1201
1202 * lib-xref.ads, lib-xref-spark_specific.adb
1203 (Traverse_Compilation_Unit): Move declaration to package body.
1204
1205 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1206
1207 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
1208 the type of the renaming from its defining entity, rather then the
1209 subtype mark as there may not be a subtype mark.
1210
1211 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1212
1213 * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
1214 libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
1215 libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
1216 libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
1217 terminals.c: Initial port of GNAT for aarch64-qnx
1218
1219 2017-11-08 Elisa Barboni <barboni@adacore.com>
1220
1221 * exp_util.adb (Find_DIC_Type): Move...
1222 * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
1223
1224 2017-11-08 Justin Squirek <squirek@adacore.com>
1225
1226 * sem_res.adb (Resolve_Allocator): Add info messages corresponding to
1227 the owner and corresponding coextension.
1228
1229 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1230
1231 * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
1232 following separate procedures.
1233 (Resolve_Delta_Array_Aggregate): Previous code form
1234 Resolve_Delta_Aggregate.
1235 (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
1236 ARG decisions on the legality rules for delta aggregates for records:
1237 in the case of a variant record, components from different variants
1238 cannot be specified in the delta aggregate, and this must be checked
1239 statically.
1240
1241 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1242
1243 * spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
1244 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1245 removed component.
1246
1247 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1248
1249 * sem_ch4.adb: Minor typo fix.
1250
1251 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1252
1253 * spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
1254 Spec_Scope_Num components.
1255 * spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
1256 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1257 removed components.
1258 (Collect_SPARK_Xrefs): Skip setting proper values of removed
1259 components.
1260
1261 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1262
1263 * exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
1264 name is a discriminant in check for unconditional accessibility
1265 violation within instances.
1266
1267 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1268
1269 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
1270 for constants (with variable input).
1271 (Is_Constant_Object_Without_Variable_Input): Remove.
1272
1273 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1274
1275 * exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
1276
1277 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1278
1279 * spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
1280 cross-references.
1281 (dspark): Remove hardcoded table bound.
1282
1283 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1284
1285 * sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
1286 the type of the base of the construct to determine the type (or
1287 candidate interpretations) of the delta aggregate. This allows the
1288 construct to appear in a context that expects a private extension.
1289 * sem_res.adb (Resolve): Handle properly a delta aggregate with an
1290 overloaded base.
1291
1292 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1293
1294 * spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
1295 with Entity_Id of the reference.
1296 * spark_xrefs.adb (dspark): Adapt pretty-printing routine.
1297 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
1298 reference, not the file and scope indices.
1299
1300 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1301
1302 * errout.ads (Current_Node): New.
1303 * errout.adb (Error_Msg): Use Current_Node.
1304 * par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
1305 when relevant.
1306 * style.adb: Call Error_Msg_N when possible.
1307
1308 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1309
1310 * spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
1311 Entity.
1312 * lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
1313 the Scope_Id record component.
1314
1315 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1316
1317 * spark_xrefs.ads (SPARK_File_Record): Remove string components.
1318 * spark_xrefs.adb (dspark): Remove pretty-printing of removed
1319 SPARK_File_Record components.
1320 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
1321 representation of files/units.
1322
1323 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1324
1325 * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
1326 Remove Inside_Stubs parameter.
1327
1328 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1329
1330 * spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
1331 represented by Entity_Id.
1332 (SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
1333 represented by Entity_Id; this information is not repeated as
1334 Scope_Entity.
1335 (Heap): Moved from lib-xref-spark_specific.adb, to reside next to
1336 Name_Of_Heap_Variable.
1337 * spark_xrefs.adb (dspark): Adapt debug routine to above changes in
1338 data types.
1339 * lib-xref-spark_specific.adb: Adapt routines for populating SPARK
1340 scope and xrefs tables to above changes in data types.
1341
1342 2017-11-08 Justin Squirek <squirek@adacore.com>
1343
1344 * sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
1345 primitives of generic actuals.
1346 (Mark_Use_Type): Add recursive call to properly mark class-wide type's
1347 base type clauses as per ARM 8.4 (8.2/3).
1348
1349 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1350
1351 * sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
1352 categorization dependency of the body, as is done for non-generic
1353 units.
1354 (New_Overloaded_Entity, Visible_Part_Type): Remove linear search
1355 through declarations (Simple optimization, no behavior change).
1356
1357 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1358
1359 * spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
1360 (SPARK_Scope_Record): Remove inessential components.
1361 * spark_xrefs.adb (dspark): Remove pretty-printing of removed record
1362 components.
1363 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
1364 removed record components.
1365 (Add_SPARK_Xrefs): Remove setting of removed record components.
1366
1367 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1368
1369 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
1370 empty entities.
1371
1372 2017-11-08 Javier Miranda <miranda@adacore.com>
1373
1374 * sem_disp.adb (Is_Inherited_Public_Operation): Extend the
1375 functionality of this routine to handle multiple levels of derivations.
1376
1377 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1378
1379 * einfo.adb: Elist36 is now used as Nested_Scenarios.
1380 (Nested_Scenarios): New routine.
1381 (Set_Nested_Scenarios): New routine.
1382 (Write_Field36_Name): New routine.
1383 * einfo.ads: Add new attribute Nested_Scenarios along with occurrences
1384 in entities.
1385 (Nested_Scenarios): New routine along with pragma Inline.
1386 (Set_Nested_Scenarios): New routine along with pragma Inline.
1387 * sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
1388 (Process_Nested_Scenarios): New routine.
1389 (Traverse_Body): When a subprogram body is traversed for the first
1390 time, find, save, and process all suitable scenarios found within.
1391 Subsequent traversals of the same subprogram body utilize the saved
1392 scenarios.
1393
1394 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1395
1396 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
1397 protected operations.
1398 (Add_SPARK_Xrefs): Simplify detection of empty entities.
1399 * get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
1400 put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
1401 reading and testing SPARK cross-references stored in the ALI files.
1402 * lib-xref.ads (Output_SPARK_Xrefs): Remove.
1403 * lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
1404 ALI file.
1405 * spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
1406 with description of the SPARK xrefs ALI format.
1407 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
1408 and put_spark_refs.o.
1409
1410 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1411
1412 * exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
1413 when the associated access type is subject to pragma
1414 No_Heap_Finalization.
1415 * exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
1416 designated type in case it comes from a limited withed unit.
1417
1418 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1419
1420 * exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
1421 SPARK-related flags. Add ??? comment.
1422 * exp_util.adb (Insert_Actions): Add an entry for node
1423 N_Variable_Reference_Marker.
1424 * sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
1425 * sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
1426 and record a variable reference marker for the current name.
1427 (Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
1428 a variable reference marker for the current name.
1429 * sem_elab.adb (Build_Variable_Reference_Marker): New routine.
1430 (Extract_Variable_Reference_Attributes): Reimplemented.
1431 (Info_Scenario): Add output for variable references and remove output
1432 for variable reads.
1433 (Info_Variable_Read): Removed.
1434 (Info_Variable_Reference): New routine.
1435 (Is_Suitable_Scenario): Variable references are now suitable scenarios
1436 while variable reads are not.
1437 (Output_Active_Scenarios): Add output for variable references and
1438 remove output for variable reads.
1439 (Output_Variable_Read): Removed.
1440 (Output_Variable_Reference): New routine.
1441 (Process_Variable_Read): Removed.
1442 (Process_Variable_Reference): New routine.
1443 (Process_Variable_Reference_Read): New routine.
1444 * sem_elab.ads (Build_Variable_Reference_Marker): New routine.
1445 * sem_res.adb (Resolve_Actuals): Build and record a variable reference
1446 marker for the current actual.
1447 * sem_spark.adb (Check_Node): Add an entry for node
1448 N_Variable_Reference_Marker.
1449 * sem_util.adb (Within_Subprogram_Call): Moved to the library level.
1450 * sem_util.ads (Within_Subprogram_Call): Moved to the library level.
1451 * sinfo.adb (Is_Read): New routine.
1452 (Is_Write): New routine.
1453 (Target): Updated to handle variable reference markers.
1454 (Set_Is_Read): New routine.
1455 (Set_Is_Write): New routine.
1456 (Set_Target): Updated to handle variable reference markers.
1457 * sinfo.ads: Add new attributes Is_Read and Is_Write along with
1458 occurrences in nodes. Update attribute Target. Add new node
1459 kind N_Variable_Reference_Marker.
1460 (Is_Read): New routine along with pragma Inline.
1461 (Is_Write): New routine along with pragma Inline.
1462 (Set_Is_Read): New routine along with pragma Inline.
1463 (Set_Is_Write): New routine along with pragma Inline.
1464 * sprint.adb (Sprint_Node_Actual): Add an entry for node
1465 N_Variable_Reference_Marker.
1466
1467 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1468
1469 * sem_util.adb (Subprogram_Name): Append suffix for overloaded
1470 subprograms.
1471
1472 2017-11-08 Yannick Moy <moy@adacore.com>
1473
1474 * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
1475 about unused use-type or use-package clauses inside inlined bodies.
1476
1477 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1478
1479 * sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
1480 In_Partial_Fin along with a comment on its usage. Do not guarantee the
1481 prior elaboration of a unit when the need came from a partial
1482 finalization context.
1483 (In_Initialization_Context): Relocated to Process_Call.
1484 (Is_Partial_Finalization_Proc): New routine.
1485 (Process_Access): Add new parameter In_Partial_Fin along with a comment
1486 on its usage.
1487 (Process_Activation_Call): Add new parameter In_Partial_Fin along with
1488 a comment on its usage.
1489 (Process_Activation_Conditional_ABE_Impl): Add new parameter
1490 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1491 diagnostics when the activation occurs in a partial finalization
1492 context.
1493 (Process_Activation_Guaranteed_ABE_Impl): Add new parameter
1494 In_Partial_Fin along with a comment on its usage.
1495 (Process_Call): Add new parameter In_Partial_Fin along with a comment
1496 on its usage. A call is within a partial finalization context when it
1497 targets a finalizer or primitive [Deep_]Finalize, and the call appears
1498 in initialization actions. Pass this information down to the recursive
1499 steps of the Processing phase.
1500 (Process_Call_Ada): Add new parameter In_Partial_Fin along with a
1501 comment on its usage. Remove the guard which suppresses the generation
1502 of implicit Elaborate[_All] pragmas. This is now done in
1503 Ensure_Prior_Elaboration.
1504 (Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
1505 with a comment on its usage. Do not emit any ABE diagnostics when the
1506 call occurs in a partial finalization context.
1507 (Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
1508 comment on its usage.
1509 (Process_Instantiation): Add new parameter In_Partial_Fin along with a
1510 comment on its usage.
1511 (Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
1512 with a comment on its usage.
1513 (Process_Instantiation_Conditional_ABE): Add new parameter
1514 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1515 diagnostics when the instantiation occurs in a partial finalization
1516 context.
1517 (Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
1518 with a comment on its usage.
1519 (Process_Scenario): Add new parameter In_Partial_Fin along with a
1520 comment on its usage.
1521 (Process_Single_Activation): Add new parameter In_Partial_Fin along
1522 with a comment on its usage.
1523 (Traverse_Body): Add new parameter In_Partial_Fin along with a comment
1524 on its usage.
1525
1526 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1527
1528 * sem_ch13.adb: Add optional parameter to Error_Msg.
1529
1530 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1531
1532 * fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
1533 for the Interfaces.* hierarchy as longer unit names are now allowed.
1534
1535 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1536
1537 * sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
1538 subprogram as well. Support more cases of entities.
1539 (Append_Entity_Name): Add some defensive code.
1540
1541 2017-11-06 Eric Botcazou <ebotcazou@adacore.com>
1542
1543 * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
1544
1545 2017-10-31 Eric Botcazou <ebotcazou@adacore.com>
1546
1547 PR ada/82785
1548 * gcc-interface/Makefile.in (m68k/Linux): Fix typo.
1549
1550 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1551
1552 * gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
1553
1554 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1555
1556 * gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
1557 (convert): Do not use an unchecked conversion for converting from a
1558 type to another type padding it.
1559
1560 2017-10-20 Doug Rupp <rupp@adacore.com>
1561
1562 * libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
1563 needed for using monotonic clock.
1564 * libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
1565 changes.
1566 * libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
1567 out monotonic clock related functions body.
1568 (Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
1569 Compute_Deadline): Move to...
1570 * libgnarl/s-tpopmo.adb: ... here. New separate package body.
1571
1572 2017-10-20 Ed Schonberg <schonberg@adacore.com>
1573
1574 * sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
1575 case where the controlling formal is an anonymous access to interface
1576 type.
1577 * exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
1578 access type, handle properly the the constructed dereference that
1579 designates the object used in the rewritten synchronized call.
1580 (Parameter_Block_Pack): If the type of the actual is by-copy, its
1581 generated declaration in the parameter block does not need an
1582 initialization even if the type is a null-excluding access type,
1583 because it will be initialized with the value of the actual later on.
1584 (Parameter_Block_Pack): Do not add controlling actual to parameter
1585 block when its type is by-copy.
1586
1587 2017-10-20 Justin Squirek <squirek@adacore.com>
1588
1589 * sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
1590 scope stack traversal into the context clause.
1591
1592 2017-10-20 Bob Duff <duff@adacore.com>
1593
1594 * sinfo.ads: Fix a comment typo.
1595
1596 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1597
1598 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
1599 warning against usage in conjunction with -gnatn.
1600 (-fdump-xref): Delete entry.
1601 * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
1602 -fdump-xref switch.
1603 * gnat_ugn.texi: Regenerate.
1604
1605 2017-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1606
1607 * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
1608 Minor reformatting.
1609
1610 2017-10-20 Yannick Moy <moy@adacore.com>
1611
1612 * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
1613 compare a dimensioned expression with a literal.
1614 (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
1615 special value zero.
1616 * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
1617 dimensionality system in GNAT.
1618 * gnat_ugn.texi: Regenerate.
1619
1620 2017-10-20 Yannick Moy <moy@adacore.com>
1621
1622 * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
1623 inadequate silencing of errors.
1624 * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
1625 checking the subprogram body generated from an expression function,
1626 when this is done as part of the preanalysis done on expression
1627 functions, as the subprogram body may not yet be attached in the AST.
1628 The error if any will be issued later during the analysis of the body.
1629 (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
1630
1631 2017-10-20 Arnaud Charlet <charlet@adacore.com>
1632
1633 * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
1634 warning on ineffective use clause.
1635
1636 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1637
1638 * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
1639 * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
1640 to issue the warning on the absence of local raise.
1641 (Possible_Local_Raise): Do not issue the warning for Call_Markers.
1642 (Warn_If_No_Local_Raise): New procedure to issue the warning on the
1643 absence of local raise.
1644 * sem_elab.adb: Add with and use clauses for Exp_Ch11.
1645 (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
1646 where a scenario could give rise to raising Program_Error.
1647 * sem_elab.adb: Typo fixes.
1648 * fe.h (Warn_If_No_Local_Raise): Declare.
1649 * gcc-interface/gigi.h (get_exception_label): Change return type.
1650 * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
1651 simple vector of Entity_Id.
1652 (gnu_storage_error_label_stack): Likewise.
1653 (gnu_program_error_label_stack): Likewise.
1654 (gigi): Adjust to above changes.
1655 (Raise_Error_to_gnu): Likewise.
1656 (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
1657 (N_Push_Constraint_Error_Label): Push the label onto the stack.
1658 (N_Push_Storage_Error_Label): Likewise.
1659 (N_Push_Program_Error_Label): Likewise.
1660 (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
1661 a warning on the absence of local raise.
1662 (N_Pop_Storage_Error_Label): Likewise.
1663 (N_Pop_Program_Error_Label): Likewise.
1664 (push_exception_label_stack): Delete.
1665 (get_exception_label): Change return type to Entity_Id and adjust.
1666 * gcc-interface/utils2.c (build_goto_raise): Change type of first
1667 parameter to Entity_Id and adjust. Set TREE_USED on the label.
1668 (build_call_raise): Adjust calls to get_exception_label and also
1669 build_goto_raise.
1670 (build_call_raise_column): Likewise.
1671 (build_call_raise_range): Likewise.
1672 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
1673 Document actual default behavior.
1674
1675 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1676
1677 * einfo.ads: Minor consistent punctuation in comment. All numbered
1678 items in the comment of Is_Internal are now terminated with a period.
1679
1680 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1681
1682 * exp_util.adb (Build_Temporary): Mark created temporary entity as
1683 internal.
1684
1685 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1686
1687 * sem_type.adb (In_Generic_Actual): Simplified.
1688
1689 2017-10-20 Justin Squirek <squirek@adacore.com>
1690
1691 * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
1692 verify a renaming exists for a generic formal before comparing it to
1693 the actual as defaulted formals will not have a renamed_object.
1694
1695 2017-10-20 Javier Miranda <miranda@adacore.com>
1696
1697 * exp_ch6.adb (Replace_Returns): Fix wrong management of
1698 N_Block_Statement nodes.
1699
1700 2017-10-20 Bob Duff <duff@adacore.com>
1701
1702 * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
1703 component of an array aggregate if it is initialized by a
1704 build-in-place function call.
1705 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
1706 bip for nonlimited types.
1707 * debug.adb: Document -gnatd.9.
1708
1709 2017-10-20 Bob Duff <duff@adacore.com>
1710
1711 * sem_ch12.adb: Remove redundant setting of Parent.
1712
1713 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1714
1715 * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
1716 of the operands is a string literal.
1717
1718 2017-10-20 Bob Duff <duff@adacore.com>
1719
1720 * einfo.ads: Comment fix.
1721
1722 2017-10-20 Clement Fumex <fumex@adacore.com>
1723
1724 * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
1725
1726 2017-10-20 Ed Schonberg <schonberg@adacore.com>
1727
1728 * sem_dim.adb (Extract_Power): Accept dimension values that are not
1729 non-negative integers when the dimensioned base type is an Integer
1730 type.
1731
1732 2017-10-20 Bob Duff <duff@adacore.com>
1733
1734 * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
1735 that an allocator came from a b-i-p return statement.
1736 * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
1737 object of a nonlimited build-in-place function call.
1738 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
1739 Alloc_For_BIP_Return flag on generated allocators.
1740 * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
1741 If the N_Assignment_Statement has been transformed into something else,
1742 then Should_Transform_BIP_Assignment won't work.
1743 * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
1744 "Remove Adjust if we're building the return object of an extended
1745 return statement in place." Back out that part of the change, because
1746 the Alloc_For_BIP_Return flag is now used for that.
1747
1748 2017-10-19 Bob Duff <duff@adacore.com>
1749
1750 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
1751 should be "T". Handle case of a subtype of a class-wide type.
1752
1753 2017-10-19 Bob Duff <duff@adacore.com>
1754
1755 * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
1756 which node kinds can legitimately be ignored, and raise Program_Error
1757 for others.
1758
1759 2017-10-19 Hristian Kirtchev <kirtchev@adacore.com>
1760
1761 * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
1762 instantiation that acts as a compilation unit.
1763 (Find_Code_Unit): Reimplemented.
1764 (Find_Top_Unit): Reimplemented.
1765 (Find_Unit_Entity): New routine.
1766 (Process_Instantiation_SPARK): Correct the elaboration requirement a
1767 package instantiation imposes on a unit.
1768
1769 2017-10-19 Bob Duff <duff@adacore.com>
1770
1771 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
1772 for a narrow set of controlled types.
1773
1774 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1775
1776 * sinput.ads (Line_Start): Add pragma Inline.
1777 * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
1778
1779 2017-10-19 Bob Duff <duff@adacore.com>
1780
1781 * exp_attr.adb (Expand_N_Attribute_Reference): Disable
1782 Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
1783 build-in-place function call so that the temp is declared in the right
1784 place.
1785
1786 2017-10-18 Eric Botcazou <ebotcazou@adacore.com>
1787
1788 * gcc-interface/misc.c (gnat_tree_size): Move around.
1789
1790 * gcc-interface/utils.c (max_size): Deal with SSA names.
1791
1792 2017-10-17 Jakub Jelinek <jakub@redhat.com>
1793
1794 * gcc-interface/misc.c (gnat_tree_size): New function.
1795 (LANG_HOOKS_TREE_SIZE): Redefine.
1796
1797 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1798
1799 * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
1800 Remote_Call_Interface is not a suitable preelaboratd context when the
1801 call appears in the package body.
1802
1803 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
1804
1805 * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
1806 * layout.adb (Set_Elem_Alignment): Likewise. Use M name as maximum
1807 alignment for consistency. If Align is non-zero, use the minimum of
1808 Align and M for the alignment.
1809 * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
1810 setting the alignment directly.
1811
1812 2017-10-14 Ed Schonberg <schonberg@adacore.com>
1813
1814 * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
1815 optional string in an Assert pragma until the expansion of the pragma
1816 has rewritten it as a conditional statement, so that the string
1817 argument is only evaluaed if the assertion fails. This is mandated by
1818 RM 11.4.2.
1819
1820 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1821
1822 * debug.adb: Switch -gnatd.v and associated flag are now used to
1823 enforce the SPARK rules for elaboration in SPARK code.
1824 * sem_elab.adb: Describe switch -gnatd.v.
1825 (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
1826 (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
1827 in effect.
1828 (Process_Variable_Assignment): Clarify why variable assignments are
1829 processed reglardless of whether -gnatd.v is in effect.
1830 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
1831 sections on elaboration code and compilation switches.
1832 * gnat_ugn.texi: Regenerate.
1833
1834 2017-10-14 Gary Dismukes <dismukes@adacore.com>
1835
1836 * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
1837 sem_warn.adb: Minor reformattings.
1838
1839 2017-10-14 Ed Schonberg <schonberg@adacore.com>
1840
1841 * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
1842 for reverse iteration over formal containers.
1843 * gnat_rm.texi: Regenerate.
1844
1845 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1846
1847 * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
1848 Ensure_Prior_Elaboration_Dynamic for consistency reasons.
1849 (Ensure_Static_Prior_Elaboration): Renamed to
1850 Ensure_Prior_Elaboration_Static for consistency reasons.
1851 (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
1852 reflect its new purpose.
1853 (Is_Initialized): New routine.
1854 (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
1855 in order to reflect its new purpose.
1856 (Is_Variable_Read): New routine.
1857 (Output_Variable_Reference): Renamed to Output_Variable_Read in order
1858 to reflect its new purpose.
1859 (Process_Variable_Assignment): This routine now acts as a top level
1860 dispatcher for variable assignments.
1861 (Process_Variable_Assignment_Ada): New routine.
1862 (Process_Variable_Assignment_SPARK): New routine.
1863 (Process_Variable_Reference): Renamed to Process_Variable_Read in order
1864 to reflects its new purpose. A reference to a variable is now suitable
1865 for ABE processing only when it is a read. The logic in the routine now
1866 reflects the latest SPARK elaboration rules.
1867
1868 2017-10-14 Justin Squirek <squirek@adacore.com>
1869
1870 * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
1871 triggers marking on formal subprograms.
1872
1873 2017-10-14 Javier Miranda <miranda@adacore.com>
1874
1875 * checks.adb (Ensure_Valid): Do not skip adding the validity check on
1876 renamings of objects that come from the sources.
1877
1878 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
1879
1880 * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
1881 parameter and set the alignment of the type to Align.
1882 (Copy_Float_Type): Adjust call to Build_Float_Type.
1883 (Register_Float_Type): Add pragma Unreferenced for Precision. Adjust
1884 call to Build_Float_Type and do not set RM_Size and Alignment.
1885
1886 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
1887
1888 * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
1889 GNATRTL_NONTASKING_OBJ.
1890
1891 2017-10-14 Bob Duff <duff@adacore.com>
1892
1893 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
1894 enabling b-i-p for nonlimited controlled types (but disabled).
1895
1896 2017-10-14 Justin Squirek <squirek@adacore.com>
1897
1898 * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
1899 Has_Warnings_Off with Warnings_Off.
1900
1901 2017-10-14 Piotr Trojanek <trojanek@adacore.com>
1902
1903 * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
1904
1905 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1906
1907 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
1908 enclosing package at the end of the visible declarations.
1909 * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
1910 an initialization item which is undefined due to some illegality.
1911
1912 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
1913
1914 * ali.adb: Add new ALI line 'T' to read the number of tasks contain
1915 within each unit that require a default-sized primary and secondary
1916 stack to be generated by the binder.
1917 (Scan_ALI): Scan new 'T' lines.
1918 * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
1919 * bindgen.adb (Gen_Output_File): Count the number of default-sized
1920 stacks within the closure that are to be created by the binder.
1921 (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
1922 stacks and record these in System.Secodnary_Stack.
1923 (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
1924 closure of the program being bound.
1925 * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
1926 * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
1927 (Expand_N_Object_Declaration): Count the number of default-sized stacks
1928 used by task objects contained within the object whose declaration is
1929 being expanded. Only performed when either the restrictions
1930 No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
1931 effect.
1932 * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
1933 (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
1934 the expansion of a task type if the size of the stack is known at
1935 run-time and the restrictions No_Implicit_Heap_Allocations or
1936 No_Implicit_Task_Allocations are in effect.
1937 (Make_Task_Create_Call): If using a restricted profile provide
1938 secondary stack parameter: either the statically created stack or null.
1939 * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
1940 Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
1941 Unit_Record initialization expressions.
1942 * lib-writ.adb (Add_Preprocessing_Dependency,
1943 Ensure_System_Dependency): Include Primary_Stack_Count and
1944 Sec_Stack_Count in Unit_Record initialization expression.
1945 (Write_ALI): Write T lines.
1946 (Write_Unit_Information): Do not output 'T' lines if there are no
1947 stacks for the binder to generate.
1948 * lib-writ.ads: Updated library information documentation to include
1949 new T line entry.
1950 * lib.adb (Increment_Primary_Stack_Count): New routine.
1951 (Increment_Sec_Stack_Count): New routine.
1952 (Primary_Stack_Count): New routine.
1953 (Sec_Stack_Count): New routine.
1954 * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
1955 Unit_Record and updated documentation.
1956 (Increment_Primary_Stack_Count): New routine along with pragma Inline.
1957 (Increment_Sec_Stack_Count): New routine along with pragma Inline.
1958 (Primary_Stack_Count): New routine along with pragma Inline.
1959 (Sec_Stack_Count): New routine along with pragma Inline.
1960 * opt.ads: New constant No_Stack_Size. Flag Default_Stack_Size
1961 redefined. New flag Default_Sec_Stack_Size and
1962 Quantity_Of_Default_Size_Sec_Stacks.
1963 * rtfinal.c Fixed erroneous comment.
1964 * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
1965 System.Secondary_Stack to System.Parameters. Add RE_SS_Stack.
1966 * sem_util.adb (Number_Of_Elements_In_Array): New routine.
1967 * sem_util.ads (Number_Of_Elements_In_Array): New routine.
1968 * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
1969 * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
1970 (Set_Sec_Stack_Addr): Removed routine.
1971 (Get_Sec_Stack): New routine.
1972 (Set_Sec_Stack): New routine.
1973 (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
1974 reflect new procedure and global names.
1975 * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
1976 libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
1977 libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
1978 parameter profile to allow the secondary stack size to be specified.
1979 * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
1980 profile to include Sec_Stack_Address. Update Tasking.Initialize_ATCB
1981 call to remove Secondary_Stack_Size reference. Add secondary stack
1982 address and size to SSL.Create_TSD call.
1983 (Task_Wrapper): Remove secondary stack creation.
1984 * libgnarl/s-tarest.ads (Create_Restricted_Task,
1985 Create_Restricted_Task_Sequential): Update parameter profile to include
1986 Sec_Stack_Address and clarify the Size parameter.
1987 * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
1988 from profile and body.
1989 (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
1990 * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
1991 Common_ATCB.
1992 (Initialize_ATCB): Update the parameter profile to remove
1993 Secondary_Stack_Size.
1994 * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
1995 call to Initialize_ATCB. Add secondary stack address and size to
1996 SSL.Create_TSD call, and catch any storage exception from the call.
1997 (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
1998 new subprogram and component names.
1999 (Task_Wrapper): Remove secondary stack creation.
2000 (Vulnerable_Complete_Master): Update to reflect TSD changes.
2001 * libgnarl/s-tassta.ads: Reformat comments.
2002 (Create_Task): Update parameter profile.
2003 * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
2004 profile to include secondary stack size. Remove secondary size
2005 parameter from Initialize_ATCB call and add it to Create_TSD call.
2006 * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
2007 libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
2008 * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
2009 libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
2010 Percentage. Remove constants Dynamic, Sec_Stack_Percentage and
2011 Sec_Stack_Dynamic. Add constant Runtime_Default_Sec_Stack_Size and
2012 Sec_Stack_Dynamic.
2013 (Default_Sec_Stack_Size): New routine.
2014 * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
2015 now Preelaborate.
2016 * libgnat/s-soflin.adb: Removed unused with-clauses. With
2017 System.Soft_Links.Initialize to initialize non-tasking TSD.
2018 (Create_TSD): Update parameter profile. Initialize the TSD and
2019 unconditionally call SS_Init.
2020 (Destroy_TSD): Update SST.SS_Free call.
2021 (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
2022 Set_Sec_Stack_Addr_Soft): Remove routines.
2023 (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
2024 Set_Sec_Stack_Soft): Add routines.
2025 (NT_TSD): Move to private part of package specification.
2026 * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
2027 with suppressed access checks. Renamed *_Sec_Stack_Addr_* routines and
2028 objects to *_Sec_Stack_*. TSD: removed warning suppression and
2029 component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
2030 (Create_TSD): Update parameter profile.
2031 (NT_TSD): Move to private section from body.
2032 * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
2033 * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
2034 * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
2035 Remove routine.
2036 (Get_Sec_Stack, Set_Sec_Stack): Add routine.
2037 (Thread_Body_Enter): Update parameter profile and body to adapt to new
2038 System.Secondary_Stack.
2039 (Init_RTS): Update body for new System.Soft_Links names.
2040 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
2041 s-soliin.o.
2042
2043 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2044
2045 * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
2046 operating on trees as wide_ints.
2047
2048 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2049
2050 * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
2051 as a scoping construct when it is byproduct of exception handling.
2052
2053 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2054
2055 * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
2056 semantic field Target of node N_Call_Marker.
2057
2058 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2059
2060 * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
2061 attempts to copy a limited value, when the allocator is the expression
2062 in an expression function.
2063
2064 2017-10-09 Joel Brobecker <brobecker@adacore.com>
2065
2066 * doc/share/conf.py: Tell the style checker that this is a Python
2067 fragment, and therefore that pyflakes should not be run to validate
2068 this file.
2069
2070 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
2071
2072 * einfo.ads (Is_Boolean_Type): Add pragma Inline.
2073 (Is_Entity_Name): Likewise.
2074 (Is_String_Type): Likewise.
2075 * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
2076 and remove useless comparisons on the base types.
2077 (Covers): Use simple tests for Standard_Void_Type. Move up cheap tests
2078 on T2. Always test Is_Private_Type before Full_View_Covers.
2079
2080 2017-10-09 Bob Duff <duff@adacore.com>
2081
2082 * exp_ch4.adb: Minor refactoring.
2083
2084 2017-10-09 Javier Miranda <miranda@adacore.com>
2085
2086 * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
2087 not components.
2088
2089 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2090
2091 * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
2092 are verified only in the static model.
2093
2094 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2095
2096 * sem_ch5.adb (Analyze_Iterator_Specification,
2097 Check_Reverse_Iteration): Check that the domain of iteration supports
2098 reverse iteration when it is a formal container. This requires the
2099 presence of a Previous primitive in the Iterable aspect.
2100 * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
2101 primitives Last and Previous to support reverse iteration over formal
2102 containers.
2103 (Validate_Iterable_Aspect): Add check for reverse iteration operations.
2104 * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
2105 for reverse iteration using primitives Last and Previous in generated
2106 loop.
2107
2108 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2109
2110 * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
2111 of the Defining_Program_Unit_Name, which is an identifier, in order to
2112 construct the string for the fully qualified name.
2113
2114 2017-10-09 Justin Squirek <squirek@adacore.com>
2115
2116 * sem_ch3.adb: Rename Uses_Unseen_Priv into
2117 Contains_Lib_Incomplete_Type.
2118
2119 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2120
2121 * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
2122 sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
2123 exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
2124 prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
2125 sem_ch10.adb, par-ch8.adb: Minor reformatting.
2126
2127 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2128
2129 * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
2130 in the static model.
2131 (Is_Suitable_Variable_Assignment): This scenario is now only relevant
2132 in the static model.
2133 (Is_Suitable_Variable_Reference): This scenario is now only relevant in
2134 the static model.
2135
2136 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2137
2138 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
2139 expressions when the enclosing scope is a subprogram body and the next
2140 declaration is a body that freezes entities previously declared in the
2141 scope.
2142
2143 2017-10-09 Justin Squirek <squirek@adacore.com>
2144
2145 * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
2146 ghost packages and living packages in use clauses.
2147 (Use_One_Type, Note_Redundant_Use): Correct warning messages
2148
2149 2017-10-09 Justin Squirek <squirek@adacore.com>
2150
2151 * osint.ads: Document new parameter FD for Read_Source_File.
2152
2153 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2154
2155 * exp_util.adb (Make_Predicate_Call): If the type of the expression to
2156 which the predicate check applies is tagged, convert the expression to
2157 that type. This is in most cases a no-op, but is relevant if the
2158 expression is clas-swide, because the predicate function being invoked
2159 is not a primitive of the type and cannot take a class-wide actual.
2160
2161 2017-10-09 Gary Dismukes <dismukes@adacore.com>
2162
2163 * exp_disp.adb: Minor reformatting.
2164
2165 2017-10-09 Arnaud Charlet <charlet@adacore.com>
2166
2167 * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
2168
2169 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2170
2171 * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
2172 GNATprove.
2173 (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
2174
2175 2017-10-09 Bob Duff <duff@adacore.com>
2176
2177 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
2178 immediately if the call has already been processed (by a previous call
2179 to Make_Build_In_Place_Call_In_Anonymous_Context).
2180 * sem_elab.adb: Minor typo fixes.
2181
2182 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2183
2184 * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
2185 predicate, do not replace an identifier that matches the type if the
2186 identifier is a selector in a selected component, because this
2187 indicates a reference to some homograph of the type itself, and not to
2188 the current occurence in the predicate.
2189
2190 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
2191
2192 * repinfo.adb (List_Record_Layout): Tweak formatting.
2193 (Write_Val): Remove superfluous spaces in back-end layout mode.
2194
2195 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2196
2197 * sem_res.adb (Property_Error): Remove.
2198 (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
2199 current wording of the rule.
2200
2201 2017-10-09 Justin Squirek <squirek@adacore.com>
2202
2203 * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
2204 before analyzing a given scope due to an expression function.
2205 (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
2206
2207 2017-10-09 Bob Duff <duff@adacore.com>
2208
2209 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
2210 Defining_Identifier (Obj_Decl) in two places, because it might have
2211 changed.
2212 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
2213 involving 'Input on (not visibly) derived types.
2214
2215 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2216
2217 * atree.adb: Add new soft link Rewriting_Proc.
2218 (Rewrite): Invoke the subprogram attached to the rewriting soft link.
2219 (Set_Rewriting_Proc): New routine.
2220 * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
2221 (Set_Rewriting_Proc): New routine.
2222 * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
2223 for *E*laboration flag to maintain consistency with other elaboration
2224 flag generating subprograms.
2225 * debug.adb: Document the new usage of flag -gnatdL.
2226 * einfo.adb: Node19 is now used as Receiving_Entry. Node39 is now used
2227 as Protected_Subprogram. Flag148 is now used as
2228 Is_Elaboration_Checks_OK_Id. Flag302 is now used as
2229 Is_Initial_Condition_Procedure.
2230 (Is_Elaboration_Checks_OK_Id): New routine.
2231 (Is_Initial_Condition_Procedure): New routine.
2232 (Protected_Subprogram): New routine.
2233 (Receiving_Entry): New routine.
2234 (SPARK_Pragma): Update assertion.
2235 (SPARK_Pragma_Inherited): Update assertion.
2236 (Suppress_Elaboration_Warnings): Removed.
2237 (Set_Is_Elaboration_Checks_OK_Id): New routine.
2238 (Set_Is_Initial_Condition_Procedure): New routine.
2239 (Set_Protected_Subprogram): New routine.
2240 (Set_Receiving_Entry): New routine.
2241 (Set_SPARK_Pragma): Update assertion.
2242 (Set_SPARK_Pragma_Inherited): Update assertion.
2243 (Write_Entity_Flags): Update the output for Flag148 and Flag302.
2244 (Write_Field19_Name): Add output for Receiving_Entry.
2245 (Write_Field39_Name): Add output for Protected_Subprogram.
2246 (Write_Field40_Name): Update the output for SPARK_Pragma.
2247 * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
2248 Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
2249 Remove attribute Suppress_Elaboration_Warnings. Update the stricture
2250 of various entities.
2251 (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
2252 (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
2253 (Protected_Subprogram): New routine along with pragma Inline.
2254 (Receiving_Entry): New routine along with pragma Inline.
2255 (Suppress_Elaboration_Warnings): Removed.
2256 (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
2257 Inline.
2258 (Set_Is_Initial_Condition_Procedure): New routine along with pragma
2259 Inline.
2260 (Set_Protected_Subprogram): New routine along with pragma Inline.
2261 (Set_Receiving_Entry): New routine along with pragma Inline.
2262 (Set_Suppress_Elaboration_Warnings): Removed.
2263 * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
2264 consistency with other finalizer generating subprograms.
2265 (Default_Initialize_Object): Mark the block which wraps the call to
2266 finalize as being part of initialization.
2267 * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
2268 Initial_Condition.
2269 (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
2270 (Next_Suitable_Statement): Update the comment on usage. Skip over call
2271 markers generated by the ABE mechanism.
2272 * exp_ch9.adb (Activation_Call_Loc): New routine.
2273 (Add_Accept): Link the accept procedure to the original entry.
2274 (Build_Protected_Sub_Specification): Link the protected or unprotected
2275 version to the original subprogram.
2276 (Build_Task_Activation_Call): Code cleanup. Use a source location which
2277 is very close to the "begin" or "end" keywords when generating the
2278 activation call.
2279 * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
2280 * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
2281 process loops.
2282 (Expand_SPARK_N_Loop_Statement): New routine.
2283 (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
2284 call to the Default_Initial_Condition procedure.
2285 (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
2286 * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
2287 effect.
2288 (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
2289 (Insert_Actions): Add processing for N_Call_Marker.
2290 (Kill_Dead_Code): Explicitly kill an elaboration scenario.
2291 * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
2292 * frontend.adb: Initialize Sem_Elab. Process all saved top level
2293 elaboration scenarios for ABE issues.
2294 * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
2295 nodes.
2296 * lib.adb (Earlier_In_Extended_Unit): New variant.
2297 * sem.adb (Analyze): Ignore N_Call_Marker nodes.
2298 (Preanalysis_Active): New routine.
2299 * sem.ads (Preanalysis_Active): New routine.
2300 * sem_attr.adb (Analyze_Access_Attribute): Save certain
2301 elaboration-related attributes. Save the scenario for ABE processing.
2302 * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
2303 effect. Save certain elaboration-related attributes.
2304 * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
2305 attributes. Save the scenario for ABE processing.
2306 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
2307 mode in effect. Save certain elaboration-related attributes.
2308 (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
2309 locating the first real statement.
2310 (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
2311 certain elaboration-related attributes.
2312 * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
2313 elaboration warnings.
2314 * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
2315 generated for purposes of wrapping an attribute used as a generic
2316 actual.
2317 (Find_Direct_Name): Save certain elaboration-related attributes. Save
2318 the scenario for ABE processing.
2319 (Find_Expanded_Name): Save certain elaboration-related attributes. Save
2320 the scenario for ABE processing.
2321 * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
2322 elaboration-related attributes.
2323 (Analyze_Requeue): Save certain elaboration-related attributes. Save
2324 the scenario for ABE processing.
2325 (Analyze_Single_Task_Declaration): Save certain elaboration-related
2326 attributes.
2327 (Analyze_Task_Type_Declaration): Save certain elaboration-related
2328 attributes.
2329 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
2330 elaboration-related attributes.
2331 (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
2332 effect. Save certain elaboration-related attributes.
2333 (Analyze_Package_Instantiation): Save certain elaboration-related
2334 attributes. Save the scenario for ABE processing. Create completing
2335 bodies in case the instantiation results in a guaranteed ABE.
2336 (Analyze_Subprogram_Instantiation): Save certain elaboration-related
2337 attributes Save the scenario for ABE processing. Create a completing
2338 body in case the instantiation results in a guaranteed ABE.
2339 (Provide_Completing_Bodies): New routine.
2340 * sem_elab.ads: Brand new implementation.
2341 * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
2342 Elaborate_Body): Do not suppress elaboration warnings.
2343 * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
2344 operator.
2345 (Resolve_Call): Save certain elaboration-related attributes. Save the
2346 scenario for ABE processing.
2347 (Resolve_Entity_Name): Do not perform any ABE processing here.
2348 (Resolve_Entry_Call): Inherit certain attributes from the original call.
2349 * sem_util.adb (Begin_Keyword_Location): New routine.
2350 (Defining_Entity): Update the parameter profile. Add processing for
2351 concurrent subunits that are rewritten as null statements.
2352 (End_Keyword_Location): New routine.
2353 (Find_Enclosing_Scope): New routine.
2354 (In_Instance_Visible_Part): Code cleanup.
2355 (In_Subtree): Update the parameter profile. Add new version.
2356 (Is_Preelaborable_Aggregate): New routine.
2357 (Is_Preelaborable_Construct): New routine.
2358 (Mark_Elaboration_Attributes): New routine.
2359 (Scope_Within): Update the parameter profile.
2360 (Scope_Within_Or_Same): Update the parameter profile.
2361 * sem_util.ads (Begin_Keyword_Location): New routine.
2362 (Defining_Entity): Update the parameter profile and the comment on
2363 usage.
2364 (End_Keyword_Location): New routine.
2365 (Find_Enclosing_Scope): New routine.
2366 (In_Instance_Visible_Part): Update the parameter profile.
2367 (In_Subtree): Update the parameter profile. Add new version.
2368 (Is_Preelaborable_Aggregate): New routine.
2369 (Is_Preelaborable_Construct): New routine.
2370 (Mark_Elaboration_Attributes): New routine.
2371 (Scope_Within): Update the parameter profile and the comment on usage.
2372 (Scope_Within_Or_Same): Update the parameter profile and the comment on
2373 usage.
2374 * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
2375 to determine whether a loop has meaningful condition actions.
2376 (Has_Condition_Actions): New routine.
2377 * sinfo.adb (ABE_Is_Certain): Removed.
2378 (Is_Declaration_Level_Node): New routine.
2379 (Is_Dispatching_Call): New routine.
2380 (Is_Elaboration_Checks_OK_Node): New routine.
2381 (Is_Initialization_Block): New routine.
2382 (Is_Known_Guaranteed_ABE): New routine.
2383 (Is_Recorded_Scenario): New routine.
2384 (Is_Source_Call): New routine.
2385 (Is_SPARK_Mode_On_Node): New routine.
2386 (No_Elaboration_Check): Removed.
2387 (Target): New routine.
2388 (Was_Attribute_Reference): New routine.
2389 (Set_ABE_Is_Certain): Removed.
2390 (Set_Is_Declaration_Level_Node): New routine.
2391 (Set_Is_Dispatching_Call): New routine.
2392 (Set_Is_Elaboration_Checks_OK_Node): New routine.
2393 (Set_Is_Initialization_Block): New routine.
2394 (Set_Is_Known_Guaranteed_ABE): New routine.
2395 (Set_Is_Recorded_Scenario): New routine.
2396 (Set_Is_Source_Call): New routine.
2397 (Set_Is_SPARK_Mode_On_Node): New routine.
2398 (Set_No_Elaboration_Check): Removed.
2399 (Set_Target): New routine.
2400 (Set_Was_Attribute_Reference): New routine.
2401 * sinfo.ads: Remove attribute ABE_Is_Certain. Attribute
2402 Do_Discriminant_Check now utilizes Flag3. Attribute
2403 No_Side_Effect_Removal now utilizes Flag17. Add new node
2404 N_Call_Marker. Update the structure of various nodes.
2405 (ABE_Is_Certain): Removed along with pragma Inline.
2406 (Is_Declaration_Level_Node): New routine along with pragma Inline.
2407 (Is_Dispatching_Call): New routine along with pragma Inline.
2408 (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
2409 (Is_Initialization_Block): New routine along with pragma Inline.
2410 (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2411 (Is_Recorded_Scenario): New routine along with pragma Inline.
2412 (Is_Source_Call): New routine along with pragma Inline.
2413 (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2414 (No_Elaboration_Check): Removed along with pragma Inline.
2415 (Target): New routine along with pragma Inline.
2416 (Was_Attribute_Reference): New routine along with pragma Inline.
2417 (Set_ABE_Is_Certain): Removed along with pragma Inline.
2418 (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
2419 (Set_Is_Dispatching_Call): New routine along with pragma Inline.
2420 (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
2421 Inline.
2422 (Set_Is_Initialization_Block): New routine along with pragma Inline.
2423 (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2424 (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
2425 (Set_Is_Source_Call): New routine along with pragma Inline.
2426 (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2427 (Set_No_Elaboration_Check): Removed along with pragma Inline.
2428 (Set_Target): New routine along with pragma Inline.
2429 (Set_Was_Attribute_Reference): New routine along with pragma Inline.
2430 * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
2431
2432 2017-10-09 Bob Duff <duff@adacore.com>
2433
2434 * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
2435
2436 2017-10-09 Bob Duff <duff@adacore.com>
2437
2438 * freeze.ads: Minor comment fixed.
2439
2440 2017-10-09 Bob Duff <duff@adacore.com>
2441
2442 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
2443 care of unchecked conversions in addition to regular conversions. This
2444 takes care of a case where a type is derived from a private untagged
2445 type that is completed by a tagged controlled type.
2446
2447 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2448
2449 * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
2450 rewriting a class-wide condition, handle properly the case where the
2451 controlling argument of the operation to which the condition applies is
2452 an access to a tagged type, and the condition includes a dispatching
2453 call with an implicit dereference.
2454
2455 2017-10-09 Bob Duff <duff@adacore.com>
2456
2457 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
2458 the code at the end of this procedure that was setting the type of a
2459 class-wide object to the specific type returned by a function call.
2460 Treat this case as indefinite instead.
2461
2462 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2463
2464 * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
2465 Suppress spurious ambiguity error when two traversals of the homonym
2466 chain (first directly, and then through an examination of relevant
2467 interfaces) retrieve the same operation, when other irrelevant homonyms
2468 of the operatioh are also present.
2469
2470 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2471
2472 * sem_util.adb (Object_Access_Level): If the object is the return
2473 statement of an expression function, return the level of the function.
2474 This is relevant when the object involves an implicit conversion
2475 between access types and the expression function is a completion, which
2476 forces the analysis of the expression before rewriting it as a body, so
2477 that freeze nodes can appear in the proper scope.
2478
2479 2017-10-09 Bob Duff <duff@adacore.com>
2480
2481 * atree.adb: Make nnd apply to everything "interesting", including
2482 Rewrite. Remove rrd.
2483
2484 2017-10-09 Javier Miranda <miranda@adacore.com>
2485
2486 * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
2487 processing the declaration of the dummy object internally created by
2488 Make_DT to compute the offset to the top of components referencing
2489 secondary dispatch tables.
2490 (Initialize_Tag): Do not initialize the offset-to-top field if it has
2491 been initialized initialized.
2492 * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
2493 * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
2494 (Make_DT): Create a dummy constant object if we can statically build
2495 secondary dispatch tables.
2496 (Make_Secondary_DT): For statically allocated secondary dispatch tables
2497 use the dummy object to compute the offset-to-top field value by means
2498 of the attribute 'Position.
2499
2500 2017-10-09 Bob Duff <duff@adacore.com>
2501
2502 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
2503 code so if BIPAlloc is not passed in, it will likely raise
2504 Program_Error instead of cause miscellaneous chaos.
2505 (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
2506 as for the other Is_B-I-P... functions.
2507 * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
2508 aggregate whose ancestor part is a build-in-place call returning a
2509 nonlimited type, transform the assignment to the ancestor part to use a
2510 temp.
2511 * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
2512 creating an Itype for a library unit entity.
2513 (Check_Initialization): Avoid spurious error message on
2514 internally-generated call.
2515 * sem_ch5.adb (Analyze_Assignment): Handle the case where the
2516 right-hand side is a build-in-place call. This didn't happen when b-i-p
2517 was only for limited types.
2518 * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
2519 implies >= Ada 2005.
2520 * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
2521 repeatedly.
2522 * sem_util.adb (Next_Actual): Handle case of build-in-place call.
2523
2524 2017-10-09 Arnaud Charlet <charlet@adacore.com>
2525
2526 * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
2527
2528 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2529
2530 * libgnarl/s-taprob.adb: Minor whitespace fix.
2531
2532 2017-10-09 Bob Duff <duff@adacore.com>
2533
2534 * namet.ads: Minor comment fix.
2535
2536 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2537
2538 * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
2539 just like other program units listed in Ada RM 10.1(1).
2540
2541 2017-10-09 Justin Squirek <squirek@adacore.com>
2542
2543 * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
2544
2545 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2546
2547 * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
2548 actual for a formal package is an instantiation of a child unit, create
2549 a freeze node for the instance of the parent if it appears in the same
2550 scope and is not frozen yet.
2551
2552 2017-10-09 Pierre-Marie de Rodat <derodat@adacore.com>
2553
2554 * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
2555 in-source documentation for tagged types's Offset_To_Top.
2556
2557 2017-10-09 Bob Duff <duff@adacore.com>
2558
2559 * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
2560 confusing. Same for N_Loc. Remove assumption that b-i-p implies
2561 limited. This is for the case of a function call that occurs as the
2562 default for a record component.
2563 (Expand_N_Object_Declaration): Deal with the case where expansion has
2564 created an object declaration initialized with something like
2565 F(...)'Reference.
2566 * exp_ch3.adb: Minor reformatting.
2567
2568 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2569
2570 * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
2571 the attribute is an object, but it may appear within a conversion. The
2572 object itself must be retrieved when generating the range test that
2573 implements the validity check on a scalar type.
2574
2575 2017-10-05 Eric Botcazou <ebotcazou@adacore.com>
2576
2577 PR ada/82393
2578 * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
2579 * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
2580
2581 2017-10-02 Eric Botcazou <ebotcazou@adacore.com>
2582 Pierre-Marie de Rodat <derodat@adacore.com>
2583
2584 PR ada/82384
2585 * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
2586 (time_t): Change from derived type to subtype.
2587 (timeval): Use suseconds_t for tv_usec.
2588 * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
2589
2590 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2591
2592 * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
2593 handling the form (plus/mult (convert @0) @1).
2594
2595 2017-09-29 Bob Duff <duff@adacore.com>
2596
2597 * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
2598 what we had before.
2599 (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
2600 change. Set the Etype in the class-wide case. This fixes a regression
2601 in the libadalang test suite.
2602
2603 2017-09-29 Joel Brobecker <brobecker@adacore.com>
2604
2605 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2606 doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
2607 in comment markup.
2608 * gnat_ugn.texi: Regenerate.
2609
2610 2017-09-29 Justin Squirek <squirek@adacore.com>
2611
2612 * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
2613 fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
2614 gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
2615 sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
2616 for checking source file status and error message and/or call to
2617 Read_Source_File.
2618 * libgnat/s-os_lib.ads: Add new potential value constant for
2619 uninitialized file descriptors.
2620 * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
2621 return result of IO to encompass a read access failure in addition to a
2622 file-not-found error.
2623
2624 2017-09-29 Bob Duff <duff@adacore.com>
2625
2626 * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
2627 functions returning nonlimited types. Allow for qualified expressions
2628 and type conversions.
2629 (Expand_N_Extended_Return_Statement): Correct the computation of
2630 Func_Bod to allow for child units.
2631 (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
2632 limited (initialization of In_Place_Expansion), and implies >= Ada
2633 2005.
2634 (Is_Build_In_Place_Result_Type): New function to accompany
2635 Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
2636 sometimes we just have the type on our hands, not the function. For
2637 now, does the same thing as the old version, so build-in-place is
2638 disabled for nonlimited types, except that you can use -gnatd.9 to
2639 enable it.
2640 * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
2641 accompany Is_Build_In_Place_Function and
2642 Is_Build_In_Place_Function_Call, because sometimes we just have the
2643 type on our hands, not the function.
2644 (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
2645 cases.
2646 (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
2647 questionable code at the end that was setting the Etype.
2648 * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
2649 determine whether "return (...agg...);" is returning from a
2650 build-in-place function.
2651 (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
2652 Remove assumption that b-i-p implies limited (initialization of
2653 In_Place_Expansion).
2654 (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
2655 an unchecked conversion. Add assertions.
2656 (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
2657 secondary stack here, just because the type needs finalization. That
2658 code is obsolete.
2659 (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
2660 For "return (...agg...);" don't assume b-i-p implies limited.
2661 Needs_Finalization does not imply secondary stack.
2662 (Expand_Array_Aggregate): Named notation. Reverse the sense of
2663 Component_OK_For_Backend -- more readability with fewer double
2664 negatives.
2665 * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
2666 b-i-p implies >= Ada 2005.
2667 * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
2668 b-i-p implies >= Ada 2005. Remove Adjust if we're building the return
2669 object of an extended return statement in place.
2670 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
2671 Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
2672 b-i-p implies >= Ada 2005.
2673 * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
2674 b-i-p implies >= Ada 2005.
2675 * exp_ch7.adb: Comment fix.
2676 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
2677 assumptions that b-i-p implies >= Ada 2005.
2678 * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
2679 b-i-p implies >= Ada 2005.
2680 * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
2681 (Expr), in case Pool_Id is not set.
2682 (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
2683 qualified or converted.
2684 (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
2685 (Param)) = N_Identifier; that's all it could be.
2686 * sinfo.ads: Comment fixes.
2687 * snames.ads-tmpl: Comment fixes.
2688 * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
2689
2690 2017-09-29 Justin Squirek <squirek@adacore.com>
2691
2692 * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
2693 all cases related to marking entity identifiers.
2694
2695 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2696
2697 * adaint.c (win32_wait): Properly handle error and take into account
2698 the WIN32 limitation on the number of simultaneous wait objects.
2699
2700 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2701
2702 * cal.c: Minor proofreading.
2703
2704 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2705
2706 * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
2707 * gnat_ugn.texi: Regenerate.
2708
2709 2017-09-29 Bob Duff <duff@adacore.com>
2710
2711 * lib-xref.ads: Comment fix.
2712
2713 2017-09-29 Bob Duff <duff@adacore.com>
2714
2715 * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
2716 Discriminants can't need finalization.
2717
2718 2017-09-29 Ed Schonberg <schonberg@adacore.com>
2719
2720 * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
2721 for types in expression if the function is within a generic unit.
2722 * sem_res.adb (Resolve): In a generic context do not freeze an
2723 expression, unless it is an entity. This exception is solely for the
2724 purpose of detecting illegal uses of deferred constants in generic
2725 units.
2726 * sem_res.adb: Minor reformatting.
2727
2728 2017-09-29 Justin Squirek <squirek@adacore.com>
2729
2730 * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
2731 redundant warnings.
2732
2733 2017-09-29 Yannick Moy <moy@adacore.com>
2734
2735 * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
2736
2737 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2738
2739 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
2740 * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
2741 Document the effect of pragma Optimize_Alignment (Space) on non-packed
2742 record types.
2743 * gnat_rm.texi: Regenerate.
2744
2745 2017-09-25 Justin Squirek <squirek@adacore.com>
2746
2747 * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
2748 exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
2749 gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
2750 gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
2751 libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
2752 libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
2753 libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
2754 libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
2755 libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
2756 libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
2757 put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
2758 sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
2759 Removal of ineffective use-clauses.
2760 * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
2761 constant folded barriers.
2762 * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
2763 Subtype_Marks and Names list in use-clause nodes to their new singular
2764 counterparts (e.g. Subtype_Mark, Name).
2765 * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
2766 Prev_Ids and More_Ids in use-clause nodes.
2767 (P_Use_Clause): Modify to take a list as a parameter.
2768 (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
2769 subtype_marks within an aggregate use-clauses into individual clauses.
2770 * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
2771 P_Use_Clause to match its new behavior.
2772 * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
2773 * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
2774 errors.
2775 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
2776 Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
2777 the declarative region.
2778 * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
2779 after analysis (Analyze_Package_Specification): Update use clause chain
2780 when there is no body.
2781 * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
2782 parameter to determine weither the installation of scopes should also
2783 propagate on the use-clause "chain".
2784 (Mark_Use_Clauses): Created to traverse use-clause chains and determine
2785 what constitutes a valid "use" of a clause.
2786 (Update_Use_Clause_Chain): Created to aggregate common machinary used
2787 to clean up use-clause chains (and warn on ineffectiveness) at the end
2788 of declaritive regions.
2789 * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
2790 package name from a use-package clause.
2791 (Analyze_Package_Name_List): Created to perform analysis on a list of
2792 package names (similar to Analyze_Package_Name).
2793 (Find_Most_Prev): Created to traverse to the beginning of a given
2794 use-clause chain.
2795 (Most_Decendant_Use_Clause): Create to identify which clause from a
2796 given set is highest in scope (not always the most prev).
2797 (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
2798 handle the new chaining algorithm, also many changes related to
2799 redundant clauses. A new parameter has also been added to force
2800 installation to handle certain cases.
2801 * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
2802 Analyze_Task_Body): Mark use clauses on relevant entities.
2803 * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
2804 Install_Parents): Add parameter to determine weither the installation
2805 of scopes should also propagate on the use-clause "chain".
2806 * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
2807 Install_Context to avoid redundant chaining of use-clauses.
2808 * sem_ch13.adb: Minor reformatting.
2809 * sem_res.adb (Resolve): Mark use clauses on operators.
2810 (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
2811 entities.
2812 * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
2813 Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
2814 represent any given clause's usage/reference/necessity.
2815 (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
2816 nodes to allow loose chaining of redundant clauses.
2817 (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
2818 Set_More_Ids, Set_Name): Modify set procedure calls to reflect
2819 reorganization in node fields.
2820 * types.ads (Source_File_Index): Adjust index bounds.
2821 (No_Access_To_Source_File): New constant.
2822
2823 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2824
2825 * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
2826 the expression to be used in the generated attribute specification
2827 (rather than relocating it) to avoid resolving a potentially malformed
2828 tree when the expression is resolved through an ASIS-specific call to
2829 Resolve_Aspect_Expressions. This manifests itself as a crash on a
2830 function with parameter associations.
2831
2832 2017-09-25 Yannick Moy <moy@adacore.com>
2833
2834 * exp_spark.adb (Expand_SPARK_Indexed_Component,
2835 Expand_SPARK_Selected_Component): New procedures to insert explicit
2836 dereference if required.
2837 (Expand_SPARK): Call the new procedures.
2838
2839 2017-09-25 Patrick Bernardi <bernardi@adacore.com>
2840
2841 * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
2842 libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
2843 libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
2844 libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
2845 libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
2846
2847 2017-09-25 Vasiliy Fofanov <fofanov@adacore.com>
2848
2849 * adaint.c (win32_wait): Properly handle error and take into account
2850 the WIN32 limitation on the number of simultaneous wait objects.
2851
2852 2017-09-25 Yannick Moy <moy@adacore.com>
2853
2854 * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
2855 invariant procedure in GNATprove mode.
2856 * sem_ch5.adb (Analyze_Assignment): Likewise.
2857
2858 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
2859
2860 * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
2861 "back-end" in comments.
2862
2863 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2864
2865 * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
2866 call that appears in a classwide precondition and that mentions an
2867 access formal of the subprogram, must use the accessibility level of
2868 the actual in the call. This is one case in which a reference to a
2869 formal parameter appears outside of the body of the subprogram.
2870
2871 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2872
2873 * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
2874 for GNATprove.
2875 (Resolve_Entry): Clean up predicate
2876
2877 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2878
2879 * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
2880 than Program_Error because U_E is more in line with respect to the
2881 intended behavior.
2882
2883 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2884
2885 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
2886 Storage_Size does not freeze, and thus can include references to
2887 deferred constants.
2888
2889 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2890
2891 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
2892 reference when it appears within a pragma of no significance to SPARK.
2893 (In_Insignificant_Pragma): New routine.
2894 * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
2895
2896 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2897
2898 * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
2899 actual is a renaming, indicate that it is the renamed package that must
2900 be frozen before the instantiation.
2901
2902 2017-09-25 Yannick Moy <moy@adacore.com>
2903
2904 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
2905 of dimensionality system in GNAT UG.
2906 * gnat_ugn.texi: Regenerate.
2907
2908 2017-09-25 Yannick Moy <moy@adacore.com>
2909
2910 * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
2911 GNATprove_Mode when switch -gnatdF used.
2912
2913 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
2914
2915 * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
2916 the backend.
2917
2918 2017-09-25 Javier Miranda <miranda@adacore.com>
2919
2920 * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
2921 expansion of user-defined enumeration types when the generation of
2922 names for enumeration literals is suppressed.
2923
2924 2017-09-25 Gary Dismukes <dismukes@adacore.com>
2925
2926 * libgnarl/s-taprop__linux.adb: Minor reformatting.
2927
2928 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2929
2930 * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
2931 that appear as selector names of parameter associations, as these are
2932 never resolved by visibility.
2933
2934 2017-09-25 Justin Squirek <squirek@adacore.com>
2935
2936 * sem_res.adb (Resolve_Entry): Generate reference for index entities.
2937
2938 2017-09-25 Doug Rupp <rupp@adacore.com>
2939
2940 * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
2941
2942 2017-09-25 Javier Miranda <miranda@adacore.com>
2943
2944 * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
2945 (Expand_User_Defined_Enumeration_Image): New subprogram.
2946 (Expand_Image_Attribute): Enable speed-optimized expansion of
2947 user-defined enumeration types when we are compiling with optimizations
2948 enabled.
2949
2950 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
2951
2952 * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
2953 routine is already provided by Einfo.
2954 * einfo.adb (Has_Null_Abstract_State): Replace with the body from
2955 Sem_Util, which had better comments and avoided double calls to
2956 Abstract_State.
2957
2958 2017-09-25 Bob Duff <duff@adacore.com>
2959
2960 * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
2961
2962 2017-09-25 Doug Rupp <rupp@adacore.com>
2963
2964 * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
2965 (Compute_Base_Monotonic_Clock): New function.
2966 (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
2967 (Timed_Delay): Likewise.
2968 (Monotonic_Clock): Likewise.
2969 * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
2970
2971 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2972
2973 * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
2974 previous change.
2975
2976 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2977
2978 * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
2979 Minor reformatting.
2980
2981 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
2982
2983 * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
2984
2985 2017-09-18 Bob Duff <duff@adacore.com>
2986
2987 * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
2988 reference types in the access-to-access case.
2989
2990 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
2991
2992 * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
2993 of the "aliased" keyword on the prefix from here to...
2994 (Resolve_Attribute) <Attribute_Access>: ...here. Remove useless call
2995 to Check_No_Implicit_Aliasing.
2996 * sinfo.ads (Non_Aliased_Prefix): Delete.
2997 (Set_Non_Aliased_Prefix): Likewise.
2998 * sinfo.adb (Non_Aliased_Prefix): Delete.
2999 (Set_Non_Aliased_Prefix): Likewise.
3000
3001 2017-09-18 Bob Duff <duff@adacore.com>
3002
3003 * exp_ch5.adb (Build_Formal_Container_Iteration,
3004 Expand_Formal_Container_Element_Loop): Convert the container to the
3005 root type before passing it to the iteration operations, so it will be
3006 of the right type.
3007
3008 2017-09-18 Bob Duff <duff@adacore.com>
3009
3010 * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
3011
3012 2017-09-18 Bob Duff <duff@adacore.com>
3013
3014 * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
3015 and it's a bit-packed array, pass False to the Consider_IS parameter of
3016 Needs_Simple_Initialization.
3017
3018 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
3019
3020 * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
3021 the preexisting body.
3022 * sem_prag.adb (Check_Inline_Always_Placement): New routine.
3023 (Process_Inline): Verify the placement of pragma Inline_Always. The
3024 pragma must now appear on the initial declaration of the related
3025 subprogram.
3026
3027 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3028
3029 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, At the end of the
3030 declarative list in a subprogram body, analyze aspext specifications to
3031 provide basic semantic information, because otherwise the aspect
3032 specifications might only be snalyzed during expansion, when related
3033 subprograms are generated.
3034
3035 2017-09-18 Bob Duff <duff@adacore.com>
3036
3037 * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
3038 validity checks have rewritten the tree.
3039
3040 2017-09-18 Bob Duff <duff@adacore.com>
3041
3042 * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
3043
3044 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3045
3046 * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
3047 qualified exxpression for an aggregate in a generic unit, verify that
3048 the scope of the type is itself visible and not hidden, so that the
3049 qualified expression is correctly resolved in any instance.
3050
3051 2017-09-18 Bob Duff <duff@adacore.com>
3052
3053 * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
3054 mark refers to the current instance. Set the type to Any_Type in that
3055 case, to avoid later crashes.
3056
3057 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3058
3059 * exp_ch3.adb (Replace_Discriminant_References): New procedure,
3060 subsidiary of Build_Assignment, used to handle the initialization code
3061 for a mutable record component whose default value is an aggregate that
3062 sets the values of the discriminants of the components.
3063
3064 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
3065
3066 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
3067 the entity as being volatile for an overlay that toggles the scalar
3068 storage order.
3069
3070 2017-09-18 Fedor Rybin <frybin@adacore.com>
3071
3072 * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
3073 options -U main and --harness-only are not compatible.
3074
3075 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
3076
3077 * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
3078
3079 2017-09-18 Piotr Trojanek <trojanek@adacore.com>
3080
3081 * einfo.ads (Is_Imported): Update comment, as this
3082 routine also applies to constants.
3083
3084 2017-09-18 Yannick Moy <moy@adacore.com>
3085
3086 * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
3087 holding state.
3088
3089 2017-09-18 Justin Squirek <squirek@adacore.com>
3090
3091 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
3092 constant indication for Pragma_Linker_Section.
3093
3094 2017-09-18 Bob Duff <duff@adacore.com>
3095
3096 Alternate fix for PR ada/71358
3097 * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
3098 Instead, make a local copy of Config, and if it's null, allocate an
3099 empty Command_Line_Configuration_Record, so we won't crash on null
3100 pointer dereference.
3101
3102 2017-09-16 Eric Botcazou <ebotcazou@adacore.com>
3103
3104 * libgnarl/a-intnam__rtems.ads: Update copyright date.
3105 * libgnarl/s-interr__hwint.adb: Likewise.
3106 * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
3107 * libgnarl/s-osinte__rtems.adb: Likewise.
3108 * libgnarl/s-osinte__rtems.ads: Likewise.
3109
3110 2017-09-13 Nicolas Roche <roche@adacore.com>
3111
3112 * Make-lang.in: In the fallback mechanim, parse the associated .ali
3113 file and try to guess the locations of dependencies.
3114
3115 2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
3116
3117 * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
3118 the suppression status of Alignment_Check on the current scope.
3119 (Alignment_Checks_Suppressed): New function to use the saved instead of
3120 the current suppression status of Alignment_Check.
3121 (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
3122 (Analyze_Attribute_Definition_Clause): Instead of manually appending to
3123 the table, call Register_Address_Clause_Check.
3124 (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
3125 recorded address clause instead of its entity.
3126
3127 2017-09-13 Jerome Guitton <guitton@adacore.com>
3128
3129 * libgnarl/s-tpopsp__vxworks-tls.adb,
3130 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
3131 (Self): Register thread if task id is null.
3132
3133 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3134
3135 * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
3136
3137 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3138
3139 * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
3140 from an entity to only scope index, as a mapping from an entity to the
3141 same entity was useless.
3142 (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
3143 to E.
3144 (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
3145 to E.
3146 (Is_Constant_Object_Without_Variable_Input): remove local "Result"
3147 variable, just use return statements.
3148
3149 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3150
3151 * libgnarl/s-vxwext__kernel-smp.adb,
3152 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
3153 New file.
3154
3155 2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
3156
3157 * einfo.adb: Flag42 is now Is_Controlled_Active.
3158 (Is_Controlled): This attribute is now synthesized.
3159 (Is_Controlled_Active): This attribute is now an explicit flag rather
3160 than a synthesized attribute. (Set_Is_Controlled): Removed.
3161 (Set_Is_Controlled_Active): New routine.
3162 (Write_Entity_Flags): Update the output for Flag42.
3163 * einfo.ads: Update the documentation of the following attributes:
3164 Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
3165 and Is_Controlled_Active have swapped their functionality.
3166 (Is_Controlled): Renamed to Is_Controlled_Active.
3167 (Is_Controlled_Active): Renamed to Is_Controlled.
3168 (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
3169 * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
3170 Is_Controlled.
3171 * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
3172 (Needs_Finalization): Code clean up. Remove the tests for
3173 Disable_Controlled because a) they were incorrect as they would reject
3174 a type which is sublect to the aspect, but may contain controlled
3175 components, and b) they are no longer necessary.
3176 * exp_util.ads (Needs_Finalization): Update comment on documentation.
3177 * freeze.adb (Freeze_Array_Type): Restore the original use of
3178 Is_Controlled.
3179 (Freeze_Record_Type): Restore the original use of Is_Controlled.
3180 * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
3181 Is_Controlled.
3182 (Array_Type_Declaration): Restore the original use of Is_Controlled.
3183 (Build_Derived_Private_Type): Restore the original use of
3184 Is_Controlled.
3185 (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
3186 type derived from Ada.Finalization.[Limited_]Controlled.
3187 (Build_Derived_Type): Restore the original use of Is_Controlled.
3188 (Record_Type_Definition): Restore the original use of Is_Controlled.
3189 * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
3190 Is_Controlled.
3191 * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
3192 (Analyze_Aspect_Specifications): Use routine
3193 Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
3194
3195 2017-09-13 Vincent Celier <celier@adacore.com>
3196
3197 * clean.adb (Gnatclean): Fix error when looking for target
3198 of <target>-gnatclean
3199
3200 2017-09-13 Javier Miranda <miranda@adacore.com>
3201 Ed Schonberg <schonberg@adacore.com>
3202
3203 * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
3204 expanded name that designates the current instance of a child unit in
3205 its own body and appears as the prefix of a reference to an entity
3206 local to the child unit.
3207
3208 2017-09-12 Bob Duff <duff@adacore.com>
3209
3210 * sem_warn.adb: Minor comment.
3211
3212 2017-09-12 Bob Duff <duff@adacore.com>
3213
3214 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
3215 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
3216 be Default_Initialized_Item, and apply pragma Unmodified to it,
3217 to suppress the warning.
3218
3219 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3220
3221 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
3222 for access types.
3223
3224 2017-09-12 Yannick Moy <moy@adacore.com>
3225
3226 * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
3227 together with Global when ignoring one in CodePeer mode.
3228
3229 2017-09-12 Javier Miranda <miranda@adacore.com>
3230
3231 * sem_ch3.adb (Analyze_Declarations): In nested
3232 package declarations that have a private part enable missing check
3233 of the RM rule 13.1.1(11/3): usage names in aspect definitions are
3234 resolved at the end of the immediately enclosing declaration list.
3235
3236 2017-09-12 Bob Duff <duff@adacore.com>
3237
3238 * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
3239 Empty.
3240
3241 2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
3242
3243 * debug.adb: Reserving flag -gnatdF for safe pointer checking.
3244 * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
3245 dF flag.
3246 * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
3247 in preparation for the evolution of the SPARK language that
3248 includes a pointer analysis for checking non-aliasing of access
3249 types. The Check_Safe_Pointers function is the entry point, and
3250 will traverse the AST and raise compile-time errors everytime
3251 it detects non-begign aliasing. Detailed comments are present
3252 in the sem_spark.ads file.
3253 * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
3254 functions to iterate over the list of globals of a subprogram.
3255 * libgnat/system.ads: Add restriction No_Finalization.
3256 * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
3257 dependency on g-dynhta.adb.
3258
3259 2017-09-12 Bob Duff <duff@adacore.com>
3260
3261 * sem_ch6.adb (Analyze_Expression_Function): Call
3262 Check_Dynamically_Tagged_Expression.
3263 * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
3264 "and then Is_Tagged_Type (Typ)" because there is an earlier
3265 "Assert (Is_Tagged_Type (Typ))".
3266
3267 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3268
3269 * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
3270
3271 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3272
3273 * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
3274 * doc/gnat_ugn/platform_specific_information.rst: Remove doc
3275 for no longer supported platforms.
3276 * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
3277 description of the semantics for dimensionality analysis.
3278 * gnat_ugn.texi: Regenerated.
3279
3280 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3281
3282 * freeze.adb (Has_Incomplete_Compoent): Delete.
3283 (Freeze_Profile):
3284 Do not inhibit the freezing of the profile of an expression
3285 function here.
3286 (Freeze_Subprogram): Do not re-create extra formals.
3287 * sem_ch6.adb (Analyze_Expression_Function): Always
3288 pre-analyze the expression if the function is not a completion.
3289 (Analyze_Subprogram_Body_Helper): For the body generated
3290 from an expression function that is not a completion, do
3291 not freeze the profile and temporary mask the types declared
3292 outside the expression that are not yet frozen.
3293 * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
3294 during the pre-analysis of an expression function.
3295
3296 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3297
3298 * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
3299 (gigi): Likewise.
3300
3301 2017-09-11 Yannick Moy <moy@adacore.com>
3302
3303 * lib-xref-spark_specific.adb: Minor rewrite.
3304
3305 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3306
3307 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
3308 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
3309 renaming into account.
3310
3311 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3312
3313 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
3314 * gcc-interface/Makefile.in: Take this renaming into account.
3315
3316 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3317
3318 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
3319 longer used.
3320
3321 2017-09-11 Yannick Moy <moy@adacore.com>
3322
3323 * sem_util.adb (Check_Result_And_Post_State):
3324 Do not issue a warning about missing reference to an outcome if
3325 the subprogram is ghost and has no outputs.
3326 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
3327 reformatting.
3328
3329 2017-09-11 Yannick Moy <moy@adacore.com>
3330
3331 * gnat1drv.adb (Adjust_Global_Switches): Set
3332 Check_Validity_Of_Parameters to False in GNATprove mode.
3333 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3334 set option.
3335
3336 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
3337
3338 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
3339 generate debug info for inner record types if -fgnat-encodings=minimal.
3340 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
3341 type as the debug type.
3342
3343 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3344
3345 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
3346 packed record types if pragma Optimize_Alignment (Space) is enabled.
3347
3348 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3349
3350 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
3351 limits for expression functions.
3352 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
3353
3354 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3355
3356 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
3357 layout of the record from the parent type only if both are or are not
3358 unchecked unions.
3359 (is_stored_discriminant): Return false for an unchecked union.
3360
3361 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3362
3363 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
3364 return NULL_EXPR.
3365
3366 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3367
3368 * gcc-interface/decl.c (promote_object_alignment): New function taken
3369 from...
3370 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
3371 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
3372 create a padding type on success before doing the atomic check.
3373
3374 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3375
3376 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
3377 promotion to static memory earlier in the processing.
3378
3379 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3380
3381 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
3382 and TYPE_BY_REFERENCE_P flags on types after various promotions.
3383 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
3384 Consider all kinds of entities.
3385
3386 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3387
3388 * gcc-interface/utils.c (convert): When converting to a padding type,
3389 reuse an existing CONSTRUCTOR if it has got the right size.
3390
3391 2017-09-08 Nicolas Roche <roche@adacore.com>
3392
3393 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
3394 source in libgnat/
3395 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
3396 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
3397 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
3398 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
3399 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
3400 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
3401 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
3402 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
3403 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
3404 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
3405 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
3406 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
3407 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
3408 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
3409 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
3410 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
3411 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
3412 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
3413 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
3414 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
3415 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
3416 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
3417 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
3418 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
3419 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
3420 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
3421 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
3422 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
3423 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
3424 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
3425 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
3426 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
3427 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
3428 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
3429 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
3430 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
3431 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
3432 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
3433 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
3434 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
3435 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
3436 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
3437 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
3438 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
3439 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
3440 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
3441 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
3442 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
3443 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
3444 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
3445 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
3446 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
3447 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
3448 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
3449 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
3450 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
3451 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
3452 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
3453 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
3454 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
3455 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
3456 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
3457 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
3458 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
3459 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
3460 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
3461 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
3462 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
3463 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
3464 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
3465 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
3466 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
3467 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
3468 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
3469 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
3470 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
3471 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
3472 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
3473 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
3474 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
3475 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
3476 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
3477 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
3478 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
3479 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
3480 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
3481 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
3482 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
3483 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
3484 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
3485 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
3486 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
3487 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
3488 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
3489 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
3490 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
3491 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
3492 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
3493 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
3494 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
3495 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
3496 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
3497 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
3498 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
3499 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
3500 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
3501 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
3502 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
3503 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
3504 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
3505 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
3506 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
3507 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
3508 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
3509 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
3510 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
3511 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
3512 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
3513 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
3514 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
3515 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
3516 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
3517 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
3518 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
3519 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
3520 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
3521 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
3522 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
3523 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
3524 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
3525 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
3526 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
3527 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
3528 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
3529 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
3530 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
3531 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
3532 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
3533 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
3534 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
3535 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
3536 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
3537 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
3538 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
3539 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
3540 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
3541 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
3542 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
3543 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
3544 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
3545 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
3546 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
3547 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
3548 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
3549 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
3550 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
3551 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
3552 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
3553 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
3554 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
3555 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
3556 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
3557 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
3558 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
3559 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
3560 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
3561 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
3562 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
3563 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
3564 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
3565 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
3566 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
3567 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
3568 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
3569 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
3570 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
3571 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
3572 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
3573 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
3574 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
3575 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
3576 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
3577 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
3578 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
3579 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
3580 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
3581 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
3582 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
3583 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
3584 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
3585 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
3586 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
3587 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
3588 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
3589 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
3590 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
3591 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
3592 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
3593 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
3594 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
3595 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
3596 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
3597 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
3598 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
3599 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
3600 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
3601 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
3602 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
3603 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
3604 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
3605 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
3606 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
3607 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
3608 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
3609 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
3610 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
3611 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
3612 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
3613 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
3614 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
3615 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
3616 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
3617 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
3618 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
3619 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
3620 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
3621 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
3622 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
3623 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
3624 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
3625 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
3626 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
3627 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
3628 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
3629 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
3630 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
3631 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
3632 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
3633 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
3634 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
3635 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
3636 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
3637 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
3638 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
3639 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
3640 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
3641 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
3642 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
3643 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
3644 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
3645 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
3646 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
3647 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
3648 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
3649 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
3650 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
3651 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
3652 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
3653 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
3654 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
3655 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
3656 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
3657 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
3658 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
3659 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
3660 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
3661 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
3662 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
3663 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
3664 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
3665 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
3666 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
3667 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
3668 to libgnat subdirectory.
3669
3670 2017-09-08 Yannick Moy <moy@adacore.com>
3671
3672 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
3673 return the entity associated with the call.
3674 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
3675 Replace the internal Get_Function_Id with the new
3676 Sem_Aux.Get_Called_Entity.
3677 (Iterate_Call_Parameters): New
3678 procedure to iterate on formals and actuals at the same time.
3679 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
3680 Set SPARK_Mode from spec when set, for analysis
3681 of instance. Restore after analysis of instance.
3682 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
3683 set, for analysis of body instance. Restored automatically at
3684 the end of the subprogram.
3685 * gnat1drv.adb (Adjust_Global_Switches): Set
3686 Check_Validity_Of_Parameters to False in GNATprove mode.
3687 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3688 set option.
3689
3690 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3691
3692 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
3693 (New_Copy_Tree): ...there. Reset the hash tables only if they
3694 were used in the previous invocation.
3695 * s-htable.adb: Fix typo.
3696
3697 2017-09-08 Bob Duff <duff@adacore.com>
3698
3699 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
3700
3701 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3702
3703 * sem_aggr.adb: minor style fix.
3704
3705 2017-09-08 Bob Duff <duff@adacore.com>
3706
3707 * sprint.adb (Write_Corresponding_Source): Ignore if there is
3708 no current source file.
3709 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
3710 Print something helpful in case N is invalid.
3711 * sprint.ads: Minor comment fix.
3712
3713 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3714
3715 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
3716 access types.
3717
3718 2017-09-08 Bob Duff <duff@adacore.com>
3719
3720 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
3721 Ada_2020, along the same lines as the other Ada version pragmas.
3722
3723 2017-09-08 Gary Dismukes <dismukes@adacore.com>
3724
3725 * sem_ch12.adb: Minor typo fixes and reformatting.
3726
3727 2017-09-08 Yannick Moy <moy@adacore.com>
3728
3729 * sem_aggr.adb (Resolve_Record_Aggregate):
3730 Rewrite bounds of aggregate subexpressions which may depend on
3731 discriminants of the enclosing aggregate.
3732
3733 2017-09-08 Yannick Moy <moy@adacore.com>
3734
3735 * sem_ch5.adb: Prevent assertion failure on illegal code.
3736
3737 2017-09-08 Yannick Moy <moy@adacore.com>
3738
3739 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
3740 calling Renamed_Entity on an entity which cannot be a renaming.
3741
3742 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3743
3744 * exp_aggr.adb: Add with & use clause for Urealp.
3745 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
3746 elementary types instead of just discrete types.
3747 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
3748 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
3749 Be prepared for the FP zero value in the memset case. Add small
3750 guard.
3751
3752 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3753
3754 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
3755 of loop.
3756
3757 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3758
3759 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
3760 of New_Copy because the latter leaves the syntactic structure of
3761 the tree inconsistent (a child is accessible through two parents)
3762 and prevents proper replication of itypes by subsequent calls
3763 to New_Copy_Tree.
3764 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
3765 New_Copy because the latter leaves the syntactic structure of the
3766 tree inconsistent (a child is accessible through two parents)
3767 and prevents proper replication of itypes by subsequent calls
3768 to New_Copy_Tree.
3769 * sem_util.adb (In_Subtree): New routine.
3770 (New_Copy_Tree): Reimplemented.
3771 * sem_util.ads (In_Subtree): New routine.
3772 (New_Copy_Tree): Reimplemented.
3773
3774 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3775
3776 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
3777 for aspect Default_Value is a static scalar value, but it does
3778 not freeze the type. Yhis allows for subsequent representation
3779 clauses for the type.
3780
3781 2017-09-08 Javier Miranda <miranda@adacore.com>
3782
3783 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
3784 not add entries into the undefined reference table when we are
3785 compiling with errors ignored.
3786
3787 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3788
3789 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
3790 check if the instance is within an enclosing instance body. The
3791 formal package was legal in the enclosing generic, and is
3792 legal in the enclosing instantiation. This optimisation may be
3793 applicable elsewhere, and it also removes spurious errors that
3794 may arise with on-the-fly processing of instantiations that
3795 contain Inline_Always subprograms.
3796
3797 2017-09-08 Vincent Celier <celier@adacore.com>
3798
3799 * gnatcmd.adb: Disregard empty argument of GNAT driver.
3800
3801 2017-09-08 Justin Squirek <squirek@adacore.com>
3802
3803 * checks.adb (Insert_Valid_Check): Manually decorate
3804 the generated temporary for range valdity checks.
3805
3806 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3807
3808 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
3809
3810 2017-09-08 Justin Squirek <squirek@adacore.com>
3811
3812 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
3813 case to handle underscore flags.
3814 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
3815 new procedure to handle underscores.
3816
3817 2017-09-08 Javier Miranda <miranda@adacore.com>
3818
3819 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
3820 divisions with fixed point results to avoid generating twice
3821 the runtime check on divide by zero.
3822 * checks.adb (Apply_Divide_Checks): Ensure that operands are
3823 not evaluated twice (once for their runtime checks and once for
3824 their regular computation).
3825
3826 2017-09-08 Yannick Moy <moy@adacore.com>
3827
3828 * sem_prag.adb (Analyze_Part_Of): Add missing
3829 return statements after issuing errors. Add detection of
3830 out-of-order item and single concurrent type.
3831
3832 2017-09-08 Nicolas Roche <roche@adacore.com>
3833
3834 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
3835 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
3836 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
3837 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
3838 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
3839 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
3840 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
3841 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
3842 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
3843 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
3844 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
3845 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
3846 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
3847 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
3848 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
3849 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
3850 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
3851 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
3852 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
3853 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
3854 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
3855 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
3856 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
3857 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
3858 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
3859 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
3860 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
3861 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
3862 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
3863 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
3864 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
3865 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
3866 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
3867 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
3868 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
3869 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
3870 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
3871 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
3872 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
3873 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
3874 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
3875 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
3876 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
3877 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
3878 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
3879 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
3880 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
3881 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
3882 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
3883 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
3884 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
3885 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
3886 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
3887 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
3888
3889 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3890
3891 * doc/share/conf.py, doc/share/latex_elements.py,
3892 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
3893 highlighting.
3894
3895 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3896
3897 * gnat_rm.texi, gnat_ugn.texi,
3898 doc/gnat_ugn/the_gnat_compilation_model.rst,
3899 doc/gnat_ugn/getting_started_with_gnat.rst,
3900 doc/gnat_ugn/inline_assembler.rst,
3901 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3902 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
3903 doc/gnat_ugn/about_this_guide.rst,
3904 doc/gnat_ugn/platform_specific_information.rst,
3905 doc/gnat_ugn/example_of_binder_output.rst,
3906 doc/gnat_ugn/gnat_and_program_execution.rst,
3907 doc/gnat_ugn/gnat_utility_programs.rst,
3908 doc/gnat_rm/implementation_of_specific_ada_features.rst,
3909 doc/gnat_rm/interfacing_to_other_languages.rst,
3910 doc/gnat_rm/implementation_defined_aspects.rst,
3911 doc/gnat_rm/intrinsic_subprograms.rst,
3912 doc/gnat_rm/implementation_defined_characteristics.rst,
3913 doc/gnat_rm/implementation_advice.rst,
3914 doc/gnat_rm/implementation_defined_attributes.rst,
3915 doc/gnat_rm/compatibility_and_porting_guide.rst,
3916 doc/gnat_rm/standard_library_routines.rst,
3917 doc/gnat_rm/the_gnat_library.rst,
3918 doc/gnat_rm/implementation_defined_pragmas.rst,
3919 doc/gnat_rm/representation_clauses_and_pragmas.rst,
3920 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3921 doc/gnat_rm/obsolescent_features.rst,
3922 doc/gnat_rm/about_this_guide.rst,
3923 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
3924 doc/gnat_rm/implementation_of_ada_2012_features.rst,
3925 doc/gnat_ugn.rst,
3926 doc/gnat_rm.rst: Update documentation.
3927
3928 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3929
3930 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
3931 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
3932 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
3933
3934 2017-09-08 Bob Duff <duff@adacore.com>
3935
3936 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
3937 New routine to read the Tag robustly.
3938 * exp_attr.adb (Input): Change the expansion of 'Input,
3939 in the class-wide case, to call String_Input_Tag instead of
3940 String_Input_Blk_IO.
3941
3942 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3943
3944 * s-rident.ads (Restriction_Id): reorder enum
3945 literals, so that Pure_Barriers is no longer in range of the
3946 Cunit_Boolean_Restrictions subtype.
3947
3948 2017-09-08 Nicolas Roche <roche@adacore.com>
3949
3950 * a-taster.ads, a-taster.adb: Move to libgnarl
3951 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
3952 Add support for files in libgnarl.
3953
3954 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3955
3956 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
3957 accessibility check to an interface conversion, whose purpose
3958 is to perform a pointer adjustment in a dispatching call.
3959 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
3960 when the actual is a construct that involves a dereference of an
3961 expression that includes a formal of the enclosing subprogram,
3962 In such cases, the accessibility level of the actual is that of
3963 the corresponding formal, which is passed in as an additional
3964 actual in the outer call.
3965
3966 2017-09-08 Bob Duff <duff@adacore.com>
3967
3968 * exp_intr.adb (Add_Source_Info): Do not decode
3969 file names; they were not encoded in the first place.
3970
3971 2017-09-08 Bob Duff <duff@adacore.com>
3972
3973 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
3974 exceptions instead of crashes. Check for absurdly long strings
3975 and empty strings. Empty strings cause trouble because they can
3976 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
3977 be empty, which causes an array index out of bounds.
3978 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
3979 instead of crashes.
3980
3981 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3982
3983 * sem_util.adb (Is_CCT_Instance): allow use in
3984 the context of protected types.
3985
3986 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3987
3988 * a-tigeli.adb: minor remove extra whitespace.
3989
3990 2017-09-08 Gary Dismukes <dismukes@adacore.com>
3991
3992 * par-ch4.adb: Reformatting of an error message.
3993
3994 2017-09-08 Javier Miranda <miranda@adacore.com>
3995
3996 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
3997 identifiers to ensure their correct decoration of names on
3998 aspect expressions.
3999
4000 2017-09-08 Yannick Moy <moy@adacore.com>
4001
4002 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
4003 not skip a loop coming from source which is rewritten into a loop.
4004
4005 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4006
4007 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4008 wrapper has convention Ada, to prevent spurious warnings on
4009 unconstrained array parameters.
4010
4011 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4012
4013 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
4014 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
4015
4016 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4017
4018 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
4019
4020 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4021
4022 * exp_intr.adb (Append_Entity_Name): Move to ...
4023 * sem_util.ads, sem_util.adb: ... here to share it.
4024 (Subprogram_Name): New subprogram, to compute the name of the enclosing
4025 subprogram/entity.
4026 * errutil.adb (Error_Msg): Fill new field Node.
4027 * erroutc.ads (Subprogram_Name_Ptr): New.
4028 (Error_Msg_Object): New field Node.
4029 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
4030 * errout.adb (Error_Msg): New variant with node id parameter.
4031 Fill new parameter Node when emitting messages. Revert previous
4032 changes for Include_Subprogram_In_Messages.
4033 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
4034 generating warning message.
4035
4036 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4037
4038 * par-ch4.adb (P_Iterated_Component_Association): Place construct
4039 under -gnat2020 flag, given that it is a future feature of
4040 the language.
4041 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
4042 defining identifier as referenced to prevent spurious warnings:
4043 corresponding loop is expanded into one or more loops whose
4044 variable has the same name, and the expression uses those names
4045 and not the original one.
4046
4047 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4048
4049 * sem_elab.adb (Check_A_Call): Do not consider
4050 references to internal variables for SPARK semantics.
4051
4052 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4053
4054 * inline.adb (In_Package_Spec): refine type of
4055 the parameter from Node_Id to Entity_Id.
4056
4057 2017-09-08 Justin Squirek <squirek@adacore.com>
4058
4059 * exp_ch5.adb (Expand_Formal_Container_Loop):
4060 Reset the scope of the loop parameter after it is reanalyzed.
4061
4062 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4063
4064 * sem_util.ads (Set_Rep_Info): New inline procedure.
4065 * sem_util.adb (Set_Rep_Info): Implement it.
4066 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
4067 always copy the representation aspects onto the subtype.
4068
4069 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
4070
4071 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
4072 Correction of the return type from access type to option type.
4073 (Simple_HTable): Moving the Instance_Data to ads file.
4074
4075 2017-09-08 Yannick Moy <moy@adacore.com>
4076
4077 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
4078
4079 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4080
4081 * opt.ads (Include_Subprogram_In_Messages): New variable.
4082 * errout.ads (Current_Subprogram_Ptr): New variable.
4083 * errout.adb (Error_Msg): Prepend current subprogram info
4084 in messages if Include_Subprogram_In_Messages is set.
4085 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
4086 Current_Subprogram.
4087 * gnat1drv.adb (Adjust_Global_Switches): Set
4088 Include_Subprogram_In_Messages when -gnatdJ is set.
4089 * debug.adb: Document and reserve -gnatdJ.
4090
4091 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
4092
4093 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
4094 functions to iterate over simple hastables.
4095 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
4096
4097 2017-09-08 Javier Miranda <miranda@adacore.com>
4098
4099 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
4100 missing checks on the presence of Entity() before checking the
4101 entity attributes.
4102
4103 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4104
4105 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
4106 statements, use local variable and remove unnecessary processing.
4107
4108 2017-09-08 Javier Miranda <miranda@adacore.com>
4109
4110 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
4111 subprogram.
4112 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
4113 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4114 subprogram.
4115 (Unqual_BIP_Iface_Function_Call): New subprogram.
4116 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
4117 subprogram containing code that was previously inside
4118 Make_Build_In_Place_Call_In_Object_Declaration since it is also
4119 required for one of the new subprograms.
4120 (Expand_Actuals):
4121 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
4122 (Expand_N_Extended_Return_Statement): Extend the
4123 cases covered by an assertion on expected BIP object
4124 declarations.
4125 (Make_Build_In_Place_Call_In_Assignment):
4126 Removing unused code; found working on this ticket.
4127 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
4128 that replaces the internal name of the renaming declaration
4129 into the new subprogram Replace_Renaming_Declaration_Id.
4130 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
4131 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
4132 New subprogram.
4133 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4134 subprogram.
4135 (Unqual_BIP_Iface_Function_Call): New subprogram.
4136 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
4137 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
4138 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
4139 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4140 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
4141 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
4142 (Expand_N_Indexed_Component): Invoke the new subprogram
4143 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4144 (Expand_N_Selected_Component): Invoke the new subprogram
4145 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4146 (Expand_N_Slice): Invoke the new subprogram
4147 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4148 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
4149 Invoke the new subprogram
4150 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4151
4152 2017-09-08 Javier Miranda <miranda@adacore.com>
4153
4154 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
4155 access to interface types. Remove also the accessibility check.
4156
4157 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4158
4159 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
4160 all the types that are referenced by the expression.
4161 (Analyze_Expression_Function): Call Freeze_Expr_Types for
4162 a completion instead of manually freezing the type of the
4163 expression.
4164 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
4165
4166 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4167
4168 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
4169 New procedure, auxiliary to Expand_Pragma_Check, to handle
4170 references to the discriminants of a protected type within a
4171 precondition of a protected operation. This is needed because
4172 the original precondition has been analyzed in the context of
4173 the protected declaration, but in the body of the operation
4174 references to the discriminants have been replaved by references
4175 to the discriminants of the target object, and these references
4176 are only created when expanding the protected body.
4177
4178 2017-09-08 Yannick Moy <moy@adacore.com>
4179
4180 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
4181 Loop_Variant.
4182
4183 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4184
4185 * exp_attr.adb (Build_Record_VS_Func): If the record is an
4186 unchecked union, do not emit checks for its (non-existent)
4187 discriminants, or for variant parts that depend on them.
4188
4189 2017-09-08 Justin Squirek <squirek@adacore.com>
4190
4191 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
4192 Find_Comparison_Type.Try_One_Interp): Add check for generic
4193 instances.
4194
4195 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4196
4197 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
4198 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
4199 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
4200 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
4201 remaining references to AAMP_On_Target.
4202
4203 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4204
4205 * style.adb: Fix typo.
4206
4207 2017-09-08 Javier Miranda <miranda@adacore.com>
4208
4209 * einfo.adb (Underlying_Type): Add missing support for class-wide
4210 types that come from the limited view.
4211 * exp_attr.adb (Attribute_Address): Check class-wide type
4212 interfaces using the underlying type to handle limited-withed
4213 types.
4214 (Attribute_Tag): Check class-wide type interfaces using
4215 the underlying type to handle limited-withed types.
4216
4217 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4218
4219 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
4220 over a subtype of a type with a static predicate, taking into
4221 account the predicate function of the parent type and the bounds
4222 given in the loop specification.
4223 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
4224 a loop specification that is a subtype indication whose type mark
4225 is a type with a static predicate, inherit predicate function,
4226 used to build case statement for rewritten loop.
4227
4228 2017-09-08 Justin Squirek <squirek@adacore.com>
4229
4230 * lib-load.adb: Modify printing of error message to exclude file
4231 line number.
4232
4233 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4234
4235 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
4236 don't inline subprograms declared in both visible and private
4237 parts of a package.
4238 (In_Package_Spec): previously In_Package_Visible_Spec; now
4239 detects subprograms declared both in visible and private parts
4240 of a package spec.
4241
4242 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4243
4244 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
4245 the type is an anonymous array in an object declaration, whose
4246 component type has an invariant, use the object declaration
4247 as the insertion point for the invariant procedure, given that
4248 there is no explicit type declaration for an anonymous array type.
4249
4250 2017-09-08 Bob Duff <duff@adacore.com>
4251
4252 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
4253
4254 2017-09-08 Bob Duff <duff@adacore.com>
4255
4256 * a-strfix.adb (Trim): Compute Low and High only if needed.
4257
4258 2017-09-08 Justin Squirek <squirek@adacore.com>
4259
4260 * lib-load.adb (Load_Main_Source): Add error output in the case a
4261 source file is missing.
4262
4263 2017-09-08 Bob Duff <duff@adacore.com>
4264
4265 PR ada/80888
4266 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
4267 Default_WCEM by default (i.e. if the encoding is not specified
4268 by the Form string).
4269
4270 2017-09-08 Bob Duff <duff@adacore.com>
4271
4272 * s-trasym.ads (Hexa_Traceback): If
4273 Suppress_Hex is True, print "..." instead of a hexadecimal
4274 address.
4275 * s-trasym.adb: Ignore No_Hex in this version.
4276 Misc cleanup.
4277
4278 2017-09-08 Bob Duff <duff@adacore.com>
4279
4280 * debug.adb: Minor reformatting.
4281
4282 2017-09-08 Bob Duff <duff@adacore.com>
4283
4284 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
4285 code so it doesn't trigger an "uninit var" warning.
4286
4287 2017-09-08 Nicolas Roche <roche@adacore.com>
4288
4289 * s-hibaen.ads: Remove obsolete file.
4290
4291 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4292
4293 * a-locale.ads: Add comment explaining the state of this package.
4294
4295 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4296
4297 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
4298 of packages.
4299 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
4300 allow calls in the context of package spec (for pragma
4301 Initializes) and bodies (for pragma Refined_State).
4302
4303 2017-09-08 Bob Duff <duff@adacore.com>
4304
4305 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
4306 new Exp.
4307
4308 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4309
4310 * debug.adb (dA): Adjust comment.
4311 * gnat1drv.adb (Gnat1drv): Likewise.
4312 * opt.ads (List_Representation_Info_Extended): New variable.
4313 * repinfo.adb (List_Record_Info): Split implementation into...
4314 (Compute_Max_Length): ...this. Recurse on records if requested.
4315 (List_Record_Layout): Likewise.
4316 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
4317 statement, accept '0' and set List_Representation_Info_Extended
4318 on 'e'.
4319 * usage.adb (Usage): Document new -gnatRe variant.
4320
4321 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4322
4323 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
4324 Do not save the given entity in the global variable Default_Pool
4325 if the pragma appears within a generic unit.
4326
4327 2017-09-08 Bob Duff <duff@adacore.com>
4328
4329 * errout.adb (Delete_Warning): Do not
4330 decrement Warnings_Treated_As_Errors. This is called before
4331 Warnings_Treated_As_Errors has been incremented to account for
4332 this warning. Decrementing it here can lead to negative values
4333 of Warnings_Treated_As_Errors, raising Constraint_Error in
4334 checks-on builds, and causing the compiler to return an error
4335 code in checks-off builds.
4336
4337 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4338
4339 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
4340 entities of named concurrent types as Ref_Id and not of anonymous
4341 concurrent objects (because callers already know when a conversion
4342 is necessary and can easily do it); also, do not expect protected
4343 types or protected objects as Context_Id (because no flow-related
4344 SPARK pragmas are attached there); reflect these changes in a
4345 more precise comment.
4346
4347 2017-09-08 Olivier Hainque <hainque@adacore.com>
4348
4349 * g-altive.ads: Add documentation.
4350
4351 2017-09-08 Bob Duff <duff@adacore.com>
4352
4353 * sem_util.ads, debug.adb: Minor comment fix.
4354 * erroutc.ads: Comment fix.
4355
4356 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4357
4358 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
4359 for compatibility of component types of formal and actual in an
4360 instantiation of a child unit, when the component type of the
4361 formal is itself a formal of an enclosing generic.
4362
4363 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4364
4365 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
4366 sem_prag.adb to make it available for GNATprove; for concurrent
4367 types replace custom scope climbing with Scope_Same_Or_Within; for
4368 single concurrent objects add scope climbing (with Scope_Within),
4369 which was not there (that's the primary semantic change of this
4370 commit); also, when comparing a single concurrent object with
4371 its corresponding concurrent type rely on equality of types,
4372 not of objects (because that's simpler to code).
4373 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
4374 (Analyze_Global_Item): adjust special-casing of references to the
4375 current instance of a concurrent unit in the Global contracts
4376 of task types and single tasks objects; similar for references
4377 in the protected operations and entries of protected types and
4378 single protected objects (in all these cases the current instance
4379 behaves as an implicit parameter and must not be mentioned in
4380 the Global contract).
4381
4382 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4383
4384 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
4385 function calls returning a record within a subprogram call,
4386 for C generation.
4387
4388 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4389
4390 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
4391 name that designates the current instance of a child unit in its
4392 own body and appears as the prefix of a reference to an entity
4393 local to the child unit.
4394 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
4395 Minor reformatting.
4396
4397 2017-09-08 Yannick Moy <moy@adacore.com>
4398
4399 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
4400 may be intentional.
4401
4402 2017-09-08 Tristan Gingold <gingold@adacore.com>
4403
4404 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
4405 warnings on internal units in configurable run time mode.
4406
4407 2017-09-08 Bob Duff <duff@adacore.com>
4408
4409 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
4410 representation items from interfaces that the derived type
4411 implements, not just from the parent type.
4412 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
4413 this to return an empty list when there are no interfaces.
4414 * einfo.ads, sem_ch13.adb: Minor comment fixes.
4415 * sem_attr.adb: Minor comment fix.
4416
4417 2017-09-08 Doug Rupp <rupp@adacore.com>
4418
4419 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
4420 x86-vx7.
4421
4422 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4423
4424 * exp_ch4.adb (Expand_N_Allocator): Generate a
4425 call to Allocate_Any_Controlled when the allocation does not
4426 require any initialization.
4427
4428 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4429
4430 * sem_util.adb (Copy_Node_With_Replacement):
4431 Update the Renamed_Object field of a replicated object renaming
4432 declaration.
4433
4434 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
4435
4436 * exp_ch9.adb (Is_Pure_Barrier): Allow type
4437 conversions and components of objects. Simplified the detection
4438 of the Count attribute by identifying the corresponding run-time
4439 calls.
4440
4441 2017-09-08 Yannick Moy <moy@adacore.com>
4442
4443 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
4444 sem_type.adb, sinfo.ads: Minor reformatting.
4445
4446 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4447
4448 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
4449 of Freeze_Profile, used to inhibit the freezing of the profile
4450 of an expression function declared within a nested package, when
4451 some type in the profile depends on a private type declared in
4452 an enclosing package.
4453
4454 2017-09-08 Bob Duff <duff@adacore.com>
4455
4456 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
4457 the subunit case. It's still OK to set it in the "missing subunits"
4458 case, because that won't cause the obsolete .ali files that cause
4459 confusion.
4460
4461 2017-09-08 Bob Duff <duff@adacore.com>
4462
4463 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
4464 unclear why this didn't cause a warning.
4465 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
4466 pragmas. It's unclear why this didn't cause an error.
4467
4468 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4469
4470 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
4471 Reimplemented.
4472 (Expand_SPARK_Potential_Renaming): Code clean up.
4473 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
4474 the item does not have a proper entity.
4475 (Analyze_Input_Item): Add a guard in case the item does not have a
4476 proper entity.
4477 (Collect_States_And_Objects): Include object renamings in the
4478 items being collected.
4479 (Resolve_State): Update the documentation of this routine.
4480 * sem_util.adb (Entity_Of): Add circuitry to handle
4481 renamings of function results.
4482 (Remove_Entity): New routine.
4483 (Remove_Overloaded_Entity): Take advantage of factorization.
4484 * sem_util.ads (Entity_Of): Update the documentation
4485 of this routine.
4486 (Remove_Entity): New routine.
4487 (Remove_Overloaded_Entity): Update the documentation of this
4488 routine.
4489
4490 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4491
4492 * repinfo.adb (List_Record_Info): During first loop,
4493 do not override the normalized position and first bit
4494 if they have already been set. Move fallback code
4495 for the packed case to the case where it belongs.
4496 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
4497 Also adjust the normalized position of components.
4498 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
4499
4500 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4501
4502 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
4503 the placement of a primitive operation O that renames an operation
4504 R declared in an inner package, and which is thus not a primitive
4505 of the dispatching type of O. In this case O is a new primitive
4506 and does not inherit its dispatch table position from R (which
4507 has none).
4508
4509 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4510
4511 * sem_dim.adb (Analyze_Dimension_If_Expression,
4512 Analyze_Dimension_Case_Expression): new subprograms to verify
4513 the dimensional correctness of Ada2012 conditional expressions,
4514 and set properly the dimensions of the construct.
4515 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
4516 call Analyze_Dimension.
4517
4518 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4519
4520 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
4521 loop on an interface declared as a private extension of another
4522 synchronized interface.
4523
4524 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4525
4526 * sem_ch12.adb (Check_Generic_Parent): New procedure within
4527 Analyze_Associations, to handle actual packages that depend on
4528 previous instances. If a package IAP that is an instantiation is
4529 used as an actual in a subsequent instantiation SI in the same
4530 scope, and IAP has a body, IAP must be frozen before SI. If
4531 the generic parent of IAP is itself declared in a previous
4532 instantiation in the same scope, that instantiation must also
4533 be frozen before SI.
4534 (Install_Body): Prevent double insertion of freeze node for
4535 instance.
4536
4537 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4538
4539 * sem_prag.adb (Resolve_State): Update the
4540 comment on documentation. Generate a reference to the state once
4541 resolution takes place.
4542
4543 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4544
4545 * sem_ch13.adb (Analyze_Aspect_Specifications, case
4546 Linker_Section): If the aspect applies to an object declaration
4547 with explicit initialization, do not delay the freezing of the
4548 object, to prevent access-before-elaboration in the generated
4549 initialization code.
4550
4551 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4552
4553 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
4554 (Integer_Value (Item)) when the size of the fixed decimal type
4555 is larger than Integer.
4556
4557 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4558
4559 PR ada/82127
4560 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
4561 in order of increasing position in more cases.
4562
4563 2017-09-07 Yannick Moy <moy@adacore.com>
4564
4565 * a-exetim-mingw.ads: Add contract Global=>null
4566 on all operations that are modeled as having no read or write
4567 of global variables in SPARK.
4568
4569 2017-09-07 Raphael Amiard <amiard@adacore.com>
4570
4571 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
4572 to Hmaps.Generic_Ops.
4573 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
4574 cursors.
4575 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
4576 cursors.
4577 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
4578 position in cursors.
4579
4580 2017-09-07 Javier Miranda <miranda@adacore.com>
4581
4582 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
4583 allow disabling the generation of implicit pragma Elaborate_All
4584 on task bodies.
4585
4586 2017-09-07 Javier Miranda <miranda@adacore.com>
4587
4588 * exp_disp.adb (Make_Tags): Avoid suffix counter
4589 in the external name of the elaboration flag. Required to fix
4590 the regressions introduced by the initial version of this patch.
4591
4592 2017-09-07 Bob Duff <duff@adacore.com>
4593
4594 * sem_ch6.adb (Analyze_Function_Return): Do not
4595 insert an explicit conversion to force the displacement of the
4596 "this" pointer to reference the secondary dispatch table in the
4597 case where the return statement is returning a raise expression,
4598 as in "return raise ...".
4599
4600 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4601
4602 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
4603 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
4604 procedure from sem_disp.adb.
4605 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
4606 with Unit.
4607 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
4608 return the instantiation node for subprograms. Update references
4609 to Get_Unit_Instantiation_Node.
4610 * sem_ch7.adb (Install_Parent_Private_Declarations): update
4611 reference to Get_Unit_Instantiation_Node.
4612 * exp_dist.adb (Build_Package_Stubs): update reference to
4613 Get_Unit_Instantiation_Node.
4614 * sem_ch9.adb: minor typo in comment.
4615 * lib-xref-spark_specific.adb
4616 (Traverse_Declaration_Or_Statement): traverse into task type
4617 definition.
4618
4619 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4620
4621 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
4622 to handle properly various cases of type conversions where the
4623 target type and/or the expression carry dimension information.
4624 (Dimension_System_Root); If a subtype carries dimension
4625 information, obtain the source parent type that carries the
4626 Dimension aspect.
4627
4628 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
4629
4630 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
4631
4632 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4633
4634 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
4635 If the prefix is a reference to an object, rewrite it as an
4636 explicit dereference, as required by 3.7.2 (2) and as is done
4637 with most other attributes whose prefix is an access value.
4638
4639 2017-09-07 Bob Duff <duff@adacore.com>
4640
4641 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
4642 Refined_Depends aspect.
4643 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
4644 Refined_Depends pragma.
4645 * scans.ads: Fix documentation of Inside_Depends flag.
4646 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
4647
4648 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
4649
4650 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
4651 Account for the case where the are no lists to insert, but the
4652 secondary stack still requires management.
4653 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
4654 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
4655 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
4656 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
4657 Minor reformatting.
4658
4659 2017-09-07 Vincent Celier <celier@adacore.com>
4660
4661 * clean.adb: Do not get the target parameters before calling
4662 gprclean.
4663
4664 2017-09-07 Nicolas Roche <roche@adacore.com>
4665
4666 * s-osinte-solaris-posix.ads: Removed.
4667
4668 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4669
4670 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
4671 single concurrent objects.
4672
4673 2017-09-07 Javier Miranda <miranda@adacore.com>
4674
4675 * s-regexp.ads: Fix documentation of the globbing grammar.
4676
4677 2017-09-07 Gary Dismukes <dismukes@adacore.com>
4678
4679 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
4680
4681 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4682
4683 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
4684 in CodePeer mode, to support more legacy code automatically.
4685
4686 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4687
4688 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
4689 and thus not a controlling argument, preserve its type after
4690 rewriting because it may appear in an nested call with a classwide
4691 parameter.
4692
4693 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4694
4695 * comperr.adb (Delete_SCIL_Files): Handle case of
4696 N_Package_Instantiation.
4697
4698 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4699
4700 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
4701 clause for a unit U appears in a context that includes a regular
4702 with_clause on U, rewrite the redundant private clause into a null
4703 statement, rather than removing it altogether from the context,
4704 so that ASIS tools can reconstruct the original source.
4705
4706 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4707
4708 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
4709 for aspect Small can be of any real type (not only a universal
4710 real literal) as long as it is a static constant.
4711
4712 2017-09-07 Thomas Quinot <quinot@adacore.com>
4713
4714 * par_sco.adb: Minor reformatting.
4715
4716 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4717
4718 * s-parame-ae653.ads: Removed.
4719
4720 2017-09-07 Nicolas Roche <roche@adacore.com>
4721
4722 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
4723 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
4724 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
4725 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
4726 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
4727 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
4728
4729 2017-09-07 Yannick Moy <moy@adacore.com>
4730
4731 * a-ngelfu.ads Add preconditions to all functions
4732 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
4733
4734 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4735
4736 * lib-xref.adb (Generate_Reference): ignore
4737 references to entities which are Part_Of single concurrent
4738 objects.
4739
4740 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4741
4742 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
4743 comment.
4744
4745 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4746
4747 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
4748 Null_Task_Id is passed.
4749
4750 2017-09-07 Javier Miranda <miranda@adacore.com>
4751
4752 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
4753 attribute. Defined for record types and subtypes.
4754 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
4755 (Init_Tags_List) to facilitate generating separate code in the
4756 IP routine to initialize the object components and for completing
4757 the elaboration of dispatch tables.
4758 * exp_ch3.adb (Build_Init_Procedure): Improve the code
4759 generated in the IP routines by means of keeping separate
4760 the initialization of the object components from the
4761 initialization of its dispatch tables. (Init_Secondary_Tags):
4762 Adding new formal (Init_Tags_List) and adjusting calls to
4763 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
4764 adjusting also calls to Ada.Tags.Register_Interface_Offset
4765 because the type of one of its formals has been changed.
4766 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
4767 modified. Instead of receiving a pointer to an object this
4768 routine receives now a primary tag.
4769 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
4770 additional formal: the tag of the primary dispatch table.
4771 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
4772 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
4773 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
4774 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
4775 formal in calls to Init_Secondary_Tags.
4776
4777 2017-09-07 Javier Miranda <miranda@adacore.com>
4778
4779 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
4780 subprogram.
4781 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
4782 applied to generic subprograms.
4783
4784 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4785
4786 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
4787 (because it refers to the anonymous concurrent object, not its type);
4788 fix condition for emitting error message about task/protected type,
4789
4790 2017-09-07 Bob Duff <duff@adacore.com>
4791
4792 * binde.adb (Debug_Flag_Old): If both -do and -dp
4793 are specified, behave as if just -do was specified, rather than
4794 using a mixture.
4795
4796 2017-09-07 Nicolas Roche <roche@adacore.com>
4797
4798 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
4799 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
4800
4801 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4802
4803 * sem_prag.adb (Find_Role): The Global_Seen flag
4804 is now consulted not only for abstract states and variables,
4805 but for all kinds of items.
4806 (Collect_Subprogram_Inputs_Outputs): Do not process formal
4807 generic parameters, because unlike ordinary formal parameters,
4808 generic formals only act as input/ outputs if they are explicitly
4809 mentioned in a Global contract.
4810
4811 2017-09-07 Yannick Moy <moy@adacore.com>
4812
4813 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
4814 predicate procedure. Check predicate pragma/aspect with Ghost entity.
4815 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
4816 reformatting.
4817
4818 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4819
4820 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
4821 (code cleanup);
4822 * sem_ch3.adb (Build_Derived_Record_Type):i Call
4823 Copy_Dimensions_Of_Components after creating the copy of the
4824 record declaration.
4825 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
4826 derived recor type, copy the dikensions if any of each component
4827 of the parent record to the corresponding component declarations
4828 of the derived record. These expressions are used among other
4829 things as default values in aggregates with box associations.
4830 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
4831 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
4832 Minor reformatting.
4833
4834 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4835
4836 * sem_util.adb: Remove extra space after THEN.
4837
4838 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4839
4840 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
4841 also mark the renamed subprogram as referenced.
4842
4843 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4844
4845 * par-ch6.adb (P_Subprogram): Improve error message on null
4846 procedure with misplaced aspect specification, which the parser
4847 first attempts to interpret as a malformed expression function.
4848
4849 2017-09-07 Gary Dismukes <dismukes@adacore.com>
4850
4851 * sem_attr.adb (Analyze_Attribute_Old_Result):
4852 Allow attributes Result and Old in the case of an expression
4853 function.
4854
4855 2017-09-07 Justin Squirek <squirek@adacore.com>
4856
4857 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
4858 Volatile to subcomponents.
4859
4860 2017-09-07 Bob Duff <duff@adacore.com>
4861
4862 * exp_ch7.adb (Find_Last_Init): Check for the
4863 case where a build-in-place function call has been replaced by a
4864 'Reference attribute reference.
4865
4866 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4867
4868 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
4869 nodes.
4870
4871 2017-09-07 Bob Duff <duff@adacore.com>
4872
4873 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
4874 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
4875 secondary stack for all functions that return limited tagged
4876 types -- just do it for dispatching calls. Misc cleanup.
4877 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
4878 remove qualifications and type conversions. Fix various bugs
4879 where only a single level of qualification or conversion was
4880 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
4881 instead of "X".
4882 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
4883 cleanup.
4884
4885 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4886
4887 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
4888 do not create actual subtypes that may generate further predicate
4889 functions.
4890 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
4891 of body is a predicate function as well.
4892 (Resolve_Aspect_Expressions, Resolve_Name): For a component
4893 association, only the expression needs resolution, not the name.
4894 (Resolve_Aspect_Expressions, case Predicates): Construct and
4895 analyze the predicate function declaration in the scope of the
4896 type, before making the type and its discriminants visible.
4897
4898 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4899
4900 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
4901 only if the record type itself comes from source.
4902
4903 2017-09-06 Gary Dismukes <dismukes@adacore.com>
4904
4905 * sem_ch5.adb: Minor reformatting and a typo fix
4906
4907 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4908
4909 * sinput-l.ads: minor remove extra period at the end of comment
4910
4911 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4912
4913 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
4914 E_Discriminant.
4915 (Find_Role): remove support for E_Discriminant.
4916
4917 2017-09-06 Javier Miranda <miranda@adacore.com>
4918
4919 * exp_ch6.adb (Expand_Simple_Function_Return):
4920 Add missing implicit type conversion to force displacement of the
4921 "this" pointer.
4922
4923 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4924
4925 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
4926
4927 2017-09-06 Yannick Moy <moy@adacore.com>
4928
4929 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
4930 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
4931
4932 2017-09-06 Bob Duff <duff@adacore.com>
4933
4934 * sem_ch8.adb: Change Assert to be consistent with
4935 other similar ones.
4936
4937 2017-09-06 Bob Duff <duff@adacore.com>
4938
4939 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
4940 requested. Previously, the -do switch meant "run Elab_New and
4941 Elab_Old and use the order chosen by Elab_Old, possibly with
4942 debugging printouts comparing the two orders." Now it means
4943 "do not run Elab_New." This is of use if there are bugs that
4944 cause Elab_New to crash.
4945 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
4946 type conversions.
4947 * ali.ads (Elab_Position): Change type to Nat, to avoid various
4948 type conversions.
4949
4950 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4951
4952 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
4953 reference to SPARK RM.
4954
4955 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4956
4957 * layout.adb: Use SSU short hand consistently throughout the file.
4958
4959 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4960
4961 * freeze.adb (Freeze_Record_Type)
4962 <Sized_Component_Total_Round_RM_Size>: New local variable to
4963 accumulate the rounded RM_Size of components. Update it for
4964 every component whose RM_Size is statically known. Add missing
4965 guard to check that bit packing is really required before issuing
4966 the error about packing. Swap condition for clarity's sake.
4967 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
4968
4969 2017-09-06 Fedor Rybin <frybin@adacore.com>
4970
4971 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
4972 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
4973 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
4974 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
4975 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
4976 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
4977 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
4978 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
4979 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
4980 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
4981 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
4982 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
4983 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
4984 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
4985 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
4986 project manager sources.
4987
4988 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4989
4990 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
4991 entity of a mutable type and the right-hand side is a conditional
4992 expression, resolve the alternatives of the conditional using
4993 the base type of the target entity, because the alternatives
4994 may have distinct subtypes. This is particularly relevant if
4995 the alternatives are aggregates.
4996
4997 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4998
4999 * checks.adb (Apply_Predicate_Check): If the expression is an
5000 aggregate that is the RHS of an assignment, apply the check to
5001 the LHS after the assignment, rather than to the aggregate. This
5002 is more efficient than creating a temporary for the aggregate,
5003 and prevents back-end crashes when the aggregate includes a
5004 dynamic "others' association.
5005
5006 2017-09-06 Yannick Moy <moy@adacore.com>
5007
5008 * sem_ch12.adb (Analyze_Instance_And_Renamings):
5009 Set variable to ignore SPARK_Mode in instance before the analysis
5010 of the generated package declaration.
5011
5012 2017-09-06 Yannick Moy <moy@adacore.com>
5013
5014 * sem_res.adb (Resolve_Call): Do not issue a
5015 message for calls inside expression function, unless body was
5016 seen and is candidate for inlining.
5017
5018 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5019
5020 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
5021 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
5022 body. do not freeze the formals of the generic unit.
5023
5024 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5025
5026 * errout.adb (Error_Msg): Separate the
5027 treatment for warning vs. style messages in inlinings and
5028 instantiations. Prevents blowups on calls to Warn_Insertion for
5029 style messages, which should not be called in that case because
5030 Warning_Msg_Char is not set.
5031
5032 2017-09-06 Justin Squirek <squirek@adacore.com>
5033
5034 * sem_prag.adb (Check_VFA_Conflicts): Created
5035 to group all Volatile_Full_Access checks relating to other
5036 representation pragmas (Mark_Component_Or_Object): Created
5037 to centeralize the flagging of attributes for the record type
5038 component case, a pragma applied individually to a component, and
5039 the object case.
5040 (Process_Atomic_Independent_Shared_Volatile):
5041 Add propagation of certain pragmas to record components and move
5042 evaluation of VFA checks
5043
5044 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5045
5046 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
5047 Do not warn on conditions that are not obeyed for Inline_Always
5048 subprograms, when assertions are not enabled.
5049
5050 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5051
5052 * sem_util.adb (Unique_Entity): For abstract states return their
5053 non-limited view.
5054
5055 2017-09-06 Bob Duff <duff@adacore.com>
5056
5057 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
5058 that is a proper body corresponding to a stub, we defer the
5059 adjustment of the sloc until after the correct adjustment has
5060 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
5061 the adjustment, because it will be outside the range in (the old,
5062 incorrect) S_Adjustment.
5063 * inline.adb: Use named notation for readability and uniformity.
5064 * sinput-l.adb: Minor improvements to debugging output printed
5065 for Debug_Flag_L.
5066 * sinput-l.ads (Create_Instantiation_Source): Minor comment
5067 correction.
5068
5069 2017-09-06 Vincent Celier <celier@adacore.com>
5070
5071 * make.adb: Do not invoke gprbuild for -bargs -P.
5072
5073 2017-09-06 Sylvain Dailler <dailler@adacore.com>
5074
5075 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
5076 case when Op is of kind N_Qualified_Expression. In this case,
5077 the function is called recursively on the subexpression like in
5078 other cases.
5079 * make.adb: Minor reformatting
5080
5081 2017-09-06 Justin Squirek <squirek@adacore.com>
5082
5083 * einfo.adb (Set_Linker_Section_Pragma): Modify
5084 Set_Linker_Section_Pragma to be consistant with the "getter"
5085 Linker_Section_Pragma.
5086 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
5087 checking for container loops so that the index cursor is not
5088 directly changable by the user with the use of E_Loop_Parameter.
5089 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
5090 * sem_warn.adb (Check_References): Revert previous change.
5091
5092 2017-09-06 Bob Duff <duff@adacore.com>
5093
5094 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
5095 calls and the like.
5096
5097 2017-09-06 Yannick Moy <moy@adacore.com>
5098
5099 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
5100 declarations to only consider valid uses of Global/Depends those on
5101 single concurrent objects.
5102
5103 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5104
5105 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
5106 error as soon as one of the specified components overlaps the
5107 parent field.
5108
5109 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5110
5111 * sem_prag.ads: minor fix typo in comment.
5112
5113 2017-09-06 Justin Squirek <squirek@adacore.com>
5114
5115 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
5116 from source before checking source references.
5117 * sem_warn.adb (Check_References): Add check for internal block
5118 before recursing.
5119
5120 2017-09-06 Vincent Celier <celier@adacore.com>
5121
5122 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
5123 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
5124 gnatname.adb: Remove the Project Manager from the GNAT tools.
5125 * gcc-interface/Makefile.in: ditto.
5126
5127 2017-09-06 Bob Duff <duff@adacore.com>
5128
5129 * sem_util.ads: Minor comment fix.
5130
5131 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5132
5133 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
5134 Generate a freeze node for the actual of a formal package, if
5135 the actual is declared in the same unit and has a corresponding
5136 body, to prevent the current instance from being frozen before
5137 the actual is.
5138
5139 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5140
5141 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
5142
5143 2017-09-06 Yannick Moy <moy@adacore.com>
5144
5145 * sem_warn.adb: Minor refactoring.
5146
5147 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5148
5149 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
5150 to retrieve the inherited classwide precondition/postcondition
5151 of a subprogram.
5152 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
5153 freezing a subprogram, to complete the generation of the
5154 corresponding checking code.
5155
5156 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5157
5158 * exp_util.adb (Is_Controlled_Indexing): New routine.
5159 (Is_Displace_Call): Use routine Strip to remove indirections.
5160 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
5161 missing case of controlled generalized indexing.
5162 (Is_Source_Object): Use routine Strip to remove indirections.
5163 (Strip): New routine.
5164
5165 2017-09-06 Bob Duff <duff@adacore.com>
5166
5167 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
5168 we include the proper header. Otherwise, we just declare the necessary
5169 things from the capabilities library. This is so we can build on
5170 machines without that library, while still enabling that library.
5171 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
5172 simply return 0 if the library is not present, or not included
5173 in the link.
5174
5175 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
5176
5177 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
5178 for renamings that involve function calls in prefix form.
5179
5180 2017-09-06 Bob Duff <duff@adacore.com>
5181
5182 * sem_ch3.adb (Analyze_Subtype_Declaration):
5183 Set Has_Delayed_Freeze on a subtype of an incomplete type.
5184
5185 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
5186
5187 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
5188 has no parameter specification and no entry index, use the entry name
5189 as the end of the generated SCO statement.
5190
5191 2017-09-06 Steve Baird <baird@adacore.com>
5192
5193 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
5194 uses of 'Image and related attributes as having side effects in
5195 order to avoid replicating such uses.
5196 * pprint.ads (Expression_Image) Add new generic formal flag
5197 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
5198 (eventually) override the default.
5199 * pprint.adb (Expression_Image) If the new flag is set, then
5200 suppress the ".all" suffix when displaying a dereference whose
5201 prefix is a use of a value-capturing compiler temp of the sort
5202 generated by Expr_Util.Remove_Side_Effects .
5203 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
5204 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
5205 Minor reformatting.
5206 * inline.adb: Minor wording change.
5207
5208 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5209
5210 * sem_ch7.adb: Update comment.
5211
5212 2017-09-06 Yannick Moy <moy@adacore.com>
5213
5214 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
5215 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
5216 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
5217 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
5218 so that applies to any entity.
5219
5220 2017-09-06 Yannick Moy <moy@adacore.com>
5221
5222 * sem_ch3.adb (Derived_Type_Declaration): Use
5223 Incomplete_Or_Partial_View rather than local Find_Partial_View.
5224
5225 2017-09-06 Javier Miranda <miranda@adacore.com>
5226
5227 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
5228 following ISO-8861.
5229
5230 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5231
5232 * sem_dim.adb (Analyze_Dimension): In an instance, a type
5233 conversion takes its dimensions from the expression, not from
5234 the context type.
5235 (Dimensions_Of_Operand): Ditto.
5236
5237 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5238
5239 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
5240 null procedures when GNAT coverage is used, so that their (empty)
5241 bodies are properly covered.
5242
5243 2017-09-06 Bob Duff <duff@adacore.com>
5244
5245 * sem_ch13.adb (Resolve_Aspect_Expressions): If
5246 the entity is a type with discriminants, make the discriminants
5247 directly visible in aspect clauses.
5248
5249 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5250
5251 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
5252 Universal_Real and the context is a floating-point type, resolve
5253 both operands to the target type.
5254
5255 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5256
5257 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
5258 sem_ch3.adb, sem_util.adb: Minor reformatting.
5259
5260 2017-09-06 Yannick Moy <moy@adacore.com>
5261
5262 * freeze.adb (Check_Inherited_Conditions): Rewriting
5263 of inherited preconditions and postconditions should only occur
5264 in GNATprove mode, that is, when GNATprove_Mode is True, not to
5265 be confused with SPARK_Mode being On.
5266
5267 2017-09-06 Yannick Moy <moy@adacore.com>
5268
5269 * sem_warn.adb (Check_References): Take into
5270 account possibility of attribute reference as original node.
5271
5272 2017-09-06 Yannick Moy <moy@adacore.com>
5273
5274 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
5275 use of attribute.
5276
5277 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5278
5279 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
5280 on the procedure created to encapsulate the body.
5281 * sem_ch7.adb: Add with clause for GNAT.HTable.
5282 (Entity_Table_Size): New constant.
5283 (Entity_Hash): New function.
5284 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
5285 (Is_Subprogram_Ref): Rename into...
5286 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
5287 the table instead of bailing out on them. Scan the value of constants
5288 if it is not known at compile time.
5289 (Contains_Subprograms_Refs): Rename into...
5290 (Scan_Subprogram_Refs): ...this.
5291 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
5292 Is_Public flag on subprograms if they are not actually referenced.
5293 (Hide_Public_Entities): Beef up comment on the algorithm.
5294 Reset the table of subprograms on entry.
5295
5296 2017-09-06 Yannick Moy <moy@adacore.com>
5297
5298 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
5299
5300 2017-09-06 Javier Miranda <miranda@adacore.com>
5301
5302 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
5303 cannot handle a type conversion of an array as an aggregate
5304 component.
5305
5306 2017-09-06 Bob Duff <duff@adacore.com>
5307
5308 * g-comlin.adb (Try_Help): Remove ".exe" so we
5309 get the same results on windows and unix.
5310
5311 2017-09-06 Justin Squirek <squirek@adacore.com>
5312
5313 * exp_imgv.adb (Expand_Image_Attribute),
5314 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
5315 Added case to handle new-style 'Image expansion
5316 (Rewrite_Object_Image): Moved from exp_attr.adb
5317 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5318 attribute cases so that the relevant subprograms in exp_imgv.adb
5319 handle all expansion.
5320 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
5321 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
5322 cases to call common function Analyze_Image_Attribute.
5323 (Analyze_Image_Attribute): Created as a common path for all
5324 image attributes (Check_Object_Reference_Image): Removed
5325 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5326 Removed and refactored into Is_Object_Image (Is_Object_Image):
5327 Created as a replacement for Is_Image_Applied_To_Object
5328
5329 2017-09-06 Yannick Moy <moy@adacore.com>
5330
5331 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
5332 message for missing input.
5333
5334 2017-09-06 Yannick Moy <moy@adacore.com>
5335
5336 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
5337 of protected subprograms and entries.
5338 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
5339 New function to detect when a subprogram of entry is defined
5340 inside a protected object.
5341
5342 2017-09-06 Bob Duff <duff@adacore.com>
5343
5344 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
5345 whether the current process has the CAP_SYS_NICE capability.
5346 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
5347 ceiling priorities if the current process has the CAP_SYS_NICE
5348 capability.
5349
5350 2017-09-06 Bob Duff <duff@adacore.com>
5351
5352 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
5353 check back to the body, because SPARK is not yet ready for
5354 "or else raise Constraint_Error".
5355
5356 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5357
5358 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
5359 procedure by a single null statement, after evaluating the
5360 actuals that require it.
5361
5362 2017-09-06 Javier Miranda <miranda@adacore.com>
5363
5364 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
5365 Generating C code improve the code that checks the use of nested
5366 aggregates to initialize object declarations.
5367
5368 2017-09-06 Yannick Moy <moy@adacore.com>
5369
5370 * sem_ch3.adb (Derived_Type_Declaration): Detect
5371 violations of new rule SPARK RM 3.4(1). Also refactor existing
5372 check to use the new function Find_Partial_View.
5373
5374 2017-09-06 Vincent Celier <celier@adacore.com>
5375
5376 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
5377 from the Prj hierarchy has been removed from the GNAT driver.
5378
5379 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5380
5381 * sem_type.adb (Interface_Present_In_Ancestor): Within an
5382 expression function, or within a spec expression (default value,
5383 etc) a reference to an incomplete type is legal: legality of
5384 the operation will be checked when some related entity (type,
5385 object or subprogram) is frozen.
5386
5387 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5388
5389 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
5390 adjustments and a typo fix.
5391
5392 2017-09-06 Yannick Moy <moy@adacore.com>
5393
5394 * sem_res.adb (Resolve_Call): Do not issue info
5395 message about inlining of calls to functions in assertions,
5396 for functions whose body has not been seen yet.
5397
5398 2017-09-06 Bob Duff <duff@adacore.com>
5399
5400 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
5401 we can use modern Ada in this package.
5402 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
5403 Move Ada.Command_Line.Response_File to System.Response_File,
5404 and make Ada.Command_Line.Response_File into a rename of
5405 System.Response_File. This is to avoid having gnatbind depend
5406 Ada.Command_Line, which would damage the bootstrap process now
5407 that Ada.Command_Line contains modern Ada (the raise expression).
5408 * gnatbind.adb: Avoid dependence on
5409 Ada.Command_Line. Depend on System.Response_File instead
5410 of Ada.Command_Line.Response_File. Change one call to
5411 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
5412 to Ada.Command_Line.Argument_Count to use Arg_Count.
5413 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
5414
5415 2017-09-06 Bob Duff <duff@adacore.com>
5416
5417 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
5418 switch, because we've already read gnat.adc by default.
5419
5420 2017-09-06 Bob Duff <duff@adacore.com>
5421
5422 * exp_ch5.adb (Get_Default_Iterator): Replace
5423 "Assert(False)" with "return Iter", because if an iterable
5424 type is derived from a noniterable one, then we won't find an
5425 overriding or inherited default iterator.
5426
5427 2017-09-06 Yannick Moy <moy@adacore.com>
5428
5429 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
5430 literal index used to access a string is null or negative.
5431
5432 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5433
5434 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
5435 allowed on loop parameters.
5436 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
5437 on loop parameters.
5438 (Write_Field15_Name): Update the output for
5439 Status_Flag_Or_Transient_Decl.
5440 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
5441 to loop parameters. Update the documentation of the attribute
5442 and the E_Loop_Parameter entity.
5443 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
5444 which assumes that cursors can never be controlled.
5445 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
5446 guard which assumes that cursors can never be controlled.
5447
5448 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5449
5450 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
5451 sem_warn.adb: Minor reformatting.
5452
5453 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5454
5455 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
5456 fix and preserve older GNAT warning on overlapping actuals that
5457 are not elementary types.
5458
5459 2017-09-06 Justin Squirek <squirek@adacore.com>
5460
5461 * sem_attr.adb: Comment correction.
5462
5463 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5464
5465 * sem_util.adb: Minor reformatting.
5466
5467 2017-09-06 Yannick Moy <moy@adacore.com>
5468
5469 * a-comlin.ads (Argument): Add precondition for analysis.
5470
5471 2017-09-06 Yannick Moy <moy@adacore.com>
5472
5473 * sem_res.adb (Resolve): Update message for function call as statement.
5474
5475 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5476
5477 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
5478 generated bodies for renamings that are completions, when renamed
5479 procedure is No_Return.
5480 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5481 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
5482 with No_Return, the renamed entity must be No_Return as well.
5483
5484 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5485
5486 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
5487 Minor reformatting.
5488
5489 2017-09-06 Justin Squirek <squirek@adacore.com>
5490
5491 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5492 attribute cases (Rewrite_Object_Reference_Image): Created to
5493 aid the rewriting of new-style 'Image attributes.
5494 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
5495 (Check_Object_Reference_Image): Created to handle verification of
5496 'Image with object-references as prefixes.
5497 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5498 Create predicate to identify cases where an 'Image attribute's
5499 prefix applies to an object reference.
5500
5501 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5502
5503 * freeze.adb (Freeze_Entity): Do not generate a freeze
5504 node for a generic unit, even if it includes delayed aspect
5505 specifications. Freeze nodes for generic entities must never
5506 appear in the tree that reaches the back-end of the compiler.
5507
5508 2017-09-06 Yannick Moy <moy@adacore.com>
5509
5510 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
5511
5512 2017-09-06 Yannick Moy <moy@adacore.com>
5513
5514 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
5515 to subprograms in other units as possibly inlined.
5516
5517 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5518
5519 * freeze.adb (Freeze_Entity): For a derived type that has no
5520 explicit delayed aspects but may inherit delayed aspects from its
5521 parent type, analyze aspect at freeze point for proper capture
5522 of an inherited aspect.
5523
5524 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5525
5526 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
5527 renamings; also, avoid repeated calls to Renamed_Object when getting
5528 through object renamings.
5529
5530 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5531
5532 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
5533 array type declaration in a private part, when an index is a
5534 subtype indication of a discrete type with a private partial view.
5535
5536 2017-09-06 Javier Miranda <miranda@adacore.com>
5537
5538 * exp_ch4.adb (Expand_Modular_Op): Force generating
5539 temporary to improve the generated code.
5540
5541 2017-09-06 Tristan Gingold <gingold@adacore.com>
5542
5543 * s-fatgen.adb: Minor typo fix in comment.
5544
5545 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5546
5547 * exp_ch5.adb (Make_Field_Assign): If the type
5548 of the right-hand side has stored constraint, use its values
5549 (except for those that are renamings of parent discriminants)
5550 to produce additional assignments for the discriminants of the
5551 left-hand side, which are invisible in the righ-hand side and
5552 not retrievable as selected components.
5553
5554 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5555
5556 * sem_util.adb (Needs_One_Formal): The first formal of such a
5557 function must be a controlling formal, so that Obj.F (X, Y)
5558 can have the interpretation F(Obj)(X, Y).
5559 * sem_util.ads: Clarify documentation.
5560
5561 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5562
5563 * table.ads, table.adb: Restore original implementation.
5564 * namet.h (Names_Ptr): Adjust back.
5565 (Name_Chars_Ptr): Likewise.
5566 * uintp.h (Uints_Ptr): Likewise.
5567 (Udigits_Ptr): Likewise.
5568 * g-table.ads: Remove pragma Compiler_Unit_Warning.
5569 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
5570 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
5571 * spark_xrefs.ads: Likewise.
5572 * scos.h: Undo latest changes.
5573
5574 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5575
5576 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
5577 No_Return flag to instance if pragma applies to generic unit. This
5578 must be done explicitly because the pragma does not appear
5579 directly in the generic declaration (unlike the corresponding
5580 aspect specification).
5581
5582 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5583
5584 * sem_ch7.adb (Has_Referencer): Move up and expand comment
5585 explaining the test used to detect inlining. Use same test
5586 in second occurrence.
5587 (Analyze_Package_Body_Helper): Minor formatting fixes.
5588
5589 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5590
5591 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
5592 derived type with a mixture of renamed and constrained parent
5593 discriminants, the constraint for the target must obtain the
5594 discriminant values from both the operand and from the stored
5595 constraint for it, given that the constrained discriminants are
5596 not visible in the object.
5597 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
5598 side may be derived from that of the left-hand side (as in the
5599 case of an assignment with a change of representation) so the
5600 discriminant to be used in the retrieval of the value of the
5601 component must be the entity in the type of the right-hand side.
5602
5603 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5604
5605 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
5606 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5607 * exp_util.adb (Is_Source_Object): Account for
5608 the cases where the source object may appear as a dereference
5609 or within a type conversion.
5610 * exp_ch6.adb: Fix missing space in error message.
5611
5612 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5613
5614 * sem_prag.adb: Update description of Eliminate.
5615
5616 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5617
5618 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
5619 properly an attribute reference 'Loop_Entry that appears in the
5620 list of indices of an indexed expression, to prevent an infinite
5621 loop in the compiler.
5622
5623 2017-09-06 Bob Duff <duff@adacore.com>
5624
5625 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
5626
5627 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5628
5629 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
5630 in a set membership is an overloaded enumeration literal, and
5631 the type of the alternative is resolved from a previous one,
5632 replace the entity of the alternative as well as the type,
5633 to prevent inconsistencies between the entity and the type.
5634
5635 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5636
5637 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
5638 (No_Component_Reordering_Specified): New switch.
5639 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
5640 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
5641 * bcheck.adb (Check_Consistent_No_Component_Reordering):
5642 New check.
5643 (Check_Configuration_Consistency): Invoke it.
5644 * debug.adb (d.r): Toggle the effect of the switch.
5645 (d.v): Change to no-op.
5646 * einfo.ads (Has_Complex_Representation):
5647 Restrict to record types.
5648 (No_Reordering): New alias for Flag239.
5649 (OK_To_Reorder_Components): Delete.
5650 (No_Reordering): Declare.
5651 (Set_No_Reordering): Likewise.
5652 (OK_To_Reorder_Components): Delete.
5653 (Set_OK_To_Reorder_Components): Likewise.
5654 * einfo.adb (Has_Complex_Representation): Expect record types.
5655 (No_Reordering): New function.
5656 (OK_To_Reorder_Components): Delete.
5657 (Set_Has_Complex_Representation): Expect base record types.
5658 (Set_No_Reordering): New procedure.
5659 (Set_OK_To_Reorder_Components): Delete.
5660 (Write_Entity_Flags): Adjust to above change.
5661 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
5662 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
5663 OK_To_Reorder_Components on record types with convention Ada.
5664 * lib-writ.adb (Write_ALI): Deal with NC marker.
5665 * opt.ads (No_Component_Reordering): New flag.
5666 (No_Component_Reordering_Config): Likewise.
5667 (Config_Switches_Type): Add No_Component_Reordering component.
5668 * opt.adb (Register_Opt_Config_Switches): Copy
5669 No_Component_Reordering onto No_Component_Reordering_Config.
5670 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
5671 (Save_Opt_Config_Switches): Save No_Component_Reordering.
5672 (Set_Opt_Config_Switches): Set No_Component_Reordering.
5673 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
5674 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
5675 No_Reordering flag from the default.
5676 (Build_Derived_Private_Type): Likewise.
5677 (Build_Derived_Record_Type): Likewise. Then inherit it
5678 for untagged types and clean up handling of similar flags.
5679 (Record_Type_Declaration): Likewise.
5680 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
5681 remove redundant test on Is_Tagged_Type.
5682 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
5683 (Sig_Flags): Likewise.
5684 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
5685 (Pragma_Id): Add Pragma_No_Component_Reordering value.
5686 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
5687 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
5688 Copy the layout of the parent type only if the No_Reordering
5689 settings match.
5690 (components_to_record): Reorder record types with
5691 convention Ada by default unless No_Reordering is set or -gnatd.r
5692 is specified and do not warn if No_Reordering is set in GNAT mode.
5693
5694 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5695
5696 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
5697 new predicate to reject declarations that can be completions,
5698 when there is a visible prior homograph that is a null procedure.
5699 * sem_ch6.adb (Analyze_Null_Procedure): use it.
5700 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
5701
5702 2017-09-06 Thomas Quinot <quinot@adacore.com>
5703
5704 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
5705 run of 253 characters or more.
5706
5707 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5708
5709 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
5710 properly incomplete subtypes that may be created by explicit or
5711 implicit declarations.
5712 (Is_Base_Type): Take E_Incomplete_Subtype into account.
5713 (Subtype_Kind): Ditto.
5714 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
5715 Ekind of a subtype of a discriminated incomplete type.
5716 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
5717 incomplete types, to preserve error reporting.
5718 (Process_Incomplete_Dependents): Do not create a subtype
5719 declaration for an incomplete subtype that is created internally.
5720 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
5721 incomplete subtypes that do not require a completion, either
5722 because they are limited views, of they are generic actuals.
5723
5724 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5725
5726 * checks.adb (Insert_Valid_Check): Remove the
5727 suspicious manipulation of the Do_Range_Check flag as ths is
5728 no linger needed. Suppress validity check when analysing the
5729 validation variable.
5730
5731 2017-09-06 Philippe Gil <gil@adacore.com>
5732
5733 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
5734 GNATCOLL.Memory
5735
5736 2017-09-06 Bob Duff <duff@adacore.com>
5737
5738 * sem_elim.adb: Minor comment fix.
5739
5740 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5741
5742 * sem_util.adb (Is_Object_Reference): A function call is an
5743 object reference, and thus attribute references for attributes
5744 that are functions (such as Pred and Succ) as well as predefined
5745 operators are legal in contexts that require an object, such as
5746 the prefix of attribute Img and the Ada2020 version of 'Image.
5747
5748 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5749
5750 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
5751 exp_ch3.adb, xoscons.adb: Minor reformatting.
5752
5753 2017-09-06 Raphael Amiard <amiard@adacore.com>
5754
5755 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
5756 Position parameter. If supplied, use it to provide efficient iteration.
5757 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
5758 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
5759 iteration.
5760
5761 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5762
5763 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
5764 designated type is class-wide and the expression is an unchecked
5765 conversion, preserve the conversion when checking the tag of the
5766 designated object, to prevent spurious semantic errors when the
5767 expression in the conversion has an untagged type (for example
5768 an address attribute).
5769
5770 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5771
5772 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
5773 operation is subject to a pragma Eliminate.
5774
5775 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5776
5777 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
5778
5779 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5780
5781 * fe.h (Eliminate_Error_Msg): Remove.
5782
5783 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
5784
5785 * gcc-interface/utils.c (make_packable_type): Update call to
5786 mode_for_size_tree.
5787
5788 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
5789
5790 * gcc-interface/utils2.c (build_load_modify_store):
5791 Use int_mode_for_size.
5792
5793 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5794
5795 PR ada/62235
5796 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5797 for Itypes that are E_Record_Subtype with a cloned subtype.
5798 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
5799
5800 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5801
5802 * gcc-interface/trans.c (convert_with_check): Use a custom base type
5803 if the base type of the expression has a different machine mode.
5804 Rename a couple of parameters and local variable.
5805
5806 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5807
5808 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
5809 conversions around prefixes that are not references.
5810
5811 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5812
5813 * gcc-interface/utils.c (unchecked_convert): When the result type is a
5814 non-biased integral type with size 0, set the result to 0 directly.
5815
5816 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5817
5818 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
5819 (renaming_from_instantiation_p): ...this.
5820 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
5821 instead of explicit tests on kind of entities. Adjust for renaming.
5822 (gnat_to_gnu_profile_type): Likewise.
5823 (gnat_to_gnu_subprog_type): Likewise.
5824 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
5825 (Case_Statement_to_gnu): Likewise.
5826 (gnat_to_gnu): Likewise.
5827 (process_freeze_entity): Likewise.
5828 (process_type): Likewise.
5829 (add_stmt_with_node): Adjust for renaming.
5830 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
5831 (renaming_from_generic_instantiation_p): Rename to...
5832 (renaming_from_instantiation_p): ...this. Use inline predicate.
5833 (pad_type_hasher::keep_cache_entry): Fold.
5834
5835 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5836
5837 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
5838 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
5839 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
5840 (N_Slice): Likewise.
5841 (N_Selected_Component): Likewise. Do not try again to translate it.
5842 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
5843
5844 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5845
5846 * repinfo.ads: Document new treatment of dynamic values.
5847 (TCode): Bump upper bound to 29.
5848 (Dynamic_Val): New constant set to 29.
5849 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
5850 (Rep_Value) <Dynamic_Val>: Likewise.
5851 * repinfo.h (Dynamic_Val): New macro.
5852 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
5853 DECL_P nodes too.
5854 <INTEGER_CST>: Set TCODE instead of recursing.
5855 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
5856 <VAR_DECL>: New case.
5857 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
5858 <BIT_AND_EXPR>: Adjust.
5859 <CALL_EXPR>: Do not fall through.
5860
5861 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5862
5863 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
5864 there is no target, do not create a temporary for the return value for
5865 an allocator either.
5866
5867 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5868
5869 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
5870 unconstrained array type.
5871
5872 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5873 Alan Hayward <alan.hayward@arm.com>
5874 David Sherwood <david.sherwood@arm.com>
5875
5876 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
5877 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
5878
5879 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5880 Alan Hayward <alan.hayward@arm.com>
5881 David Sherwood <david.sherwood@arm.com>
5882
5883 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
5884 is_a <scalar_int_mode>.
5885 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
5886 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
5887
5888 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5889 Alan Hayward <alan.hayward@arm.com>
5890 David Sherwood <david.sherwood@arm.com>
5891
5892 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
5893 instead of mode_for_size.
5894 (gnat_to_gnu_subprog_type): Likewise.
5895 * gcc-interface/utils.c (make_type_from_size): Likewise.
5896
5897 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5898 Alan Hayward <alan.hayward@arm.com>
5899 David Sherwood <david.sherwood@arm.com>
5900
5901 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
5902 (fp_size_to_prec): Likewise.
5903
5904 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5905 Alan Hayward <alan.hayward@arm.com>
5906 David Sherwood <david.sherwood@arm.com>
5907
5908 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
5909 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
5910
5911 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5912 Alan Hayward <alan.hayward@arm.com>
5913 David Sherwood <david.sherwood@arm.com>
5914
5915 * gcc-interface/decl.c (validate_size): Update use of
5916 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
5917
5918 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5919 Alan Hayward <alan.hayward@arm.com>
5920 David Sherwood <david.sherwood@arm.com>
5921
5922 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
5923 (fp_size_to_prec): Likewise.
5924
5925 2017-08-29 Martin Liska <mliska@suse.cz>
5926
5927 PR other/39851
5928 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
5929
5930 2017-08-08 Martin Liska <mliska@suse.cz>
5931
5932 * gcc-interface/trans.c: Include header files.
5933
5934 2017-07-29 Jakub Jelinek <jakub@redhat.com>
5935
5936 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
5937 as new argument to the imported_module_or_decl debug hook.
5938
5939 2017-07-25 Javier Miranda <miranda@adacore.com>
5940
5941 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
5942 evaluated twice.
5943
5944 2017-07-19 Jakub Jelinek <jakub@redhat.com>
5945
5946 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
5947 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
5948 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
5949
5950 2017-07-18 Mike Frysinger <vapier@chromium.org>
5951
5952 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
5953 (../../gnatlink$(exeext)): Likewise.
5954
5955 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
5956
5957 PR ada/81446
5958 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
5959 (Backend_Overflow_Checks): Set to True.
5960
5961 2017-06-23 Jakub Jelinek <jakub@redhat.com>
5962
5963 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
5964
5965 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
5966
5967 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
5968 notice. New macro.
5969 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
5970 as a definition.
5971 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
5972 definition.
5973 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
5974 imported subprograms for the current compilation unit as
5975 definitions. Disable debug info for references to variables.
5976 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
5977 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
5978 not built-in functions to their binding scope.
5979 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
5980 the function as a definition. Update all callers.
5981 (gnat_write_global_declarations): Emit debug info for imported
5982 functions. Filter out external variables for which debug info
5983 is disabled.
5984
5985 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
5986
5987 PR ada/81105
5988 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
5989 (i[3456]86-pc-gnu): Likewise.
5990 (x86_64 kfreebsd): Likewise.
5991
5992 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
5993
5994 PR bootstrap/80897
5995 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
5996
5997 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
5998
5999 PR ada/81070
6000 * s-interr-hwint.adb: Reinstate.
6001 * gcc-interface/Makefile.in (RTEMS): Use it again.
6002
6003 2017-06-08 Olivier Hainque <hainque@adacore.com>
6004
6005 * vx_crtbegin_auto.c: Update year in copyright notice.
6006 * vx_crtbegin.c: Likewise.
6007 * vx_crtbegin.inc: Likewise.
6008 * vx_crtend.c: Likewise.
6009
6010 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
6011
6012 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
6013 * s-tpopsp-rtems.adb: Delete.
6014
6015 2017-06-02 Olivier Hainque <hainque@adacore.com>
6016
6017 * vx_crtbegin_auto.c: New file.
6018 * vx_crtbegin.c: New file.
6019 * vx_crtbegin.inc: New file.
6020 * vx_crtend.c: New file.
6021
6022 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
6023
6024 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
6025 const qualifiers that cause -Wignored-qualifiers warnings.
6026
6027 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
6028
6029 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
6030 for Itypes that are E_Access_Subtype.
6031 <E_Access_Subtype>: Use the DECL of the base type directly.
6032
6033 2017-05-22 Ed Schonberg <schonberg@adacore.com>
6034 Eric Botcazou <ebotcazou@adacore.com>
6035
6036 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
6037 limited view may appear in the profile of a function, and a call to
6038 that function in another unit in which the full view is available must
6039 use this full view to spurious type errors at the point of call.
6040 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
6041 of parent body with a with clause for the main unit.
6042 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
6043 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
6044 types declared in external units like types from limited with clauses.
6045 Adjust final processing of defer_limited_with_list accordingly.
6046 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
6047 again to translate the prefix after the field if it is incomplete.
6048
6049 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
6050
6051 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
6052 alignment for simple volatile fields and remove associated errors.
6053
6054 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6055
6056 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
6057 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
6058
6059 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
6060
6061 * gcc-interface/utils.c (can_materialize_object_renaming_p):
6062 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
6063 process Original_Node instead of expanded names.
6064
6065 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6066
6067 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
6068 addressability check in the constrained case.
6069
6070 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6071
6072 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
6073 types not coming from a limited context.
6074
6075 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6076
6077 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
6078 the inlined list that are not public.
6079 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
6080 there is a pragma Inline_Always on the subprogram.
6081
6082 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6083
6084 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
6085 <N_Allocator>: Use properly typed constants.
6086 (extract_values): Move around.
6087 (pos_to_constructor): Minor tweaks.
6088 (Sloc_to_locus): Fix formatting.
6089 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
6090 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
6091 (Gigi_Equivalent_Type): Adjust head comment.
6092 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
6093
6094 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6095
6096 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
6097 is a representation clause on an extension, propagate the alignment of
6098 the parent type only if the platform requires strict alignment.
6099
6100 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
6101
6102 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
6103 instead of Word_Size.
6104
6105 Revert
6106 2017-03-28 Andreas Schwab <schwab@suse.de>
6107
6108 PR ada/80117
6109 * system-linux-aarch64-ilp32.ads: New file.
6110 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6111 from LIBGNAT_TARGET_PAIRS.
6112 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6113 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6114 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6115 or -mabi=ilp32, resp.
6116
6117 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
6118
6119 PR ada/80626
6120 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
6121 instead of Word_Size.
6122
6123 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
6124
6125 * raise-gcc.c (exception_class_eq): Make ec parameter const.
6126
6127 2017-05-02 Richard Biener <rguenther@suse.de>
6128
6129 * gcc-interface/misc.c (gnat_post_options): Do not set
6130 -fstrict-overflow.
6131
6132 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6133
6134 * gcc-interface/trans.c (assoc_to_constructor): Make sure
6135 Corresponding_Discriminant is only called on discriminants.
6136 Skip the saving of the result only for them.
6137 (gnat_to_gnu) <N_Selected_Component>: Likewise.
6138 <N_Unchecked_Type_Conversion>: Translate the result type first.
6139 (gigi): Set TREE_NOTHROW on Begin_Handler.
6140 (stmt_list_cannot_raise_p): New predicate.
6141 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
6142 a cleanup if the statements of the handler cannot raise.
6143 (process_freeze_entity): Use Is_Record_Type.
6144 (process_type): Likewise.
6145
6146 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6147
6148 * einfo.ads (Corresponding_Record_Component): New alias
6149 for Node21 used for E_Component and E_Discriminant.
6150 * einfo.adb (Corresponding_Record_Component): New function.
6151 (Set_Corresponding_Record_Component): New procedure.
6152 (Write_Field21_Name): Handle Corresponding_Record_Component.
6153 * sem_ch3.adb (Inherit_Component): Set
6154 Corresponding_Record_Component for every component in
6155 the untagged case. Clear it afterwards for non-girder
6156 discriminants.
6157 * gcc-interface/decl.c (gnat_to_gnu_entity)
6158 <E_Record_Type>: For a derived untagged type with discriminants
6159 and constraints, apply the constraints to the layout of the
6160 parent type to deduce the layout.
6161 (field_is_aliased): Delete.
6162 (components_to_record): Test DECL_ALIASED_P directly.
6163 (annotate_rep): Check that fields are present except for
6164 an extension.
6165 (create_field_decl_from): Add DEBUG_INFO_P
6166 parameter and pass it in recursive and other calls. Add guard
6167 for the manual CSE on the size.
6168 (is_stored_discriminant): New predicate.
6169 (copy_and_substitute_in_layout): Consider only
6170 stored discriminants and check that original fields are present
6171 in the old type. Deal with derived types. Adjust call to
6172 create_variant_part_from.
6173
6174 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6175
6176 * exp_ch6.adb (Expand_Call_Helper): When locating the
6177 accessibility entity created for an access parameter, handle
6178 properly a reference to a formal of an enclosing subprogram. if
6179 the reference appears in an inherited class-wide condition, it
6180 is the rewriting of the reference in the ancestor expression,
6181 but the accessibility entity must be that of the current formal.
6182
6183 2017-05-02 Javier Miranda <miranda@adacore.com>
6184
6185 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
6186 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
6187 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
6188 Call Expand_Non_Binary_Modular_Op.
6189
6190 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6191
6192 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
6193 has discriminants, do not override the Stored_Constraint list of
6194 the full view of the derived type with that of the derived type.
6195
6196 2017-05-02 Bob Duff <duff@adacore.com>
6197
6198 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
6199
6200 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6201
6202 * s-os_lib.ads: Minor typo fix.
6203
6204 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6205
6206 * gnatls.adb: Merge and refactor code from Prj.Env and remove
6207 this deprecated dependency.
6208
6209 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6210
6211 * exp_util.ads: minor comment addition.
6212
6213 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6214
6215 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
6216 pastos in part #3 of the head comment.
6217
6218 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6219
6220 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
6221 procedure body for a local (sub)type declaration within a
6222 predicate function. Invariant checks do not apply to these, and
6223 the expansion of the procedure will happen in the wrong scope,
6224 leading to misplaced freeze nodes.
6225
6226 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6227
6228 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
6229 to analyze generated actions. If the main unit is a body,
6230 the required scope is that of the corresponding unit declaration.
6231
6232 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6233
6234 * einfo.adb (Declaration_Node): flip branches of
6235 an IF statement to avoid repeated negations in its condition;
6236 no change in semantics, only to improve readability.
6237
6238 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6239
6240 * sem_case.adb: Remove extra spaces in parameter declarations.
6241
6242 2017-05-02 Justin Squirek <squirek@adacore.com>
6243
6244 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
6245 in usage line for new -gnatwE switch.
6246
6247 2017-05-02 Claire Dross <dross@adacore.com>
6248
6249 * a-cofuve.ads (Remove): Remove unnecessary
6250 conditions in precondition.
6251
6252 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6253
6254 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
6255 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
6256
6257 2017-05-02 Justin Squirek <squirek@adacore.com>
6258
6259 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6260 alternative expression.
6261 * sem_res.adb (Resolve_Case_Expression): Ditto.
6262
6263 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6264
6265 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
6266 Refine predicate for the case where the primitive operation
6267 is a renaming of equality. An overriding operation that is
6268 a user-defined renaming of predefined equality inherits its
6269 slot from the overridden operation. Otherwise it is treated
6270 as a predefined op and occupies the same predefined slot as
6271 equality. A call to it is transformed into a call to its alias,
6272 which is the predefined equality. A dispatching call thus uses
6273 the proper slot if operation is further inherited and called
6274 with class-wide arguments.
6275
6276 2017-05-02 Justin Squirek <squirek@adacore.com>
6277
6278 * errout.adb (Set_Msg_Text): Add a case to switch the message
6279 type when the character '[' is detected signifying a warning
6280 about a run-time exception.
6281 * opt.ads Add a new Warning_Mode value for new switch
6282 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
6283 to handle new warning mode
6284 * usage.adb (Usage): Add usage entry for -gnatwE
6285 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
6286
6287 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6288
6289 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
6290 declaration that operates on some fixed point type.
6291
6292 2017-05-02 Justin Squirek <squirek@adacore.com>
6293
6294 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
6295
6296 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6297
6298 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
6299
6300 2017-05-02 Justin Squirek <squirek@adacore.com>
6301
6302 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6303 expression (Analyze_If_Expression): Add check for valid condition
6304 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
6305 on case-expression
6306 * sem_res.adb (Resolve_If_Expression): Add check for valid
6307 condition and then-expression.
6308
6309 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6310
6311 * exp_ch3.adb (Build_Initialization_Call): Generate a null
6312 statement if the initialization call is a null procedure, as
6313 can happen with a controlled type with no explicit Initialize
6314 procedure, or an array of such.
6315 * exp_ch7.adb (Process_Object_Declaration): For a type with
6316 controlled components that has a trivial Initialize procedure,
6317 insert declaration for finalization counter after object
6318 declaration itself.
6319 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
6320 finalization block and attendant declarations if component has
6321 a trivial Initialize procedure.
6322 (Make_Init_Call): Do not generate a call if controlled type has
6323 a trivial Initialize procedure.
6324
6325 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6326
6327 * g-forstr.ads (Data): Move Format component last.
6328 * g-forstr.adb ("+"): Adjust for above change.
6329 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
6330 * g-sechas.ads (Context): Move Key last.
6331 * g-socket.ads (Service_Entry_Type): Move Aliases last.
6332 * s-fileio.adb (Temp_File_Record): Move Name last.
6333 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
6334 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
6335
6336 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
6337
6338 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
6339 switch introduced recently. finally not needed.
6340
6341 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6342
6343 * sem_ch6.adb (Analyze_Null_Procedure): Set the
6344 Corresponding_Body link for a null procedure declaration.
6345
6346 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6347
6348 * atree.h (Flag290): Add missing terminating parenthesis.
6349 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
6350 (Set_Is_Class_Wide_Clone): Likewise.
6351 * einfo.ads (Is_Class_Wide_Clone): Likewise.
6352
6353 2017-05-02 Gary Dismukes <dismukes@adacore.com>
6354
6355 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
6356 parameter Array_Comp to indicate the case of an array object
6357 with null-excluding components.
6358 * checks.adb (Null_Exclusion_Static_Checks):
6359 Call Compile_Time_Constraint_Error instead of
6360 Apply_Compile_Time_Constraint_Error in the component case. Also
6361 call that when Array_Comp is True, with an appropriate warning for
6362 the array component case. Only create an explicit initialization
6363 by null in the case of an object of a null-excluding access type
6364 (and no longer do that in the component case).
6365 * sem_ch3.adb (Check_Component): Add a Boolean parameter
6366 Array_Comp defaulted to False. Pass Empty for the Comp
6367 actual when calling Null_Exclusion_Static_Checks in the case
6368 where Comp_Decl matches Object_Decl, because we don't have a
6369 component in that case. In the case of an object or component
6370 of an array type, pass True for Array_Comp on the recursive call
6371 to Check_Component.
6372
6373 2017-05-02 Bob Duff <duff@adacore.com>
6374
6375 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
6376 compute the linux priority from the Ada priority. Call this everywhere
6377 required. In particular, the previous version was not doing this
6378 computation when setting the ceiling priority in various places. It
6379 was just converting to C.int, which results in a ceiling that is off
6380 by 1.
6381
6382 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6383
6384 * sem_ch3.adb: Comment predicate inheritance.
6385
6386 2017-05-02 Tristan Gingold <gingold@adacore.com>
6387
6388 * s-trasym.ads: Add comment.
6389
6390 2017-05-02 Bob Duff <duff@adacore.com>
6391
6392 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
6393 * sem_ch4.adb: Minor reformatting.
6394 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
6395 * s-taspri-posix-noaltstack.ads: Minor refactoring.
6396 * sinput.ads: Minor typo fix.
6397
6398 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6399
6400 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
6401 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
6402 here from exp_ch9, to recognize objects whose creation requires
6403 dynamic allocation, so that the proper warning can be emitted
6404 when restriction No_Implicit_Heap_Allocation is in effect.
6405 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
6406 to emit proper warning when an object that requires dynamic
6407 allocation is declared.
6408
6409 2017-05-02 Tristan Gingold <gingold@adacore.com>
6410
6411 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
6412
6413 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6414
6415 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
6416 visibility rules for equality operators that apply within an
6417 instantiation apply within an inlined body.
6418 * sem_type.adb (Add_One_Interp): ditto.
6419
6420 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6421
6422 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
6423 procedures.
6424
6425 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6426
6427 * snames.ads-tmpl
6428 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
6429 Name_No_Tagged_Streams): Move to regular pragmas. Add
6430 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
6431 and Secondary_Stack_Size.
6432 (Pragma_Id): Move Pragma_Assume,
6433 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
6434 Pragma_No_Tagged_Streams to second part.
6435
6436 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6437
6438 * exp_attr.adb: Minor reformatting.
6439
6440 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6441
6442 * sem_ch4.adb (Analyze_Selected_Component): Improve error
6443 detection for illegal references to private components or
6444 operations of a protected type in the body of the type.
6445
6446 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6447
6448 * opt.ads: Add missing GNAT markers in comments.
6449 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
6450 settings of Optimize_Alignment at the end.
6451
6452 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6453
6454 * checks.adb (Apply_Constraint_Check): Do not apply
6455 a discriminant check when the associated type is a constrained
6456 subtype created for an unconstrained nominal type.
6457 * exp_attr.adb: Minor reformatting.
6458
6459 2017-05-02 Bob Duff <duff@adacore.com>
6460
6461 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
6462 the N_Raise_Expression case.
6463 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
6464 and add assertions.
6465
6466 2017-05-02 Yannick Moy <moy@adacore.com>
6467
6468 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
6469 optimize length comparison in GNATprove mode.
6470 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
6471 operator /= into negation of operator = when needed.
6472 (Expand_SPARK): Call new
6473 function to expand operator /=.
6474
6475 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6476
6477 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
6478 Simplify the expression for a fixed-fixed division to remove
6479 divisions by constants whenever possible, as an optimization
6480 for restricted targets.
6481
6482 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6483
6484 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
6485
6486 2017-05-02 Bob Duff <duff@adacore.com>
6487
6488 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
6489 to find primitive ops, instead of using an Identifier that will
6490 later be looked up. This is necessary because these ops are not
6491 necessarily visible at all places where we need to call them.
6492 * exp_util.ads: Minor comment fix.
6493
6494 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6495
6496 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
6497 references are fully conformant if they are both expansions
6498 of the discriminant of a protected type, within one of the
6499 protected operations. One occurrence may be expanded into a
6500 constant declaration while the other is an input parameter to
6501 the corresponding generated subprogram.
6502
6503 2017-05-02 Justin Squirek <squirek@adacore.com>
6504
6505 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
6506 recursivly searching composite-types for null-excluding access
6507 types and verifying them.
6508 (Analyze_Object_Declaration): Add a
6509 call to Check_Null_Excluding_Components for static verification
6510 of non-initialized objects.
6511 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
6512 a parameter for a composite-type's component and an extra case
6513 for printing component information.
6514
6515 2017-05-02 Yannick Moy <moy@adacore.com>
6516
6517 * sem_ch10.adb (Analyze_Subunit): Take
6518 configuration pragma into account when restoring appropriate
6519 pragma for analysis of subunit.
6520
6521 2017-05-02 Justin Squirek <squirek@adacore.com>
6522
6523 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
6524 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
6525 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
6526 clauses from the runtime.
6527
6528 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6529
6530 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
6531 array components specially.
6532
6533 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6534
6535 * sem_ch8.adb (Premature_Usage): If the premature usage of
6536 an entity is as the expression in its own object decaration,
6537 rewrite the reference as Any_Id to prevent cascaded errors or
6538 compiler loops when such an entity is used in an address clause.
6539
6540 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6541
6542 * gcc-interface/decl.c (components_to_record): Add missing guard.
6543
6544 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6545
6546 * gcc-interface/decl.c (components_to_record): Add more comments.
6547 Put back pending fields onto the regular list if the misalignment
6548 happens to cancel itself.
6549
6550 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6551
6552 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
6553 controlling actual in a prefixed call, preserve the original node
6554 information if the prefix itself has been rewritten, for ASIS use.
6555
6556 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6557
6558 * exp_ch6.adb (Insert_Post_Call_Actions):
6559 Code clean up. Insert the post-call actions after an enclosing
6560 procedure call when N denotes a function call and appears as an
6561 actual parameter in the procedure call.
6562
6563 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6564
6565 * freeze.adb (Check_Component_Storage_Order): If there is a clause
6566 for the component, also reject the attribute if the component
6567 doesn't end on a byte boundary and its scalar storage order is
6568 different from that of the enclosing record type.
6569
6570 2017-04-28 Javier Miranda <miranda@adacore.com>
6571
6572 * atree.ads (Info_Messages): Removed.
6573 (Warning_Info_Messages): New counter.
6574 (Report_Info_Messages): New counter.
6575 * err_vars.ads Update documentation.
6576 * errout.adb (Delete_Warning_And_Continuations): Update
6577 Info_Message occurrences.
6578 (Error_Msg_Internal): Update Info_Message occurrences.
6579 (Delete_Warning): Update Info_Message occurrences.
6580 (Write_Error_Summary): Update Info_Message occurrences.
6581 (Output_Messages): Update Info_Message occurrences.
6582 (To_Be_Removed): Update Info_Message occurrences.
6583 (Reset_Warnings): Update Info_Message occurrences.
6584 * errutil.adb (Error_Msg): Update Info_Message occurrences.
6585 (Finalize): Update Info_Message occurrences.
6586 (Initialize): Update Info_Message occurrences.
6587 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
6588 (Compilation_Errors): Update Info_Message_Occurences.
6589
6590 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6591
6592 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
6593 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
6594 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
6595 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
6596 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
6597 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
6598 Y_Size.
6599 * sem_eval.adb (Why_Not_Static): Initialize Typ.
6600 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
6601
6602 2017-04-28 Bob Duff <duff@adacore.com>
6603
6604 * sem_util.ads, sem_util.adb (Might_Raise): New function
6605 that replaces Is_Exception_Safe, but has the opposite
6606 sense. Is_Exception_Safe was missing various cases -- calls inside
6607 a pragma Debug, calls inside an 'if' or assignment statement,
6608 etc. Might_Raise now walks the entire subtree looking for things
6609 that can raise.
6610 * exp_ch9.adb (Is_Exception_Safe): Remove.
6611 (Build_Protected_Subprogram_Body): Replace call to
6612 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
6613 constants where possible).
6614 * exp_ch7.adb: Rename Is_Protected_Body -->
6615 Is_Protected_Subp_Body. A protected_body is something different
6616 in the grammar.
6617
6618 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6619
6620 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
6621 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
6622 (P_Discrete_Choice_List): Initialize Expr_Node variable.
6623 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
6624 (P_Protected): Likewise.
6625 * sem_case.adb (Check_Duplicates):
6626 Add pragma Warnings on variable.
6627 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
6628 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
6629 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
6630 (Analyze_Exit_Statement): Initialize Scope_Id variable.
6631 (Analyze_Iterator_Specification): Initialize Bas variable.
6632 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
6633 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
6634 (Analyze_Accept_Statement): Initialize Task_Nam.
6635
6636 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6637
6638 * checks.adb (Install_Primitive_Elaboration_Check):
6639 Do not generate an elaboration check if all checks have been
6640 suppressed.
6641
6642 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6643
6644 * sem_ch13.adb (Analyze_Aspect_Specifications, case
6645 Interrupt_Handler and Attach_Handler): Generate reference
6646 to protected operation to prevent spurious warnings about
6647 unreferenced entities. Previous scheme failed with style checks
6648 enabled.
6649
6650 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6651
6652 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
6653 that follows an expression function must not be relocated to
6654 the generated body, because it applies to the code that follows.
6655
6656 2017-04-28 Gary Dismukes <dismukes@adacore.com>
6657
6658 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
6659 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
6660 code that might violate the more stringent checking for 'Access
6661 introduced in Ada 2005.
6662
6663 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6664
6665 * a-cforse.adb: minor style fix in comment.
6666
6667 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6668
6669 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
6670 initialize Block_Decls variable.
6671 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
6672 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
6673 * exp_disp.adb (Expand_Interface_Actuals): Initialize
6674 Formal_DDT and Actual_DDT variables.
6675 (Expand_Interface_Thunk): Initialize Iface_Formal.
6676 (Make_DT): Initialize Size_Comp.
6677 (Make_Select_Specific_Data_Table): Initialize Decls.
6678 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
6679 Also initialize more RPC_Receiver_* variables.
6680 (Build_To_Any_Function): Initialize Cstr_Formal.
6681 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
6682
6683 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6684
6685 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
6686 node between access types, freeze the designated type as well,
6687 so that dispatch table pointers are created in the proper scope,
6688 and not in the constructed body of the expression function.
6689
6690 2017-04-28 Bob Duff <duff@adacore.com>
6691
6692 * alloc.ads (Nodes_Initial): Go back to previous value. The large
6693 value makes large compilations faster, but small compilations slower.
6694
6695 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6696
6697 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
6698
6699 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6700
6701 * erroutc.adb (Compilation_Errors): Do not consider info messages
6702 as suitable warnings when warnings must be treated as errors.
6703 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
6704 internally-generated packages when outputting completion
6705 information.
6706 * errout.adb (Output_Messages): Do not consider info messages as
6707 suitable warnings when warnings must be treated as errors.
6708 * errutil.adb (Finalize): Do not consider info messages as
6709 suitable warnings when warnings must be treated as errors.
6710
6711 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6712
6713 * warnsw.ads: Minor fix for incorrect wording in comment.
6714
6715 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6716
6717 * sem_res.adb (In_Instance_Code): New predicate in
6718 Valid_Conversion, to determine whether a type conversion appears
6719 as (or within) an actual for a formal object. Type conversions
6720 in instances are not rechecked in Valid_Conversion because
6721 visibility changes between generic location andi instance may
6722 lead to spurious errors, but conversions within an actual must be
6723 fully checked, and they are not fully resolved when pre-analyzing
6724 the actuals.
6725
6726 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6727
6728 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
6729 New_Copy_Tree instead of Relocate_Node as any subsequent copies
6730 of the relocated node will have mangled Parent pointers.
6731 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
6732 tables used in conjunction with entity and itype replication.
6733 (Visit_Entity): Rewrite the restriction on which entities
6734 require duplication. The restriction now includes all types.
6735
6736 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6737
6738 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
6739 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
6740 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
6741 cleanups.
6742
6743 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6744
6745 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
6746 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
6747
6748 2017-04-28 Gary Dismukes <dismukes@adacore.com>
6749
6750 * exp_util.adb: Minor reformatting.
6751
6752 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6753
6754 * sem_ch4.adb: Fix copy/pasto.
6755
6756 2017-04-27 Tristan Gingold <gingold@adacore.com>
6757
6758 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
6759 raise-gcc.c. Fix include search path for raise-gcc.c
6760
6761 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
6762
6763 * fe.h (Warn_On_Questionable_Layout): Declare.
6764 * warnsw.ads (Warn_On_Record_Holes): Move down.
6765 (Warn_On_Questionable_Layout): New boolean variable.
6766 (Warning_Record): Add Warn_On_Questionable_Layout field.
6767 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
6768 (Restore_Warnings): Likewise.
6769 (Save_Warnings): Likewise.
6770 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
6771 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
6772 components_to_record.
6773 (gnu_field_to_gnat): New function.
6774 (warn_on_field_placement): Likewise.
6775 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
6776 parameters. Rename local variables and adjust recursive call.
6777 Rework final scan of the field list and implement warnings on the
6778 problematic placement of specific sorts of fields.
6779
6780 2017-04-27 Bob Duff <duff@adacore.com>
6781
6782 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
6783 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
6784 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
6785 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
6786 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
6787 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
6788 For efficiency, cache results of Is_Internal_File_Name and
6789 Is_Predefined_File_Name in the Units table. This avoids a lot
6790 of repeated text processing.
6791
6792 2017-04-27 Emmanuel Briot <briot@adacore.com>
6793
6794 * g-comlin.adb (Sort_Sections): remove useless test.
6795
6796 2017-04-27 Claire Dross <dross@adacore.com>
6797
6798 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
6799 allow the use of regular equality over elements in contracts.
6800 (Formal_Model): Ghost package containing model functions that are
6801 used in subprogram contracts.
6802 (Current_To_Last): Removed, model functions should be used instead.
6803 (First_To_Previous): Removed, model functions should be used instead.
6804 (Strict_Equal): Removed, model functions should be used instead.
6805 (No_Overlap): Removed, model functions should be used instead.
6806 (Equivalent_Keys): Functions over cursors are removed. They were
6807 awkward with explicit container parameters.
6808 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
6809 allow the use of regular equality over elements in contracts.
6810 (Formal_Model): Ghost package containing model functions that
6811 are used in subprogram contracts.
6812 (Current_To_Last): Removed, model functions should be used instead.
6813 (First_To_Previous): Removed, model functions should be used instead.
6814 (Strict_Equal): Removed, model functions should be used instead.
6815 (No_Overlap): Removed, model functions should be used instead.
6816
6817 2017-04-27 Yannick Moy <moy@adacore.com>
6818
6819 * gnat1drv.adb: Code cleanup.
6820
6821 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6822
6823 * exp_util.adb (Replace_Entity): The prefix of a 'Result
6824 attribute reference in a post- condition is the subprogram to
6825 which the condition applies. If the condition is inherited
6826 by a type extension, the prefix becomes a reference to the
6827 inherited operation, but there is no need to create a wrapper
6828 for this operation, because 'Result is expanded independently
6829 when elaborating the postconditions.
6830
6831 2017-04-27 Bob Duff <duff@adacore.com>
6832
6833 * sinput.adb: Minor code cleanup.
6834 * namet.adb (Append): Create faster versions of
6835 Append(String) and Append(Name_Id) by using slice assignment
6836 instead of loops.
6837 * sem_util.adb (In_Instance): Speed this up by removing
6838 unnecessary tests; Is_Generic_Instance is defined for all
6839 entities.
6840 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
6841 Remove unused function.
6842 * alloc.ads (Nodes_Initial): Use a much larger value, because
6843 the compiler was spending a lot of time copying the nodes table
6844 when it grows. This number was chosen in 1996, so is rather out
6845 of date with current memory sizes. Anyway, it's virtual memory.
6846 Get rid of Orig_Nodes_...; use Node_... instead.
6847 * atree.adb (Lock): Do not release the Nodes tables; it's a
6848 waste of time.
6849 Orig_Nodes_ ==> Nodes_
6850 * nlists.adb: Orig_Nodes_ ==> Nodes_
6851 * g-table.adb: Remove unused "with" clause.
6852 * g-table.ads, table.ads: Remove Big_Table_Type, which should
6853 not be used by clients.
6854 * g-dyntab.adb (Last_Allocated): New function
6855 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
6856
6857 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6858
6859 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
6860 check.
6861 (Subtypes_Statically_Match): Remove duplicate check.
6862 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
6863
6864 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6865
6866 * exp_aggr.adb (Replace_Type): Remove the special processing
6867 for selected components.
6868 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
6869 processing for attributes Fixed_Value and Integer_Value.
6870 * exp_util.adb (Side_Effect_Free): Merge the processing for
6871 qualified expressions, type conversions, and unchecked type
6872 conversions.
6873 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
6874 and Optional.
6875 * par-ch3.adb (P_Declarative_Items): Merge the processing for
6876 tokens function, not, overriding, and procedure.
6877 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
6878 for qualified expressions, type conversions, and unchecked
6879 type conversions.
6880 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
6881 processing for Ada 83 and instances.
6882 (Object_Access_Level): Merge the processing for indexed components
6883 and selected components.
6884 * uname.adb (Add_Node_Name): Merge the processing for stubs.
6885
6886 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6887
6888 * checks.adb (Install_Primitive_Elaboration_Check):
6889 Do not generate the check when restriction No_Elaboration_Code
6890 is in effect.
6891
6892 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6893
6894 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
6895 of Expand_Dispatching_Call. If the denoted subprogram has a
6896 class-wide precondition, this is the only precondition that
6897 applies to the call, rather that the class-wide preconditions
6898 that may apply to the body that is executed. (This is specified
6899 in AI12-0195).
6900
6901 2017-04-27 Yannick Moy <moy@adacore.com>
6902
6903 * gnat1drv.adb (Adjust_Global_Switches): Issue
6904 a warning in GNATprove mode if the runtime library does not
6905 support IEEE-754 floats.
6906
6907 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6908
6909 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
6910 is itself inherited it does not carry any contract information,
6911 so examine its parent operation which is its Alias.
6912
6913 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6914
6915 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
6916 prefix can be an object reference in which case Obj'Image (X)
6917 can only be interpreted as an indexing of the parameterless
6918 version of the attribute.
6919 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
6920 an indexing or a slice operation if the attribute does not require
6921 parameters. In Ada2012 'Image also belongs in this category,
6922 and A'Image (lo .. hi) is legal and must be parsed as a slice.
6923
6924 2017-04-27 Yannick Moy <moy@adacore.com>
6925
6926 * exp_ch4.adb: Minor reformatting.
6927 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
6928 disable the CodePeer and C generation modes. Similar to the
6929 opposite actions done in CodePeer mode.
6930
6931 2017-04-27 Yannick Moy <moy@adacore.com>
6932
6933 * sem_res.adb: Remove duplicate code.
6934 * sem_attr.adb: Delete duplicate code.
6935
6936 2017-04-27 Bob Duff <duff@adacore.com>
6937
6938 * g-dyntab.adb: Reduce the amount of copying in
6939 Release. No need to copy items past Last.
6940
6941 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6942
6943 * checks.adb Add with and use clauses for Sem_Disp.
6944 (Install_Primitive_Elaboration_Check): New routine.
6945 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
6946 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
6947 processing of 'Elaborated.
6948 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
6949 elaboration check.
6950
6951 2017-04-27 Bob Duff <duff@adacore.com>
6952
6953 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
6954 If the table grows and then shrinks back to empty, we won't necessarily
6955 point back to the empty array. Code cleanups.
6956 * sinput.ads: Add 'Base to Size clause to match the declared
6957 component subtypes.
6958
6959 2017-04-27 Claire Dross <dross@adacore.com>
6960
6961 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
6962 allow the use of regular equality over elements in contracts.
6963 (Formal_Model): Ghost package containing model functions that
6964 are used in subprogram contracts.
6965 (Current_To_Last): Removed, model functions should be used instead.
6966 (First_To_Previous): Removed, model functions should be used instead.
6967 (Strict_Equal): Removed, model functions should be used instead.
6968 (No_Overlap): Removed, model functions should be used instead.
6969 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
6970 Boolean generic parameter to disable contracts for equivalence
6971 between keys.
6972 (Witness): Create a witness of a key that is used for handling of
6973 equivalence between keys.
6974 (Has_Witness): Check whether a witness is contained in a map.
6975 (W_Get): Get the element associated to a witness.
6976 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
6977 directly.
6978 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
6979 Boolean generic parameter to disable contracts for equivalence
6980 between keys.
6981 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
6982 of equivalence on functional maps.
6983 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
6984 of equivalence on functional maps.
6985
6986 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6987
6988 * exp_ch9.adb (Expand_Entry_Barrier): Code
6989 cleanup. Do not perform the optimization which removes the
6990 declarations of the discriminant and component renamings when
6991 validity checks on operands and attributes are in effect.
6992
6993 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6994
6995 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
6996 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
6997 a-cfhama.ads, a-cofove.ads: Minor reformatting.
6998
6999 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7000
7001 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
7002 pointer dereference.
7003 * g-spipat.adb (Dump): Code clean up. Protect against a possible
7004 null pointer dereference.
7005
7006 2017-04-27 Bob Duff <duff@adacore.com>
7007
7008 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
7009 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
7010 Free renames Init, since they do the same thing.
7011 * g-table.ads: Default for Table_Low_Bound.
7012 * table.ads: Default for Table_Low_Bound, Table_Initial, and
7013 Table_Increment.
7014
7015 2017-04-27 Bob Duff <duff@adacore.com>
7016
7017 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
7018 can reallocate.
7019 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
7020 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
7021 Reorder code so that above assertions do not fail.
7022 * table.ads: Remove obsolete comment on Locked.
7023
7024 2017-04-27 Claire Dross <dross@adacore.com>
7025
7026 * a-cfdlli.ads: Code cleanup.
7027
7028 2017-04-27 Yannick Moy <moy@adacore.com>
7029
7030 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
7031 when needed for proof. (Expand_SPARK): Call the new procedure.
7032 * exp_util.ads Fix typo.
7033
7034 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7035
7036 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
7037 fixes.
7038
7039 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7040
7041 * sem_elab.adb Add new type Visited_Element
7042 and update the contents of table Elab_Visited. Various code clean up.
7043 (Check_Elab_Call): Determine whether a prior call to
7044 the same subprogram was already examined within the same context.
7045 (Check_Internal_Call_Continue): Register the subprogram being
7046 called as examined within a particular context. Do not suppress
7047 elaboration warnings.
7048
7049 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7050
7051 * xoscons.adb, osint.ads: Minor reformatting.
7052
7053 2017-04-27 Bob Duff <duff@adacore.com>
7054
7055 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
7056 Table_Count_Type --> Table_Last_Type, because the name
7057 was confusing (a "count" usually starts at zero). Add
7058 functionality supported or needed by other tables packages
7059 (Move, Release_Threshold).
7060 * g-table.ads, g-table.adb: This is now just a thin wrapper
7061 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
7062 or needed by other tables packages (Save, Restore).
7063 * table.ads, table.adb: This is now just a thin wrapper around
7064 * g-table.ads/g-table.adb.
7065 * namet.h, scos.h, uintp.h: These files are reaching into the
7066 private data of some instances of g-table, whose names changed,
7067 so the above change requires some adjustment here. It now uses
7068 public interfaces.
7069
7070 2017-04-27 Bob Duff <duff@adacore.com>
7071
7072 * namet.adb, namet.ads: Minor: remove unused procedures.
7073
7074 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7075
7076 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
7077 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
7078 Add pragma Warnings on Rtype variable in nested block. *
7079 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
7080 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
7081 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
7082 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
7083 (Process_Component_List_For_Finalize): Initialize Counter_Id.
7084 (Build_Finalize_Statements): Initialize Bod_Stmts.
7085 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
7086
7087 2017-04-27 Claire Dross <dross@adacore.com>
7088
7089 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
7090 allow the use of regular equality over elements in contracts.
7091 (Formal_Model): Ghost package containing model functions that are
7092 used in subprogram contracts.
7093 (Current_To_Last): Removed, model
7094 functions should be used instead.
7095 (First_To_Previous): Removed, model functions should be used instead.
7096 (Strict_Equal): Removed, model functions should be used instead.
7097 (No_Overlap): Removed, model functions should be used instead.
7098 (Equivalent_Keys): Functions over cursors are removed. They were
7099 awkward with explicit container parameters.
7100 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
7101 (proof only) procedure to help GNATprove when equivalence over
7102 keys is not equality.
7103
7104 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7105
7106 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
7107 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
7108 Minor reformatting and code cleanups.
7109
7110 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7111
7112 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
7113 subsidiary of Check_Inherited_Conditions, to build pragmas for an
7114 operation whose ancestor has classwide pre/postconditions. This
7115 is used both to check the legality of the inheritance in Ada
7116 and in SPARK, and to determine whether a wrapper is needed for
7117 an inherited operation.
7118 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
7119 Improve placement of error message for inherited classwide
7120 conditions that become illegal on type derivation.
7121
7122 2017-04-27 Yannick Moy <moy@adacore.com>
7123
7124 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
7125 SPARK_Mode from context on generic package.
7126 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
7127 useless test.
7128
7129 2017-04-27 Claire Dross <dross@adacore.com>
7130
7131 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
7132 overflows in computations.
7133 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
7134 overflows in computations.
7135 (Insert): Rewrite precondition to avoid overflows in computations.
7136 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
7137 overflows in computations.
7138 (Insert): Rewrite precondition to avoid overflows in computations.
7139
7140 2017-04-27 Steve Baird <baird@adacore.com>
7141
7142 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
7143 flag when it is declared in order to avoid confusing CodePeer about
7144 the possibility of an uninitialized variable read.
7145
7146 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7147
7148 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
7149 no dimensionality error if the subtype of the expression is
7150 identical to the nominal subtype in the declaration, even though
7151 the expression itself may have been constant-folded and lack a
7152 dimension vector.
7153 * sem_dim.ads: Add comments on setting of dimension vectors and
7154 its interaction with node rewritings and side-effect removal.
7155
7156 2017-04-27 Bob Duff <duff@adacore.com>
7157
7158 * debug.adb: Minor comment correction.
7159 * sem_dim.ads: Minor reformatting and typo fixes.
7160
7161 2017-04-27 Bob Duff <duff@adacore.com>
7162
7163 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
7164 Last of the tables via function calls, rather than relying on layout
7165 of data structures.
7166
7167 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7168
7169 * exp_util.adb: No wrapper in GNATprove mode.
7170
7171 2017-04-27 Yannick Moy <moy@adacore.com>
7172
7173 * sem_res.adb (Resolve_Comparison_Op): Always
7174 evaluate comparisons between values of universal types.
7175
7176 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7177
7178 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
7179 an elaboration counter nor a check when in GNATprove mode.
7180 * sem_util.adb (Build_Elaboration_Entity): Do not create an
7181 elaboration counter when in GNATprove mode.
7182
7183 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7184
7185 * freeze.adb: copy-paste typo.
7186
7187 2017-04-27 Yannick Moy <moy@adacore.com>
7188
7189 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
7190 Use correct test to detect call in GNATprove mode instead of
7191 compilation.
7192
7193 2017-04-27 Claire Dross <dross@adacore.com>
7194
7195 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
7196 New property function expressing that the element of a
7197 sequence are contained in the union of two sequences.
7198 (Formal_Model.M_Elements_Included): New property function
7199 expressing that the element of a sequence are another sequence.
7200 (Generic_Sorting): Use new property functions to state that
7201 elements are preserved by Sort and Merge.
7202 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
7203 allow the use of regular equality over elements in contracts.
7204 (Formal_Model): Ghost package containing model functions
7205 that are used in subprogram contracts. (Capacity):
7206 On unbounded containers, return the maximal capacity.
7207 (Current_To_Last): Removed, model functions should be used instead.
7208 (First_To_Previous): Removed, model functions should be used instead.
7209 (Append): Default parameter value replaced
7210 by new wrapper to allow more precise contracts.
7211 (Insert): Subprogram restored, it seems it was useful to users even if
7212 it is inefficient.
7213 (Delete): Subprogram restored, it seems it was useful to users even if
7214 it is inefficient.
7215 (Prepend): Subprogram restored, it seems it was useful to users even
7216 if it is inefficient.
7217 (Delete_First): Subprogram restored, it seems it
7218 was useful to users even if it is inefficient. (Delete_Last):
7219 Default parameter value replaced by new wrapper to allow more
7220 precise contracts.
7221 (Generic_Sorting.Merge): Subprogram restored.
7222 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
7223 allow the use of regular equality over elements in contracts.
7224 (Formal_Model): Ghost package containing model functions
7225 that are used in subprogram contracts. (Capacity):
7226 On unbounded containers, return the maximal capacity.
7227 (Current_To_Last): Removed, model functions should be used
7228 instead.
7229 (First_To_Previous): Removed, model functions should be used instead.
7230 (Append): Default parameter value replaced
7231 by new wrapper to allow more precise contracts.
7232 (Insert): Subprogram restored, it seems it was useful to users even if
7233 it is inefficient.
7234 (Delete): Subprogram restored, it seems it was useful to users even if
7235 it is inefficient.
7236 (Prepend): Subprogram restored, it seems it was useful to users even
7237 if it is inefficient.
7238 (Delete_First): Subprogram restored, it seems it
7239 was useful to users even if it is inefficient. (Delete_Last):
7240 Default parameter value replaced by new wrapper to allow more
7241 precise contracts.
7242 (Generic_Sorting.Merge): Subprogram restored.
7243 (Vector): Do not reuse formal vectors, as it is no longer possible
7244 to supply them with an equality function over elements.
7245
7246 2017-04-27 Bob Duff <duff@adacore.com>
7247
7248 * g-dyntab.adb (Release): When allocating the new
7249 table, use the correct slice of the old table to initialize it.
7250
7251 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7252
7253 * einfo.ads: Minor fixes in comments.
7254
7255 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7256
7257 * sem_prag.adb: disable clones in SPARK_Mode.
7258
7259 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7260
7261 * sem_util.ads, contracts.adb: Minor reformatting.
7262
7263 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7264
7265 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
7266 Build body of subprogram that has a class-wide condition that
7267 contains calls to other primitives.
7268 (Build_Class_Wide_Clone_Call); Build a call to the common
7269 class-wide clone of a subprogram with classwide conditions. The
7270 body of the subprogram becomes a wrapper for a call to the
7271 clone. The inherited operation becomes a similar wrapper to which
7272 modified conditions apply, and the call to the clone includes
7273 the proper conversion in a call the parent operation.
7274 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
7275 subprogram that has a classwide condition that contains calls to
7276 other primitives, build an internal subprogram that is invoked
7277 through a type-specific wrapper for all inherited subprograms
7278 that may have a modified condition.
7279 * sem_prag.adb (Check_References): If subprogram has a classwide
7280 condition, create entity for corresponding clone, to be invoked
7281 through wrapper subprograns.
7282 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
7283 message about placement if pragma isi internally generated.
7284 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
7285 a classwide clone, build body of clone as copy of original body,
7286 and rewrite original body as a wrapper as a wrapper for a call to
7287 the clone, so that it incorporates the original pre/postconditions
7288 of the subprogram.
7289 * freeze.adb (Check_Inherited_Conditions): For an inherited
7290 subprogram that inherits a classwide condition, build spec and
7291 body of corresponding wrapper so that call to inherited operation
7292 gets the modified conditions.
7293 * contracts.adb (Analyze_Contracts): If analysis of classwide
7294 condition has created a clone for a primitive operation, analyze
7295 declaration of clone.
7296
7297 2017-04-27 Steve Baird <baird@adacore.com>
7298
7299 * exp_util.adb (Build_Allocate_Deallocate_Proc):
7300 Add "Suppress => All_Checks" to avoid generating unnecessary
7301 checks.
7302
7303 2017-04-27 Yannick Moy <moy@adacore.com>
7304
7305 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
7306 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
7307 inlining body in GNATprove mode when switch -gnatdm used.
7308 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
7309 in GNATprove mode when switch -gnatdm used.
7310
7311 2017-04-27 Arnaud Charlet <charlet@adacore.com>
7312
7313 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
7314 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
7315 clauses, so that we keep an indication of the address clause
7316 before removing it from the tree.
7317
7318 2017-04-27 Yannick Moy <moy@adacore.com>
7319
7320 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
7321 of expression being qualified, when not an object name, or else
7322 evaluate the underlying name.
7323
7324 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
7325
7326 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
7327
7328 2017-04-27 Justin Squirek <squirek@adacore.com>
7329
7330 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
7331 Process_Component_List_For_Finalization as a local variable.
7332 (Process_Component_For_Finalize): Add an extra parameter to avoid
7333 global references.
7334 (Process_Component_List_For_Finalization): Correct calls to
7335 Process_Component_For_Finalize to take Num_Comps as a parameter.
7336
7337 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7338
7339 * sem_ch8.adb (Find_Direct_Name): Account for the case where
7340 a use-visible entity is defined within a nested scope of an
7341 instance when giving priority to entities which were visible in
7342 the original generic.
7343 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
7344
7345 2017-04-27 Tristan Gingold <gingold@adacore.com>
7346
7347 * raise-gcc.c: Don't use unwind.h while compiling
7348 for the frontend, but mimic host behavior.
7349
7350 2017-04-27 Javier Miranda <miranda@adacore.com>
7351
7352 * sem_ch3.adb (Build_Discriminated_Subtype):
7353 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
7354
7355 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7356
7357 * sem_prag.adb (Analyze_Global_Item):
7358 Do not consider discriminants because they are not "entire
7359 objects". Remove the discriminant-related checks because they are
7360 obsolete.
7361 (Analyze_Input_Output): Do not consider discriminants
7362 because they are not "entire objects".
7363
7364 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7365
7366 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
7367 perform check if the current scope does not come from source,
7368 as is the case for a rewritten task body, because check has
7369 been performed already, and may not be doable because of changed
7370 visibility.
7371
7372 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7373
7374 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
7375 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
7376 Minor reformatting.
7377
7378 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7379
7380 * sem_ch4.adb (Analyze_Call): If the return type of a function
7381 is incomplete in an context in which the full view is available,
7382 replace the type of the call by the full view, to prevent spurious
7383 type errors.
7384 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
7385 abstract subprogram so that compiler does not reject a parameter
7386 of a primitive operation of a tagged type being frozen, when
7387 the untagged type of that parameter cannot be frozen.
7388
7389 2017-04-27 Bob Duff <duff@adacore.com>
7390
7391 * sem_attr.adb (Compute_Type_Key): Don't walk
7392 representation items for irrelevant types, which could be in a
7393 different source file.
7394
7395 2017-04-27 Steve Baird <baird@adacore.com>
7396
7397 * exp_attr.adb (Expand_N_Attribute_Reference):
7398 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
7399 for CodePeer.
7400
7401 2017-04-27 Yannick Moy <moy@adacore.com>
7402
7403 * exp_unst.ads: Fix typos in comments.
7404
7405 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7406
7407 * sem_eval.adb (Choice_Matches): Handle properly a real literal
7408 whose type has a defined static predicate.
7409
7410 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7411
7412 * exp_ch4.adb (Insert_Dereference_Action):
7413 Do not adjust the address of a controlled object when the
7414 associated access type is subject to pragma No_Heap_Finalization.
7415 Code reformatting.
7416
7417 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
7418
7419 * gcc-interface/utils.c (gnat_type_for_size): Set
7420 TYPE_ARTIFICIAL on created types.
7421
7422 2017-04-27 Claire Dross <dross@adacore.com>
7423
7424 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7425 modifications in functional containers.
7426 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7427 to improve readablity. Subprograms are separated between basic
7428 operations, constructors and properties. Universally quantified
7429 formulas in contracts are factorized in independant functions
7430 with a name and a comment. Names of parameters are improved.
7431
7432 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7433
7434 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7435
7436 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7437
7438 * sem_res.adb (Resolve_Type_Conversion): Do not
7439 install a predicate check here since this is already done during
7440 the expansion phase. Verify whether the operand satisfies the
7441 static predicate (if any) of the target type.
7442 * sem_ch3.adb (Analyze_Object_Declaration): Do
7443 not install a predicate check if the object is initialized by
7444 means of a type conversion because the conversion is subjected
7445 to the same check.
7446
7447 2017-04-27 Tristan Gingold <gingold@adacore.com>
7448
7449 * raise.c (__gnat_builtin_longjmp): Remove.
7450 (__gnat_bracktrace):
7451 Add a dummy definition for the compiler (__gnat_eh_personality,
7452 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
7453 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
7454 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
7455 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
7456 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
7457 and a-except-2005.adb.
7458 * raise-gcc.c: Allow build in compiler, compiled as a C++
7459 file.
7460 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
7461 (db): Constify msg_format.
7462 (get_call_site_action_for): Don't use void arithmetic.
7463 * system.ads (Frontend_Exceptions): Set to False.
7464 (ZCX_By_Default): Set to True.
7465 (GCC_ZC_Support): Set to True.
7466 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
7467 a-except.ad[sb].
7468 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
7469 in gnat1 and gnatbind.
7470 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
7471 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
7472 * s-excmac.ads, s-excmac.adb: Copy of variants.
7473 * a-except.o: Adjust preequisites.
7474 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
7475
7476 2017-04-27 Claire Dross <dross@adacore.com>
7477
7478 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7479 modifications in functional containers.
7480 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7481 to improve readablity. Subprograms are separated between basic
7482 operations, constructors and properties. Universally quantified
7483 formulas in contracts are factorized in independant functions
7484 with a name and a comment. Names of parameters are improved.
7485
7486 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7487
7488 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7489
7490 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7491
7492 * sem_res.adb (Resolve_Type_Conversion): Do not
7493 install a predicate check here since this is already done during
7494 the expansion phase. Verify whether the operand satisfies the
7495 static predicate (if any) of the target type.
7496 * sem_ch3.adb (Analyze_Object_Declaration): Do
7497 not install a predicate check if the object is initialized by
7498 means of a type conversion because the conversion is subjected
7499 to the same check.
7500
7501 2017-04-27 Tristan Gingold <gingold@adacore.com>
7502
7503 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
7504 replaced by their variants).
7505
7506 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7507
7508 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
7509 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
7510 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
7511
7512 2017-04-27 Tristan Gingold <gingold@adacore.com>
7513
7514 * s-excmac-gcc.ads, s-excmac-gcc.adb,
7515 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
7516 Ada95.
7517
7518 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7519
7520 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
7521 the loop which detects potential enclosing transient scopes. The
7522 loop now terminates much earlier as transient scopes are bounded
7523 by packages and subprograms.
7524
7525 2017-04-27 Claire Dross <dross@adacore.com>
7526
7527 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
7528 allow the use of regular equality over elements in contracts.
7529 (Cursor): Type is now public so that it can be used in
7530 model functions.
7531 (Formal_Model): Ghost package containing
7532 model functions that are used in subprogram contracts.
7533 (Current_To_Last): Removed, model functions should be used
7534 instead.
7535 (First_To_Previous): Removed, model functions should
7536 be used instead.
7537 (Strict_Equal): Removed, model functions
7538 should be used instead.
7539 (Append): Default parameter value
7540 replaced by new wrapper to allow more precise contracts.
7541 (Insert): Default parameter value replaced by new wrapper to
7542 allow more precise contracts.
7543 (Delete): Default parameter
7544 value replaced by new wrapper to allow more precise contracts.
7545 (Prepend): Default parameter value replaced by new wrapper to
7546 allow more precise contracts.
7547 (Delete_First): Default parameter
7548 value replaced by new wrapper to allow more precise contracts.
7549 (Delete_Last): Default parameter value replaced by new wrapper
7550 to allow more precise contracts.
7551
7552 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7553
7554 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
7555 for object declarations.
7556 (Expand_SPARK_N_Object_Declaration): New routine.
7557 * sem_elab.adb (Check_A_Call): Include calls to the
7558 Default_Initial_Condition procedure of a type under the SPARK
7559 elaboration checks umbrella.
7560
7561 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7562
7563 * sem.adb (Analyze): Diagnose an illegal iterated component
7564 association.
7565 * sem_util.ads, sem_util.adb
7566 (Diagnose_Iterated_Component_Association): New routine.
7567
7568 2017-04-27 Bob Duff <duff@adacore.com>
7569
7570 * adaint.c (__gnat_get_current_dir): Return 0 in length if
7571 getcwd fails.
7572 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
7573 exception if getcwd failed.
7574
7575 2017-04-27 Yannick Moy <moy@adacore.com>
7576
7577 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
7578 entities with special prefix.
7579
7580 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7581
7582 * debug.adb Change the documentation of switch -gnatd.s.
7583 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
7584 to manage the secondary stack when an enclosing scope already
7585 performs this functionality (aka relaxed management). Switch
7586 -gnatd.s may be used to force strict management in which case
7587 the block will manage the secondary stack unconditionally. Add
7588 a guard to stop the traversal when encountering a package or a
7589 subprogram scope.
7590
7591 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7592
7593 * sem_res.adb (Resolve_Call): Refine further the handling of
7594 limited views of return types in function calls. If the function
7595 that returns a limited view appears in the current unit,
7596 we do not replace its type by the non-limited view because
7597 this transformation is performed int the back-end. However,
7598 the type of the call itself must be the non-limited view, to
7599 prevent spurious resolution errors.
7600
7601 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7602
7603 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
7604 Removed, proposed implementation using generics for class-wide
7605 preconditions proved impractical.
7606 (Class_Wide_Clone): New attribute of subprogram. Designates
7607 subprogram created for primitive operations with class-wide
7608 pre/postconditions that contain calls to other primitives. The
7609 clone holds the body of the original primitive, but the
7610 pre/postonditions do not apply to it. The original body is
7611 rewritten as a wrapper for a call to the clone.
7612 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
7613 the flag is set, no code for the corresponding pre/postconditions
7614 is inserted into its body.
7615
7616 2017-04-27 Bob Duff <duff@adacore.com>
7617
7618 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
7619 Scalar_Storage_Order if -gnatI is given.
7620 * sem_prag.adb (Analyze_Pragma): Ignore
7621 Default_Scalar_Storage_Order if -gnatI is given.
7622
7623 2017-04-27 Claire Dross <dross@adacore.com>
7624
7625 * a-cofuba.ads (Add): Take as an additional input parameter
7626 the position where the element should be inserted.
7627 (Remove): New function that removes an element from the container.
7628 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
7629 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
7630 (Remove): New function that removes an element from a set.
7631 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
7632 (Remove): New function that removes an element from a sequence.
7633 (Insert): New function that adds anywhere in a sequence.
7634
7635 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7636
7637 * checks.adb (Generate_Range_Check): Revert previous change.
7638
7639 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7640
7641 * sem_util.adb: Minor reformatting/rewording.
7642
7643 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7644
7645 * lib-xref.adb (Generate_Reference): The use
7646 of attribute 'Result is not considered a violation of pragma
7647 Unreferenced.
7648
7649 2017-04-27 Justin Squirek <squirek@adacore.com>
7650
7651 * cstand.adb (Create_Standard): Correctly set
7652 Directly_Designated_Type for Any_Access.
7653 * sem_type.adb (Covers): Minor grammar fixes.
7654
7655 2017-04-27 Bob Duff <duff@adacore.com>
7656
7657 * sem_attr.adb: Minor cleanup.
7658
7659 2017-04-27 Claire Dross <dross@adacore.com>
7660
7661 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
7662 private child of Ada.Containers used to implement all functional
7663 containers.
7664 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
7665 child of Ada.Containers. It provides functional indefinite unbounded
7666 maps which can be used as high level models for specification
7667 of data structures.
7668 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
7669 child of Ada.Containers. It provides functional indefinite unbounded
7670 sets which can be used as high level models for specification
7671 of data structures.
7672 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
7673 child of Ada.Containers. It provides functional indefinite unbounded
7674 vectors which can be used as high level models for specification
7675 of data structures.
7676 * Makefile.rtl: Add new packages.
7677 * impunit.adb: Add new packages.
7678
7679 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7680
7681 * sem_ch4.adb: Minor reformatting.
7682
7683 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7684
7685 * sem_ch12.adb (Analyze_Associations): minor reformatting.
7686 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
7687 point type actual that has user-defined arithmetic primitives,
7688 when there is a previous actual for a formal package that defines
7689 a fixed-point type with the parent user-defined operator.
7690
7691 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7692
7693 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
7694 * sem_attr.adb (Resolve_Attribute): Generate a range check when
7695 the component type allows range checks.
7696
7697 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7698
7699 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
7700 corresponding declaration, because formal derived types are
7701 rewritten as private extensions.
7702
7703 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7704
7705 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
7706 dimensions of operands if node has been analyzed already, because
7707 previous analysis and dimension checking will have removed the
7708 dimension information from the operands.
7709
7710 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7711
7712 * debug.adb: Document the use of switch -gnatd.s.
7713 * einfo.ads Update the documentation on attribute
7714 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
7715 the uses of these attributes from certain entities.
7716 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
7717 which determines whether the block should continue to manage
7718 the secondary stack.
7719 (Manages_Sec_Stack): New routine.
7720
7721 2017-04-27 Bob Duff <duff@adacore.com>
7722
7723 * atree.ads: Minor edit.
7724
7725 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7726
7727 * sinfo.ads: Update the section on Ghost mode. Add
7728 a section on SPARK mode. Update the placement of section on
7729 expression functions.
7730
7731 2017-04-27 Bob Duff <duff@adacore.com>
7732
7733 * sinput.adb (Get_Source_File_Index): Don't
7734 assert that S is in the right range in the case where this is
7735 a .dg file under construction.
7736
7737 2017-04-27 Yannick Moy <moy@adacore.com>
7738
7739 * sem_util.adb (Check_Result_And_Post_State):
7740 Handle more precisely each conjunct in expressions formed by
7741 and'ing sub-expressions.
7742
7743 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7744
7745 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
7746
7747 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7748
7749 * gnat_rm.texi, gnat_ugn.texi,
7750 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7751 doc/gnat_ugn/platform_specific_information.rst,
7752 doc/gnat_ugn/gnat_and_program_execution.rst,
7753 doc/gnat_ugn/gnat_utility_programs.rst,
7754 doc/gnat_ugn/the_gnat_compilation_model.rst,
7755 doc/gnat_rm/implementation_defined_attributes.rst,
7756 doc/gnat_rm/the_gnat_library.rst,
7757 doc/gnat_rm/implementation_defined_pragmas.rst,
7758 doc/gnat_rm/representation_clauses_and_pragmas.rst,
7759 doc/gnat_rm/implementation_of_specific_ada_features.rst,
7760 doc/gnat_rm/implementation_defined_aspects.rst,
7761 doc/gnat_rm/implementation_defined_characteristics.rst: Update
7762 documentation.
7763
7764 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7765
7766 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
7767 generating C code on complex case expressions.
7768
7769 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7770
7771 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
7772 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
7773 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
7774 Ada_2012 instead of Ada_2005 to be compatible with the above
7775 change.
7776 * bindgen.adb: Silence new warning on pragma Ada_95.
7777
7778 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7779
7780 * checks.adb (Generate_Range_Check): Revert part of previous change.
7781
7782 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7783
7784 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
7785 container indexing operation that appears as a an actual in a
7786 parameter association in a procedure call.
7787
7788 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
7789
7790 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
7791 Fix spelling mistakes.
7792
7793 2017-04-25 Bob Duff <duff@adacore.com>
7794
7795 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
7796 * sinput-p.adb: Use regular fat pointers, with bounds checking,
7797 for source buffers. Fix misc obscure bugs.
7798 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
7799 checking, for source buffers. Modify representation clause for
7800 Source_File_Record as appropriate. Move Source_File_Index_Table
7801 from spec to body, because it is not used outside the body.
7802 Move Set_Source_File_Index_Table into the private part, because
7803 it is used only in the body and in children. Use trickery to
7804 modify the dope in the generic instantiation case. It's ugly,
7805 but not as ugly as the previous method. Fix documentation.
7806 Remove obsolete code.
7807 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
7808 indexing in source buffers.
7809 * fmap.adb: Avoid conversions from one string type to another.
7810 Remove a use of global name buffer.
7811 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
7812 fixes.
7813
7814 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7815
7816 * exp_util.adb, exp_ch4.adb: Minor reformatting.
7817
7818 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7819
7820 * checks.adb: Code clean up in various routines.
7821 (Generate_Range_Check): Do not generate a range check when the
7822 expander is not active or when index/range checks are suppressed
7823 on the target type.
7824 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
7825 Remove variants that include a Supress parameter. These routines
7826 are never used, and were introduced before the current scope-based
7827 check suppression method.
7828
7829 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
7830
7831 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
7832 code and some subprogram calls that are now noop.
7833
7834 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7835
7836 * exp_ch4.adb (Expand_N_Case_Expression): Take
7837 Minimize_Expression_With_Actions into account when possible.
7838
7839 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7840
7841 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
7842 (Known_Null): Moved to Sem_Util.
7843 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
7844 (Known_Null): Moved to Sem_Util.
7845 * sem_util.adb Add new enumeration type Null_Status_Kind.
7846 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
7847 this routine is now carried out by Null_Status.
7848 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
7849 is now carried out by Null_Status.
7850 (Null_Status): New routine.
7851 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
7852 (Known_Null): Moved from Exp_Util.
7853
7854 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7855
7856 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
7857 error on the return type of an expression function that is a
7858 completion, if the type is derived from a generic formal type.
7859
7860 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7861
7862 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
7863 conversion are those of the target type.
7864
7865 2017-04-25 Bob Duff <duff@adacore.com>
7866
7867 * a-clrefi.adb: Minor cleanup.
7868
7869 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7870
7871 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
7872
7873 2017-04-25 Bob Duff <duff@adacore.com>
7874
7875 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
7876 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
7877 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
7878 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
7879 the Internal_Source buffer. This removes the incorrect call to "="
7880 the customer noticed.
7881 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
7882 eventually need to eliminate them altogether. Or else get rid
7883 of zero-origin addressing.
7884
7885 2017-04-25 Claire Dross <dross@adacore.com>
7886
7887 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
7888 function used in GNATprove to know if an expression contains
7889 non-dispatching calls on primitives of a tagged type.
7890
7891 2017-04-25 Bob Duff <duff@adacore.com>
7892
7893 * rtsfind.adb (Initialize): Initialize
7894 First_Implicit_With. Building the compiler with Normalize_Scalars
7895 and validity checking finds this being used as an uninitialized
7896 variable.
7897
7898 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7899
7900 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
7901 Add a warning about SPARK mode management. The routine now
7902 saves and restores both the mode and associated pragma.
7903 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
7904 SPARK mode management. The routine now saves and restores both
7905 the mode and associated pragma.
7906 (Analyze_Object_Contract):
7907 Add a warning about SPARK mode management. The routine
7908 now saves and restores both the mode and associated pragma.
7909 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
7910 management. The routine now saves and restores both the mode
7911 and associated pragma. (Analyze_Package_Contract): Add a warning
7912 about SPARK mode management. The routine now saves and restores
7913 both the mode and associated pragma.
7914 (Analyze_Task_Contract):
7915 Add a warning about SPARK mode management. The routine now saves
7916 and restores both the mode and associated pragma.
7917 * expander.adb (Expand): Change the way the Ghost mode is saved
7918 and restored.
7919 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
7920 saved and restored.
7921 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
7922 and restored.
7923 * exp_util.adb (Build_DIC_Procedure_Body):
7924 Change the way the Ghost mode is saved and restored.
7925 (Build_DIC_Procedure_Declaration): Change the way the Ghost
7926 mode is saved and restored.
7927 (Build_Invariant_Procedure_Body):
7928 Change the way the Ghost mode is saved and restored.
7929 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
7930 mode is saved and restored.
7931 (Make_Predicate_Call): Change the
7932 way the Ghost mode is saved and restored.
7933 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
7934 saved and restored.
7935 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7936 and its assignment.
7937 (Mark_And_Set_Ghost_Body): Remove parameter
7938 Mode and its assignment.
7939 (Mark_And_Set_Ghost_Completion):
7940 Remove parameter Mode and its assignment.
7941 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
7942 assignment.
7943 (Mark_And_Set_Ghost_Instantiation): Remove parameter
7944 Mode and its assignment.
7945 (Mark_And_Set_Ghost_Procedure_Call):
7946 Remove parameter Mode and its assignment.
7947 (Set_Ghost_Mode):
7948 Remove parameter Mode and its assignment.
7949 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7950 and update the comment on usage.
7951 (Mark_And_Set_Ghost_Body):
7952 Remove parameter Mode and update the comment on usage.
7953 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
7954 update the comment on usage.
7955 (Mark_And_Set_Ghost_Declaration):
7956 Remove parameter Mode and update the comment on usage.
7957 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
7958 update the comment on usage.
7959 (Mark_And_Set_Ghost_Procedure_Call):
7960 Remove parameter Mode and update the comment on usage.
7961 (Set_Ghost_Mode): Remove parameter Mode and update the comment
7962 on usage.
7963 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
7964 types.
7965 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
7966 of obsolete field SPARK_Mode_Pragma.
7967 (Load_Main_Source): Remove
7968 the assignment of obsolete field SPARK_Mode_Pragma.
7969 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
7970 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
7971 the assignment of obsolete field SPARK_Mode_Pragma.
7972 (Ensure_System_Dependency): Remove the assignment of obsolete
7973 field SPARK_Mode_Pragma.
7974 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
7975 mode management. Change the way Ghost and SPARK modes are saved
7976 and restored.
7977 * sem.adb (Analyze): Change the way the Ghost mode is saved
7978 and restored.
7979 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
7980 Ghost mode is saved and restored.
7981 (Process_Full_View): Change
7982 the way the Ghost mode is saved and restored.
7983 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
7984 mode is saved and restored.
7985 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
7986 mode is saved and restored.
7987 (Analyze_Subprogram_Body_Helper):
7988 Change the way the Ghost mode is saved and restored.
7989 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
7990 Ghost mode is saved and restored.
7991 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
7992 management. Save the SPARK mode-related data prior to any changes
7993 to the scope stack and contexts. The mode is then reinstalled
7994 before the subunit is analyzed in order to restore the original
7995 view of the subunit.
7996 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
7997 warning on region management. Change the way the Ghost and
7998 SPARK modes are saved and restored.
7999 (Inline_Instance_Body):
8000 Add a warning about SPARK mode management. Code clean up.
8001 (Analyze_Subprogram_Instantiation): Update the warning on region
8002 management. Change the way the Ghost and SPARK modes are saved
8003 and restored.
8004 (Instantiate_Package_Body): Update the warning
8005 on region management. Change the way the Ghost and SPARK modes
8006 are saved and restored.
8007 (Instantiate_Subprogram_Body): Update
8008 the warning on region management. Change the way the Ghost and
8009 SPARK modes are saved and restored.
8010 (Set_Instance_Env): Add a
8011 warning about SPARK mode management. Change the way SPARK mode
8012 is saved and restored.
8013 * sem_ch13.adb (Build_Predicate_Functions):
8014 Change the way the Ghost mode is saved and restored.
8015 (Build_Predicate_Function_Declaration): Change the way the Ghost
8016 mode is saved and restored.
8017 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
8018 mode management. Change the way SPARK mode is saved and restored.
8019 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
8020 Change the way the Ghost mode is saved and restored.
8021 (Analyze_Initial_Condition_In_Decl_Part): Change the way
8022 the Ghost mode is saved and restored.
8023 (Analyze_Pragma):
8024 Change the way the Ghost mode is saved and restored.
8025 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
8026 Ghost mode is saved and restored.
8027 * sem_util.adb (Install_SPARK_Mode): New routine.
8028 (Restore_SPARK_Mode): New routine.
8029 (Save_SPARK_Mode_And_Set): Removed.
8030 (Set_SPARK_Mode): New routine.
8031 * sem_util.ads (Install_SPARK_Mode): New routine.
8032 (Restore_SPARK_Mode): New routine.
8033 (Save_SPARK_Mode_And_Set): Removed.
8034 (Set_SPARK_Mode): New routine.
8035
8036 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8037
8038 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
8039 to determine whether a type is declared in a local package that
8040 has not yet been frozen.
8041 * freeze.adb (Freeze_Before): Use new predicate to determine
8042 whether a local package must be installed on the scope stack
8043 in order to evaluate in the proper scope actions generated by
8044 aspect specifications, such as Predicate
8045 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
8046 using new predicate.
8047
8048 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8049
8050 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
8051 comparisons between non- scalar expressions expressions because
8052 their values cannot be invalidated.
8053 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
8054 comment on usage.
8055
8056 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8057
8058 * par_sco.adb: Minor reformatting.
8059
8060 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8061
8062 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
8063 is a type from an unfrozen local package, install package to
8064 complete the analysis of delayed aspects of the type.
8065
8066 2017-04-25 Tristan Gingold <gingold@adacore.com>
8067
8068 * bingen.adb (System_Version_Control_Used): New variable.
8069 (Resolve_Binder_Options): Set the above variable.
8070 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
8071 (Gen_Elab_Order): Emit blank line before.
8072
8073 2017-04-25 Justin Squirek <squirek@adacore.com>
8074
8075 * sem_cat.adb (Validate_RT_RAT_Component): Added
8076 an extra check to ignore incomplete types.
8077
8078 2017-04-25 Thomas Quinot <quinot@adacore.com>
8079
8080 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
8081 bogus circuitry for the case where Name is Predicate.
8082
8083 2017-04-25 Thomas Quinot <quinot@adacore.com>
8084
8085 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
8086 Create SCOs for Predicate aspects in disabled
8087 state initially, to be enabled later on by...
8088 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
8089 SCO for predicate as enabled.
8090
8091 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8092
8093 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
8094 pragmas Warnings Off / On.
8095 * namet.adb (Finalize): Remove now obsolete pair of pragmas
8096 Warnings Off / On.
8097 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
8098 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
8099 consider comparisons between static expressions because their
8100 values cannot be invalidated.
8101 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
8102 Warnings Off / On.
8103 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
8104 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
8105
8106 2017-04-25 Bob Duff <duff@adacore.com>
8107
8108 * sem_elab.adb (In_Task_Activation): Trace internal calls in
8109 task bodies.
8110
8111 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8112
8113 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
8114 typo fixes.
8115
8116 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8117
8118 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
8119 On/Off to defend against a spurious warning in conditional
8120 compilation.
8121 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
8122 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
8123 defend against a spurious warning in conditional compilation.
8124 * output.adb Add a pair of pragma Warnings On/Off to defend
8125 against a spurious warning in conditional compilation.
8126 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
8127 (Fold_General_Op): New routine.
8128 (Fold_Static_Real_Op): New routine.
8129 (Test_Comparison): New routine.
8130 * sem_eval.ads (Test_Comparison): New routine.
8131 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
8132 (Warn_On_Constant_Valid_Condition): New routine.
8133 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
8134 to detect a specific case.
8135 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
8136 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
8137 to defend against a spurious warning in conditional compilation.
8138 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
8139 against a spurious warning in conditional compilation.
8140 * usage.adb Add a pair of pragma Warnings On/Off to defend
8141 against a spurious warning in conditional compilation.
8142
8143 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8144
8145 * sinfo.ads, sem_ch13.adb: Update comment.
8146
8147 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8148
8149 * sem_util.adb (Is_Post_State): A reference to a
8150 generic in out parameter is considered a change in the post-state
8151 of a subprogram.
8152
8153 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8154
8155 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
8156 declaration of a subprogram instance within its wrapper package,
8157 skip over null statements that may result from the rewriting of
8158 ignored pragmas.
8159
8160 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8161
8162 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
8163 If the type is an unchecked_union, replace the attribute with
8164 a Raise_Program_Error (rather than inserting such before the
8165 attribute reference) to handle properly the case where we are
8166 processing a component of a larger record, and we need to prevent
8167 further expansion for the unchecked union.
8168 (Expand_Attribute_Reference, case 'Write): If the type is
8169 an unchecked_union, check whether enclosing scope is a Write
8170 subprogram. Replace attribute with a Raise_Program_Error if the
8171 discriminants of the unchecked_union type have not default values
8172 because such a use is erroneous..
8173
8174 2017-04-25 Tristan Gingold <gingold@adacore.com>
8175
8176 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
8177 Add relative_deadline to task record on edf profile.
8178 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
8179 (Make_Task_Create_Call): Pass relative_deadline value.
8180 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
8181 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
8182 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
8183 * sem_prag.adb (Set_Ravenscar_Profile): Handle
8184 GNAT_Ravenscar_EDF (set scheduling policy).
8185 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
8186 pragma.
8187 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
8188 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
8189 New names.
8190 (Pragma_Deadline_Floor): New pragma.
8191 * targparm.adb (Get_Target_Parameters): Recognize
8192 GNAT_Ravenscar_EDF profile.
8193
8194 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8195
8196 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
8197
8198 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8199
8200 * sem_aux.adb (Nearest_Ancestor): Use original node of type
8201 declaration to locate nearest ancestor, because derived
8202 type declarations for record types are rewritten as record
8203 declarations.
8204 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
8205 properly derivations that are completions of private types.
8206 (Add_Predicates): If type is private, examine rep. items of full
8207 view, which may include inherited predicates.
8208 (Build_Predicate_Functions): Ditto.
8209
8210 2017-04-25 Javier Miranda <miranda@adacore.com>
8211
8212 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
8213 to generate new entities for subtype declarations located in
8214 Expression_With_Action nodes.
8215
8216 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8217
8218 * sem_elab.adb (Check_A_Call): Remove
8219 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
8220 need for Elaborate_All when SPARK elaboration checks are
8221 required. Update the checks for instances, variables, and calls
8222 to Default_Initial_Condition procedures.
8223
8224 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8225
8226 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
8227 into a boolean aspect, in analogy with the Ada aspect No_Return.
8228
8229 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8230
8231 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
8232
8233 2017-04-25 Bob Duff <duff@adacore.com>
8234
8235 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
8236 Is_True_Constant for an array variable that is passed to a
8237 foreign function as an 'in' parameter.
8238 * debug.adb: Document -gnatd.q.
8239
8240 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8241
8242 * sem_ch6.adb (Analyze_Expression_Function): If expression function
8243 is completion and return type is an access type do not freeze
8244 designated type: this will be done in the process of freezing
8245 the expression if needed.
8246 (Freeze_Expr_Types): Check whether type is complete before
8247 creating freeze node, to provide a better error message if
8248 reference is premature.
8249 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
8250 functions created by type derivations.
8251
8252 2017-04-25 Pascal Obry <obry@adacore.com>
8253
8254 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
8255
8256 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8257
8258 * sem_res.adb (Resolve_Type_Conversion):
8259 When resolving against any fixed type, set the type of the
8260 operand as universal real when the operand is a multiplication
8261 or a division where both operands are of any fixed type.
8262 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
8263 placement of an error message by pointing to the operand of a
8264 type conversion rather than the conversion itself.
8265
8266 2017-04-25 Thomas Quinot <quinot@adacore.com>
8267
8268 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
8269 Needs_Debug_Info when producing SCOs.
8270
8271 2017-04-25 Thomas Quinot <quinot@adacore.com>
8272
8273 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
8274 Always pass a null finalization master for a library level named access
8275 type to which a pragme No_Heap_Finalization applies.
8276
8277 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8278
8279 PR ada/78845
8280
8281 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
8282 set to A'First(2) and vice versa.
8283
8284 2017-04-25 Yannick Moy <moy@adacore.com>
8285
8286 * freeze.adb (Freeze_Record_Type): Remove obsolete
8287 rule on volatile tagged record restriction on SPARK code.
8288
8289 2017-04-25 Yannick Moy <moy@adacore.com>
8290
8291 * sem_prag.adb (minor) Fix SPARK RM reference.
8292
8293 2017-04-25 Yannick Moy <moy@adacore.com>
8294
8295 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
8296 comment to reflect which entity is chosen as unique entity.
8297 (Unique_Entity): Return full view instead of private spec for
8298 protected type or task type. Fix possible incorrect access when
8299 called on entry.
8300
8301 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8302
8303 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
8304 array types only instead of all packed array types.
8305
8306 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8307
8308 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
8309 dimension system, verify that dimensions of both match.
8310 (Check_Conformance): Add error message in case of dimension
8311 mismatch.
8312 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
8313 predicate.
8314
8315 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8316
8317 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
8318 confusing.
8319
8320 2017-04-25 Yannick Moy <moy@adacore.com>
8321
8322 * sem_util.adb: Minor refactoring.
8323 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
8324
8325 2017-04-25 Claire Dross <dross@adacore.com>
8326
8327 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
8328 ultimate alias when accessing overridden operation. Indeed, if the
8329 overridden operation is itself inherited, it won't have any explicit
8330 contract.
8331
8332 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8333
8334 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
8335 overlap if the two formals have different types, because formally
8336 the corresponding actuals cannot designate the same objects.
8337
8338 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8339
8340 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
8341 dimensions are present from context, use them. b) If operand is
8342 a static constant rewritten as a literal, obtain the dimensions
8343 from the original declaration, otherwise use dimensions of type
8344 established from context.
8345
8346 2017-04-25 Yannick Moy <moy@adacore.com>
8347
8348 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
8349 of array that is private.
8350
8351 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8352
8353 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
8354 reformatting.
8355
8356 2017-04-25 Yannick Moy <moy@adacore.com>
8357
8358 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
8359 on body.
8360
8361 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8362
8363 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
8364 the check that recognizes a call to a private overridding and
8365 replaces the called subprogram with its alias.
8366
8367 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8368
8369 * exp_util.adb: Minor reformatting.
8370
8371 2017-04-25 Justin Squirek <squirek@adacore.com>
8372
8373 * exp_ch3.adb (Freeze_Type): Add condition to always treat
8374 interface types as a partial view of a private type for the
8375 generation of invariant procedure bodies.
8376 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
8377 Add a condition to get the Corresponding_Record_Type for
8378 concurrent types, add condition to return in the absence of a
8379 class in the pragma, remove call to Replace_Type_References,
8380 and add call to Replace_References.
8381 (Add_Interface_Invariatns),
8382 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
8383 to including the working type T.
8384 (Add_Own_Invariants): Remove
8385 legacy condition for separate units, remove dispatching for ASIS
8386 and save a copy of the expression in the pragma expression.
8387 (Build_Invariant_Procedure_Body): Default initalize vars,
8388 remove return condition on interfaces, always use the
8389 private type for interfaces, and move the processing of types
8390 until after the processing of invariants for the full view.
8391 (Build_Invariant_Procedure_Declaration): Remove condition
8392 to return if an interface type is encountered and add
8393 condition to convert the formal parameter to its class-wide
8394 counterpart if Work_Typ is abstract.
8395 (Replace_Type): Add call to Remove_Controlling_Arguments.
8396 (Replace_Type_Ref): Remove class-wide dispatching for the current
8397 instance of the type.
8398 (Replace_Type_References): Remove parameter "Derived"
8399 (Remove_Controlling_Arguments): Created in order to removing
8400 the controlliong argument from calls to primitives in the case
8401 of the formal parameter being an class-wide abstract type.
8402 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
8403 to the change made to Freeze_Type in exp_ch3. Add a condition
8404 to treat interface types as a partial view.
8405 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
8406 to Build_Invariant_Procedure_Declaration to properly generate a
8407 "partial" invariant procedure when Typ is an interface.
8408
8409 2017-04-25 Bob Duff <duff@adacore.com>
8410
8411 * a-numeri.ads: Go back to using brackets encoding for the Greek
8412 letter pi.
8413
8414 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8415
8416 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
8417 (10-15): if derived type T with progenitors is abstract,
8418 and primitive P of this type inherits non-trivial classwide
8419 preconditions from both a parent operation and from an interface
8420 operation, then the inherited operation is abstract if the parent
8421 operation is not null.
8422 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
8423 with Covered_Interface_Op to yield the actual interface operation
8424 that is implemented by a given inherited operation.
8425
8426 2017-04-25 Javier Miranda <miranda@adacore.com>
8427
8428 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
8429 and right operands after performing the validity checks. Required
8430 because validity checks may remove side effects from the operands.
8431
8432 2017-04-25 Javier Miranda <miranda@adacore.com>
8433
8434 * exp_attr.adb (Attribute_Unrestricted_Access):
8435 Do not disable implicit type conversion. Required to generate
8436 code that displaces the pointer to reference the secondary
8437 dispatch table.
8438
8439 2017-04-25 Pascal Obry <obry@adacore.com>
8440
8441 * prj-attr.adb, snames.ads-tmpl: Add package Install's
8442 Required_Artifacts attribute.
8443
8444 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8445
8446 * sem_util.adb (Same_Value): String literals are compile-time
8447 values, and comparing them must use Expr_Value_S.
8448
8449 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8450
8451 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
8452 dereference is introduced for the object, and the object is
8453 overloaded, do not check whether it is aliased, because it may
8454 include an implicit dereference.
8455 * sem_type.adb (Disambiguate): If two interpretations are access
8456 attribute types with the same designated type keep either of
8457 them and do not report an ambiguity. A true ambiguity will be
8458 reported elsewhere.
8459
8460 2017-04-25 Bob Duff <duff@adacore.com>
8461
8462 * a-numeri.ads: Change the encoding of Greek letter Pi from
8463 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
8464 to indicate the encoding. We considered using a byte order mark
8465 (BOM), but that causes various trouble (misc software eats the
8466 BOM, if you have a patch with a BOM, then it's not at the start
8467 of the patch, so it's not a BOM, the BOM affects with-ing files,
8468 etc.).
8469 * scng.adb, s-wchcnv.adb: Minor.
8470
8471 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8472
8473 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
8474 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8475
8476 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
8477 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
8478 Improve error message on operations that inherit non-conforming
8479 classwide preconditions from ancestor and progenitor.
8480 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
8481 moved here from sem_ch3.
8482 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
8483 check given in RM 6.1.1 (17) concerning renamings of overriding
8484 operations that inherits class-wide preconditions from ancestor
8485 or progenitor.
8486
8487 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8488
8489 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
8490 (Build_Adjust_Statements): Code cleanup.
8491 (Build_Finalizer): Update the initialization of
8492 Exceptions_OK.
8493 (Build_Finalize_Statements): Code cleanup.
8494 (Build_Initialize_Statements): Code cleanup.
8495 (Make_Deep_Array_Body): Update the initialization of
8496 Exceptions_OK.
8497 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
8498 (Process_Object_Declaration): Generate a null exception handler only
8499 when exceptions are allowed.
8500 (Process_Transients_In_Scope): Update the initialization of
8501 Exceptions_OK.
8502 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
8503 routine.
8504 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
8505 restrictions when the handler is internally generated and the
8506 mode is warnings.
8507
8508 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8509
8510 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
8511 enforce legality rule on classwide preconditions inherited from
8512 both an ancestor and a progenitor (RM 6.1.1 (10-13).
8513 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
8514 subprogram need not be dispatching if it appears in a precondition
8515 for an abstract or null subprogram.
8516
8517 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8518
8519 * sem_ch10.adb: Minor typo fix.
8520
8521 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8522
8523 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
8524
8525 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8526
8527 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
8528 have a length which is a power of 2.
8529 (Is_Predefined_File_Name): Likewise. Adjust comment.
8530
8531 2017-04-25 Bob Duff <duff@adacore.com>
8532
8533 * exp_aggr.adb (Component_Count): Protect the
8534 arithmetic from attempting to convert a value >= 2**31 to Int,
8535 which would otherwise raise Constraint_Error.
8536
8537 2017-04-25 Bob Duff <duff@adacore.com>
8538
8539 * opt.ads (Locking_Policy): Fix incorrect documentation. The
8540 first character of the policy name is not unique.
8541
8542 2017-04-25 Bob Duff <duff@adacore.com>
8543
8544 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
8545 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
8546 about this flag not being used. It was already used, and it is
8547 now used more.
8548
8549 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8550
8551 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
8552 (Ignore_SPARK_Mode_Pragmas): New routine.
8553 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
8554 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
8555 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
8556 related entities.
8557 (Ignore_SPARK_Mode_Pragmas): New routine
8558 along with pragma Inline.
8559 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
8560 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
8561 Ignore_SPARK_Mode_Pragmas_In_Instance.
8562 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8563 Save and restore the value of global flag
8564 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
8565 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
8566 the corresponding spec or the body must ignore all SPARK_Mode
8567 pragmas found within.
8568 (Analyze_Subprogram_Declaration): Mark
8569 the spec when it needs to ignore all SPARK_Mode pragmas found
8570 within to allow the body to infer this property in case it is
8571 instantiated or inlined later.
8572 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
8573 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8574 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8575 when the corresponding spec also ignored all SPARK_Mode pragmas
8576 found within.
8577 (Analyze_Package_Declaration): Mark the spec when
8578 it needs to ignore all SPARK_Mode pragmas found within to allow
8579 the body to infer this property in case it is instantiated or
8580 inlined later.
8581 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
8582 Save and restore the value of flag
8583 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8584 formal spec when it needs to ignore all SPARK_Mode
8585 pragmas found within to allow the body to infer this
8586 property in case it is instantiated or inlined later.
8587 (Analyze_Package_Instantiation): Save and restore the value
8588 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
8589 the instance spec when it needs to ignore all SPARK_Mode
8590 pragmas found within to allow the body to infer this
8591 property in case it is instantiated or inlined later.
8592 (Analyze_Subprogram_Instantiation): Save and restore the value
8593 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8594 instance spec and anonymous package when they need to ignore
8595 all SPARK_Mode pragmas found within to allow the body to infer
8596 this property in case it is instantiated or inlined later.
8597 (Instantiate_Package_Body): Save and restore the value of global
8598 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
8599 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
8600 corresponding instance spec also ignored all SPARK_Mode pragmas
8601 found within.
8602 (Instantiate_Subprogram_Body): Save and restore the
8603 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8604 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8605 when the corresponding instance spec also ignored all SPARK_Mode
8606 pragmas found within.
8607 * sem_prag.adb (Analyze_Pragma): Update the reference to
8608 Ignore_Pragma_SPARK_Mode.
8609 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
8610 all SPARK_Mode pragmas defined within yields mode "off".
8611
8612 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8613
8614 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
8615
8616 2017-04-25 Bob Duff <duff@adacore.com>
8617
8618 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
8619 All_Checks" to avoid generating unnecessary checks.
8620 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
8621 All_Checks".
8622 * sem.ads: Fix comment.
8623 * expander.ads: Fix comment.
8624 * exp_atag.ads: Fix comment: "Index = 0" should be
8625 "Index >= 0".
8626
8627 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8628
8629 * s-taprop-linux.adb: Minor editorial fixes.
8630
8631 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8632
8633 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
8634 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
8635 variable and set it to True whenever the main hash table is
8636 populated. Short- circuit the Assoc function if it is false
8637 and add associated guards.
8638
8639 2017-04-25 Olivier Hainque <hainque@adacore.com>
8640
8641 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
8642 specs without elaboration code that have an elaboration counter
8643 nevertheless, e.g. when compiled with -fpreserve-control-flow.
8644 * sem_ch10.adb (Analyze_Compilation_Unit):
8645 Set_Elaboration_Entity_Required when requested to preserve
8646 control flow, to ensure the unit elaboration is materialized at
8647 bind time, resulting in the inclusion of the unit object file
8648 in the executable closure at link time.
8649
8650 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
8651
8652 * exp_dbug.adb: In Debug_Renaming_Declaration,
8653 when dealing with indexed component, accept to produce a renaming
8654 symbol when the index is an IN parameter or when it is a name
8655 defined in an outer scope.
8656
8657 2017-04-25 Yannick Moy <moy@adacore.com>
8658
8659 * errout.adb (Error_Msg): Adapt continuation
8660 message in instantiations and inlined bodies for info messages.
8661
8662 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8663
8664 * fname.adb (Has_Internal_Extension): Add pragma Inline.
8665 Use direct 4-character slice comparisons.
8666 (Has_Prefix): Add
8667 pragma Inline. (Has_Suffix): Delete.
8668 (Is_Internal_File_Name):
8669 Test Is_Predefined_File_Name first.
8670 (Is_Predefined_File_Name):
8671 Use direct slice comparisons as much as possible and limit all
8672 comparisons to at most 8 characters.
8673
8674 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8675
8676 * checks.adb (Insert_Valid_Check): Code cleanup.
8677 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
8678 (Expand_Actuals): Generate proper copy-back for a validation
8679 variable when it acts as the argument of a type conversion.
8680 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
8681 predicate to operate on type qualifications.
8682
8683 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8684
8685 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
8686 Minor reformatting.
8687
8688 2017-04-25 Bob Duff <duff@adacore.com>
8689
8690 * sem_prag.adb (No_Return): Give an error if the pragma applies
8691 to a body. Specialize the error for the specless body case,
8692 as is done for (e.g.) pragma Convention.
8693 * debug.adb: Add switch -gnatd.J to disable the above legality
8694 checks. This is mainly for use in our test suite, to avoid
8695 rewriting a lot of illegal (but working) code. It might also
8696 be useful to customers. Under this switch, if a pragma No_Return
8697 applies to a body, and the procedure raises an exception (as it
8698 should), the pragma has no effect. If the procedure does return,
8699 execution is erroneous.
8700
8701 2017-04-25 Bob Duff <duff@adacore.com>
8702
8703 * exp_ch6.adb (Expand_Actuals): This is the
8704 root of the problem. It took N as an 'in out' parameter, and in
8705 some cases, rewrote N, but then set N to Original_Node(N). So
8706 the node returned in N had no Parent. The caller continued
8707 processing of this orphaned node. In some cases that caused a
8708 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
8709 and trips over the Empty Parent). The solution is to make N an
8710 'in' parameter. Instead of rewriting it, return the list of
8711 post-call actions, so the caller can do the rewriting later,
8712 after N has been fully processed.
8713 (Expand_Call_Helper): Move most of Expand_Call here. It has
8714 too many premature 'return' statements, and we want to do the
8715 rewriting on return.
8716 (Insert_Post_Call_Actions): New procedure to insert the post-call
8717 actions in the appropriate place. In the problematic case,
8718 that involves rewriting N as an Expression_With_Actions.
8719 (Expand_Call): Call the new procedures Expand_Call_Helper and
8720 Insert_Post_Call_Actions.
8721
8722 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8723
8724 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
8725 properly type derived from generic formal types, to handle
8726 properly modified version of ACATS 4.1B B611017.
8727
8728 2017-04-25 Javier Miranda <miranda@adacore.com>
8729
8730 * exp_unst.adb (Subp_Index): Adding missing
8731 support for renamings and functions that return a constrained
8732 array type (i.e. functions for which the frontend built a
8733 procedure with an extra out parameter).
8734
8735 2017-04-25 Pascal Obry <obry@adacore.com>
8736
8737 * s-string.adb: Minor code clean-up.
8738
8739 2017-04-25 Bob Duff <duff@adacore.com>
8740
8741 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
8742 procedure.
8743 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
8744 function for Non_Blocking_Wait_Process.
8745
8746 2017-04-25 Bob Duff <duff@adacore.com>
8747
8748 * prep.adb (Preprocess): Remove incorrect
8749 Assert. Current character can be ASCII.CR.
8750
8751 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8752
8753 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
8754 convention Stdcall, which has a number of exceptions. Convention
8755 is legal on a component declaration whose type is an anonymous
8756 access to subprogram.
8757
8758 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8759
8760 * sem_ch4.adb: sem_ch4.adb Various reformattings.
8761 (Try_One_Prefix_Interpretation): Use the base type when dealing
8762 with a subtype created for purposes of constraining a private
8763 type with discriminants.
8764
8765 2017-04-25 Javier Miranda <miranda@adacore.com>
8766
8767 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
8768 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
8769 dispatching primitives (Restore_Warnings): Restore warning on
8770 late dispatching primitives (Save_Warnings): Save warning on late
8771 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
8772 to enable/disable this warning.
8773 (WA_Warnings): Set warning on late dispatching primitives.
8774 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
8775 that its parent type has a private extension.
8776 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
8777 New subprogram.
8778 * usage.adb: Document -gnatw.j and -gnatw.J.
8779
8780 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8781
8782 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
8783 reformatting.
8784
8785 2017-04-25 Bob Duff <duff@adacore.com>
8786
8787 * binde.adb (Validate): Do not pass dynamic strings
8788 to pragma Assert, because older compilers do not support that.
8789
8790 2017-04-25 Bob Duff <duff@adacore.com>
8791
8792 * s-fileio.adb (Close): When a temp file is
8793 closed, delete it and clean up its Temp_File_Record immediately,
8794 rather than waiting until later.
8795 (Temp_File_Record): Add File
8796 component, so Close can know which Temp_File_Record corresponds
8797 to the file being closed.
8798 (Delete): Don't delete temp files,
8799 because they are deleted by Close.
8800 (Open): Set the File component
8801 of Temp_File_Record. This requires moving the creation of the
8802 Temp_File_Record to the end, after the AFCB has been created.
8803
8804 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8805
8806 * checks.adb (Insert_Valid_Check): Do not generate
8807 a validity check when inside a generic.
8808
8809 2017-04-25 Yannick Moy <moy@adacore.com>
8810
8811 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
8812
8813 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8814
8815 * snames.ads-tmpl (Snames): More names for detecting predefined
8816 potentially blocking subprograms.
8817
8818 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8819
8820 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
8821 concerning inheritance of class-wide preconditions do not apply
8822 to postconditions.
8823
8824 2017-04-25 Bob Duff <duff@adacore.com>
8825
8826 * s-ficobl.ads: Minor comment fix.
8827
8828 2017-04-25 Yannick Moy <moy@adacore.com>
8829
8830 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
8831 conversions from float to integer in GNATprove mode.
8832 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
8833 to call Apply_Type_Conversion_Checks, so that range checks
8834 are properly positioned when needed on conversions, including
8835 when converting from float to integer. (Determine_Range): In
8836 GNATprove mode, take into account the possibility of conversion
8837 from float to integer.
8838 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
8839 check on conversions from fixed-point to integer, not anymore
8840 on conversions from floating-point to integer, when in GNATprove
8841 mode.
8842
8843 2017-04-25 Yannick Moy <moy@adacore.com>
8844
8845 * checks.adb (Determine_Range_R): Special case type conversions
8846 from integer to float in order to get bounds in that case too.
8847 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
8848 mode, for computations involved in interval checking.
8849
8850 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8851
8852 * checks.adb (Insert_Valid_Check): Partially reimplement validity
8853 checks.
8854 * einfo.adb Node36 is now used as Validated_Object.
8855 (Validated_Object): New routine.
8856 (Set_Validated_Object): New routine.
8857 (Write_Field36_Name): Add an entry for Validated_Object.
8858 * einfo.ads Add new attribute Validated_Object along with
8859 usage in entities.
8860 (Validated_Object): New routine along with pragma Inline.
8861 (Set_Validated_Object): New routine along with pragma Inline.
8862 * exp_attr.adb (Make_Range_Test): Add processing for validation
8863 variables to avoid extra reads and copies of the prefix.
8864 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
8865 variables in order to reflect any changes done in the variable
8866 back into the original object.
8867 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
8868 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
8869
8870 2017-04-25 Steve Baird <baird@adacore.com>
8871
8872 * exp_ch7.adb (Build_Array_Deep_Procs,
8873 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
8874 generate Finalize_Address routines for CodePeer.
8875
8876 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8877
8878 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
8879 Analyze_Pre_Post_Condition, to implement the legality checks
8880 mandated by AI12-0131: Pre'Class shall not be specified for an
8881 overriding primitive subprogram of a tagged type T unless the
8882 Pre'Class aspect is specified for the corresponding primitive
8883 subprogram of some ancestor of T.
8884
8885 2017-04-25 Bob Duff <duff@adacore.com>
8886
8887 * sem_ch8.adb (Use_One_Type): If a use_type_clause
8888 is redundant, set its Used_Operations to empty. This is only
8889 necessary for use clauses that appear in the parent of a generic
8890 child unit, because those use clauses get reanalyzed when we
8891 instantiate the generic, and we don't want the Used_Operations
8892 carried over from the original context (where it was probably
8893 not redundant).
8894
8895 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8896
8897 * exp_ch6.adb: Minor reformatting.
8898
8899 2017-04-25 Bob Duff <duff@adacore.com>
8900
8901 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
8902 Use Source_Index (Current_Sem_Unit) to find the correct casing.
8903 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
8904 (Current_Sem_Unit) to find the correct casing.
8905 * par.adb (Par): Null out Current_Source_File, to ensure that
8906 the above bugs won't rear their ugly heads again.
8907
8908 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8909
8910 * sem_ch8.adb (Find_Type): For an attribute reference
8911 'Class, if prefix type is synchronized and previous errors
8912 have suppressed the creation of the corresponding record type,
8913 create a spurious class-wide for the synchonized type itself,
8914 to catch other misuses of the attribute
8915
8916 2017-04-25 Steve Baird <baird@adacore.com>
8917
8918 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
8919 is True, then don't generate the accessibility check for the
8920 tag of a tagged result.
8921 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
8922 if CodePeer_Mode is True, then don't generate the
8923 tag checks for the result of call to an instance of
8924 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
8925 descendant of" check and the accessibility check).
8926
8927 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8928
8929 * sem_ch13.adb: Code cleanups.
8930 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
8931 * sem_ch8.ads: Minor comment fix.
8932
8933 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8934
8935 * exp_ch4.adb (Library_Level_Target): New function.
8936 (Expand_Concatenate): When optimization is enabled, also expand
8937 the operation out-of-line if the concatenation is present within
8938 the expression of the declaration of a library-level object and
8939 not only if it is the expression of the declaration.
8940
8941 2017-04-25 Bob Duff <duff@adacore.com>
8942
8943 * freeze.adb (Freeze_Object_Declaration): Do
8944 not Remove_Side_Effects if there is a pragma Linker_Section,
8945 because in that case we want static initialization in the
8946 appropriate section.
8947
8948 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8949
8950 * exp_dbug.adb: Minor rewording and reformatting.
8951
8952 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8953
8954 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
8955 handle the proposed changes to rules concerning potentially
8956 unevaluated expressions, to include selected components that
8957 do not depend on discriminants, and indexed components with
8958 static indices.
8959 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
8960 predicate in quantified expression, and fix bugs in the handling
8961 of case expressions and membership test.
8962 (Analyze_Attribute_Old_Result): use new predicate.
8963 (Analyze_Attribute, case Loop_Entry): ditto.
8964
8965 2017-04-25 Bob Duff <duff@adacore.com>
8966
8967 * s-secsta.adb (SS_Info): Add a comment
8968 explaining why we don't need to walk all the chunks in order to
8969 compute the total size.
8970
8971 2017-04-25 Bob Duff <duff@adacore.com>
8972
8973 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
8974 of the global name buffer to 4*Max_Line_Length.
8975
8976 2017-04-25 Javier Miranda <miranda@adacore.com>
8977
8978 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
8979 renaming entity for debug information, mark the entity as needing debug
8980 info if it comes from sources.
8981
8982 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8983
8984 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
8985 restriction converning the use of 'Address where the prefix is
8986 of a controlled type.
8987
8988 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
8989
8990 * exp_dbug.adb: In Debug_Renaming_Declaration,
8991 skip slices that are made redundant by an indexed component
8992 access.
8993 * atree.h: New definition for Original_Node.
8994
8995 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8996
8997 * sem_prag.adb, sem_prag.ads: Minor reformatting.
8998
8999 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9000
9001 * sem_ch3.adb (Check_Entry_Contract): Call
9002 Preanalyze_Spec_Expression so that resolution takes place as well.
9003 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
9004 internal calls that appear in preconditions of protected
9005 operations, in default values for same, and in contract guards
9006 for contract cases in SPARK.
9007
9008 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9009
9010 * a-numaux.ads: Fix description of a-numaux-darwin
9011 and a-numaux-x86.
9012 (Double): Define to Long_Float.
9013 * a-numaux-vxworks.ads (Double): Likewise.
9014 * a-numaux-darwin.ads
9015 (Double): Likewise.
9016 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
9017 * a-numaux-x86.ads: Fix package description.
9018 * a-numaux-x86.adb (Is_Nan): Minor tweak.
9019 (Reduce): Adjust and complete description. Call Is_Nan instead of
9020 testing manually. Use an integer temporary to hold rounded value.
9021 * a-numaux-darwin.adb (Reduce): Likewise.
9022 (Is_Nan): New function.
9023
9024 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9025
9026 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
9027 on analysis of prefix whose type is a current instance of a
9028 synchronized type, but where the prefix itself is an entity that
9029 is an object.
9030
9031 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9032
9033 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
9034 the identity of callable entities therein, because they have been
9035 properly resolved, and prefixed calls may have been rewritten
9036 as normal calls.
9037
9038 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
9039
9040 * exp_ch3.adb (Build_Init_Statements): Convert
9041 the expression of the pragma/aspect Secondary_Stack_Size to
9042 internal type System.Parameters.Size_Type before assigning
9043 it to the Secondary_Stack_Size component of the task type's
9044 corresponding record.
9045
9046 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9047
9048 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
9049 (etc) optimizations when the type is modular and the offsets
9050 are equal.
9051
9052 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9053
9054 * s-osinte-freebsd.ads: Minor comment tweaks
9055
9056 2017-04-25 Javier Miranda <miranda@adacore.com>
9057
9058 * urealp.adb (UR_Write): Reverse previous patch
9059 adding documentation on why we generate multiplications instead
9060 of divisions (needed to avoid expressions whose computation with
9061 large numbers may cause division by 0).
9062
9063 2017-04-25 Bob Duff <duff@adacore.com>
9064
9065 * erroutc.adb (Set_Specific_Warning_Off,
9066 Set_Warnings_Mode_Off): Use the correct source file for
9067 Stop. Was using Current_Source_File, which is only valid during
9068 parsing. Current_Source_File will have a leftover value from
9069 whatever file happened to be parsed last, because of a with_clause
9070 or something.
9071
9072 2017-04-25 Bob Duff <duff@adacore.com>
9073
9074 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
9075 to In_Predefined_Unit, but including GNAT units.
9076 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
9077 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
9078 because Should_Ignore_Pragma was not working reliably outside
9079 the parser, because Current_Source_File is not valid.
9080 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
9081 * par-prag.adb: Call Should_Ignore_Pragma_Par.
9082
9083 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9084
9085 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
9086 codepeer mode.
9087
9088 2017-04-25 Javier Miranda <miranda@adacore.com>
9089
9090 * urealp.adb (UR_Write): Fix output of constants with a base other
9091 that 10.
9092
9093 2017-04-25 Justin Squirek <squirek@adacore.com>
9094
9095 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
9096 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
9097 Add extra parameter for Process_Interface_Name.
9098 (Process_Interface_Name): Add parameter for pragma to analyze
9099 corresponding aspect.
9100 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
9101 from sem_ch13.adb
9102
9103 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9104
9105 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
9106 correction.
9107
9108 2017-04-25 Yannick Moy <moy@adacore.com>
9109
9110 * sem_res.adb (Resolve_Comparison_Op): Do not
9111 attempt evaluation of relational operations inside assertions.
9112
9113 2017-04-25 Justin Squirek <squirek@adacore.com>
9114
9115 * exp_util.adb (Add_Interface_Invariants):
9116 Restored, code moved back from Build_Invariant_Procedure_Body.
9117 (Add_Parent_Invariants): Restored, code moved back from
9118 Build_Invariant_Procedure_Body.
9119 (Build_Invariant_Procedure_Body):
9120 Remove refactored calls and integrated code from
9121 Add_Parent_Invariants and Add_Interface_Invariants.
9122
9123 2017-04-25 Johannes Kanig <kanig@adacore.com>
9124
9125 * errout.adb (Output_Messages): Adjust computation of total
9126 errors
9127 * erroutc.adb (Error_Msg): In statistics counts, deal
9128 correctly with informational messages that are not warnings.
9129 * errutil.adb (Finalize): adjust computation of total errors.
9130
9131 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9132
9133 * terminals.c (__gnat_terminate_pid): New.
9134 * g-exptty.ads (Terminate_Process): New. Update comments.
9135
9136 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9137
9138 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
9139
9140 2017-04-25 Justin Squirek <squirek@adacore.com>
9141
9142 * sem_ch3.adb (Analyze_Declarations): Minor
9143 correction to comments, move out large conditional and scope
9144 traversal into a predicate.
9145 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
9146 logic.
9147
9148 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9149
9150 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
9151 of prefix whose type is a current instance of a synchronized
9152 type. If the prefix is an object this is an external call (or
9153 requeue) that can only access public operations of the object. The
9154 previous predicate was too restrictive, and did not allow public
9155 protected operations, only task entries.
9156
9157 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9158
9159 * sem_ch5.adb, fname.adb: Minor reformatting.
9160
9161 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9162
9163 * einfo.adb (Is_Anonymous_Access_Type): New routine.
9164 * einfo.ads Update the placement of
9165 E_Anonymous_Access_Subprogram_Type along with all subtypes that
9166 mention the ekind.
9167 (Is_Anonymous_Access_Type): New routine.
9168 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
9169 master for an access type subject to pragma No_Heap_Finalization.
9170 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
9171 allocated or deallocated does not finalization actions if the
9172 associated access type is subject to pragma No_Heap_Finalization.
9173 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
9174 * par-prag.adb Pragma No_Heap_Finalization does not need special
9175 processing from the parser.
9176 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
9177 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
9178 * sem_prag.adb Add an entry in table Sig_Flags for pragma
9179 No_Heap_Finalization.
9180 (Analyze_Pragma): Add processing for
9181 pragma No_Heap_Finalization. Update various error messages to
9182 use Duplication_Error.
9183 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
9184 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
9185 and corresponding pragma id.
9186
9187 2017-04-25 Bob Duff <duff@adacore.com>
9188
9189 * freeze.adb (Freeze_Record_Type): Use the
9190 underlying type of the component type to determine whether it's
9191 elementary. For representation clause purposes, a private type
9192 should behave the same as its full type.
9193 * fname.ads, fname.adb (Is_Predefined_File_Name):
9194 Make sure things like "system.ali" are recognized as predefined.
9195
9196 2017-04-25 Javier Miranda <miranda@adacore.com>
9197
9198 * debug.adb: Update documentation of -gnatd.6.
9199
9200 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9201
9202 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
9203 element iterator when the name is an overloaded function call,
9204 one of whose interpretations yields an array.
9205
9206 2017-04-25 Bob Duff <duff@adacore.com>
9207
9208 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
9209 Is_Internal_Unit_Name): New functions for operating on unit
9210 names, as opposed to file names. There's some duplicated code
9211 with fname.adb, which is unfortunate, but it seems like we don't
9212 want to add dependencies here.
9213 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
9214 to Is_Predefined_Unit_Name; the former was wrong, because Uname
9215 is not a file name at all.
9216 * fname.ads, fname.adb: Document the fact that
9217 Is_Predefined_File_Name and Is_Internal_File_Name can be called
9218 for ALI files, and fix the code so it works properly for ALI
9219 files. E.g. these should return True for "system.ali".
9220
9221 2017-04-25 Justin Squirek <squirek@adacore.com>
9222
9223 * exp_util.adb (Add_Invariant): Removed,
9224 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
9225 and Add_Own_Invariant. (Add_Invariant_Check): Used
9226 for adding runtime checks from any kind of invariant.
9227 (Add_Inherited_Invariant): Generates invariant checks for
9228 class-wide invariants (Add_Interface_Invariants): Removed, code
9229 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
9230 Create a types own invariant procedure (Add_Parent_Invariants):
9231 Removed, code moved to Build_Invariant_Procedure_Body
9232 (Build_Invariant_Procedure_Body): Add refactored calls
9233 and integrated code from Add_Parent_Invariants and
9234 Add_Interface_Invariants.
9235 (Process_Type): Removed, the
9236 relavant code was inlined into both Add_Own_Invariant and
9237 Add_Inherited_Invariant.
9238
9239 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9240
9241 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
9242 scn.adb, osint.adb, fname.adb: Minor reformatting.
9243
9244 2017-04-25 Pascal Obry <obry@adacore.com>
9245
9246 * s-taprop-mingw.adb: Do not check for CloseHandle in
9247 Finalize_TCB.
9248
9249 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9250
9251 * sem_util.adb (Check_Part_Of_Reference):
9252 Continue to examine the context if the reference appears within
9253 an expression function.
9254
9255 2017-04-25 Justin Squirek <squirek@adacore.com>
9256
9257 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
9258 and Build_Invariant_Procedure_Declaration.
9259 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
9260 and Build_Invariant_Procedure_Declaration from exp_ch7
9261 and break-out Is_Untagged_Private_Derivation from
9262 Build_Invariant_Procedure_Body.
9263 (Replace_Type_References):
9264 Append an extra parameter to allow for dispatching replacements
9265 and add the corrasponding logic.
9266 (Type_Invariant): Remove
9267 Replace_Typ_Refs and replace its references with calls to
9268 Replace_Type_References.
9269 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
9270
9271 2017-04-25 Bob Duff <duff@adacore.com>
9272
9273 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
9274 that returns True when appropriate.
9275 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
9276 when compiling predefined files.
9277 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
9278 "gnat.adc" should not be considered a predefined file name.
9279 That required (or at least encouraged) a lot of cleanup of global
9280 variable usage. We shouldn't be communicating information via
9281 the global name buffer.
9282 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
9283 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
9284 required by the above-mentioned cleanup.
9285
9286 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9287
9288 * osint.adb (Find_File): Handle properly a request for a
9289 configuration file whose name is a directory.
9290
9291 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9292
9293 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
9294
9295 2017-04-25 Bob Duff <duff@adacore.com>
9296
9297 * types.ads: Minor: Fix '???' comment.
9298 * sem_ch8.adb: Minor comment fix.
9299
9300 2017-04-25 Bob Duff <duff@adacore.com>
9301
9302 * sem_prag.adb: Remove suspicious uses of Name_Buf.
9303 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
9304 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
9305 Add String_To_Name with no side effects.
9306
9307 2017-04-25 Justin Squirek <squirek@adacore.com>
9308
9309 * sem_ch3.adb (Analyze_Declarations): Add
9310 additional condition for edge case.
9311
9312 2017-04-25 Bob Duff <duff@adacore.com>
9313
9314 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
9315 reserved words inside pragmas. This is necessary to allow the
9316 pragma name Interface to be used in pragma Ignore_Pragma.
9317 * par.adb: Minor comment fix.
9318
9319 2017-04-25 Javier Miranda <miranda@adacore.com>
9320
9321 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
9322 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
9323 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
9324 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
9325 occurrences of RE_Type_Is_Abstract
9326
9327 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9328
9329 * exp_util.adb (Build_Chain): Account for ancestor
9330 subtypes while traversing the derivation chain.
9331
9332 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9333
9334 * sem_attr.adb: minor reformatting.
9335
9336 2017-04-25 Doug Rupp <rupp@adacore.com>
9337
9338 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
9339
9340 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9341
9342 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
9343 the first pass over an assignment statement with target names,
9344 to prevent the generation of subtypes (such as discriminated
9345 record components)that may carry the target name outside of the
9346 tree for the assignment. The subtypes will be generated when
9347 the assignment is reanalyzed in full.
9348 (Analyze_Target_Name): Handle properly class-wide types.
9349
9350 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9351
9352 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
9353 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9354 the purposes of freezing.
9355 * exp_util.adb Update the documentation and structure of the
9356 type map used in class-wide semantics of assertion expressions.
9357 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9358 and resolve the triaged expression because all substitutions
9359 refer to the proper entities. Update the replacement of
9360 references.
9361 (Build_DIC_Procedure_Body): Add formal parameter
9362 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9363 are now only processed when freezing occurs. Build a body only
9364 when one is needed.
9365 (Entity_Hash): Removed.
9366 (Map_Types): New routine.
9367 (Replace_Object_And_Primitive_References): Removed.
9368 (Replace_References): New routine.
9369 (Replace_Type_References): Moved to the library level of Exp_Util.
9370 (Type_Map_Hash): New routine.
9371 (Update_Primitives_Mapping): Update the mapping call.
9372 (Update_Primitives_Mapping_Of_Types): Removed.
9373 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9374 parameter For_Freeze and update the comment on usage.
9375 (Map_Types): New routine.
9376 (Replace_References): New routine.
9377 (Replace_Type_References): Moved to the library level of Exp_Util.
9378 (Update_Primitives_Mapping_Of_Types): Removed.
9379 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9380 properties of the private type to the full view in case the full
9381 view derives from a parent type and inherits a DIC pragma.
9382 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9383 DIC pragma is placed at the top of a declarative region.
9384
9385 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9386
9387 * a-tasatt.adb: Complete previous change and use an unsigned
9388 int to avoid overflow checks.
9389
9390 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9391
9392 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
9393 the error message when the attribute reference is an actual in
9394 a call to a subprogram inherited from a generic formal type with
9395 unknown discriminants, which makes the subprogram and its formal
9396 parameters intrinsic (see RM 6.3.1 (8) and (13)).
9397
9398 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9399
9400 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
9401 sem_prag.adb: Minor reformatting.
9402
9403 2017-04-25 Bob Duff <duff@adacore.com>
9404
9405 * sem_attr.adb (Type_Key): Add code in the
9406 recursive Compute_Type_Key to protect against fetching the source
9407 code for Standard, in case a component of the type is declared
9408 in Standard. There was already code to do this for the original
9409 type, but not for its components.
9410
9411 2017-04-25 Javier Miranda <miranda@adacore.com>
9412
9413 * exp_ch3.adb (Build_Initialization_Call): Handle
9414 subtypes of private types when searching for the underlying full
9415 view of a private type.
9416
9417 2017-04-25 Javier Miranda <miranda@adacore.com>
9418
9419 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
9420 real conditional expression can appear in a fixed-type context
9421 and must be resolved with that context to facilitate the code
9422 generation to the backend.
9423
9424 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9425
9426 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
9427 to indicate whether during inline processing, when some unit U1
9428 appears in the context of a unit U2 compiled for instantiation
9429 or inlining purposes, the body of U1 needs to be compiled as well.
9430 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
9431 context is a package declaration.
9432 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
9433 Analyze_Generic_Package_Declaration): ditto.
9434 * inline.adb (Analyze_Inlined_Bodies): Check
9435 Body_Needed_For_Inlining.
9436
9437 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9438
9439 * par.adb (Current_Assign_Node): Global variable use to record
9440 the presence of a target_name in the right hand side of the
9441 assignment being parsed.
9442 * par-ch4.adb (P_Name): If the name is a target_name, mark the
9443 enclosing assignment node accordingly.
9444 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
9445 appropriately.
9446 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
9447 analyzing RHS if the statement has target_names.
9448 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
9449 properly choices that are subtype marks.
9450 * exp_ch5.adb: Code cleanup.
9451
9452 2017-04-25 Bob Duff <duff@adacore.com>
9453
9454 * s-memory.adb: Add a comment regarding efficiency.
9455 * atree.adb: Fix the assertion, and combine 2 assertions into one,
9456 "the source has an extension if and only if the destination does."
9457 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
9458
9459 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9460
9461 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
9462 conversion.
9463
9464 2017-04-25 Doug Rupp <rupp@adacore.com>
9465
9466 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
9467 handling for ppc64-vx7.
9468 * sigtramp-vxworks-target.inc
9469 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
9470
9471 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9472
9473 * ada_get_targ.adb: New file.
9474
9475 2017-04-25 Bob Duff <duff@adacore.com>
9476
9477 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
9478 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
9479 (UI_GCD): Remove ??? comment involving possible efficiency
9480 improvements. This just isn't important after all these years.
9481 Also minor cleanup.
9482 * uintp.ads: Minor cleanup.
9483
9484 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9485
9486 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
9487 Revert previous changes.
9488 * scng.adb: Minor reformatting.
9489 * s-stratt.ads: Fix unbalanced parens in comment.
9490
9491 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9492
9493 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
9494 Minor reformatting.
9495
9496 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9497
9498 * scng.adb (Scan): Handle '@' appropriately.
9499 * sem_ch5.adb: Code cleanup.
9500
9501 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9502
9503 * freeze.adb (Check_Expression_Function): Do not check for the
9504 use of deferred constants if the freezing of the expression
9505 function is triggered by its generated body, rather than a
9506 premature use.
9507
9508 2017-04-25 Javier Miranda <miranda@adacore.com>
9509
9510 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
9511 subtypes of private types when performing the view conversion.
9512
9513 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9514
9515 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9516 the purposes of freezing.
9517 * exp_util.adb Update the documentation and structure of the
9518 type map used in class-wide semantics of assertion expressions.
9519 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9520 and resolve the triaged expression because all substitutions
9521 refer to the proper entities. Update the replacement of
9522 references.
9523 (Build_DIC_Procedure_Body): Add formal parameter
9524 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9525 are now only processed when freezing occurs. Build a body only
9526 when one is needed.
9527 (Entity_Hash): Removed.
9528 (Map_Types): New routine.
9529 (Replace_Object_And_Primitive_References): Removed.
9530 (Replace_References): New routine.
9531 (Replace_Type_References): Moved to the library level of Exp_Util.
9532 (Type_Map_Hash): New routine.
9533 (Update_Primitives_Mapping): Update the mapping call.
9534 (Update_Primitives_Mapping_Of_Types): Removed.
9535 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9536 parameter For_Freeze and update the comment on usage.
9537 (Map_Types): New routine.
9538 (Replace_References): New routine.
9539 (Replace_Type_References): Moved to the library level of Exp_Util.
9540 (Update_Primitives_Mapping_Of_Types): Removed.
9541 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9542 properties of the private type to the full view in case the full
9543 view derives from a parent type and inherits a DIC pragma.
9544 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9545 DIC pragma is placed at the top of a declarative region.
9546
9547 2017-04-25 Tristan Gingold <gingold@adacore.com>
9548
9549 * s-mmap.ads (Data): Add pragma Inline.
9550
9551 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9552
9553 * checks.adb (Insert_Valid_Check): Do not use
9554 a renaming to alias a volatile name because this will lead to
9555 multiple evaluations of the volatile name. Use a constant to
9556 capture the value instead.
9557
9558 2017-04-25 Doug Rupp <rupp@adacore.com>
9559
9560 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
9561
9562 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9563
9564 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
9565 Add out parameter to indicate to caller that a wrapper must
9566 be constructed for an inherited primitive whose inherited
9567 pre/postcondition has called to overridden primitives.
9568 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
9569 for inherited primitive that requires it.
9570 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
9571 legal primitive operations and belong to the list of bodies
9572 generated after the freeze point of a type.
9573 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
9574 of Build_Class_Wide_Expression.
9575 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
9576 to construct the specification of the wrapper subprogram created
9577 for an inherited operation.
9578
9579 2017-04-25 Bob Duff <duff@adacore.com>
9580
9581 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
9582 pthread_mutexattr_setprioceiling): Add new interfaces for these
9583 pthread operations.
9584 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
9585 protocols as appropriate for Locking_Policy 'C' and 'I'.
9586 * s-taprop-posix.adb: Minor reformatting to make it more similar
9587 to s-taprop-linux.adb.
9588
9589 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9590
9591 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
9592 Handle properly a multi- level derivation involving both renamed
9593 and constrained parent discriminants, when the type to be
9594 constrained has fewer discriminants that the ultimate ancestor.
9595
9596 2017-04-25 Bob Duff <duff@adacore.com>
9597
9598 * sem_util.adb (Is_Object_Reference): In the
9599 case of N_Explicit_Dereference, return False if it came from a
9600 conditional expression.
9601
9602 2017-04-25 Bob Duff <duff@adacore.com>
9603
9604 * par-ch4.adb (P_Case_Expression): If a semicolon
9605 is followed by "when", assume that ";" was meant to be ",".
9606
9607 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9608
9609 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
9610 fixes.
9611
9612 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9613
9614 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
9615 loading of an entity.
9616 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
9617 previously repeated in the analysis.
9618 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
9619 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
9620 use new procedure SPARK_Implicit_Load.
9621 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
9622 SPARK_Implicit_Load.
9623
9624 2017-04-25 Javier Miranda <miranda@adacore.com>
9625
9626 * sem_util.adb (New_Copy_Tree): By default
9627 copying of defining identifiers is prohibited because
9628 this would introduce an entirely new entity into the
9629 tree. This patch introduces an exception to this general
9630 rule: the declaration of constants and variables located in
9631 Expression_With_Action nodes.
9632 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
9633 (In_Map): New subprogram.
9634 (Visit_Entity): New subprogram.
9635 (Visit_Node): Handle EWA_Level,
9636 EWA_Inner_Scope_Level, and take care of defining entities defined
9637 in Expression_With_Action nodes.
9638
9639 2017-04-25 Thomas Quinot <quinot@adacore.com>
9640
9641 * exp_ch6.adb: minor comment edit.
9642 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
9643 procedure specifications that come from source.
9644 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
9645 Null_Statement attribute.
9646 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
9647 procedure, generate statement SCO for the generated NULL statement.
9648 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
9649 parser, if available.
9650
9651 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9652
9653 * system-linux-s390.ads: Use Long_Integer'Size to define
9654 Memory_Size.
9655
9656 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
9657
9658 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
9659
9660 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
9661
9662 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
9663 * g-socket.adb (To_Host_Entry): Fix typo in comment.
9664 * gnat_ugn.texi: Fix typo.
9665 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
9666 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
9667 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
9668 * sem_util.adb (Mark_Coextensions): Likewise.
9669 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
9670
9671 2017-03-28 Andreas Schwab <schwab@suse.de>
9672
9673 PR ada/80117
9674 * system-linux-aarch64-ilp32.ads: New file.
9675 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
9676 from LIBGNAT_TARGET_PAIRS.
9677 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
9678 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
9679 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
9680 or -mabi=ilp32, resp.
9681
9682 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
9683
9684 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
9685
9686 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
9687
9688 PR ada/79903
9689 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
9690
9691 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
9692
9693 PR ada/79945
9694 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
9695
9696 * system-linux-arm.ads (Default_Bit_Order): Likewise.
9697 * system-linux-mips.ads (Default_Bit_Order): Likewise.
9698 * system-linux-armeb.ads: Delete.
9699 * system-linux-mipsel.ads: Likewise.
9700 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
9701 (ARM/Linux): Likewise.
9702
9703 2017-02-24 Jakub Jelinek <jakub@redhat.com>
9704
9705 PR c/79677
9706 * gcc-interface/misc.c (gnat_handle_option): Pass true to
9707 handle_generated_option GENERATED_P.
9708
9709 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9710
9711 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
9712 around a justified modular type if it doesn't have the same scalar
9713 storage order as the enclosing record type.
9714
9715 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9716
9717 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
9718 of boolean rvalues to function calls.
9719
9720 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9721
9722 * gcc-interface/utils.c (fold_bit_position): New function.
9723 (rest_of_record_type_compilation): Call it instead of bit_position to
9724 compute the field position and remove the call to remove_conversions.
9725 (compute_related_constant): Factor out the multiplication in both
9726 operands, if any, and streamline the final test.
9727
9728 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9729
9730 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
9731
9732 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9733
9734 * gcc-interface/decl.c: Include demangle.h.
9735 (is_cplusplus_method): Return again true for a primitive operation
9736 only if it is dispatching. For a subprogram with an interface name,
9737 call the demangler to get the number of C++ parameters and compare it
9738 with the number of Ada parameters.
9739
9740 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9741
9742 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
9743 there is no end label, put the location of the At_End procedure on
9744 the call to the procedure.
9745
9746 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9747
9748 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
9749 value for array types with TYPE_INDEX_TYPE set on their domain type.
9750 * gcc-interface/utils.c (max_size): For operations and expressions, do
9751 not build a new node if the operands have not changed or are missing.
9752
9753 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9754
9755 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
9756 argument when recursing on TRUTH_NOT_EXPR.
9757
9758 2017-02-12 John Marino <gnugcc@marino.st>
9759
9760 * system-freebsd-x86.ads: Rename into...
9761 * system-freebsd.ads: ...this.
9762 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
9763 * gcc-interface/Makefile.in: Support aarch64-freebsd.
9764 (x86-64/FreeBSD): Adjust to above renaming.
9765 (i386/FreeBSD): Likewise.
9766
9767 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
9768
9769 * comperr.adb: Update FSF bug reporting URL.
9770
9771 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
9772 Jakub Jelinek <jakub@redhat.com>
9773
9774 PR ada/79309
9775 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
9776
9777 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
9778
9779 PR lto/79061
9780 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
9781 to build_translation_unit_decl.
9782
9783 2017-01-23 Javier Miranda <miranda@adacore.com>
9784
9785 * sem_util.adb (New_Copy_Tree): Code cleanup:
9786 removal of the internal map (ie. variable Actual_Map, its
9787 associated local variables, and all the code handling it).
9788 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
9789 force loading of the System package when processing a task type.
9790 (Analyze_Protected_Type_Declaration): in GNATprove mode force
9791 loading of the System package when processing a protected type.
9792 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
9793 force loading of the System package when processing compilation
9794 unit with a main-like subprogram.
9795 * frontend.adb (Frontend): remove forced loading of the System
9796 package.
9797
9798 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9799
9800 * sem_prag.adb (Default_Initial_Condition): If the desired type
9801 declaration is a derived type declaration with discriminants,
9802 it is rewritten as a private type declaration.
9803 * sem_ch13.adb (Replace_Type_References_Generic,
9804 Visible_Component): A discriminated private type with descriminnts
9805 has components that must be rewritten as selected components
9806 if they appear as identifiers in an aspect expression such as
9807 a Default_Initial_Condition.
9808 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
9809 nodes.
9810
9811 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9812
9813 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
9814 * gnat1drv.adb Generate an empty object file for an ignored
9815 Ghost compilation unit.
9816 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
9817
9818 2017-01-23 Yannick Moy <moy@adacore.com>
9819
9820 * sem_ch4.adb (Analyze_Indexed_Component_Form):
9821 Adapt to inlined prefix with string literal subtype.
9822 * inline.adb (Expand_Inlined_Call): Keep unchecked
9823 conversion inside inlined call when formal type is constrained.
9824
9825 2017-01-23 Javier Miranda <miranda@adacore.com>
9826
9827 * sem_util.adb (New_Copy_Tree): Code cleanup:
9828 removal of global variables. All the global variables, global
9829 functions and tables of this subprogram are now declared locally.
9830
9831 2017-01-23 Gary Dismukes <dismukes@adacore.com>
9832
9833 * exp_strm.ads: Minor reformatting and typo fixes.
9834
9835 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9836
9837 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
9838 exp_aggr.adb: Minor reformatting.
9839 * g-diopit.adb: minor grammar/punctuation fix in comment.
9840 * g-byorma.ads: minor fix of unbalanced parens in comment.
9841
9842 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9843
9844 * par.adb: Update the documentation of component Labl.
9845 * par-ch6.adb (P_Return_Statement): Set the expected label of
9846 an extended return statement to Error.
9847
9848 2017-01-23 Tristan Gingold <gingold@adacore.com>
9849
9850 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
9851
9852 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9853
9854 * expander.adb: Handle N_Delta_Aggregate.
9855
9856 2017-01-23 Javier Miranda <miranda@adacore.com>
9857
9858 * exp_ch6.adb (Expand_Call): Improve the code that
9859 checks if some formal of the called subprogram is a class-wide
9860 interface, to handle subtypes of class-wide interfaces.
9861
9862 2017-01-23 Javier Miranda <miranda@adacore.com>
9863
9864 * checks.adb (Apply_Parameter_Aliasing_Checks):
9865 Remove side effects of the actuals before generating the overlap
9866 check.
9867
9868 2017-01-23 Justin Squirek <squirek@adacore.com>
9869
9870 * exp_strm.ads, exp_strm.ads
9871 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
9872 as to avoid getting the underlying type by default.
9873 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
9874 underlying type in the Iiput and output attribute cases when
9875 building their respective functions.
9876
9877 2017-01-23 Gary Dismukes <dismukes@adacore.com>
9878
9879 * scng.adb: Minor reformatting of error message.
9880
9881 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9882
9883 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
9884 to freeze the return type of an expression funxtion that is a
9885 completion, if the type is a limited view and the non-limited
9886 view is available.
9887
9888 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9889
9890 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
9891 aggregate construct.
9892 (P_Record_Or_Array_Component_Association): An array aggregate
9893 can start with an Iterated_Component_Association.
9894 * scng.adb: Modify error message on improper use of @ in earlier
9895 versions of the language.
9896 * sinfo.ads: New node kind N_Delta_Aggregate.
9897 * sinfo.adb: An N_Delta_Aggregate has component associations and
9898 an expression.
9899 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
9900 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
9901 Create a new index for each one of the choices in the association,
9902 to prevent spurious homonyms in the scope.
9903 (Resolve_Delta_Aggregate): New.
9904 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
9905 * exp_util.adb (Insert_Actions): Take into account
9906 N_Delta_Aggregate.
9907 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
9908 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
9909 and local procedures Expand_Delta_Array_Aggregate and
9910 expand_Delta_Record_Aggregate.
9911 * sprint.adb: Handle N_Delta_Aggregate.
9912
9913 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9914
9915 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
9916 empty name when the exception declaration is subject to pragma
9917 Discard_Names.
9918 (Null_String): New routine.
9919
9920 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9921
9922 * par-ch9.adb (P_Protected_Definition): Parse
9923 any optional and potentially illegal pragmas which appear in
9924 a protected operation declaration list.
9925 (P_Task_Items): Parse
9926 any optional and potentially illegal pragmas which appear in a
9927 task item list.
9928
9929 2017-01-23 Pascal Obry <obry@adacore.com>
9930
9931 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
9932 is needed when a foreign thread call a Win32 API using a thread handle
9933 like GetThreadTimes() for example.
9934
9935 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9936
9937 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9938 allow an 'Address clause to be specified on a prefix of a
9939 class-wide type.
9940
9941 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9942
9943 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9944 attribute 'Valid is a renaming of the original expression when
9945 the expression denotes a name. For all other kinds of expression,
9946 use a constant to capture the value.
9947 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9948 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9949
9950 2017-01-23 Justin Squirek <squirek@adacore.com>
9951
9952 * sem_eval.adb (Eval_Integer_Literal): Add special
9953 case to avoid optimizing out check if the literal appears in
9954 an if-expression.
9955
9956 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9957
9958 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9959 allow an 'Address clause to be specified on a prefix of a
9960 class-wide type.
9961
9962 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9963
9964 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9965 attribute 'Valid is a renaming of the original expression when
9966 the expression denotes a name. For all other kinds of expression,
9967 use a constant to capture the value.
9968 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9969 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9970
9971 2017-01-23 Justin Squirek <squirek@adacore.com>
9972
9973 * sem_eval.adb (Eval_Integer_Literal): Add special
9974 case to avoid optimizing out check if the literal appears in
9975 an if-expression.
9976
9977 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9978
9979 * sem_ch4.adb (Try_Primitive_Operations,
9980 Is_Valid_First_Argument_Of): argument is valid if it is a derived
9981 type with unknown discriminants that matches its underlying
9982 record view.
9983 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
9984 expression if its type is derived from a limited type with
9985 unknown discriminants, because the expansion (which is a call)
9986 must be expanded in the enclosing context to add the proper build-
9987 in-place parameters to the call.
9988 * lib.ads, exp_ch9.adb: Minor fixes in comments.
9989
9990 2017-01-23 Yannick Moy <moy@adacore.com>
9991
9992 * frontend.adb (Frontend): Do not load runtime
9993 unit for GNATprove when parsing failed.
9994 * exp_ch9.adb: minor removal of extra whitespace
9995 * exp_ch6.adb: minor typo in comment
9996 * sem_util.adb: Code cleanup.
9997 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
9998 * a-ngcefu.adb: minor style fix in whitespace
9999
10000 2017-01-23 Thomas Quinot <quinot@adacore.com>
10001
10002 * scos.ads: Document usage of 'd' as default SCO kind for
10003 declarations.
10004 * par_sco.adb (Traverse_Declarations_Or_Statements.
10005 Traverse_Degenerate_Subprogram): New supporting routine for expression
10006 functions and null procedures.
10007 (Traverse_Declarations_Or_Statements.Traverse_One): Add
10008 N_Expression_Function to the subprogram case; add required
10009 support for null procedures and expression functions.
10010
10011 2017-01-23 Bob Duff <duff@adacore.com>
10012
10013 * namet.ads (Bounded_String): Decrease the size of type
10014 Bounded_String to avoid running out of stack space.
10015 * namet.ads (Append): Don't ignore buffer overflow; raise
10016 Program_Error instead.
10017
10018 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10019
10020 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
10021 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
10022 reformatting.
10023 * exp_ch9.adb: minor style fix in comment.
10024
10025 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10026
10027 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
10028 for a limited record extension with unknown discriminants whose
10029 full view has no discriminants.
10030
10031 2017-01-23 Yannick Moy <moy@adacore.com>
10032
10033 * exp_spark.adb: Alphabetize with clauses.
10034
10035 2017-01-23 Yannick Moy <moy@adacore.com>
10036
10037 * sem_util.adb (Has_Enabled_Property): Treat
10038 protected objects and variables differently from other variables.
10039
10040 2017-01-23 Thomas Quinot <quinot@adacore.com>
10041
10042 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
10043 Split original Ada 95 part off into new subprogram
10044 below. Call that subprogram (instead of proceeding with
10045 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
10046 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
10047 * debug.adb Document new switch -gnatd.p
10048 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
10049 record for reverse bit order if an error has already been posted
10050 on the record type. This avoids generating extraneous "info:"
10051 messages for illegal code.
10052
10053 2017-01-23 Justin Squirek <squirek@adacore.com>
10054
10055 * sem_ch3.adb (Analyze_Declarations): Correct comments
10056 * freeze.adb (Find_Constant): Add detection of deferred constants
10057 so they are not incorrectly flagged as premature.
10058
10059 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10060
10061 * scans.ads: New token At_Sign. Remove '@' from list of illegal
10062 characters for future version of the language. '@' is legal name.
10063 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
10064 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
10065 denotes a Target_Name.
10066 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
10067 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
10068 (Has_Target_Names): New flag on N_Assignment_Statement, to
10069 indicate that RHS has occurrences of N_Target_Name.
10070 * sem.adb: Call Analyze_Target_Name.
10071 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
10072 (urrent_LHS): Global variable that denotes LHS of assignment,
10073 used in the analysis of Target_Name nodes.
10074 * sem_res.adb (Resolve_Target_Name): New procedure.
10075 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
10076 N is an assignment statement whose RHS contains occurences of @
10077 that designate the value of the LHS of the assignment. If the
10078 LHS is side-effect free the target names can be replaced with
10079 a copy of the LHS; otherwise the semantics of the assignment
10080 is described in terms of a procedure with an in-out parameter,
10081 and expanded as such.
10082 (Expand_N_Assignment_Statement): Call
10083 Expand_Assign_With_Target_Names when needed.
10084 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
10085 * sprint.adb: Handle N_Target_Name.
10086
10087 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
10088
10089 * checks.adb: Minor fix in comment.
10090
10091 2017-01-23 Philippe Gil <gil@adacore.com>
10092
10093 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
10094 count in Sort = Memory_Usage or Allocations_Count
10095
10096 2017-01-23 Justin Squirek <squirek@adacore.com>
10097
10098 * sem_ch3.adb: Code cleanup.
10099
10100 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10101
10102 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
10103 variables to the local variable section. Update the profile
10104 of various nested routine that previously had visibility
10105 of those globals. One the matching phase has completed,
10106 remove certain classes of clauses which are considered noise.
10107 (Check_Dependency_Clause): Properly detect a match between two
10108 'Result attributes. Update the various post-match cases to use
10109 Is_Already_Matched as this routine now automatically recognizes
10110 a previously matched 'Result attribute.
10111 (Is_Already_Matched): New routine.
10112 (Remove_Extra_Clauses): New routine.
10113 (Report_Extra_Clauses): Remove the detection of ... => null
10114 clauses as this is now done in Remove_Extra_Clauses.
10115
10116 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10117
10118 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
10119 report on spurious overlaps between values involving a subtype
10120 with a static predicate, because the expansion of such a subtype
10121 into individual ranges in inhibited in ASIS mode.
10122
10123 2017-01-23 Justin Squirek <squirek@adacore.com>
10124
10125 * sem_ch3.adb (Analyze_Declarations): Add detection
10126 of an edge case and delay freezing if it is present.
10127
10128 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10129
10130 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
10131 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
10132
10133 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10134
10135 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
10136 access-to-subprogram types inherit the convention of the
10137 associated subprogram. (Set_Profile_Convention): New routine.
10138 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
10139 of the two entities directly, use Conventions_Match to account
10140 for anonymous access-to-subprogram and subprogram types.
10141 (Conventions_Match): New routine.
10142
10143 2017-01-23 Claire Dross <dross@adacore.com>
10144
10145 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
10146 which return Universal_Integer, force the overflow check flag for
10147 Length and Range_Length for types as big as Long_Long_Integer.
10148
10149 2017-01-23 Claire Dross <dross@adacore.com>
10150
10151 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
10152 attributes which return Universal_Integer, introduce a conversion
10153 to the expected type with the appropriate check flags set.
10154 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
10155 base type if the range is null. It may still be invalid if it
10156 is higher than the lower bound. This is checked later in the
10157 context in which the range appears.
10158
10159 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
10160
10161 * scos.ads: Introduce a constant to represent ignored
10162 dependencies in SCO_Unit_Table_Entry.
10163
10164 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10165
10166 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
10167 spaces from error messages.
10168
10169 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10170
10171 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
10172 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
10173 an object declaration for an array type with a modular index type
10174 with the size of Long_Long_Integer. Special processing is needed
10175 in this case to compute reliably the size of the object, and
10176 eventually to raise Storage_Error, when wrap-around arithmetic
10177 might compute a meangingless size for the object.
10178
10179 2017-01-23 Justin Squirek <squirek@adacore.com>
10180
10181 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
10182 sem_type.adb: Code cleanups.
10183
10184 2017-01-23 Bob Duff <duff@adacore.com>
10185
10186 * sem_res.adb (Resolve_Call): In the part of the code where
10187 it is deciding whether to turn the call into an indexed
10188 component, avoid doing so if the call is to an instance of
10189 Unchecked_Conversion. Otherwise, the compiler turns it into an
10190 indexed component, and resolution of that turns it back into a
10191 function call, and so on, resulting in infinite recursion.
10192 * sem_util.adb (Needs_One_Actual): If the first formal has a
10193 default, then return False.
10194
10195 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
10196
10197 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
10198 optimizations when the type is modular and the offsets are equal.
10199
10200 2017-01-20 Thomas Quinot <quinot@adacore.com>
10201
10202 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
10203 message.
10204
10205 2017-01-20 Nicolas Roche <roche@adacore.com>
10206
10207 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
10208
10209 2017-01-20 Bob Duff <duff@adacore.com>
10210
10211 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
10212 (etc) optimizations when the type is modular.
10213
10214 2017-01-20 Yannick Moy <moy@adacore.com>
10215
10216 * sem_ch6.adb (Move_Pragmas): move some pragmas,
10217 but copy the SPARK_Mode pragma instead of moving it.
10218 (Build_Subprogram_Declaration): Ensure that the generated spec
10219 and original body share the same SPARK_Pragma aspect/pragma.
10220 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
10221 procedure to copy SPARK_Mode aspect.
10222
10223 2017-01-20 Bob Duff <duff@adacore.com>
10224
10225 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
10226 even in ASIS mode.
10227 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
10228 Empty even in ASIS mode.
10229
10230 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10231
10232 * exp_ch9.adb: minor style fixes in comments.
10233 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
10234 relative statement introduces an implicit dependency on
10235 Ada.Real_Time.Clock_Time.
10236 * sem_util.adb: Minor reformatting.
10237
10238 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10239
10240 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
10241 must be treated as delayed aspect even if the expression is
10242 a literal, because the aspect affects the freezing and the
10243 elaboration of the object to which it applies.
10244
10245 2017-01-20 Tristan Gingold <gingold@adacore.com>
10246
10247 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
10248
10249 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10250
10251 * lib-xref.adb (Generate_Reference): Do not warn about the
10252 presence of a pragma Unreferenced if the entity appears as the
10253 actual in a procedure call that does not come from source.
10254
10255 2017-01-20 Pascal Obry <obry@adacore.com>
10256
10257 * expect.c, terminals.c: Fix some warnings about unused variables.
10258 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
10259 of the runtime.
10260
10261 2017-01-20 Bob Duff <duff@adacore.com>
10262
10263 * exp_attr.adb (Constrained): Apply an access check (check that
10264 the prefix is not null) when the prefix denotes an object of an
10265 access type; that is, when there is an implicit dereference.
10266
10267 2017-01-20 Gary Dismukes <dismukes@adacore.com>
10268
10269 * s-rident.ads (constant Profile_Info): Remove
10270 No_Calendar from GNAT_Extended_Ravenscar restrictions.
10271
10272 2017-01-20 Tristan Gingold <gingold@adacore.com>
10273
10274 * s-maccod.ads: Add pragma No_Elaboration_Code_All
10275
10276 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10277
10278 * ghost.adb (Mark_Ghost_Clause): New routine.
10279 (Prune_Node): Do not prune compilation unit nodes.
10280 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
10281 This does not touch the node itself, but does prune all its fields.
10282 * ghost.ads (Mark_Ghost_Clause): New routine.
10283 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
10284 package clause mentions Ghost and non-Ghost packages. Mark a
10285 use package clause as Ghost when it mentions a Ghost package.
10286 (Analyze_Use_Type): Emit an error when a use type clause mentions
10287 Ghost and non-Ghost types. Mark a use type clause as Ghost when
10288 it mentions a Ghost type.
10289 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
10290 Ghost when it withs a Ghost unit.
10291
10292 2017-01-20 Javier Miranda <miranda@adacore.com>
10293
10294 * sem_res.adb (Resolve_Call): If a function call
10295 returns a limited view of a type and at the point of the call the
10296 function is not declared in the extended main unit then replace
10297 it with the non-limited view, which must be available. If the
10298 called function is in the extended main unit then no action is
10299 needed since the back-end handles this case.
10300
10301 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
10302
10303 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
10304 (Contains_Subprograms_Refs): ...this. Adjust comment
10305 for constants. (Is_Subp_Or_Const_Ref): Rename into...
10306 (Is_Subprogram_Ref): ...this.
10307 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
10308 Has_Non_Subprograms_Referencer and adjust comment. Remove
10309 incorrect shortcut for package declarations and bodies.
10310
10311 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10312
10313 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
10314 base type differs from that of the completion and the private
10315 subtype is an itype (created for a constraint on an access
10316 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
10317 anomalies in gigi.
10318
10319 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10320
10321 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10322 When inheriting the SPARK_Mode of a prior expression function,
10323 look at the properly resolved entity rather than the initial
10324 candidate which may denote a homonym.
10325
10326 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10327
10328 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
10329 Precondition or Postcondition, and the context is pragma
10330 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
10331 and suggest the standard names Assertion_Policy /Pre /Post
10332 instead.
10333
10334 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10335
10336 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
10337
10338 2017-01-20 Javier Miranda <miranda@adacore.com>
10339
10340 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
10341 Entity attribute.
10342 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
10343 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
10344 malformed trees.
10345
10346 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10347
10348 * sem_ch13.adb (Analyze_Aspect_Specification, case
10349 Dynamic_Predicate): If the entity E is a subtype that inherits
10350 a static predicate for its parent P,, the inherited and the
10351 new predicate combine in the generated predicate function,
10352 and E only has a dynamic predicate.
10353
10354 2017-01-20 Tristan Gingold <gingold@adacore.com>
10355
10356 * s-boustr.ads, s-boustr.adb: New package.
10357 * Makefile.rtl: Add s-boustr.
10358
10359 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10360
10361 * inline.adb (Process_Formals): Qualify the
10362 expression of a return statement when it yields a universal type.
10363
10364 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10365
10366 * freeze.adb (Freeze_All): Freeze the default
10367 expressions of all eligible formal parameters that appear in
10368 entries, entry families, and protected subprograms.
10369
10370 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10371
10372 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
10373 for illegal inherited Implicit_Dereference aspects with renamed
10374 discriminants.
10375
10376 2017-01-20 Javier Miranda <miranda@adacore.com>
10377
10378 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
10379 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
10380 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
10381 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
10382 Set_Prev, Tree_Read): Adding assertion.
10383 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
10384 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
10385 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
10386 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
10387 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
10388 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
10389 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
10390 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
10391 Set_ListN_With_Parent): Adding assertion.
10392
10393 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10394
10395 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
10396 import that applies to several homograph subprograms. when one
10397 of them is declared by a subprogram body.
10398
10399 2017-01-20 Justin Squirek <squirek@adacore.com>
10400
10401 * exp_ch6.adb (Expand_Call): Remove optimization
10402 that nulls out calls to null procedures.
10403
10404 2017-01-20 Yannick Moy <moy@adacore.com>
10405
10406 * inline.adb (Expand_Inlined_Call): Keep more
10407 precise type of actual for inlining whenever possible. In
10408 particular, do not switch to the formal type in GNATprove mode in
10409 some case where the GNAT backend might require it for visibility.
10410
10411 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10412
10413 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
10414 aspect Implicit_Dereference can be inherited by a full view if
10415 the partial view has no discriminants, because there is no way
10416 to apply the aspect to the partial view.
10417 (Build_Derived_Record_Type): If derived type renames discriminants
10418 of the parent, the new discriminant inherits the aspect from
10419 the old one.
10420 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
10421 call through an access discriminant designating a subprogram.
10422 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
10423 properly a parameterless call through an access discriminant on
10424 the left-hand side of an assignment.
10425 * sem_res.adb (resolve): If an interpreation involves a
10426 discriminant with an implicit dereference and the expression is an
10427 entity, resolution takes place later in the appropriate routine.
10428 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
10429 access discriminants that designate a subprogram type.
10430
10431 2017-01-20 Pascal Obry <obry@adacore.com>
10432
10433 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
10434
10435 2017-01-20 Yannick Moy <moy@adacore.com>
10436
10437 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
10438 on implicitly with'ed units in GNATprove mode.
10439 * sinfo.ads (Implicit_With): Document use of flag for implicitly
10440 with'ed units in GNATprove mode.
10441
10442 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10443
10444 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
10445 unit Do not report an error on a non-static entity that appears
10446 in the context of a spec expression, such as an aspect expression.
10447
10448 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10449
10450 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
10451 (Is_Underlying_Full_View): New routine.
10452 (Set_Is_Underlying_Full_View): New routine.
10453 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
10454 * einfo.ads Add new attribute Is_Underlying_Full_View.
10455 (Is_Underlying_Full_View): New routine along with pragma Inline.
10456 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
10457 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
10458 class-wide types and underlying full views. The first subtype
10459 is used as the working type for all Itypes, not just array base types.
10460 (Build_DIC_Procedure_Declaration): Do not consider
10461 class-wide types and underlying full views. The first subtype
10462 is used as the working type for all Itypes, not just array
10463 base types.
10464 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
10465 view or an underlying full view without clobbering the attributes
10466 of a previous freeze node.
10467 (Inherit_Freeze_Node): New routine.
10468 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
10469 full view as such.
10470 (Build_Underlying_Full_View): Mark an underlying full view as such.
10471 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
10472 full view as such.
10473
10474 2017-01-20 Yannick Moy <moy@adacore.com>
10475
10476 * sinfo.ads: Document lack of Do_Division_Check flag
10477 on float exponentiation.
10478
10479 2017-01-19 Javier Miranda <miranda@adacore.com>
10480
10481 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
10482 identifier attribute of a block-statement node. Required to avoid
10483 assertion failure when building the new containers library.
10484
10485 2017-01-19 Bob Duff <duff@adacore.com>
10486
10487 * exp_ch3.adb: Update comment.
10488
10489 2017-01-19 Vincent Celier <celier@adacore.com>
10490
10491 * gprep.adb (Gnatprep): Parse the definition file without
10492 "replace in comments" even when switch -C is used.
10493
10494 2017-01-19 Justin Squirek <squirek@adacore.com>
10495
10496 * exp_ch9.adb (Is_Pure_Barrier): Create function
10497 Is_Count_Attribute to identify an expansion of the 'Count
10498 attribute.
10499
10500 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10501
10502 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
10503 statements within an element iterator loop are only analyzed
10504 agter the loop is rewritten. Within a generic the analysis must
10505 be performed in any case to complete name capture.
10506
10507 2017-01-19 Bob Duff <duff@adacore.com>
10508
10509 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
10510 before checking for unrecognized pragmas.
10511 Initialize Pname on its declarations; that's always good style.
10512
10513 2017-01-19 Claire Dross <dross@adacore.com>
10514
10515 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
10516 body into the tree for GNATprove by setting its Parent field. The
10517 components invariants of composite types are not checked by
10518 the composite type's invariant procedure in GNATprove mode.
10519 (Build_Invariant_Procedure_Declaration): Semi-insert the
10520 declaration into the tree for GNATprove by setting its Parent
10521 field.
10522 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
10523 the component invariants to the array type invariant procedure
10524 so that the procedure can be used to check the array type
10525 invariants if any.
10526 (Freeze_Record_Type): In GNATprove mode, do
10527 not add the component invariants to the record type invariant
10528 procedure so that the procedure can be used to check the record
10529 type invariants if any.
10530
10531 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10532
10533 * lib-xref-spark_specific.adb: Minor reformatting.
10534 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
10535
10536 2017-01-19 Javier Miranda <miranda@adacore.com>
10537
10538 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
10539 Build_Back_End_Aggregate.
10540 (Generate_Aggregate_For_Derived_Type): Code cleanup.
10541 (Prepend_Stored_Values): Code cleanup.
10542
10543 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10544
10545 * sem_ch6.adb (Analyze_Expression_Function): Check for an
10546 incomplete return type after attempting to freeze it, so that
10547 other freeze actiona are generated in the proper order.
10548
10549 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10550
10551 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
10552 type, ie. a type whose component is a character type, and the
10553 aggregate is positional, do not convert into a string literal
10554 if the index type is not an integer type, because the original
10555 type may be required in an enclosing operation.
10556
10557 2017-01-19 Bob Duff <duff@adacore.com>
10558
10559 * binde.adb, debug.adb: Enable new elaboration order algorithm
10560 by default. -dp switch reverts to the old algorithm.
10561
10562 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10563
10564 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
10565 (Analyze_Declarations): Create the DIC and Invariant
10566 procedure bodies s after all freezing has taken place.
10567 (Build_Assertion_Bodies): New routine.
10568 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
10569 and Exp_Util.
10570 (Analyze_Package_Specification): Remove the
10571 generation of the DIC and Invariant procedure bodies. This is
10572 now done by Analyze_Declarations.
10573 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
10574 procedures are never treated as primitives.
10575
10576 2017-01-19 Yannick Moy <moy@adacore.com>
10577
10578 * frontend.adb: Analyze inlined bodies and check elaboration
10579 rules in GNATprove mode too.
10580 * sem_elab.adb (Delay_Element): Add Boolean component to save
10581 indication that call is in SPARK code. (Check_Elab_Calls):
10582 Check elaboration rules in GNATprove mode, and correctly set
10583 the current value of SPARK_Mode.
10584 * lib-xref-spark_specific.adb
10585 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
10586
10587 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10588
10589 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
10590 checks on the expression for the high bound of concatenation
10591 when checks are disabled, to suppress warnings about potential
10592 constraint errors in restricted runtimes.
10593
10594 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10595
10596 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
10597 representation-to-position function as inlined.
10598 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
10599 the purity of an internally generated entity if it has been
10600 explicitly marked as pure for optimization purposes.
10601 * exp_aggr.adb: Minor reformatting.
10602
10603 2017-01-19 Javier Miranda <miranda@adacore.com>
10604
10605 * exp_ch6.adb (Expand_Call): Remove side effects on
10606 actuals that are allocators with qualified expression since the
10607 initialization of the object is performed by means of individual
10608 statements (and hence it must be done before the call).
10609
10610 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10611
10612 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
10613 (Build_Derived_Enumeration_Type): If the derived type inherits a
10614 dynamic predicate from its parent, the bounds of the type must
10615 freeze because an explicit constraint is constructed for the
10616 type and the corresponding range is elaborated now.
10617
10618 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10619
10620 * sem_attr.ads: minor fix of inconsistent casing in comment
10621 * lib-writ.ads: minor align comments in columns
10622 * sem_ch3.adb: Minor reformatting.
10623 * spark_xrefs.ads: minor fix typo in SPARK-related comment
10624 * table.ads: minor style fix in comment
10625 * lib-xref-spark_specific.adb
10626 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
10627 * sem_ch12.adb: minor whitespace fix
10628 * freeze.adb: Add comment.
10629 * sem_util.adb (Unique_Name): for instances of
10630 generic subprograms ignore the name of the wrapper package.
10631
10632 2017-01-19 Javier Miranda <miranda@adacore.com>
10633
10634 * exp_aggr.adb (Resolve_Record_Aggregate):
10635 Factorize code needed for aggregates of limited and unlimited
10636 types in a new routine.
10637 (Pass_Aggregate_To_Back_End): New subprogram.
10638
10639 2017-01-19 Yannick Moy <moy@adacore.com>
10640
10641 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
10642
10643 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10644
10645 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
10646 public, for use elsewhere.
10647 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
10648 an Inlined_body, recognize a call that uses object notation
10649 and has not been rewritten as a regular call because regular
10650 expansion has not taken place.
10651
10652 2017-01-19 Bob Duff <duff@adacore.com>
10653
10654 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
10655 in case of generic formal discrete types, because it causes crashes in
10656 the compiler when built with assertions on.
10657
10658 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10659
10660 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
10661 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
10662
10663 2017-01-19 Bob Duff <duff@adacore.com>
10664
10665 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
10666 Increment Warnings_Detected. It was decrementing, which is
10667 wrong since we just issued a warning message.
10668 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
10669 these variables to be of subtype Nat instead of Int, because
10670 they should never be negative.
10671
10672 2017-01-19 Javier Miranda <miranda@adacore.com>
10673
10674 * contracts.adb (Build_Postconditions_Procedure): Replace
10675 Generate_C_Code by Modify_Tree_For_C.
10676 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
10677 Replace Generate_C_Code by Modify_Tree_For_C.
10678 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
10679 Modify_Tree_For_C.
10680 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
10681 Generate_C_Code by Modify_Tree_For_C.
10682 * exp_ch4.adb (Expand_Allocator_Expression): Replace
10683 Generate_C_Code by Modify_Tree_For_C.
10684 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
10685 by Modify_Tree_For_C.
10686 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
10687 Generate_C_Code by Modify_Tree_For_C.
10688 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
10689 by Modify_Tree_For_C.
10690 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
10691
10692 2017-01-19 Javier Miranda <miranda@adacore.com>
10693
10694 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
10695 subprogram.
10696 (Is_Inlinable_Expression_Function): New subprogram.
10697 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
10698 to Sem_Util.
10699 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
10700
10701 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10702
10703 * sem_ch4.adb (Diagnose_Call): Improve error message when a
10704 selected component has a prefix that might be interpreted
10705 as a parameterless function call, but none of the candidate
10706 interpretations is parameterless, and there is a hidden homonym
10707 of the prefix that is a package.
10708 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
10709 interpreted as a parameterless function call and its analysis
10710 fails, do not call Analyze_Selected_Component.
10711
10712 2017-01-19 Steve Baird <baird@adacore.com>
10713
10714 * sem_util.ads: Add new Use_Full_View Boolean parameter to
10715 Get_Index_Bounds.
10716 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
10717 calls to a newly-defined Scalar_Range_Of_Right_View function.
10718
10719 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10720
10721 * gnat1drv.adb: minor fix of unbalanced parens in comment
10722 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
10723 to visible part of the package to allow re-use in GNATprove.
10724 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
10725 from repeated code of Traverse_Compilation_Unit.
10726 (Traverse_Declaration_Or_Statement): fixed detection of
10727 generic subprograms and packages; also, iteration over case
10728 statement alternatives rewritten to avoid testing if the first
10729 alternative is present (since it must be present due to Ada
10730 syntax restrictions).
10731
10732 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10733
10734 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
10735 returning by reference not just for subprogram body stubs,
10736 but for all subprogram cases.
10737 * sem_util.adb: Code reformatting.
10738 (Requires_Transient_Scope): Update the call to Results_Differ.
10739 (Results_Differ): Update the parameter profile and the associated
10740 comment on usage.
10741
10742 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10743
10744 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
10745 identifier nodes that do not come from source, to handle properly
10746 dimensionality check within an inlined body which inclddes both
10747 original operands and rewritten operands. This removes spurious
10748 dimensionality errors in the presence of front-end inlining,
10749 as well as in SPARK mode.
10750
10751 2017-01-16 Jakub Jelinek <jakub@redhat.com>
10752
10753 PR driver/49726
10754 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
10755
10756 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10757
10758 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
10759
10760 2017-01-13 Arnaud Charlet <charlet@adacore.com>
10761
10762 * doc/gnat_ugn/getting_started_with_gnat.rst,
10763 doc/gnat_ugn/inline_assembler.rst,
10764 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
10765 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
10766 doc/gnat_ugn/about_this_guide.rst,
10767 doc/gnat_ugn/platform_specific_information.rst,
10768 doc/gnat_ugn/example_of_binder_output.rst,
10769 doc/gnat_ugn/gnat_and_program_execution.rst,
10770 doc/gnat_ugn/gnat_utility_programs.rst,
10771 doc/gnat_ugn/the_gnat_compilation_model.rst,
10772 doc/gnat_rm/implementation_defined_attributes.rst,
10773 doc/gnat_rm/compatibility_and_porting_guide.rst,
10774 doc/gnat_rm/standard_library_routines.rst,
10775 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
10776 doc/gnat_rm/implementation_defined_pragmas.rst,
10777 doc/gnat_rm/the_gnat_library.rst,
10778 doc/gnat_rm/obsolescent_features.rst,
10779 doc/gnat_rm/about_this_guide.rst,
10780 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
10781 doc/gnat_rm/implementation_of_ada_2012_features.rst,
10782 doc/gnat_rm/interfacing_to_other_languages.rst,
10783 doc/gnat_rm/implementation_defined_aspects.rst,
10784 doc/gnat_rm.rst: Update documentation.
10785 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
10786
10787 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10788
10789 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
10790 * scil_ll.adb: Minor style fix in comment.
10791 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
10792 even if entity is already set, because the node may be renalyzed
10793 after inlining transformations.
10794
10795 2017-01-13 Javier Miranda <miranda@adacore.com>
10796
10797 * sem_res.adb (Resolve_Call): Do not establish a transient scope
10798 for a call to inlinable expression function (since the call will
10799 be replaced by its returned object).
10800 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
10801 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
10802 (Expand_Call): For inlinable expression function call replace the
10803 call by its returned object.
10804 (Is_Inlinable_Expression_Function): New subprogram.
10805
10806 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10807
10808 * checks.adb: Minor typo fix and reformatting.
10809
10810 2017-01-13 Javier Miranda <miranda@adacore.com>
10811
10812 * contracts.adb (Contract_Only_Subprograms): Remove formal.
10813 (Copy_Original_Specification): Removed.
10814 (Skip_Contract_Only_Subprogram): Move here checks previously
10815 located in the caller of this routine (to leave the code more clean).
10816 (Build_Contract_Only_Subprogram): Code cleanup.
10817 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
10818 (Get_Contract_Only_Missing_Body_Name): Removed.
10819
10820 2017-01-13 Javier Miranda <miranda@adacore.com>
10821
10822 * sem_ch6.adb (Cloned_Expression): New subprogram.
10823 (Freeze_Expr_Types): Complete previous patch since the expression
10824 of an expression-function may have iterators and loops with
10825 defining identifiers which, as part of the preanalysis of the
10826 expression, may be left decorated with itypes that will not be
10827 available in the tree passed to the backend.
10828
10829 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10830
10831 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
10832 conversion to Integer of an expression that is an attribute
10833 reference 'Pos on an enumeration type.
10834
10835 2017-01-13 Bob Duff <duff@adacore.com>
10836
10837 * atree.ads: Minor comment fix.
10838
10839 2017-01-13 Justin Squirek <squirek@adacore.com>
10840
10841 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
10842 calls in accessibility check on return statement.
10843
10844 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10845
10846 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10847 Ensure that the input body is a subprogram body before trying to
10848 determine whether it denoted an expression function. Note that
10849 subprogram body stubs cannot denote expression functions.
10850
10851 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10852
10853 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
10854 and typo fixes.
10855
10856 2017-01-13 Javier Miranda <miranda@adacore.com>
10857
10858 * einfo.ads (Component_Bit_Offset): Fix documentation.
10859 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
10860 on record holes for components with unknown compile-time offsets.
10861
10862 2017-01-13 Bob Duff <duff@adacore.com>
10863
10864 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
10865 * g-locfil.ads: Minor comment fix.
10866
10867 2017-01-13 Bob Duff <duff@adacore.com>
10868
10869 * binde.adb (Elab_New): New elaboration order algorithm
10870 that is expected to cause fewer ABE issues. This is a work in
10871 progress. The new algorithm is currently disabled, and can be
10872 enable by the -dp switch, or by modifying the Do_Old and Do_New
10873 etc. flags and rebuilding. Experimental code is included to
10874 compare the results of the old and new algorithms.
10875 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
10876 can have multiple of these tables, so the old and new algorithms
10877 can coexist.
10878 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
10879 parameter of type array. This avoids the global variable, and
10880 allows bounds checking (which is normally defeated by the tables
10881 packages). It also ensures that the Elab_Order is read-only
10882 to Bindgen.
10883 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
10884 subprograms that need it, as above.
10885 * debug.adb: Document new -dp switch. Modify doc of old -do
10886 switch.
10887 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
10888 and Bindgen. Move writing of closure (-R and -Ra switches)
10889 to Binde; that's more convenient.
10890
10891 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10892
10893 * sem_ch6.adb (Analyze_Expression_Function): If the expression
10894 function is a completion, all entities referenced in the
10895 expression are frozen. As a consequence, a reference to an
10896 uncompleted private type from an enclosing scope is illegal.
10897
10898 2017-01-13 Javier Miranda <miranda@adacore.com>
10899
10900 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
10901 (Analyze_Subprogram_Body_Helper): At the occurrence of an
10902 expression function declaration that is a completion, its
10903 expression causes freezing (AI12-0103).
10904
10905 2017-01-13 Vadim Godunko <godunko@adacore.com>
10906
10907 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
10908 Reference functions of Ada.Containers.Indefinite_Holders.
10909
10910 2017-01-13 Bob Duff <duff@adacore.com>
10911
10912 * s-os_lib.ads: Minor comment fixes.
10913
10914 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10915
10916 * exp_ch3.adb (Default_Initialize_Object): Do not default
10917 initialize an object when it is of a task type and restriction
10918 No_Tasking is in effect because the initialization is obsolete.
10919 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
10920 restriction No_Tasking is in effect.
10921 (Build_Master_Renaming): Do not rename a master when restriction
10922 No_Tasking is in effect.
10923
10924 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10925
10926 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
10927 the legality of An others clause applies as well to a choice in
10928 an Iterated_component_ association.
10929 (Resolve_Iterated_Component_Association): An others choice
10930 is legal.
10931 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
10932 Iterated_Component_Association is not static.
10933
10934 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10935
10936 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
10937 control is passed to the expresion handler before the new mode
10938 is set.
10939 * sem_ch12.adb (Analyze_Package_Instantiation,
10940 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
10941 in case control is passed to the expresion handler before the
10942 new mode is set.
10943
10944 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10945
10946 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
10947 exp_aggr.adb: Minor reformatting.
10948
10949 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10950
10951 * inline.adb: Minor reformatting and typo fix.
10952
10953 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10954
10955 * sem_util.ads, sem_util.adb (Choice_List): Move function here
10956 from sem_aggr.adb, for use elsewhere.
10957 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
10958 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
10959 Iterated_Component_Present.
10960 * exp_aggr.adb: Use Choice_List throughout, to handle
10961 Iterated_Component_Associations.
10962 (Gen_Loop): Generate proper loop for an
10963 Iterated_Component_Association: loop variable has the identifier
10964 of the original association. Generate a loop even for a single
10965 component choice, in order to make loop parameter visible in
10966 expression.
10967 (Flatten): An Iterated_Component_Association is not static.
10968
10969 2017-01-13 Yannick Moy <moy@adacore.com>
10970
10971 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
10972 float exponentiation for statically known small negative values
10973 is the reciprocal of the exponentiation for the opposite value
10974 of the exponent.
10975 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
10976 Ensure that the value of float exponentiation for negative values
10977 is the reciprocal of the exponentiation for the opposite value
10978 of the exponent.
10979 * inline.adb (Expand_Inlined_Call): Fix the count
10980 for the number of generated gotos.
10981
10982 2017-01-13 Yannick Moy <moy@adacore.com>
10983
10984 * inline.adb: Code cleanup.
10985 * sem_util.adb (Is_OK_Volatile_Context): Add
10986 expression in delay statement as OK for volatile context.
10987
10988 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10989
10990 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
10991 mode a choice that is a subtype with a static predicate is
10992 replaced by the values it covers. This transformation must not
10993 be performed in ASIS mode, to preserve the source for analysis.
10994
10995 2017-01-13 Justin Squirek <squirek@adacore.com>
10996
10997 * nlists.ads: Correct minor typo.
10998
10999 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11000
11001 * sem_ch13.adb: Minor reformatting and typo fix.
11002
11003 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11004
11005 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
11006 Iterated_Component_Association is a named association in an
11007 array aggregate.
11008 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
11009 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
11010 and resolve the discrete choices and the expression of the
11011 new construct.
11012 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
11013 Loop_Actions and Box_Present are attributes of
11014 N_Iterated_Component_Association nodes. Box_Present is always
11015 False in this case.
11016 * sprint.adb (Sprint_Node): An Iterated_Component_Association
11017 has a Discrete_Choices list, as specified in the RM. A
11018 Component_Association for aggregate uses instead a Choices list.
11019 We have to live with this small inconsistency because the new
11020 construct also has a defining identifier, and there is no way
11021 to merge the two node structures.
11022
11023 2017-01-13 Yannick Moy <moy@adacore.com>
11024
11025 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
11026 list of pragmas to remove. Remove pragmas from the list of
11027 statements in the body to inline.
11028 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
11029
11030 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11031
11032 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
11033 Analyze_Declarations, to analyze and resolve the expressions of
11034 aspect specifications in the current declarative list, so that
11035 the expressions have proper entity and type info. This is needed
11036 for ASIS when there is no subsequent expansion to generate this
11037 semantic information.
11038 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
11039 original expression, to suppress cascaded errors when expression
11040 has been constant-folded.
11041 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
11042 ASIS mode, because there is no subsequent expansion to decorate
11043 the tree.
11044
11045 2017-01-13 Yannick Moy <moy@adacore.com>
11046
11047 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
11048 New function to detect when a call may be inlined or not in
11049 GNATprove mode.
11050 (Expand_Inlined_Call): Ensure that a temporary
11051 is always created in the cases where a type conversion may be
11052 needed on an input parameter in GNATprove mode, so that GNATprove
11053 sees the check to perform.
11054 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
11055 when not applicable due to actual requiring type conversion
11056 with possible check but no temporary value can be copied for
11057 GNATprove to see the check.
11058
11059 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11060
11061 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
11062 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
11063 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
11064 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
11065 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
11066 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
11067 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
11068 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
11069 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
11070 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
11071 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
11072 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
11073 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
11074 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
11075 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
11076 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
11077 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
11078 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
11079 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
11080 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
11081 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
11082 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
11083 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
11084 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
11085 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
11086 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
11087 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
11088 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
11089 statements to reflect the new style for case alternatives. Various
11090 code clean up and reformatting.
11091
11092 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11093
11094 * exp_util.adb: Minor reformatting.
11095
11096 2017-01-13 Yannick Moy <moy@adacore.com>
11097
11098 * exp_spark.adb: Code cleanup.
11099 * sem_ch9.adb (Analyze_Delay_Until): Resolve
11100 expression so that calls are identified as such inside delay
11101 until.
11102
11103 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11104
11105 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
11106 * par-ch3.adb (P_Discrete_Choice_List): An
11107 Iterated_Component_Association is an array aggregate component.
11108 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
11109 (Is_Quantified_Expression): New function that performs a lookahead
11110 to distinguish quantified expressions from iterated component
11111 associations.
11112 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
11113 associations.
11114 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
11115 * sem.adb (Analyze): Handle Iterated_Component_Association.
11116 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
11117 component associations.
11118 * sinfo.ads, sinfo.adb: Entries for for
11119 N_Iterated_Component_Association and its fields.
11120 * sprint.adb (Sprint_Node_Actual): Handle
11121 N_Iterated_Component_Association.
11122
11123 2017-01-13 Justin Squirek <squirek@adacore.com>
11124
11125 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
11126 of the style check until after preanalysis of acutals.
11127
11128 2017-01-13 Yannick Moy <moy@adacore.com>
11129
11130 * sem_ch13.adb: Minor reformatting.
11131 * par-ch11.adb: minor style fix in whitespace
11132 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
11133 reduced to Add_Artificial_ALI_File; style fix in declaration of
11134 Text; grammar fix in comment.
11135 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
11136 * freeze.adb: Cleanup to pass pragma instead of
11137 expression to call.
11138 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
11139 replace System'To_Address by equivalent call.
11140
11141 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11142
11143 * bindusg.adb: Improve usage output for -f switch.
11144
11145 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11146
11147 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
11148 Minor reformatting.
11149
11150 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11151
11152 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
11153 treat comparisons on strings as legal in a Static_Predicate.
11154 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
11155 a function call that is the expansion of a string comparison.The
11156 function call is built when compiling the corresponding predicate
11157 function, but the expression has been found legal as a static
11158 predicate during earlier analysis.
11159 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
11160 properly a function call that is the expansion of a string
11161 comparison operation, in order to recover the Static_Predicate
11162 expression and apply it to a static argument when needed.
11163
11164 2017-01-13 Tristan Gingold <gingold@adacore.com>
11165
11166 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
11167 (Open_Read): Re-implement using Open_Read_No_Exception.
11168 (Open_Write): Raise exception in case of error.
11169 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
11170 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
11171 reaise exception.
11172 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
11173
11174 2017-01-13 Yannick Moy <moy@adacore.com>
11175
11176 * checks.adb: Code cleanup.
11177
11178 2017-01-13 Yannick Moy <moy@adacore.com>
11179
11180 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
11181 expression instead of unanalyzed aspect expression for checking
11182 the validity of inheriting an operation. Also copy the expression
11183 being passing it to Build_Class_Wide_Expression, as this call
11184 modifies its argument.
11185 * sem_util.ads Fix comment to reference correct function name
11186 New_Copy_Tree.
11187
11188 2017-01-13 Javier Miranda <miranda@adacore.com>
11189
11190 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
11191 when we propagate information about the indexes back to the original
11192 indexing mode and the prefix of the index is a function call, do not
11193 remove any parameter from such call.
11194
11195 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11196
11197 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
11198 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
11199 a build-in-place function whose result type is tagged.
11200
11201 2017-01-13 Yannick Moy <moy@adacore.com>
11202
11203 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11204 Do not generate a wrapper when the only candidate is a class-wide
11205 subprogram.
11206 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
11207 inside a generic context.
11208
11209 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11210
11211 * exp_util.adb (Add_Inherited_Tagged_DIC):
11212 Pass the object parameters of both the parent and the derived
11213 type DIC procedure to the reference replacement circuitry.
11214 (Find_DIC_Type): Modify the circuitry to present the partial
11215 view of a private type in case the private type defines its own
11216 DIC pragma.
11217 (Replace_Object_And_Primitive_References): Add two
11218 optional formal parameters. Update the comment on usage. Update
11219 the replacement of references to object parameters.
11220
11221 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11222
11223 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
11224
11225 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11226
11227 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
11228 an out parameter that is a type conversion, independently of th
11229 range check that may apply to the expression of the conversion,
11230 for use in GNATProve.
11231
11232 2017-01-13 Yannick Moy <moy@adacore.com>
11233
11234 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
11235 GNATprove_Mode here to Frontend.
11236 * frontend.adb (Frontend): Move the implicit with for System
11237 in GNATprove_Mode here as it ismore correct this way; the old
11238 place only worked by chance, since there were no overloaded names.
11239 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
11240 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
11241 four attributes identified in SRM 9(18), add an implicit with
11242 to Ada.Task_Identification.
11243 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11244 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
11245 mode.
11246 * checks.adb (Apply_Discriminant_Check,
11247 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
11248 In GNATprove mode, we do not apply the checks, but we still
11249 analyze the expression to possibly issue errors on SPARK
11250 code when a run-time error can be detected at compile time.
11251 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
11252 in GNATprove mode.
11253
11254 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11255
11256 * expander.adb (Expand): Add a warning about using return
11257 statements in Ghost management code.
11258 * exp_ch3.adb (Freeze_Type): Add a warning about using return
11259 statements in Ghost management code.
11260 * exp_ch7.adb (Build_Invariant_Procedure_Body,
11261 Build_Invariant_Procedure_Declaration): Add a warning about
11262 using return statements in Ghost management code.
11263 * exp_disp.adb (Make_DT): Add a warning about using return
11264 statements in Ghost management code.
11265 * exp_util.adb (Build_DIC_Procedure_Body,
11266 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
11267 warning about using return statements in Ghost management code.
11268 * freeze.adb (Freeze_Entity): Add a warning about using return
11269 statements in Ghost management code.
11270 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
11271 statements in Ghost management code.
11272 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
11273 a warning about using return statements in Ghost management code.
11274 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
11275 return statements in Ghost management code.
11276 * sem_ch6.adb (Analyze_Procedure_Call,
11277 Analyze_Subprogram_Body_Helper): Add a warning about using return
11278 statements in Ghost management code.
11279 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
11280 using return statements in Ghost management code.
11281 * sem_ch12.adb (Analyze_Package_Instantiation,
11282 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
11283 Instantiate_Subprogram_Body): Add a warning about using return
11284 statements in Ghost management code.
11285 * sem_ch13.adb (Build_Predicate_Functions,
11286 Build_Predicate_Function_Declarations): Add a warning about
11287 using return statements in Ghost management code.
11288 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
11289 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
11290 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
11291 using return statements in Ghost management code.
11292
11293 2017-01-13 Tristan Gingold <gingold@adacore.com>
11294
11295 * s-mmosin-mingw.adb: Fix pragma import.
11296
11297 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11298
11299 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
11300 codepeer mode.
11301
11302 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11303
11304 * atree.adb (Allocate_Initialize_Node): A newly created node is
11305 no longer marked as Ghost at this level.
11306 (Mark_New_Ghost_Node): New routine.
11307 (New_Copy): Mark the copy as Ghost.
11308 (New_Entity): Mark the entity as Ghost.
11309 (New_Node): Mark the node as Ghost.
11310 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
11311 apply to unanalyzed entities.
11312 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
11313 entities.
11314 (Set_Is_Checked_Ghost_Entity): This attribute now
11315 applies to all entities as well as unanalyzed entities.
11316 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
11317 all entities as well as unanalyzed entities.
11318 * expander.adb Add with and use clauses for Ghost.
11319 (Expand): Install and revert the Ghost region associated with the node
11320 being expanded.
11321 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
11322 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
11323 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
11324 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
11325 (Freeze_Type): Install and revert the Ghost region associated
11326 with the type being frozen.
11327 * exp_ch5.adb Remove with and use clauses for Ghost.
11328 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
11329 * exp_ch6.adb Remove with and use clauses for Ghost.
11330 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
11331 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
11332 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
11333 Ghost region of the working type.
11334 (Build_Invariant_Procedure_Declaration): Install and revert
11335 the Ghost region of the working type.
11336 (Expand_N_Package_Body): Remove all Ghost-related code.
11337 * exp_ch8.adb Remove with and use clauses for Ghost.
11338 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
11339 code.
11340 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
11341 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
11342 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
11343 code.
11344 * exp_ch13.adb Remove with and use clauses for Ghost.
11345 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
11346 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
11347 the tagged type. Move the generation of various entities within
11348 the Ghost region of the type.
11349 * exp_prag.adb Remove with and use clauses for Ghost.
11350 (Expand_Pragma_Check): Remove all Ghost-related code.
11351 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
11352 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
11353 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
11354 * exp_util.adb (Build_DIC_Procedure_Body): Install
11355 and revert the Ghost region of the working types.
11356 (Build_DIC_Procedure_Declaration): Install and revert the
11357 Ghost region of the working type.
11358 (Make_Invariant_Call): Install and revert the Ghost region of the
11359 associated type.
11360 (Make_Predicate_Call): Reimplemented. Install and revert the
11361 Ghost region of the associated type.
11362 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
11363 of the entity being frozen.
11364 (New_Freeze_Node): Removed.
11365 * ghost.adb Remove with and use clauses for Opt.
11366 (Check_Ghost_Completion): Update the parameter profile
11367 and all references to formal parameters.
11368 (Ghost_Entity): Update the comment on usage.
11369 (Install_Ghost_Mode): New routines.
11370 (Is_Ghost_Assignment): New routine.
11371 (Is_Ghost_Declaration): New routine.
11372 (Is_Ghost_Pragma): New routine.
11373 (Is_Ghost_Procedure_Call): New routine.
11374 (Is_Ghost_Renaming): Removed.
11375 (Is_OK_Declaration): Reimplemented.
11376 (Is_OK_Pragma): Reimplemented.
11377 (Is_OK_Statement): Reimplemented.
11378 (Is_Subject_To_Ghost): Update the comment on usage.
11379 (Mark_And_Set_Ghost_Assignment): New routine.
11380 (Mark_And_Set_Ghost_Body): New routine.
11381 (Mark_And_Set_Ghost_Completion): New routine.
11382 (Mark_And_Set_Ghost_Declaration): New routine.
11383 (Mark_And_Set_Ghost_Instantiation): New routine.
11384 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11385 (Mark_Full_View_As_Ghost): Removed.
11386 (Mark_Ghost_Declaration_Or_Body): New routine.
11387 (Mark_Ghost_Pragma): New routine.
11388 (Mark_Ghost_Renaming): New routine.
11389 (Mark_Pragma_As_Ghost): Removed.
11390 (Mark_Renaming_As_Ghost): Removed.
11391 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
11392 (Prune_Node): Freeze nodes no longer need special pruning, they
11393 are processed by the general ignored Ghost code mechanism.
11394 (Restore_Ghost_Mode): New routine.
11395 (Set_Ghost_Mode): Reimplemented.
11396 (Set_Ghost_Mode_From_Entity): Removed.
11397 * ghost.ads Add with and use clauses for Ghost.
11398 (Check_Ghost_Completion): Update the parameter profile
11399 along with the comment on usage.
11400 (Install_Ghost_Mode): New routine.
11401 (Is_Ghost_Assignment): New routine.
11402 (Is_Ghost_Declaration): New routine.
11403 (Is_Ghost_Pragma): New routine.
11404 (Is_Ghost_Procedure_Call): New routine.
11405 (Mark_And_Set_Ghost_Assignment): New routine.
11406 (Mark_And_Set_Ghost_Body): New routine.
11407 (Mark_And_Set_Ghost_Completion): New routine.
11408 (Mark_And_Set_Ghost_Declaration): New routine.
11409 (Mark_And_Set_Ghost_Instantiation): New routine.
11410 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11411 (Mark_Full_View_As_Ghost): Removed.
11412 (Mark_Ghost_Pragma): New routine.
11413 (Mark_Ghost_Renaming): New routine.
11414 (Mark_Pragma_As_Ghost): Removed.
11415 (Mark_Renaming_As_Ghost): Removed.
11416 (Restore_Ghost_Mode): New routine.
11417 (Set_Ghost_Mode): Redefined.
11418 (Set_Ghost_Mode_From_Entity): Removed.
11419 * sem.adb (Analyze): Install and revert the Ghost region of the
11420 node being analyzed.
11421 (Do_Analyze): Change the way a clean Ghost
11422 region is installed and reverted.
11423 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
11424 all Ghost-related code.
11425 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
11426 (Analyze_Number_Declaration): Remove all Ghost-related code.
11427 (Analyze_Object_Declaration): Install and revert the Ghost region of
11428 a deferred object declaration's completion.
11429 (Array_Type_Declaration): Remove all Ghost-related code.
11430 (Build_Derived_Type): Update the comment on
11431 the propagation of Ghost attributes from a parent to a derived type.
11432 (Derive_Subprogram): Remove all Ghost-related code.
11433 (Make_Class_Wide_Type): Remove all Ghost-related code.
11434 (Make_Implicit_Base): Remove all Ghost-related code.
11435 (Process_Full_View): Install and revert the Ghost region of
11436 the partial view. There is no longer need to check the Ghost
11437 completion here.
11438 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
11439 region of the left hand side.
11440 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
11441 all Ghost-related code.
11442 (Analyze_Expression_Function): Remove all Ghost-related code.
11443 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
11444 (Analyze_Procedure_Call): Install and revert the Ghost region of
11445 the procedure being called.
11446 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
11447 region of the spec or body.
11448 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
11449 (Build_Subprogram_Declaration): Remove all Ghost-related code.
11450 (Find_Corresponding_Spec): Remove all Ghost-related code.
11451 (Process_Formals): Remove all Ghost-related code.
11452 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
11453 the Ghost region of the spec.
11454 (Analyze_Package_Declaration): Remove all Ghost-related code.
11455 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
11456 Ghost when it aliases a Ghost entity.
11457 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
11458 a Ghost entity.
11459 (Analyze_Object_Renaming): Mark a renaming as Ghost when
11460 it aliases a Ghost entity.
11461 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
11462 a Ghost entity.
11463 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
11464 aliases a Ghost entity.
11465 * sem_ch11.adb Remove with and use clauses for Ghost.
11466 (Analyze_Exception_Declaration): Remove all Ghost-related code.
11467 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
11468 Ghost-related code.
11469 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
11470 code.
11471 (Analyze_Package_Instantiation): Install and revert the Ghost region
11472 of the package instantiation.
11473 (Analyze_Subprogram_Instantiation): Install
11474 and revert the Ghost region of the subprogram instantiation.
11475 (Instantiate_Package_Body): Code clean up. Install and revert the
11476 Ghost region of the package body.
11477 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
11478 Ghost region of the subprogram body.
11479 * sem_ch13.adb (Build_Predicate_Functions): Install
11480 and revert the Ghost region of the related type.
11481 (Build_Predicate_Function_Declaration): Code clean up. Install
11482 and rever the Ghost region of the related type.
11483 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
11484 Install and revert the Ghost region of the pragma.
11485 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
11486 Ghost region of the pragma.
11487 (Analyze_Pragma): Install and revert the Ghost region of various
11488 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
11489 or encloses a Ghost entity.
11490 (Analyze_Pre_Post_Condition): Install and revert the Ghost
11491 region of the pragma.
11492 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
11493 Ghost region of the pragma.
11494 * sem_res.adb (Resolve): Remove all Ghost-related code.
11495 * sem_util.adb (Is_Declaration): Reimplemented.
11496 (Is_Declaration_Other_Than_Renaming): New routine.
11497 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
11498 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
11499 (Is_Ghost_Pragma): Removed.
11500 (Is_Ignored_Ghost_Pragma): New routine.
11501 (Set_Is_Checked_Ghost_Pragma): New routine.
11502 (Set_Is_Ghost_Pragma): Removed.
11503 (Set_Is_Ignored_Ghost_Pragma): New routine.
11504 * sinfo.ads: Update the documentation on Ghost mode and
11505 Ghost regions. New attributes Is_Checked_Ghost_Pragma
11506 and Is_Ignored_Ghost_Pragma along with usages in nodes.
11507 Remove attribute Is_Ghost_Pragma along with usages in nodes.
11508 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11509 (Is_Ghost_Pragma): Removed along with pragma Inline.
11510 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11511 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11512 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
11513 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11514
11515 2017-01-12 Tristan Gingold <gingold@adacore.com>
11516
11517 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
11518 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
11519
11520 2017-01-12 Yannick Moy <moy@adacore.com>
11521
11522 * errout.adb, errout.ads (Initialize): Factor common treatment
11523 in Reset_Warnings.
11524 (Reset_Warnings): New procedure to reset counts related to warnings.
11525 (Record_Compilation_Errors): New variable to store the presence of an
11526 error, used in gnat2why to allow changing the Warning_Mode.
11527 (Compilation_Errors): Use new variable Record_Compilation_Errors to
11528 store the presence of an error.
11529
11530 2017-01-12 Javier Miranda <miranda@adacore.com>
11531
11532 * sem_ch13.adb (Analyze_Aspect_Specifications):
11533 For Interrupt_Handler and Attach_ Handler aspects, decorate the
11534 internally built reference to the protected procedure as coming
11535 from sources and force its analysis.
11536
11537 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11538
11539 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
11540 inherit predicates if any from the first_subtype of the parent,
11541 not from the anonymous parent type.
11542 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
11543 predicate is not a static subtype.
11544
11545 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11546
11547 * freeze.adb (Check_Suspicious_Convention): New procedure
11548 performing a warning check on discriminated record types with
11549 convention C or C++. Factored out of procedure Freeze_Record_Type,
11550 and changed to only apply to base types (to avoid spurious
11551 warnings on subtypes). Minor improvement of warning messages
11552 to refer to discriminated rather than variant record types.
11553 (Freeze_Record_Type): Remove code for performing a suspicious
11554 convention check.
11555 (Freeze_Entity): Only call Freeze_Record_Type
11556 on types that aren't declared within any enclosing generic units
11557 (rather than just excluding the type when the innermost scope
11558 is generic). Call Check_Suspicious_Convention whether or not
11559 the type is declared within a generic unit.
11560 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
11561 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
11562 from Sem_Ch8).
11563
11564 2017-01-12 Tristan Gingold <gingold@adacore.com>
11565
11566 * sysdep.c, adaint.c, rtinit.c, ming32.h:
11567 (__gnat_current_codepage): Renamed from CurrentCodePage
11568 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
11569
11570 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11571
11572 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
11573 quantified expressions, following AI12-050: the loop parameters
11574 of two quantified expressions are conformant if they have the
11575 same identifier.
11576
11577 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11578
11579 * gcc-interface/Makefile.in: Clean up VxWorks targets.
11580
11581 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11582
11583 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
11584 Hnadle properly the attribute reference when it appears as part
11585 of an expression in another loop aspect.
11586
11587 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11588
11589 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
11590 subsidiary of Build_Initialization_Call, to complete generation
11591 of predicate checks on discriminants whose (sub)types have
11592 predicates, and to add checks on variants that do not have an
11593 others clause.
11594 * sem_util.adb (Gather_Components): A missing Others alternative is
11595 not an error when the type of the discriminant is a static predicate
11596 (and coverage has been checked when analyzing the case statement). A
11597 runtime check is generated to verify that a given discriminant
11598 satisfies the predicate (RM 3.8.1. (21.1/2)).
11599
11600 2017-01-12 Yannick Moy <moy@adacore.com>
11601
11602 * gnat1drv.adb (Adjust_Global_Switches): Only
11603 perform checking of exception mechanism when generating code.
11604
11605 2017-01-12 Justin Squirek <squirek@adacore.com>
11606
11607 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
11608 Remove handling of access component with invariant.
11609 (Build_Invariant_Procedure_Declaration): Remove return on class
11610 wide type.
11611 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
11612 conditional exception for component or array so Has_Own_Invariants
11613 flag is not falsly set.
11614 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
11615 wide type to have no invariant flags.
11616
11617 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11618
11619 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
11620 sem_ch13.adb: Minor reformatting.
11621
11622 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11623
11624 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
11625 adjustment primitive when the ancestor type was not properly frozen.
11626 (Gen_Assign): Guard against a missing initialization
11627 primitive when the component type was not properly frozen.
11628 (Initialize_Array_Component): Guard against a missing adjustment
11629 primitive when the component type was not properly frozen.
11630 (Initialize_Record_Component): Guard against a missing adjustment
11631 primitive when the component type was not properly frozen.
11632 (Process_Transient_Component_Completion): The transient object may
11633 not be finalized when its associated type was not properly frozen.
11634 * exp_ch3.adb (Build_Assignment): Guard against a missing
11635 adjustment primitive when the component type was not properly frozen.
11636 (Build_Initialization_Call): Guard against a missing
11637 initialization primitive when the associated type was not properly
11638 frozen.
11639 (Expand_N_Object_Declaration): Guard against a missing
11640 adjustment primitive when the base type was not properly frozen.
11641 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
11642 body when there is no adjustment primitive available. Create an
11643 empty Deep_Finalize body when there is no finalization primitive
11644 available.
11645 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
11646 missing finalization primitive when the designated type was
11647 not properly frozen.
11648 (Expand_N_Allocator): Guard against a missing initialization primitive
11649 when the designated type was not properly frozen.
11650 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
11651 only when the corresponding adjustment primitive is available.
11652 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
11653 adjustment/finalization statements only when there is an available
11654 primitive to carry out the action.
11655 (Build_Initialize_Statements): Generate the initialization/finalization
11656 statements only when there is an available primitive to carry out the
11657 action.
11658 (Make_Adjust_Call): Do not generate a call when the underlying
11659 type is not present due to a possible missing full view.
11660 (Make_Final_Call): Do not generate a call when the underlying
11661 type is not present due to a possible missing full view.
11662 (Make_Finalize_Address_Stmts): Generate an empty body when the
11663 designated type lacks a finalization primitive.
11664 (Make_Init_Call): Do not generate a call when the underlying type is
11665 not present due to a possible missing full view.
11666 (Process_Component_For_Adjust): Add the adjustment call only when the
11667 corresponding adjustment primitive is available.
11668 (Process_Component_For_Finalize): Add the finalization call only when
11669 the corresponding finalization primitive is available.
11670 (Process_Object_Declaration): Use a null statement to emulate a
11671 missing call to the finalization primitive of the object type.
11672 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
11673 (Make_Final_Call): Update the comment on usage.
11674 (Make_Init_Call): Update the comment on usage.
11675 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
11676
11677 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11678
11679 * einfo.ads: Update documentation of Address_Taken.
11680 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
11681 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
11682 for subprograms when setting Address_Taken flag.
11683
11684 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11685
11686 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
11687 Configurable_Run_Time_Mode off when analysing with'ed predefined
11688 libraries.
11689
11690 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11691
11692 * sem_prag.adb: Minor reformatting.
11693 * sem_util.adb (Unique_Entity): fix result for
11694 bodies of entry families.
11695
11696 2017-01-12 Justin Squirek <squirek@adacore.com>
11697
11698 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
11699 Resolve_Suppressible in the pragma Assertion_Policy case.
11700 (Resolve_Suppressible): Created this function to factor out
11701 common code used to resolve Suppress to either Ignore or Check
11702 * snames.ads-tmpl: Add name for Suppressible.
11703
11704 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11705
11706 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
11707 reformatting.
11708 * debug.adb: Minor comment fixes.
11709
11710 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11711
11712 * sem_util.adb (Unique_Entity): For concurrent
11713 bodies that are defined with stubs and complete a declaration
11714 of a single concurrent object return the entity of an implicit
11715 concurrent type, not the entity of the anonymous concurrent
11716 object.
11717 * debug.adb: -gnatd.J is no longer used.
11718 * make.adb (Globalize): Removed, no longer used.
11719 * sem_ch9.adb: minor typo in comment for entry index
11720
11721 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11722
11723 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11724 * exp_ch3.adb (Build_Init_Statements): As part of initialising
11725 the value record of a task, set its _Secondary_Stack_Size field
11726 if present.
11727 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11728 a _Secondary_Stack_Size field in the value record of
11729 the task if a Secondary_Stack_Size rep item is present.
11730 (Make_Task_Create_Call): Include secondary stack size
11731 parameter. If No_Secondary_Stack restriction is in place, passes
11732 stack size of 0.
11733 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11734 Secondary_Stack_Size.
11735 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11736 function to define the overhead of the secondary stack.
11737 * s-tarest.adb (Create_Restricted_Task,
11738 Create_Restricted_Task_Sequential): Functions now include
11739 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11740 * s-tarest.adb (Create_Restricted_Task,
11741 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
11742 include Secondary_Stack_Size parameter.
11743 (Task_Wrapper): Secondary stack now allocated to the size specified by
11744 the Secondary_Stack_Size parameter in the task's ATCB.
11745 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
11746 Secondary_Stack_Size component.
11747 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
11748 Create_Restricted_Task_Sequential): Function now include
11749 Secondary_Stack_Size parameter.
11750 (Task_Wrapper): Secondary stack now allocated to the size
11751 specified by the Secondary_Stack_Size parameter in the task's
11752 ATCB.
11753 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
11754 to include Secondary_Stack_Size parameter.
11755 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
11756 Secondary_Stack_Size aspect, turning the aspect into its corresponding
11757 internal attribute.
11758 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
11759 * snames.adb-tmpl, snames.ads-tmpl: Added names
11760 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
11761 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
11762
11763 2017-01-12 Yannick Moy <moy@adacore.com>
11764
11765 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
11766 subtree.
11767
11768 2017-01-12 Justin Squirek <squirek@adacore.com>
11769
11770 * exp_attr.adb (Expand_N_Attribute_Reference):
11771 Fix Finalization_Size case by properly resolving the type after
11772 rewritting the node.
11773
11774 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11775
11776 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
11777 the tree.
11778 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
11779 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
11780 exp_sel.ads: Minor reformatting.
11781
11782 2017-01-12 Justin Squirek <squirek@adacore.com>
11783
11784 * exp_ch6.adb (Expand_Call): Add guard to prevent
11785 invariant checks from being created for internally generated
11786 subprograms.
11787
11788 2017-01-12 Bob Duff <duff@adacore.com>
11789
11790 * lib-writ.ads: Remove incorrect comment.
11791
11792 2017-01-12 Javier Miranda <miranda@adacore.com>
11793
11794 * debug.adb (-gnatd.K): Enable generation of contract-only
11795 procedures in CodePeer mode.
11796 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
11797 New subprogram.
11798 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
11799 set.
11800 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
11801 subprogram.
11802 (Get_Contract_Only_Missing_Body_Name): New subprogram.
11803 (Get_Contract_Only_Body): New subprogram.
11804 (Set_Contract_Only_Body): New subprogram.
11805 (Is_Contract_Only_Body): New subprogram.
11806 (Set_Is_Contract_Only_Body): New subprogram.
11807 (SCIL_Nodes): Replace table by hash-table.
11808
11809 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11810
11811 * exp_ch6.adb: Minor reformatting.
11812 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
11813
11814 2017-01-12 Bob Duff <duff@adacore.com>
11815
11816 * binde.adb (Forced): New reason for a dependence.
11817 (Force_Elab_Order): Implementation of the new switch.
11818 * binde.ads: Minor comment fixes.
11819 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
11820 long ago that is no longer supported; removed comment about that.
11821 * opt.ads (Force_Elab_Order_File): Name of file specified for
11822 -f switch.
11823 * switch-b.adb: Parse -f switch.
11824
11825 2017-01-12 Justin Squirek <squirek@adacore.com>
11826
11827 * exp_ch6.adb (Check_View_Conversion): Created this function
11828 to properly chain calls to check type invariants that may be
11829 present in a subprogram call after the subprogram.
11830 (Expand_Call): Add a conditional to identify when a view conversion
11831 needs to be checked.
11832 * nlists.adb, nlists.ads (Prepend_New): New routine.
11833 (Prepend_New_To): New routine.
11834
11835 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11836
11837 * sinfo.ads: Minor reformatting.
11838
11839 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11840
11841 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
11842 reformatting.
11843
11844 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11845
11846 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
11847 variable Definite. Create a local object and pass its 'Access to the
11848 BIP function when the result type is either definite or it does not
11849 require any finalization or secondary stack management.
11850
11851 2017-01-12 Bob Duff <duff@adacore.com>
11852
11853 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
11854 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
11855 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
11856 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
11857 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
11858 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
11859 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
11860 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
11861 Change name to Pragma_Name_Unmapped.
11862 (Pragma_Name_Mapped): Change name to Pragma_Name.
11863 This is because the "mapped" version should be the usual case.
11864
11865 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
11866
11867 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
11868 Is_Default_Init_Cond_Procedure, and
11869 Has_Inherited_Default_Init_Cond. Add uses of flags
11870 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
11871 (Default_Init_Cond_Procedure): Removed.
11872 (DIC_Procedure): New routine.
11873 (Has_Default_Init_Cond): Removed.
11874 (Has_DIC): New routine.
11875 (Has_Inheritable_Invariants): The attribute applies to the base type.
11876 (Has_Inherited_Default_Init_Cond): Removed.
11877 (Has_Inherited_DIC): New routine.
11878 (Has_Inherited_Invariants): The attribute applies to the base type.
11879 (Has_Own_DIC): New routine.
11880 (Has_Own_Invariants): The attribute applies to the base type.
11881 (Is_Default_Init_Cond_Procedure): Removed.
11882 (Is_DIC_Procedure): New routine.
11883 (Set_Default_Init_Cond_Procedure): Removed.
11884 (Set_DIC_Procedure): New routine.
11885 (Set_Has_Default_Init_Cond): Removed.
11886 (Set_Has_Inheritable_Invariants): The attribute applies
11887 to the base type.
11888 (Set_Has_Inherited_Default_Init_Cond): Removed.
11889 (Set_Has_Inherited_DIC): New routine.
11890 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
11891 (Set_Has_Own_DIC): New routine.
11892 (Set_Has_Own_Invariants): The attribute applies to the base type.
11893 (Set_Is_Default_Init_Cond_Procedure): Removed.
11894 (Set_Is_DIC_Procedure): New routine.
11895 (Write_Entity_Flags): Update the output of all flags related to
11896 default initial condition.
11897 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
11898 of the call to the DIC procedure.
11899 (Freeze_Type): Generate the body of the DIC procedure.
11900 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
11901 all occurrences of Create_Append with Append_New_To. Do
11902 not generate an invariant procedure for a class-wide type.
11903 The generated body acts as a freeze action of the working type.
11904 (Build_Invariant_Procedure_Declaration): Do not generate an
11905 invariant procedure for a class-wide type.
11906 (Create_Append): Removed.
11907 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
11908 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
11909 class-wide pre/postcondition description and data structures from
11910 Sem_Prag.
11911 (Build_Class_Wide_Expression): Moved from Sem_Prag.
11912 (Build_DIC_Call): New routine.
11913 (Build_DIC_Procedure_Body): New routine.
11914 (Build_DIC_Procedure_Declaration): New routine.
11915 (Entity_Hash): Moved from Sem_Prag.
11916 (Find_DIC_Type): New routine.
11917 (Update_Primitives_Mapping): Reimplemented.
11918 (Update_Primitives_Mapping_Of_Types): New routine.
11919 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
11920 (Build_DIC_Call): New routine.
11921 (Build_DIC_Procedure_Body): New routine.
11922 (Build_DIC_Procedure_Declaration): New routine.
11923 (Update_Primitives_Mapping): Moved from Sem_Prag.
11924 (Update_Primitives_Mapping_Of_Types): New routine.
11925 * nlists.adb (Append_New): New routine.
11926 (Append_New_To): New routine.
11927 * nlists.ads (Append_New): New routine.
11928 (Append_New_To): New routine.
11929 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
11930 of DIC procedures here. This is now done at the end of the
11931 visible declarations, private declarations, and at the freeze
11932 point of a type.
11933 (Analyze_Private_Extension_Declaration):
11934 A private extension inherits the DIC pragma of a parent type.
11935 (Analyze_Subtype_Declaration): No need to propagate invariant
11936 attributes to a subtype as those apply to the base type.
11937 (Build_Derived_Record_Type): No need to inherit invariants here
11938 as this is now done in Build_Derived_Type.
11939 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
11940 a parent type.
11941 (Process_Full_View): Update the propagation of DIC attributes.
11942 (Propagate_Default_Init_Cond_Attributes): Removed.
11943 * sem_ch7.adb Add with and use clauses for Exp_Util.
11944 (Analyze_Package_Specification): Create the body of the DIC
11945 procedure at the end of the visible and private declarations.
11946 (Preserve_Full_Attributes): Propagate DIC attributes.
11947 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
11948 DIC attributes.
11949 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
11950 * sem_elab.adb (Check_A_Call): Update the call to
11951 Is_Nontrivial_Default_Init_Cond_Procedure.
11952 * sem_prag.adb Remove the with and use clauses for
11953 GNAT.HTable. Move the handling of class- wide pre/postcondition
11954 description and data structures to Exp_Util.
11955 (Analyze_Pragma): Create the declaration of the DIC procedure. There
11956 is no need to propagate invariant-related attributes at this point
11957 as this is done in Build_Invariant_Procedure_Declaration.
11958 (Build_Class_Wide_Expression): Moved to Exp_Util.
11959 (Entity_Hash): Moved to Exp_Util.
11960 (Update_Primitives_Mapping): Moved to Exp_Util.
11961 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
11962 (Update_Primitives_Mapping): Moved to Exp_Util.
11963 * sem_util.adb: Remove with and use clauses for Ghost
11964 and Sem_Ch13.
11965 (Build_Default_Init_Cond_Call): Removed.
11966 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11967 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11968 (Get_Views): Reimplemented.
11969 (Has_Full_Default_Initialization): Reimplement the section on DIC.
11970 (Inherit_Default_Init_Cond_Procedure): Removed.
11971 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11972 (Is_Nontrivial_DIC_Procedure): New routine.
11973 (Is_Verifiable_DIC_Pragma): New routine.
11974 (Propagate_DIC_Attributes): New routine.
11975 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
11976 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11977 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11978 (Inherit_Default_Init_Cond_Procedure): Removed.
11979 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11980 (Is_Nontrivial_DIC_Procedure): New routine.
11981 (Is_Verifiable_DIC_Pragma): New routine.
11982 (Propagate_DIC_Attributes): New routine.
11983 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
11984 on DIC.
11985 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
11986 usage in nodes.
11987 (Expression_Copy): New routine along with pragma Inline.
11988 (Set_Expression_Copy): New routine along with pragma Inline.
11989
11990 2017-01-06 Bob Duff <duff@adacore.com>
11991
11992 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
11993 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
11994 we won't generate the call to s_stalib_adafinal when the main
11995 is not written in Ada.
11996
11997 2017-01-06 Bob Duff <duff@adacore.com>
11998
11999 * sem_prag.adb: Minor: remove pragma Warnings.
12000
12001 2017-01-06 Tristan Gingold <gingold@adacore.com>
12002
12003 * Makefile.rtl: Do not compile s-stchop by default.
12004
12005 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
12006
12007 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
12008 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
12009 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
12010 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
12011 Reverted previous change for now.
12012
12013 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12014
12015 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
12016 check to default discriminant value if checks are enabled.
12017 (Build_Assignment): If type of component has static predicate,
12018 apply check to its default value, if any.
12019
12020 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
12021
12022 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
12023 * exp_ch3.adb (Build_Init_Statements): As part of initialising
12024 the value record of a task, set its _Secondary_Stack_Size field
12025 if present.
12026 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
12027 a _Secondary_Stack_Size field in the value record of
12028 the task if a Secondary_Stack_Size rep item is present.
12029 (Make_Task_Create_Call): Include secondary stack size
12030 parameter. If No_Secondary_Stack restriction is in place, passes
12031 stack size of 0.
12032 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
12033 Secondary_Stack_Size.
12034 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
12035 function to define the overhead of the secondary stack.
12036 * s-tarest.adb (Create_Restricted_Task,
12037 Create_Restricted_Task_Sequential): Functions now include
12038 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
12039 * s-tarest.adb (Create_Restricted_Task,
12040 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
12041 now include Secondary_Stack_Size parameter.
12042 (Task_Wrapper):
12043 Secondary stack now allocated to the size specified by the
12044 Secondary_Stack_Size parameter in the task's ATCB.
12045 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
12046 Secondary_Stack_Size component.
12047 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
12048 Create_Restricted_Task_Sequential): Function now include
12049 Secondary_Stack_Size parameter.
12050 (Task_Wrapper): Secondary stack
12051 now allocated to the size specified by the Secondary_Stack_Size
12052 parameter in the task's ATCB.
12053 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
12054 for Secondary_Stack_Size aspect, turning the aspect into its
12055 corresponding internal attribute.
12056 (Analyze_Attribute_Definition):
12057 Process Secondary_Stack_Size attribute.
12058 * snames.adb-tmpl, snames.ads-tmpl: Added names
12059 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
12060 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
12061
12062 2017-01-06 Pascal Obry <obry@adacore.com>
12063
12064 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
12065 Sequential_IO and Direct_IO.
12066
12067 2017-01-06 Bob Duff <duff@adacore.com>
12068
12069 * snames.ads-tmpl (Renamed): New name for the pragma argument.
12070 * par-ch2.adb: Allow the new pragma (with analysis deferred
12071 to Sem_Prag).
12072 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
12073 Keep a mapping from new pragma names to old names.
12074 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
12075 implement it by calling Map_Pragma_Name.
12076 * checks.adb, contracts.adb, einfo.adb, errout.adb,
12077 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
12078 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
12079 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
12080 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
12081 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
12082 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
12083 as appropriate.
12084
12085 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12086
12087 * exp_ch9.adb: Minor reformatting.
12088
12089 2017-01-06 Tristan Gingold <gingold@adacore.com>
12090
12091 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
12092 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
12093 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
12094 (unused).
12095 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
12096 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
12097 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
12098 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
12099
12100 2017-01-06 Bob Duff <duff@adacore.com>
12101
12102 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
12103 dummy implementation of Map_Pragma_Name.
12104
12105 2017-01-06 Tristan Gingold <gingold@adacore.com>
12106
12107 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
12108 entry_body variable constant.
12109 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
12110 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
12111 to constant.
12112 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
12113 now access to constant.
12114
12115 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12116
12117 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
12118 reformatting and typo fixes.
12119
12120 2017-01-06 Bob Duff <duff@adacore.com>
12121
12122 * snames.ads-tmpl: New names for pragma renaming.
12123 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
12124 * par-prag.adb: Add new pragma name to case statement.
12125 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
12126 of the pragma.
12127 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
12128 Dummy implementation of Pragma_Name_Mapped.
12129
12130 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12131
12132 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
12133 better detect call within an entry_wrapper.
12134 * sem_res.adb (Resolve_Call): A protected call within an
12135 entity_wrapper is analyzed in the context of the protected
12136 object but corresponds to a pre-analysis and is not an access
12137 before elaboration.
12138 * sem_attr.adb: Minor reformatting.
12139
12140 2017-01-06 Justin Squirek <squirek@adacore.com>
12141
12142 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
12143 Finalization_Size to allow a prefix of any non-class-wide type.
12144 * sem_attr.ads Modify comment for Finalization_Size to include
12145 definite type use case.
12146
12147 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12148
12149 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
12150 on procedures that are wrappers created for entries that have
12151 preconditions.
12152 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
12153 body is an entry_wrapper, compile it in the context of the
12154 synchronized type, because a precondition may refer to funtions
12155 of the type.
12156 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
12157 body entity.
12158 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
12159 within an Entry_Wrapper this is an external call whose target
12160 is the synchronized object that is the actual in the call to
12161 the wrapper.
12162
12163 2017-01-06 Yannick Moy <moy@adacore.com>
12164
12165 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
12166 in tree, which means not analyzing the previous prefix if the node has
12167 been rewritten into its prefix.
12168
12169 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12170
12171 * s-tpobop.adb: Minor reformatting.
12172
12173 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12174
12175 * checks.adb (Ensure_Valid): Do not generate a validity check
12176 within a generated predicate function, validity checks will have
12177 been applied earlier when required.
12178
12179 2017-01-06 Tristan Gingold <gingold@adacore.com>
12180
12181 * s-tpoben.ads (Protection_Entries): Add comment and reorder
12182 components for performances.
12183 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
12184 semantic.
12185
12186 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12187
12188 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
12189 If expression is compile-time known and obeys a static predicate
12190 it must be labelled as static, to prevent spurious warnings and
12191 run-time errors, e.g. in case statements. This is relevant when
12192 the expression is the result of constant-folding a type conversion
12193 whose expression is a variable with a known static value.
12194
12195 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12196
12197 * exp_attr.adb, sem_attr.ads: Minor reformatting.
12198
12199 2017-01-06 Justin Squirek <squirek@adacore.com>
12200
12201 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
12202 expansion of Finalization_Size attribute.
12203 * sem_attr.adb (Analyze_Attribute): Add entry to check the
12204 semantics of Finalization_Size.
12205 (Eval_Attribute): Add null entry for Finalization_Size.
12206 * sem_attr.ads: Add Finalization_Size to the implementation
12207 dependent attribute list.
12208 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
12209
12210 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12211
12212 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
12213 iterator specification with a serious syntactic error, transform
12214 construct into an infinite loop in order to continue analysis
12215 and prevent a compiler abort.
12216
12217 2017-01-06 Tristan Gingold <gingold@adacore.com>
12218
12219 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
12220 max_queue_lengths_array if unused.
12221
12222 2017-01-06 Bob Duff <duff@adacore.com>
12223
12224 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
12225 array access, in case "\" is at the end of Text.
12226 * stylesw.adb (Set_Style_Check_Options): Don't include input
12227 characters in the error message template, because they could
12228 be control characters such as "\", which Errout will try to
12229 interpret.
12230
12231 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12232
12233 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
12234 For a private type examine the visible declarations that follow
12235 the partial view, not just the private declarations that follow
12236 the full view.
12237
12238 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12239
12240 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
12241 code cleanup.
12242
12243 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12244
12245 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
12246 alias of the inherited op is the parent iterator, no need to
12247 examine dispatch table positions which might not be established
12248 yet if type is not frozen.
12249 * sem_disp.adb (Check_Controlling_Formals): The formal of a
12250 predicate function may be a subtype of a tagged type.
12251 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
12252 of representation items for the completion of a type extension
12253 where a predicate applies to the partial view.
12254 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
12255 parameter that designates function whose actual receives a
12256 predicate check, to improve warning message when the check will
12257 lead to infinite recursion.
12258 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
12259 Apply_Predicate_Check.
12260
12261 2017-01-06 Tristan Gingold <gingold@adacore.com>
12262
12263 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
12264 Gnat_Extended_Ravenscar.
12265 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
12266
12267 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12268
12269 * sem_util.ads: Minor typo fix and reformatting.
12270
12271 2017-01-06 Yannick Moy <moy@adacore.com>
12272
12273 * ghost.adb Minor fixing of references to SPARK RM.
12274 (Check_Ghost_Context): Check whether reference is to a lvalue
12275 before issuing an error about violation of SPARK RM 6.9(13)
12276 when declaration has Ghost policy Check and reference has Ghost
12277 policy Ignore.
12278 * sem_util.adb Minor indentation.
12279 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
12280 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
12281 * sem_util.ads (Unique_Defining_Entity): Document the result
12282 for package body stubs.
12283
12284 2017-01-06 Tristan Gingold <gingold@adacore.com>
12285
12286 * raise-gcc.c (abort): Macro to call Abort_Propagation.
12287 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
12288 constant.
12289 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12290 Do not generate the Entry_Max_Queue_Lengths_Array if all default
12291 values.
12292 * exp_util.adb (Corresponding_Runtime_Package): Consider
12293 Max_Queue_Length pragma.
12294
12295 2017-01-06 Justin Squirek <squirek@adacore.com>
12296
12297 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12298 Remove declaration generation in the case of
12299 System_Tasking_Protected_Objects_Single_Entry being used,
12300 and add a warning message when this is detected to occur.
12301 (Make_Initialize_Protection): Remove reference pass in the case
12302 of System_Tasking_Protected_Objects_Single_Entry.
12303 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
12304 * s-tposen.adb (Initialize_Protection_Entry): Remove
12305 Entry_Queue_Max parameter.
12306 * s-tposen.ads: Remove the types use to store the entry queue
12307 maximum.
12308 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
12309
12310 2017-01-06 Yannick Moy <moy@adacore.com>
12311
12312 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
12313 behavior of function, to also accept out of range positions
12314 and raise Constraint_Error in such case, and to copy sloc from
12315 literal if No_Location passed as location.
12316 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
12317 of functions to raise Constraint_Error in case of value not in
12318 appropriate range.
12319
12320 2017-01-06 Tristan Gingold <gingold@adacore.com>
12321
12322 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
12323 Invalidate_Stack_Cache.
12324
12325 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
12326
12327 * s-os_lib.adb: Minor fix to the signature of Readlink.
12328
12329 2017-01-06 Javier Miranda <miranda@adacore.com>
12330
12331 * sem_ch6.adb (Conforming_Types): Handle another
12332 confusion between views in a nested instance with an actual
12333 private type whose full view is not in scope.
12334
12335 2017-01-06 Arnaud Charlet <charlet@adacore.com>
12336
12337 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
12338 mark a rewritten if statement as explicit (Comes_From_Source).
12339
12340 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12341
12342 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
12343
12344 2017-01-06 Tristan Gingold <gingold@adacore.com>
12345
12346 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
12347
12348 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12349
12350 * sem_case.adb: Minor reformatting.
12351
12352 2017-01-06 Thomas Quinot <quinot@adacore.com>
12353
12354 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
12355
12356 2017-01-06 Justin Squirek <squirek@adacore.com>
12357
12358 * aspects.adb: Register aspect in Canonical_Aspect.
12359 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
12360 into respective tables.
12361 * einfo.ads, einfo.adb: Add a new attribute for
12362 handling the parameters for Pragma_Max_Entry_Queue
12363 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
12364 for accessing and setting were added as well.
12365 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
12366 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
12367 declaration for pramga arguments and store them in the protected
12368 type node.
12369 (Make_Initialize_Protection): Pass a reference to
12370 the Entry_Max_Queue_Lengths_Array in the protected type node to
12371 the runtime.
12372 * rtsfind.adb: Minor grammar fix.
12373 * rtsfind.ads: Register new types taken from the
12374 runtime libraries RE_Protected_Entry_Queue_Max and
12375 RE_Protected_Entry_Queue_Max_Array
12376 * s-tposen.adb, s-tpoben.adb
12377 (Initialize_Protection_Entry/Initialize_Protection_Entries):
12378 Add extra parameter and add assignment to local object.
12379 * s-tposen.ads, s-tpoben.ads: Add new types to
12380 store entry queue maximums and a field to the entry object record.
12381 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
12382 for Aspect_Max_Queue_Length.
12383 (Check_Aspect_At_Freeze_Point):
12384 Add aspect to list of aspects that don't require delayed analysis.
12385 * sem_prag.adb (Analyze_Pragma): Add case statement for
12386 Pragma_Max_Queue_Length, check semantics, and register arugments
12387 in the respective entry nodes.
12388 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
12389 and Has_Max_Queue_Length
12390 * snames.ads-tmpl: Add constant for the new aspect-name
12391 Name_Max_Queue_Length and corrasponding pragma.
12392
12393 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12394
12395 * exp_util.adb (Is_Controlled_Function_Call):
12396 Reimplemented. Consider any node which has an entity as the
12397 function call may appear in various ways.
12398
12399 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12400
12401 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
12402 an unchecked type conversion when performing a view conversion
12403 to/from a private type. In all other cases use a regular type
12404 conversion to ensure that any relevant checks are properly
12405 installed.
12406
12407 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12408
12409 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
12410
12411 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12412
12413 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
12414 error on case expression that is an entity, when coverage is
12415 incomplete and entity has a static value obtained by local
12416 propagation.
12417 (Handle_Static_Predicate): New procedure, subsidiary of
12418 Check_Choices, to handle case alternatives that are either
12419 subtype names or subtype indications involving subtypes that
12420 have static predicates.
12421
12422 2017-01-06 Thomas Quinot <quinot@adacore.com>
12423
12424 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
12425 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
12426
12427 2017-01-06 Bob Duff <duff@adacore.com>
12428
12429 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
12430 Elaborate_All(P) to P itself. That could happen in obscure cases,
12431 and always introduced a cycle (P body must be elaborated before
12432 P body).
12433 * lib-writ.ads: Comment clarification.
12434 * ali-util.ads: Minor comment fix.
12435 * ali.adb: Minor reformatting.
12436
12437 2017-01-06 Tristan Gingold <gingold@adacore.com>
12438
12439 * a-exexpr-gcc.adb: Improve comment.
12440
12441 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12442
12443 * s-linux-mips.ads: Use correct signal and errno constants.
12444 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
12445
12446 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12447
12448 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
12449 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
12450 sections.
12451
12452 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
12453
12454 * gnatvsn.ads: Bump copyright year.
12455
12456 2017-01-01 Jakub Jelinek <jakub@redhat.com>
12457
12458 * gnat_ugn.texi: Bump @copying's copyright year.
12459 * gnat_rm.texi: Likewise.
12460 \f
12461 Copyright (C) 2017 Free Software Foundation, Inc.
12462
12463 Copying and distribution of this file, with or without modification,
12464 are permitted in any medium without royalty provided the copyright
12465 notice and this notice are preserved.