gcc/ada/ChangeLog: add entries missing from previous commit
[gcc.git] / gcc / ada / ChangeLog
1 2017-12-15 Ed Schonberg <schonberg@adacore.com>
2
3 * exp_unst.adb (Unnest_Subprograms): Nothing to do if the main unit is
4 a generic package body. Unnesting is only an issue when generating
5 code, and if the main unit is generic then nested instance bodies have
6 not been created and analyzed, and unnesting will crash in the absence
7 of those bodies,
8
9 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
10
11 * inline.adb (Add_Inlined_Body): Do not add a function which is
12 completed by an expression function defined in the same context as the
13 initial declaration because the completing body is not in a package
14 body.
15 (Is_Non_Loading_Expression_Function): New routine.
16
17 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
18
19 * debug.adb: Move the functionality of -gnatdL to -gnatd_i. Restore
20 the behavior of -gnatdL from before revision 255412.
21 * sem_elab.adb: Update the section of compiler switches.
22 (Build_Call_Marker): Do not create a marker for a call which originates
23 from an expanded spec or body of an instantiated gener, does not invoke
24 a generic formal subprogram, the target is external to the instance,
25 and -gnatdL is in effect.
26 (In_External_Context): New routine.
27 (Process_Conditional_ABE_Activation_Impl): Update the uses of -gnatdL
28 and associated flag.
29 (Process_Conditional_ABE_Call): Update the uses of -gnatdL and
30 associated flag.
31 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
32 -gnatd_i.
33 * exp_unst.adb: Minor typo fixes and edits.
34
35 2017-12-15 Ed Schonberg <schonberg@adacore.com>
36
37 * sem_ch6.adb (Possible_Freeze): Do not set Delayed_Freeze on an
38 subprogram instantiation, now that the enclosing wrapper package
39 carries an explicit freeze node. THis prevents freeze nodes for the
40 subprogram for appearing in the wrong scope. This is relevant when the
41 generic subprogram has a private or incomplete formal type and the
42 instance appears within a package that declares the actual type for the
43 instantiation, and that type has itself a delayed freeze.
44
45 2017-12-15 Patrick Bernardi <bernardi@adacore.com>
46
47 * doc/gnat_ugn/gnat_and_program_execution.rst: Removed references to
48 the environment variable GNAT_STACK_LIMIT from the Stack Overflow
49 Checking section as it is no longer used by any of our supported
50 targets.
51
52 2017-12-15 Bob Duff <duff@adacore.com>
53
54 * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
55 Init_Assignment is rewritten, we need to set Assignment_OK on the new
56 node. Otherwise, we will get spurious errors when initializing via
57 assignment statement.
58
59 2017-12-15 Arnaud Charlet <charlet@adacore.com>
60
61 * exp_unst.adb (Visit_Node): Refine handling of 'Access to ignore non
62 relevant nodes.
63 (Has_Non_Null_Statements): Moved to sem_util for later reuse.
64
65 2017-12-15 Eric Botcazou <ebotcazou@adacore.com>
66
67 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Fix comment.
68 * libgnat/s-fatgen.adb (Model): Use Machine attribute.
69 (Truncation): Likewise.
70
71 2017-12-15 Bob Duff <duff@adacore.com>
72
73 * exp_ch7.adb (Expand_Cleanup_Actions): Make sure the block and handled
74 statement sequence generated for certain extended return statements
75 have a Sloc that is not No_Location. Otherwise, the back end doesn't
76 set any location and ends up reading uninitialized variables.
77
78 2017-12-15 Bob Duff <duff@adacore.com>
79
80 * types.ads, exp_ch6.adb, libgnat/s-regexp.ads, opt.ads: Partly revert
81 r255414, committed by mistake.
82
83 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
84
85 * gcc-interface/Makefile.in: Generalize support for symbolic traces.
86
87 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
88
89 * gcc-interface/misc.c (default_pass_by_ref): Minor tweak.
90
91 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
92
93 * gcc-interface/trans.c (Call_to_gnu): Set DECL_DISREGARD_INLINE_LIMITS
94 to 0 on the callee if the call is recursive.
95
96 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
97
98 * gcc-interface/decl.c (gnat_to_gnu_field): Do not set the alignment
99 of the enclosing record type if it is not already set.
100
101 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
102
103 * gcc-interface/gigi.h (pad_type_has_rm_size): Declare.
104 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
105 a padding type for the alignment before validating the size.
106 Flip conditional construct and add a comment.
107 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Make sure to
108 apply the exception for padded objects to the type of the object.
109 * gcc-interface/utils.c (hash_pad_type): New static function.
110 (lookup_and_insert_pad_type): Rename into...
111 (canonicalize_pad_type): ...this. Call hash_pad_type, do only one
112 lookup with insertion and always return the canonical type.
113 (maybe_pad_type): Adjust to above changes. Set debug type later.
114 (pad_type_has_rm_size): New predicate.
115 (set_reverse_storage_order_on_pad_type): Adjust to above changes.
116
117 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
118
119 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Initialize locus.
120
121 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
122
123 * gcc-interface/trans.c (process_freeze_entity): Be prepared for a
124 package without body.
125
126 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
127
128 * gcc-interface/decl.c (gnat_to_gnu_entity): Robustify test for types
129 descendant of System.Address.
130 (gnat_to_gnu_subprog_type): Likewise.
131
132 2017-12-08 Jakub Jelinek <jakub@redhat.com>
133
134 * gcc-interface/utils.c (gnat_internal_attribute_table): Add
135 exclusions to the comment.
136
137 2017-12-07 Martin Sebor <msebor@redhat.com>
138
139 PR c/81544
140 * gcc-interface/utils.c (gnat_internal_attribute_table): Initialize
141 new member of struct attribute_spec.
142
143 2017-12-06 Simon Wright <simon@pushface.org>
144
145 PR ada/66205
146 * bindgen.adb (Gen_AdaFinal): If the restriction No_Task_Termination is
147 set, generate a null body.
148
149 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
150
151 * sem_util.adb (Contains_Refined_State): Remove.
152
153 2017-12-05 Ed Schonberg <schonberg@adacore.com>
154
155 * sem_ch13.adb (Analyze_Aspect_Specifications, case Predicate): A
156 predicate cannot apply to a formal type.
157
158 2017-12-05 Arnaud Charlet <charlet@adacore.com>
159
160 * exp_unst.ads: Fix typos.
161
162 2017-12-05 Jerome Lambourg <lambourg@adacore.com>
163
164 * libgnarl/s-taprop__qnx.adb: Better detect priority ceiling bug in
165 QNX. At startup, the first mutex created has a non-zero ceiling
166 priority whatever its actual policy. This makes some tests fail
167 (c940013 for example).
168
169 2017-12-05 Bob Duff <duff@adacore.com>
170
171 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Call
172 Expand_Cleanup_Actions for N_Extended_Return_Statement.
173 * exp_ch7.adb (Expand_Cleanup_Actions): Handle
174 N_Extended_Return_Statement by transforming the statements into a
175 block, and (indirectly) calling Expand_Cleanup_Actions on the block.
176 It's too hard for Expand_Cleanup_Actions to operate directly on the
177 N_Extended_Return_Statement, because it has a different structure than
178 the other node kinds that Expand_Cleanup_Actions.
179 * exp_util.adb (Requires_Cleanup_Actions): Add support for
180 N_Extended_Return_Statement. Change "when others => return False;" to
181 "when others => raise ...;" so it's clear what nodes this function
182 handles. Use named notation where appropriate.
183 * exp_util.ads: Mark incorrect comment with ???.
184
185 2017-12-05 Javier Miranda <miranda@adacore.com>
186
187 * exp_ch9.adb (Install_Private_Data_Declarations): Add missing
188 Debug_Info_Needed decoration of internally generated discriminal
189 renaming declaration.
190
191 2017-12-05 Arnaud Charlet <charlet@adacore.com>
192
193 * exp_unst.adb (Unnest_Subprogram): Add handling of 'Access on
194 nested subprograms.
195
196 2017-12-05 Sergey Rybin <rybin@adacore.com>
197
198 * doc/gnat_ugn/gnat_utility_programs.rst: Add description of '--ignore'
199 option for gnatmetric, gnatpp, gnat2xml, and gnattest.
200
201 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
202
203 * sem_util.adb (Contains_Refined_State): Remove.
204
205 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
206
207 * rtsfind.ads: Add new enumeration literals: RE_Clock_Time (for
208 Ada.Real_Time.Clock_Time) and RO_CA_Clock_Time (for
209 Ada.Calendar.Clock_Time).
210
211 2017-12-05 Ed Schonberg <schonberg@adacore.com>
212
213 * sem_ch4.adb (Is_Private_Overriding): If the candidate private
214 subprogram is overloaded, scan the list of homonyms in the same
215 scope, to find the inherited operation that may be overridden
216 by the candidate.
217 * exp_ch11.adb, exp_ch7.adb: Minor reformatting.
218
219 2017-12-05 Bob Duff <duff@adacore.com>
220
221 * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
222 Init_Assignment is rewritten, we need to set Assignment_OK on the new
223 node. Otherwise, we will get spurious errors when initializing via
224 assignment statement.
225
226 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
227
228 * sem_elab.adb: Update the terminology and switch sections.
229 (Check_SPARK_Model_In_Effect): New routine.
230 (Check_SPARK_Scenario): Verify the model in effect for SPARK.
231 (Process_Conditional_ABE_Call_SPARK): Verify the model in effect for
232 SPARK.
233 (Process_Conditional_ABE_Instantiation_SPARK): Verify the model in
234 effect for SPARK.
235 (Process_Conditional_ABE_Variable_Assignment_SPARK): Verify the model
236 in effect for SPARK.
237
238 2017-12-05 Nicolas Setton <setton@adacore.com>
239
240 * terminals.c (__gnat_setup_child_communication): As documented,
241 __gnat_setup_child_communication should not terminate - it is intended
242 to be used as the child process of a call to fork(). However, execvp
243 might actually return in some cases, for instance when attempting to
244 run a 32-bit binary on a 64-bit Linux distribution when the
245 compatibility packages are not installed. In these cases, exit the
246 program to conform to the documentation.
247
248 2017-12-05 Olivier Hainque <hainque@adacore.com>
249
250 * libgnat/s-tsmona.adb: Fix for oversight in the tsmona interface
251 update.
252
253 2017-12-05 Gary Dismukes <dismukes@adacore.com>
254
255 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Minor typo fix
256 and reformatting.
257 * gnat_ugn.texi: Regenerate.
258
259 2017-12-05 Olivier Hainque <hainque@adacore.com>
260
261 * sem_util.adb (Set_Convention): Always clear Can_Use_Internal_Rep
262 on access to subprogram types with foreign convention.
263
264 2017-12-05 Yannick Moy <moy@adacore.com>
265
266 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix User's
267 Guide description of default settings of warnings.
268
269 2017-12-05 Olivier Hainque <hainque@adacore.com>
270
271 * s-dwalin.adb (Read_And_Execute_Isn): Adjust test checking for the end
272 of section. Add comments explaining the rationale of the computation.
273
274 2017-12-05 Bob Duff <duff@adacore.com>
275
276 * exp_ch11.adb: Minor refactoring.
277
278 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
279
280 * debug.adb: Add debug switches d_a, d_e, and d_p, along with
281 documentation.
282 (Set_Underscored_Debug_Flag): New routine.
283 * debug.ads: Add the flags for all underscore switches.
284 (Set_Underscored_Debug_Flag): New routine.
285 * einfo.adb: Flag303 is now Suppress_Elaboration_Warnings.
286 (Suppress_Elaboration_Warnings): New routine.
287 (Set_Suppress_Elaboration_Warnings): New routine.
288 (Write_Entity_Flags): Add output for Suppress_Elaboration_Warnings.
289 * einfo.ads: Add new flag Suppress_Elaboration_Warnings.
290 (Suppress_Elaboration_Warnings): New routine along with pragma Inline.
291 (Set_Suppress_Elaboration_Warnings): New routine along with pragma
292 Inline.
293 * exp_ch3.adb (Build_Init_Procedure): Restore the behavior of the
294 legacy elaboration model.
295 (Default_Initialize_Object): Restore the behavior of the legacy
296 elaboration model.
297 * exp_ch9.adb: Add with and use clause for Sem_Elab.
298 (Build_Task_Activation_Call): Restore the behavior of the legacy
299 elaboration model.
300 * frontend.adb (Frontend): Restore the behavior of the legacy
301 elaboration model.
302 * opt.ads: Add new flags Legacy_Elaboration_Checks and
303 Relaxed_Elaboration_Checks, along with documentation.
304 * sem_attr.adb (Analyze_Access_Attribute): Restore the behavior of the
305 legacy elaboration model.
306 * sem_ch5.adb (Analyze_Assignment): Restore the behavior of the legacy
307 elaboration model.
308 * sem_ch7.adb (Analyze_Package_Declaration): Restore the behavior of
309 the legacy elaboration model.
310 * sem_ch8.adb (Attribute_Renaming): Restore the behavior of the legacy
311 elaboration model.
312 * sem_ch12.adb (Analyze_Instance_And_Renamings): Restore the behavior
313 of the legacy elaboration model.
314 (Analyze_Package_Instantiation): Restore the behavior of the legacy
315 elaboration model.
316 (Analyze_Subprogram_Instantiation): Restore the behavior of the legacy
317 elaboration model.
318 * sem_elab.adb: Update the documentation of the Processing phase.
319 Update the documentation on elaboration-related compilation
320 switches. Update the documentation on adding a new target. Add
321 Processing_Attributes which represent the state of the Processing
322 phase. Resurrect the previous elaboration model as "legacy elaboration
323 model".
324 (Build_Call_Marker): This routine does not function when the legacy
325 elaboration model is in effect. Do not consider entry calls and requeue
326 statements when debug flag d_e is in effect. Do not consider calls to
327 subprograms which verify the runtime semantics of certain assertion
328 pragmas when debug flag d_p is in effect.
329 (Build_Variable_Reference_Marker): This routine does not function when
330 the legacy elaboration model is in effect.
331 (Check_Elaboration_Scenarios): This routine does not function when the
332 legacy elaboration model is in effect.
333 (Ensure_Prior_Elaboration): The various flags have now been replaced
334 with a state. Do not generate implicit Elaborate[_All] pragmas when
335 their creation has been suppressed.
336 (Ensure_Prior_Elaboration_Static): The with clause is marked based on
337 the requested pragma, not on the nature of the scenario.
338 (In_External_Context): Removed.
339 (Is_Assertion_Pragma_Target): New routine.
340 (Is_Potential_Scenario): Stop the traversal of a task body when
341 reaching an accept or select statement, and debug switch d_a is in
342 effect.
343 (Kill_Elaboration_Scenario): This routine does not function when the
344 legacy elaboration model is in effect.
345 (Process_Activation_Generic): The various flags have now been replaced
346 with a state.
347 (Process_Conditional_ABE): The various flags have now been replaced
348 with a state.
349 (Process_Conditional_ABE_Access): The various flags have now been
350 replaced with a state.
351 (Process_Conditional_ABE_Activation_Impl): The various flags have now
352 been replaced with a state. Do not process an activation call which
353 activates a task whose type is defined in an external instance, and
354 debug switch dL is in effect. Suppress the generation of implicit
355 Elaborate[_All] pragmas once a conditional ABE check has been
356 installed.
357 (Process_Conditional_ABE_Call): The various flags have now been
358 replaced with a state. Do not process a call which invokes a subprogram
359 defined in an external instance, and debug switch dL is in effect.
360 (Process_Conditional_ABE_Call_Ada): The various flags have now been
361 replaced with a state. Suppress the generation of implicit
362 Elaborate[_All] pragmas once a conditional ABE check has been
363 installed.
364 (Process_Conditional_ABE_Call_SPARK): The various flags have now been
365 replaced with a state.
366 (Process_Conditional_ABE_Instantiation): The various flags have now
367 been replaced with a state.
368 (Process_Conditional_ABE_Instantiation_Ada): The various flags have now
369 been replaced with a state. Suppress the generation of implicit
370 Elaborate[_All] pragmas once a conditional ABE check has been
371 installed.
372 (Process_Conditional_ABE_Instantiation_SPARK): The various flags have
373 now been replaced with a state.
374 (Process_Guaranteed_ABE_Activation_Impl): The various flags have now
375 been replaced with a state.
376 (Process_Single_Activation): The various flags have now been replaced
377 with a state.
378 (Record_Elaboration_Scenario): This routine does not function when the
379 legacy elaboration model is in effect.
380 (Traverse_Body): The various flags have now been replaced with a state.
381 * sem_elab.ads: Resurrect the pre-18.x elaboration model as "legacy
382 elaboration model".
383 * sem_prag.adb (Analyze_Pragma): Restore the behavior of the legacy
384 elaboration model.
385 * sem_res.adb (Resolve_Call): Restore the behavior of the legacy
386 elaboration model.
387 (Resolve_Entity_Name): Restore the behavior of the legacy elaboration
388 model.
389 * sem_util.adb (Mark_Elaboration_Attributes): This routine does not
390 function when the legacy elaboration model is in effect.
391 * sinfo.adb (Is_Known_Guaranteed_ABE): Update the assertion check.
392 (No_Elaboration_Check): New routine.
393 (Set_Is_Known_Guaranteed_ABE): Update the assertion check.
394 (Set_No_Elaboration_Check): New routine.
395 * sinfo.ads: Update the documentation of flag Is_Known_Guaranteed_ABE
396 along with occurrences in nodes. Add new flag No_Elaboration_Check
397 along with occurrences in nodes.
398 * switch-c.adb (Scan_Front_End_Switches): Add processing for debug
399 switches with underscores. Add processing for switches -gnatH and
400 -gnatJ.
401 * usage.adb (Usage): Add output for switches -gnatH and -gnatJ.
402 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
403 documentation to include the legacy and relaxed elaboration models.
404 * gnat_ugn.texi: Regenerate.
405
406 2017-12-05 Arnaud Charlet <charlet@adacore.com>
407
408 * doc/gnat_ugn/platform_specific_information.rst: Minor edit.
409 Improve doc on required packages for linux 32bits.
410
411 2017-12-05 Doug Rupp <rupp@adacore.com>
412
413 * tracebak.c (ppc64-vx7): USE_GCC_UNWINDER for 64bit.
414
415 2017-12-05 Javier Miranda <miranda@adacore.com>
416
417 * checks.adb (Generate_Range_Check): Force evaluation of the node in
418 more cases. This patch was written to improve the code generated by
419 the CCG compiler but it is enabled for all targets since double
420 evaluation is always a potential source of inefficiency.
421
422 2017-12-05 Gary Dismukes <dismukes@adacore.com>
423
424 * doc/gnat_ugn/gnat_utility_programs.rst: Remove reference to obsolete
425 -fdump-xref switch.
426
427 2017-12-05 Eric Botcazou <ebotcazou@adacore.com>
428
429 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use the SLOC of the
430 iteration scheme throughout, except for the new loop statement(s).
431
432 2017-12-05 Ed Schonberg <schonberg@adacore.com>
433
434 * exp_aggr.adb (Gen_Assign): Do not analyze the expressionn of the
435 assignment if it is part of an Iterated_Component_Association: the
436 analysis needs to take place once the loop structure is analyzed and
437 the loop parameter made visible, because references to it typically
438 appear in the corresponding expression. This is necessary if the
439 expression is an aggregate, because previous pre-analysis of the
440 expression does not handle nested aggregates properly.
441
442 2017-12-05 Bob Duff <duff@adacore.com>
443
444 * sem_res.adb (Resolve_Allocator): Avoid coextension processing for an
445 allocator that is the expansion of a build-in-place function call.
446
447 2017-12-05 Olivier Hainque <hainque@adacore.com>
448
449 libgnat/
450 * s-trasym__dwarf.adb (spec of Module_Name.Get): Instead of
451 possibly adjusting the lookup address by a load address, expect
452 a extra argument through which the load address can be conveyed
453 separately.
454 (Multi_Module_Symbolic_Traceback): Adjust accordingly. Pass the
455 retrieved load address to Init_Module.
456 * s-tsmona__linux.adb (Get): Honor the new interface.
457 * s-tsmona__mingw.adb (Get): Likewise.
458 * s-dwalin.ads: Adjust comments to be explicit about which
459 addresses are from module info and which are run-time addresses,
460 offsetted by the module load address.
461 * s-dwalin.adb (Set_Load_Address): Simply set C.Load_Slide.
462 Do not alter the module Low and High (relative) addresses.
463 (Is_Inside): Improve documentation regarding the kinds of addresses
464 at hand and correct the test.
465 (Symbolic_Traceback): Use separate variables with explicit names
466 for the address in traceback (run-time value) and the address to
467 lookup within the shared object (module-relative). Adjust the
468 computation of address passed to Symbolic_Address for symbolization.
469
470 2017-12-05 Arnaud Charlet <charlet@adacore.com>
471
472 * opt.ads (Expand_Nonbinary_Modular_Ops): New flag.
473 * exp_ch4.adb (Expand_Nonbinary_Modular_Op): Use
474 Expand_Nonbinary_Modular_Ops instead of Modify_Tree_For_C, so that
475 other back-ends can also benefit from the front-end expansion. Remove
476 test for Modify_Tree_For_C in all callers to better share code.
477 * gnat1drv.adb (Adjust_Global_Switches): Set
478 Expand_Nonbinary_Modular_Ops when generating C code.
479
480 2017-12-05 Ed Schonberg <schonberg@adacore.com>
481
482 * exp_ch5.adb (Expand_Formal_Container_Loop): Ensure that the loop
483 parameter becomes invisible after analyzing the loop, which has been
484 rewritten as a while-loop.
485
486 2017-12-05 Doug Rupp <rupp@adacore.com>
487
488 * vxaddr2line.adb: Revise and enhance for new ports, remove dead ports,
489 and update for 64bit ports.
490
491 2017-12-05 Bob Duff <duff@adacore.com>
492
493 * exp_ch6.adb (Build_In_Place_Formal): Search for the formal by suffix
494 instead of the full name.
495 * sem_ch6.adb (Create_Extra_Formals): Make sure there are extra formals
496 in the case of an instance of a generic.
497
498 2017-12-05 Arnaud Charlet <charlet@adacore.com>
499
500 (Adjust_Global_Switches): Create an alias GNAT_Annotate to map to
501 pragma Annotate.
502
503 2017-12-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
504
505 * gcc-interface/Makefile.in (RTEMS): Define EH_MECHANISM.
506
507 2017-12-04 Sebastian Huber <sebastian.huber@embedded-brains.de>
508
509 * gcc-interface/Makefile.in (RTEMS): Use s-osprim__rtems.adb.
510 * libgnat/s-osprim__rtems.adb: New file.
511 * libgnarl/s-osinte__rtems.adb (pthread_cond_t): Fix alignment.
512 (pthread_mutexattr_t): Likewise.
513 (pthread_rwlockattr_t): Likewise.
514 (pthread_rwlock_t): Likewise.
515 (time_t): Use 64-bit integer.
516
517 2017-12-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
518
519 * libgnarl/s-osinte__rtems.ads (pthread_cond_t): Use correct size and
520 alignment.
521 (pthread_mutex_t): Likewise.
522 (pthread_rwlock_t): Likewise.
523
524 2017-11-28 Jakub Jelinek <jakub@redhat.com>
525
526 * gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR
527 using build2 instead of build3.
528
529 2017-11-23 Eric Botcazou <ebotcazou@adacore.com>
530
531 PR ada/83091
532 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not build a variant
533 type for the implementation type of a packed array.
534
535 2017-11-23 Mike Stump <mikestump@comcast.net>
536 Eric Botcazou <ebotcazou@adacore.com>
537
538 * gcc-interface/trans.c (gnat_gimplify_stmt) <LOOP_STMT>: Pass 3rd
539 operand to ANNOTATE_EXPR and also pass unrolling hints.
540
541 2017-11-20 Eric Botcazou <ebotcazou@adacore.com>
542
543 PR ada/83016
544 * gnatlink.adb (Process_Args): Accept multiple switches for --LINK.
545 (Usage): Adjust.
546 * gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES).
547 (common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in
548 the invocations of $(GNATLINK).
549 (../../gnatdll$(exeext)): Likewise.
550 (../../vxaddr2line$(exeext)): Likewise.
551 (gnatmake-re): Likewise.
552 (gnatlink-re): Likewise.
553
554 2017-11-16 Doug Rupp <rupp@adacore.com>
555
556 * gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
557
558 2017-11-16 Steve Baird <baird@adacore.com>
559
560 * debug.adb: Update another comment to indicate gnat2scil's use of the
561 -gnatd.7 switch.
562
563 2017-11-16 Bob Duff <duff@adacore.com>
564
565 * exp_ch6.adb (Expand_Call_Helper): Avoid creating a transient scope in
566 the case of nested build-in-place calls.
567
568 2017-11-16 Joel Brobecker <brobecker@adacore.com>
569
570 * doc/gnat_ugn/gnat_utility_programs.rst: Document the switches
571 available in gnatsymbolize.
572
573 2017-11-16 Steve Baird <baird@adacore.com>
574
575 * debug.adb: Update comment to indicate gnat2scil's use of the -gnatd.7
576 switch.
577
578 2017-11-16 Gary Dismukes <dismukes@adacore.com>
579
580 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, sem_ch6.adb,
581 sem_elab.adb: Minor editorial corrections.
582 * gnat_ugn.texi: Regenerate.
583
584 2017-11-16 Joel Brobecker <brobecker@adacore.com>
585
586 * doc/gnat_ugn/gnat_utility_programs.rst (GNAT UGN): Add
587 gnatsymbolize documentation.
588 * gnat_ugn.texi: Regenerate.
589
590 2017-11-16 Steve Baird <baird@adacore.com>
591
592 * sem_ch3.adb (Build_Derived_Record_Type): Replace all uses of
593 "Scope (Parent_Type)" with "Scope (Parent_Base)".
594
595 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
596
597 * opt.ads: Elaboration warnings are now on by default. Add a comment
598 explaining why this is needed.
599 * sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration
600 warnings.
601 * sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of
602 elaboration warnings.
603 (Analyze_Subprogram_Instantiation): Preserve the status of elaboration
604 warnings.
605 * sem_elab.adb: Update the structure of Call_Attributes and
606 Instantiation_Attributes.
607 (Build_Call_Marker): Propagate the status of elaboration warnings from
608 the call to the marker.
609 (Extract_Call_Attributes): Extract the status of elaboration warnings.
610 (Extract_Instantiation_Attributes): Extract the status of elaboration
611 warnings.
612 (Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are
613 now dependent on the status of elaboration warnings.
614 (Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now
615 dependent on the status of elaboration warnings.
616 (Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics
617 are now dependent on the status of elaboration warnings.
618 (Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced
619 for formal Call_Attrs. Elaboration diagnostics are now dependent on the
620 status of elaboration warnings.
621 (Process_Guaranteed_ABE_Call): Elaboration diagnostics are now
622 dependent on the status of elaboration warnings.
623 (Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now
624 dependent on the status of elaboration warnings.
625 * sem_prag.adb (Analyze_Pragma): Remove the unjustified warning
626 concerning pragma Elaborate.
627 * sem_res.adb (Resolve_Call): Preserve the status of elaboration
628 warnings.
629 (Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node
630 from the procedure call to the entry call.
631 * sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter
632 Warnings.
633 (Mark_Elaboration_Attributes_Node): Preserve the status of elaboration
634 warnings
635 * sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter
636 Warnings. Update the comment on usage.
637 * sinfo.adb (Is_Dispatching_Call): Update to use Flag6.
638 (Is_Elaboration_Warnings_OK_Node): New routine.
639 (Set_Is_Dispatching_Call): Update to use Flag6.
640 (Set_Is_Elaboration_Warnings_OK_Node): New routine.
641 * sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new
642 attribute Is_Elaboration_Warnings_OK_Node along with occurrences
643 in nodes.
644 (Is_Elaboration_Warnings_OK_Node): New routine along with pragma
645 Inline.
646 (Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma
647 Inline.
648 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various
649 sections to indicate how to suppress elaboration warnings. Document
650 switches -gnatwl and -gnatwL.
651 * gnat_ugn.texi: Regenerate.
652
653 2017-11-16 Sylvain Dailler <dailler@adacore.com>
654
655 * sem_util.adb (Get_Enum_Lit_From_Pos): Add a condition for Pos
656 lower than 0.
657
658 2017-11-16 Bob Duff <duff@adacore.com>
659
660 * sem_ch13.adb (Check_Expr_Constants): Avoid error message in case of
661 System'To_Address.
662
663 2017-11-16 Yannick Moy <moy@adacore.com>
664
665 * sem_elab.adb (Include): Fix mode of parameter Curr to out.
666
667 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
668
669 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Allow calls where
670 Context_Id denotes a record type.
671
672 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
673
674 * sem_ch8.adb (Check_SPARK_Primitive_Operation): Enable the check in
675 instantiations.
676
677 2017-11-16 Doug Rupp <rupp@adacore.com>
678
679 Initial gnat port to aarch64-wrs-vxworks7
680 * libgnarl/s-vxwork__aarch64.ads,
681 libgnat/system-vxworks7-aarch64-rtp-smp.ads,
682 libgnat/system-vxworks7-aarch64.ads: New files
683 * sigtramp-vxworks-target.inc (aarch64): New section.
684 * tracebak.c (USE_ARM_UNWINDING): Disable for ARMARCH8A.
685
686 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
687
688 * sem_elab.adb (Include): Including a node which is also a compilation
689 unit terminates the search because there are no more lists to examine.
690
691 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
692
693 * sem_ch8.adb (Analyze_Subprogram_Renaming): Ensure that a renaming
694 declaration does not define a primitive operation of a tagged type for
695 SPARK.
696 (Check_SPARK_Primitive_Operation): New routine.
697
698 2017-11-16 Arnaud Charlet <charlet@adacore.com>
699
700 * libgnat/a-elchha.adb (Last_Chance_Handler): Display Argv (0) in
701 message when using -E binder switch.
702
703 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
704
705 * errout.ads: Fix minor typo in comment.
706
707 2017-11-16 Ed Schonberg <schonberg@adacore.com>
708
709 * sem_ch3.adb (Process_Subtype): If the subtype indication does not
710 syntactically denote a type, return Any_Type to prevent subsequent
711 compiler crashes or infinite loops.
712
713 2017-11-16 Steve Baird <baird@adacore.com>
714
715 * lib-writ.adb: Fix bug which causes Program_Error to be raised in some
716 cases when writing out a .ali file when a Rename_Pragma pragma is in
717 effect.
718 * lib-writ.adb (Write_Unit_Information): Replace call to
719 Pragma_Name_Unmapped with call to Pragma_Name.
720
721 2017-11-16 Gary Dismukes <dismukes@adacore.com>
722
723 * sem_elab.adb: Minor typo fixes.
724
725 2017-11-16 Justin Squirek <squirek@adacore.com>
726
727 * sem_res.adb (Resolve_Allocator): Correct warning messages and make
728 them more explicit.
729
730 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
731
732 * atree.ads (Nkind_In): Add 10 and 11 parameter versions.
733 * checks.adb (Install_Primitive_Elaboration_Check): Mark the setting of
734 the elaboration flag as elaboration code.
735 * einfo.adb (Contract): Update the comments.
736 (Ignore_SPARK_Mode_Pragmas): Update the comments.
737 (SPARK_Aux_Pragma): Update the comments.
738 (SPARK_Aux_Pragma_Inherited): Update the comments.
739 (SPARK_Pragma): Update the comments. The attribute now applies
740 to all types and abstract states.
741 (SPARK_Pragma_Inherited): Update the comments. The attribute now
742 applies to all types and abstract states.
743 (Set_Contract): Update the comments.
744 (Set_Ignore_SPARK_Mode_Pragmas): Update the comments.
745 (Set_SPARK_Aux_Pragma): Update the comments.
746 (Set_SPARK_Aux_Pragma_Inherited): Update the comments.
747 (Set_SPARK_Pragma): Update the comments. The attribute now applies to
748 all types and abstract states.
749 (Set_SPARK_Pragma_Inherited): Update the comments. The attribute now
750 applies to all types and abstract states.
751 (Write_Field40_Name): Add output for SPARK_Pragma when it appears on a
752 type and abstract states.
753 * einfo.ads: Update the documentation of attributes SPARK_Pragma and
754 SPARK_Pragma_Inherited. Both of them now apply to all types and
755 abstract states.
756 * exp_util.adb (Set_Elaboration_Flag): Mark the setting of the
757 elaboration flag as elaboration code.
758 * sem_ch3.adb: Add with and use clauses for Sem_Elab.
759 (Analyze_Full_Type_Declaration): Set the SPARK_Mode of the type. Record
760 a derived type for later processing by the ABE mechanism.
761 (Analyze_Incomplete_Type_Decl): Set the SPARK_Mode of the type.
762 (Analyze_Private_Extension_Declaration): Set the SPARK_Mode of the
763 type.
764 * sem_ch7.adb (Analyze_Private_Type_Declaration): Set the SPARK_Mode of
765 the type.
766 * sem_elab.adb: Define the term "early call region". Update the
767 terminology for "scenario" and "target". Update the architecture of
768 the ABE mechanism. Update the steps which must be taken when adding a
769 new scenario. Update the section on debugging ABE issues. Add new
770 hash tables Early_Call_Regions and Recorded_SPARK_Scenarios. Add new
771 table SPARK_Scenarios. Hash table Elaboration_Context is now
772 Elaboration_Statuses. The majority of Process_xxx routines have been
773 updated to better reflect their role.
774 (Add_Unit): Reimplemented.
775 (Check_Elaboration_Constituent): New routine.
776 (Check_Elaboration_Scenarios): Verify previously recorded scenarios for
777 conditional ABE issues. Verify previously recorded SPARK scenarios.
778 (Check_SPARK_Derived_Type): New routine.
779 (Check_SPARK_Instantiation): New routine.
780 (Check_SPARK_Scenario): New routine.
781 (Check_SPARK_Refined_State_Pragma): New routine.
782 (Early_Call_Region): New routine.
783 (Elaboration_Status): New routine.
784 (Ensure_Prior_Elaboration): Add new formal parameter Prag_Nam. The
785 implicit Elabotate[_All] pragma is now specified via Prag_Nam.
786 (Find_Early_Call_Region): New routine.
787 (Info_Scenario): Add output for refinement constituents.
788 (Is_Recorded_SPARK_Scenario): New routine.
789 (Is_Suitable_SPARK_Derived_Type): New routine.
790 (Is_Suitable_SPARK_Instantiation): New routine.
791 (Is_Suitable_SPARK_Refined_State_Pragma): New routine.
792 (Is_Visited_Body): New routine.
793 (Kill_Elaboration_Scenario): Reimplemented.
794 (Output_Active_Scenarios): Add output for pragma Refined_State.
795 (Output_SPARK_Refined_State_Pragma): New routine.
796 (Process_Conditional_ABE_Call): Remove the use of -gnatd.v. The effect
797 is now achieved by different means.
798 (Process_Conditional_ABE_Call_SPARK): Verify that a call which precedes
799 the subprogram body appears within the early call region of the body.
800 Either ensure the prior elaboration of external subprograms or verify
801 that the context meets the suitable elaboration requirement.
802 (Process_Conditional_ABE_Instantiation_SPARK): New routine.
803 (Record_Elaboration_Scenario): Reimplement the portion which enforces
804 the level restrictions of the static model. Add support for SPARK
805 scenarios.
806 (Record_SPARK_Elaboration_Scenario): New routine.
807 (Reset_Visited_Bodies): New routine.
808 (Set_Early_Call_Region): New routine.
809 (Set_Elaboration_Status): New routine.
810 (Set_Is_Recorded_SPARK_Scenario): New routine.
811 (Update_Elaboration_Scenario): Reimplemented.
812 * sem_elab.ads: Add new subtype Library_Or_Instantiation_Level.
813 * sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Save the pragma
814 for examination by the ABE Processing phase.
815 (Create_Abstract_State): Save the SPARK_Mode from the context.
816 * sem_util.adb (Is_Non_Preelaborable_Construct): New routine.
817 * sem_util.ads (Is_Non_Preelaborable_Construct): New routine.
818 * sinfo.adb (Is_Elaboration_Code): New routine.
819 (Set_Is_Elaboration_Code): New routine.
820 (Nkind_In): Add 10 and 11 parameter versions.
821 * sinfo.ads: Add new attribute Is_Elaboration_Code along with
822 occurrences in nodes.
823 (Is_Elaboration_Code): New routine along with pragma Inline.
824 (Set_Is_Elaboration_Code): New routine along with pragma Inline.
825 (Nkind_In): Add 10 and 11 parameter versions.
826
827 2017-11-16 Justin Squirek <squirek@adacore.com>
828
829 * sem.adb (Analyze): Remove requirement that the original node of N be
830 an operator in the case that analysis on the node yields the relevant
831 operator - so prefer it instead.
832
833 2017-11-16 Bob Duff <duff@adacore.com>
834
835 * sem_ch6.adb (Create_Extra_Formals): The type of the BIP_Object_Access
836 formal must not have a designated type that is the full view coming
837 from a limited-with'ed package.
838 * sem_util.adb,sem_util.ads (Incomplete_View_From_Limited_With): New
839 function called from sem_ch6.
840 * sem_ch5.adb (Analyze_Assignment): Treat user-defined concatenation
841 specially for b-i-p cases.
842
843 2017-11-10 Martin Sebor <msebor@redhat.com>
844
845 PR c/81117
846 * adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
847 * argv.c (__gnat_fill_arg, __gnat_fill_env): Likewise.
848
849 2017-11-10 Eric Botcazou <ebotcazou@adacore.com>
850
851 * gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
852 not fall through to the next case.
853 <ARRAY_TYPE>: Deal specially with a dereference from another array
854 type with the same element type.
855
856 2017-11-09 Gary Dismukes <dismukes@adacore.com>
857
858 * exp_util.adb, freeze.adb: Minor reformatting.
859
860 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
861
862 * gcc-interface/Makefile.in: Add rules to build aarch64-qnx runtimes.
863
864 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
865
866 * gcc-interface/trans.c (gnat_to_gnu): Add processing for
867 N_Variable_Reference_Marker nodes.
868
869 2017-11-09 Ed Schonberg <schonberg@adacore.com>
870
871 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
872 the pragma Compile_Time_Error when it appears in a generic package
873 declaration and uses an expanded name to denote the current unit.
874
875 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
876
877 * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
878 * tracebak.c: Add support for tracebacks in QNX.
879
880 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
881
882 * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
883
884 2017-11-09 Yannick Moy <moy@adacore.com>
885
886 * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
887 justification.
888
889 2017-11-09 Joel Brobecker <brobecker@adacore.com>
890
891 * doc/gnat_ugn/platform_specific_information.rst: Document packages
892 needed on GNU/Linux by GNAT.
893 * gnat_ugn.texi: Regenerate.
894
895 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
896
897 * contracts.adb (Analyze_Contracts): Remove the three parameter
898 version. This routine now only analyzes contracts and does not perform
899 any freezing actions.
900 (Analyze_Previous_Contracts): Removed.
901 (Freeze_Previous_Contracts): New routine.
902 * contracts.ads (Analyze_Previous_Contracts): Removed.
903 (Freeze_Previous_Contracts): New routine.
904 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
905 enclosing package spec regardless of whether the list denotes the
906 visible or private declarations. Fix the removal of partial state
907 refinements when the context is a package spec.
908 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
909 contracts.
910 * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
911 * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
912 (Analyze_Protected_Body): Freeze previous contracts.
913 (Analyze_Task_Body): Freeze previous contracts.
914 * sem_prag.adb: Comment reformatting.
915
916 2017-11-09 Bob Duff <duff@adacore.com>
917
918 * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
919 Export this so users can use it without importing
920 System.Tasking.Utilities.
921 * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
922 that fails when Make_Independent is called on a user task.
923 * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
924 capitalization style ((style) bad casing of "Master_of_Task").
925
926 2017-11-09 Ed Schonberg <schonberg@adacore.com>
927
928 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
929 uninitialized variable uncovered by Codepeer.
930
931 2017-11-09 Arnaud Charlet <charlet@adacore.com>
932
933 * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
934
935 2017-11-09 Javier Miranda <miranda@adacore.com>
936
937 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
938 (Static_Dispatch_Tables): Minor rewording.
939 * gnat_rm.texi: Regenerate.
940
941 2017-11-09 Justin Squirek <squirek@adacore.com>
942
943 * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
944 use_clauses within instances.
945 (Use_One_Package): Add condition to check for "hidden" open scopes to
946 avoid skipping over packages that have not been properly installed even
947 though they are visible.
948
949 2017-11-09 Ed Schonberg <schonberg@adacore.com>
950
951 * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
952 private operation of a protected type, when the type has no visible
953 operations.
954
955 2017-11-09 Javier Miranda <miranda@adacore.com>
956
957 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
958 * exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
959 if available.
960
961 2017-11-09 Bob Duff <duff@adacore.com>
962
963 * exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
964 sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
965 sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
966 variables.
967
968 2017-11-09 Yannick Moy <moy@adacore.com>
969
970 * exp_disp.adb (Make_DT): Default initialize Ifaces_List and
971 Ifaces_Comp_List.
972
973 2017-11-09 Pascal Obry <obry@adacore.com>
974
975 * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
976 only for foreign threads. We initialize the thread handle only if not
977 yet initialized. This happens in Enter_Task for foreign threads only.
978 But for native threads (Ada tasking) we do want to keep the real
979 handle (from Create_Task) to be able to free the corresponding
980 resources in Finalize_TCB (CloseHandle).
981
982 2017-11-09 Yannick Moy <moy@adacore.com>
983
984 * sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
985 P_Base_Type.
986 (Error_Attr_P): Fix name in pragma No_Return.
987 (Unexpected_Argument): Add pragma No_Return.
988 (Placement_Error): Add pragma No_Return.
989
990 2017-11-09 Javier Miranda <miranda@adacore.com>
991
992 * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
993 dispatch table is statically built.
994 (Make_DT): Declare constant the Interface_Table object associated with
995 an statically built dispatch table. For this purpose the Offset_To_Top
996 value of each interface is computed using the dummy object.
997 * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
998 the Offset_To_Top field of secondary dispatch tables when the dispatch
999 table is statically built.
1000 (Initialize_Tag): Do not generate calls to Register_Interface_Offset
1001 when the dispatch table is statically built.
1002 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1003 Document the new GNAT restriction Static_Dispatch_Tables.
1004 * gnat_rm.texi: Regenerate.
1005
1006 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1007
1008 * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
1009 to avoid a dormant bug.
1010
1011 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1012
1013 * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
1014 as such capability is not available on the OS.
1015 * link.c: Make sure linker options for QNX are correct.
1016 * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
1017 * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
1018 in particular a workaround with locks priority ceiling where a higher
1019 priority task is allowed to lock a lower ceiling priority lock. This
1020 also fixes the scheduling of FIFO tasks when the priority of a task is
1021 lowered.
1022 * libgnat/system-qnx-aarch64.ads: Fix priority ranges.
1023
1024 2017-11-09 Yannick Moy <moy@adacore.com>
1025
1026 * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
1027 message.
1028 * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
1029 condition.
1030 * namet.adb (Copy_One_Character): Add assumption for static analysis,
1031 as knowledge that Hex(2) is in the range 0..255 is too complex for
1032 CodePeer.
1033 (Finalize): Add assumption for static analysis, as the fact that there
1034 are symbols in the table depends on a global invariant at this point in
1035 the program.
1036 * set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
1037 * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
1038 true.
1039
1040 2017-11-09 Javier Miranda <miranda@adacore.com>
1041
1042 * libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
1043 * exp_disp.adb (Building_Static_DT): Check restriction.
1044 (Building_Static_Secondary_DT): Check restriction.
1045 (Make_DT): Initialize the HT_Link to No_Tag.
1046 * opt.ads (Static_Dispatch_Tables): Rename flag...
1047 (Building_Static_Dispatch_Tables): ... into this. This will avoid
1048 conflict with the restriction name.
1049 * gnat1drv.adb: Update.
1050 * exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
1051 * exp_ch3.adb (Expand_N_Object_Declaration): Update.
1052
1053 2017-11-09 Pascal Obry <obry@adacore.com>
1054
1055 * libgnarl/s-taprop__mingw.adb: Minor code clean-up. Better using a
1056 named number.
1057
1058 2017-11-09 Yannick Moy <moy@adacore.com>
1059
1060 * binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
1061 * checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
1062 use. Default initialize Hi, Lo.
1063 (Selected_Range_Checks): Retype Num_Checks more precisely.
1064 (Determine_Range, Determine_Range_R): Default initialize Hi_Right,
1065 Lo_Right.
1066 * contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
1067 Unmodified.
1068 (Process_Postconditions): Mark parameter Stmts as Unmodified.
1069 * exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
1070 * exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
1071 (Expand_Concatenate): Default initialize High_Bound.
1072 (Optimize_Length_Comparison): Default initialize Ent, Index.
1073 * exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
1074 L_Lo.
1075 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
1076 Return_Stmt.
1077 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
1078 remove pragma Warnings(Off).
1079 * exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
1080 * exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
1081 * freeze.adb (Check_Component_Storage_Order): Default initialize
1082 Comp_Byte_Aligned rather than silencing messages with pragma
1083 Warnings(Off), which does not work for CodePeer initialization
1084 messages, and given that here the possible read of an unitialized value
1085 depends on a proper use of parameters by the caller.
1086 * inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
1087 * sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
1088 * sem_ch3.adb (Build_Derived_Array_Type): Default initialize
1089 Implicit_Base.
1090 * sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
1091 pragma Warnings(Off).
1092 (Analyze_Case_Expression): Rescope checking block within branch where
1093 Others_Present is set by the call to Check_Choices.
1094 * sem_ch5.adb (Analyze_Assignment): Default initialize
1095 Save_Full_Analysis.
1096 * sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
1097 and restructure code to defend against previous errors, so that, in
1098 that case, control does not flow to the elsif condition which read an
1099 uninitialized Obj_Decl.
1100 * sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
1101 (Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
1102 which seem to be left uninitialized and possibly read in some cases.
1103 * sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
1104 precisely. This requires to exchange the test for exiting in case of
1105 too many positions and the increment to Position, inside the loop.
1106 * sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
1107 which cannot be read uninitialized, but the reasons for that are quite
1108 subtle.
1109 * sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
1110 * sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
1111 Spec_Id.
1112 * sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
1113 and test for presence of non-null Opnd_Type before testing its scope,
1114 in a test which would read its value uninitialized, and is very rarely
1115 exercized (it depends on the presence of an extension of System).
1116 * sem_spark.ads: Update comment to fix name of main analysis procedure.
1117 * sem_warn.adb (Warn_On_Known_Condition): Default initialize
1118 Test_Result.
1119 * set_targ.adb (FailN): Mark procedure with No_Return.
1120 * stylesw.adb (Save_Style_Check_Options): Delete useless code to
1121 initialize all array Options to white space, as there is already code
1122 doing the same for the remaining positions in Options at the end of the
1123 procedure.
1124
1125 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1126
1127 * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
1128 generic instantiations either.
1129
1130 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1131
1132 * sem_prag.adb (Analyze_Part_Of): Reword error message.
1133 (Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
1134 SPARK_Mode appears with an illegal mode, treat this as a non-existent
1135 mode.
1136
1137 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1138
1139 * sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
1140 a limited view of a type T declared in unit U1, when the function is
1141 declared in another unit U2 and the call appears in a procedure within
1142 another unit.
1143
1144 2017-11-09 Justin Squirek <squirek@adacore.com>
1145
1146 * sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
1147 when processing generic instances.
1148
1149 2017-11-09 Bob Duff <duff@adacore.com>
1150
1151 * namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
1152 Error_Name and No_Name. Use this (versus Name_Id) to indicate which
1153 objects can have those special values. Valid_Name_Id could usefully be
1154 used all over the compiler front end, but that's too much trouble for
1155 now. If we did that, we might want to rename:
1156 Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
1157 For parameters of type Valid_Name_Id, remove some redundant tests,
1158 including the ones found by CodePeer. Use Is_Valid_Name instead of
1159 membership test when appropriate.
1160 (Error_Name_Or_No_Name): Delete this; it's no longer needed.
1161 * sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
1162 "in Error_Name_Or_No_Name".
1163 (Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
1164 Error_Name_Or_No_Name".
1165
1166 2017-11-09 Arnaud Charlet <charlet@adacore.com>
1167
1168 * gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
1169 mode here unless -gnateC is specified.
1170 * switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
1171 -gnatC here.
1172
1173 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1174
1175 * lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
1176 part of the ALI writing; they are now processed directly from memory
1177 when requested by the backend.
1178 * lib-xref.ads (Collect_SPARK_Xrefs): Remove.
1179 (Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
1180 * lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
1181 (Add_SPARK_File): Remove.
1182 (Add_SPARK_Xref): Refactored from removed code; filters xref entries
1183 that are trivially uninteresting to the SPARK backend.
1184 * spark_xrefs.ads: Remove code that is no longer needed.
1185 * spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
1186
1187 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1188
1189 * sem_elab.adb: Update the documentation on adding a new elaboration
1190 schenario. Add new hash table Recorded_Top_Level_Scenarios.
1191 (Is_Check_Emitting_Scenario): Removed.
1192 (Is_Recorded_Top_Level_Scenario): New routine.
1193 (Kill_Elaboration_Scenario): Reimplemented.
1194 (Record_Elaboration_Scenario): Mark the scenario as recorded.
1195 (Set_Is_Recorded_Top_Level_Scenario): New routine.
1196 (Update_Elaboration_Scenario): Reimplemented.
1197 * sinfo.adb (Is_Recorded_Scenario): Removed.
1198 (Set_Is_Recorded_Scenario): Removed.
1199 * sinfo.ads: Remove attribute Is_Recorded_Scenario along with
1200 occurrences in nodes.
1201 (Is_Recorded_Scenario): Removed along with pragma Inline.
1202 (Set_Is_Recorded_Scenario): Removed along with pragma Inline.
1203
1204 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1205
1206 * sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
1207 error message.
1208
1209 2017-11-09 Justin Squirek <squirek@adacore.com>
1210
1211 * sem_res.adb (Resolve_Allocator): Add warning messages corresponding
1212 to the allocation of an anonymous access-to-controlled object.
1213
1214 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1215
1216 * sigtramp-qnx.c: Fix obvious typo.
1217
1218 2017-11-09 Doug Rupp <rupp@adacore.com>
1219
1220 * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
1221
1222 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1223
1224 * sem_res.adb (Resolve): If expression is an entity whose type has
1225 implicit dereference, generate reference to it, because no reference is
1226 generated for an overloaded entity during analysis, given that its
1227 identity may not be known.
1228
1229 2017-11-09 Javier Miranda <miranda@adacore.com>
1230
1231 * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
1232 offset-to-top field by addition.
1233 (Make_Secondary_DT): Initialize the offset-to-top field with a negative
1234 offset.
1235 * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
1236 return a negative offset-to-top value.
1237 (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
1238 Set_Static_Offset_To_Top passing a negative offet-to-top value;
1239 initialize also the offset-to-top field with a negative offset.
1240 * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
1241 an addition since the offset-to-top field is now a negative value.
1242 (Displace): Displace the pointer to the object means of a substraction
1243 since it is now a negative value.
1244 (Set_Dynamic_Offset_to_top): Displace the pointer to the object by
1245 means of a substraction since it is now a negative value.
1246
1247 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1248
1249 * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
1250 before Errout.Output_Messages also in the case of compilation errors.
1251
1252 2017-11-09 Javier Miranda <miranda@adacore.com>
1253
1254 * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
1255 the Class Level): Fix error interfacing with C strings.
1256 * gnat_ugn.texi: Regenerate.
1257
1258 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1259
1260 * system-qnx-aarch64.ads: Fix the priority constants.
1261 * s-osinte__qnx.ads: Fix constants for handling the locking protocols
1262 and scheduling.
1263 * s-osinte__qnx.adb: New file , prevents the use of priority 0 that
1264 corresponds to an idle priority on QNX.
1265
1266 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1267
1268 * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
1269 comments.
1270
1271 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1272
1273 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
1274 in expression funtions that are expanded into variables.
1275
1276 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1277
1278 * sem_util.adb: Minor whitespace cleanup.
1279
1280 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1281
1282 * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
1283 s-taprop version rather than a custom one.
1284 * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
1285
1286 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1287
1288 * lib-xref.ads, lib-xref-spark_specific.adb
1289 (Traverse_Compilation_Unit): Move declaration to package body.
1290
1291 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1292
1293 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
1294 the type of the renaming from its defining entity, rather then the
1295 subtype mark as there may not be a subtype mark.
1296
1297 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1298
1299 * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
1300 libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
1301 libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
1302 libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
1303 terminals.c: Initial port of GNAT for aarch64-qnx
1304
1305 2017-11-08 Elisa Barboni <barboni@adacore.com>
1306
1307 * exp_util.adb (Find_DIC_Type): Move...
1308 * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
1309
1310 2017-11-08 Justin Squirek <squirek@adacore.com>
1311
1312 * sem_res.adb (Resolve_Allocator): Add info messages corresponding to
1313 the owner and corresponding coextension.
1314
1315 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1316
1317 * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
1318 following separate procedures.
1319 (Resolve_Delta_Array_Aggregate): Previous code form
1320 Resolve_Delta_Aggregate.
1321 (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
1322 ARG decisions on the legality rules for delta aggregates for records:
1323 in the case of a variant record, components from different variants
1324 cannot be specified in the delta aggregate, and this must be checked
1325 statically.
1326
1327 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1328
1329 * spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
1330 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1331 removed component.
1332
1333 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1334
1335 * sem_ch4.adb: Minor typo fix.
1336
1337 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1338
1339 * spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
1340 Spec_Scope_Num components.
1341 * spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
1342 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1343 removed components.
1344 (Collect_SPARK_Xrefs): Skip setting proper values of removed
1345 components.
1346
1347 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1348
1349 * exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
1350 name is a discriminant in check for unconditional accessibility
1351 violation within instances.
1352
1353 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1354
1355 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
1356 for constants (with variable input).
1357 (Is_Constant_Object_Without_Variable_Input): Remove.
1358
1359 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1360
1361 * exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
1362
1363 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1364
1365 * spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
1366 cross-references.
1367 (dspark): Remove hardcoded table bound.
1368
1369 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1370
1371 * sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
1372 the type of the base of the construct to determine the type (or
1373 candidate interpretations) of the delta aggregate. This allows the
1374 construct to appear in a context that expects a private extension.
1375 * sem_res.adb (Resolve): Handle properly a delta aggregate with an
1376 overloaded base.
1377
1378 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1379
1380 * spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
1381 with Entity_Id of the reference.
1382 * spark_xrefs.adb (dspark): Adapt pretty-printing routine.
1383 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
1384 reference, not the file and scope indices.
1385
1386 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1387
1388 * errout.ads (Current_Node): New.
1389 * errout.adb (Error_Msg): Use Current_Node.
1390 * par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
1391 when relevant.
1392 * style.adb: Call Error_Msg_N when possible.
1393
1394 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1395
1396 * spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
1397 Entity.
1398 * lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
1399 the Scope_Id record component.
1400
1401 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1402
1403 * spark_xrefs.ads (SPARK_File_Record): Remove string components.
1404 * spark_xrefs.adb (dspark): Remove pretty-printing of removed
1405 SPARK_File_Record components.
1406 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
1407 representation of files/units.
1408
1409 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1410
1411 * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
1412 Remove Inside_Stubs parameter.
1413
1414 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1415
1416 * spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
1417 represented by Entity_Id.
1418 (SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
1419 represented by Entity_Id; this information is not repeated as
1420 Scope_Entity.
1421 (Heap): Moved from lib-xref-spark_specific.adb, to reside next to
1422 Name_Of_Heap_Variable.
1423 * spark_xrefs.adb (dspark): Adapt debug routine to above changes in
1424 data types.
1425 * lib-xref-spark_specific.adb: Adapt routines for populating SPARK
1426 scope and xrefs tables to above changes in data types.
1427
1428 2017-11-08 Justin Squirek <squirek@adacore.com>
1429
1430 * sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
1431 primitives of generic actuals.
1432 (Mark_Use_Type): Add recursive call to properly mark class-wide type's
1433 base type clauses as per ARM 8.4 (8.2/3).
1434
1435 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1436
1437 * sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
1438 categorization dependency of the body, as is done for non-generic
1439 units.
1440 (New_Overloaded_Entity, Visible_Part_Type): Remove linear search
1441 through declarations (Simple optimization, no behavior change).
1442
1443 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1444
1445 * spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
1446 (SPARK_Scope_Record): Remove inessential components.
1447 * spark_xrefs.adb (dspark): Remove pretty-printing of removed record
1448 components.
1449 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
1450 removed record components.
1451 (Add_SPARK_Xrefs): Remove setting of removed record components.
1452
1453 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1454
1455 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
1456 empty entities.
1457
1458 2017-11-08 Javier Miranda <miranda@adacore.com>
1459
1460 * sem_disp.adb (Is_Inherited_Public_Operation): Extend the
1461 functionality of this routine to handle multiple levels of derivations.
1462
1463 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1464
1465 * einfo.adb: Elist36 is now used as Nested_Scenarios.
1466 (Nested_Scenarios): New routine.
1467 (Set_Nested_Scenarios): New routine.
1468 (Write_Field36_Name): New routine.
1469 * einfo.ads: Add new attribute Nested_Scenarios along with occurrences
1470 in entities.
1471 (Nested_Scenarios): New routine along with pragma Inline.
1472 (Set_Nested_Scenarios): New routine along with pragma Inline.
1473 * sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
1474 (Process_Nested_Scenarios): New routine.
1475 (Traverse_Body): When a subprogram body is traversed for the first
1476 time, find, save, and process all suitable scenarios found within.
1477 Subsequent traversals of the same subprogram body utilize the saved
1478 scenarios.
1479
1480 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1481
1482 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
1483 protected operations.
1484 (Add_SPARK_Xrefs): Simplify detection of empty entities.
1485 * get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
1486 put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
1487 reading and testing SPARK cross-references stored in the ALI files.
1488 * lib-xref.ads (Output_SPARK_Xrefs): Remove.
1489 * lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
1490 ALI file.
1491 * spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
1492 with description of the SPARK xrefs ALI format.
1493 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
1494 and put_spark_refs.o.
1495
1496 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1497
1498 * exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
1499 when the associated access type is subject to pragma
1500 No_Heap_Finalization.
1501 * exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
1502 designated type in case it comes from a limited withed unit.
1503
1504 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1505
1506 * exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
1507 SPARK-related flags. Add ??? comment.
1508 * exp_util.adb (Insert_Actions): Add an entry for node
1509 N_Variable_Reference_Marker.
1510 * sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
1511 * sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
1512 and record a variable reference marker for the current name.
1513 (Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
1514 a variable reference marker for the current name.
1515 * sem_elab.adb (Build_Variable_Reference_Marker): New routine.
1516 (Extract_Variable_Reference_Attributes): Reimplemented.
1517 (Info_Scenario): Add output for variable references and remove output
1518 for variable reads.
1519 (Info_Variable_Read): Removed.
1520 (Info_Variable_Reference): New routine.
1521 (Is_Suitable_Scenario): Variable references are now suitable scenarios
1522 while variable reads are not.
1523 (Output_Active_Scenarios): Add output for variable references and
1524 remove output for variable reads.
1525 (Output_Variable_Read): Removed.
1526 (Output_Variable_Reference): New routine.
1527 (Process_Variable_Read): Removed.
1528 (Process_Variable_Reference): New routine.
1529 (Process_Variable_Reference_Read): New routine.
1530 * sem_elab.ads (Build_Variable_Reference_Marker): New routine.
1531 * sem_res.adb (Resolve_Actuals): Build and record a variable reference
1532 marker for the current actual.
1533 * sem_spark.adb (Check_Node): Add an entry for node
1534 N_Variable_Reference_Marker.
1535 * sem_util.adb (Within_Subprogram_Call): Moved to the library level.
1536 * sem_util.ads (Within_Subprogram_Call): Moved to the library level.
1537 * sinfo.adb (Is_Read): New routine.
1538 (Is_Write): New routine.
1539 (Target): Updated to handle variable reference markers.
1540 (Set_Is_Read): New routine.
1541 (Set_Is_Write): New routine.
1542 (Set_Target): Updated to handle variable reference markers.
1543 * sinfo.ads: Add new attributes Is_Read and Is_Write along with
1544 occurrences in nodes. Update attribute Target. Add new node
1545 kind N_Variable_Reference_Marker.
1546 (Is_Read): New routine along with pragma Inline.
1547 (Is_Write): New routine along with pragma Inline.
1548 (Set_Is_Read): New routine along with pragma Inline.
1549 (Set_Is_Write): New routine along with pragma Inline.
1550 * sprint.adb (Sprint_Node_Actual): Add an entry for node
1551 N_Variable_Reference_Marker.
1552
1553 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1554
1555 * sem_util.adb (Subprogram_Name): Append suffix for overloaded
1556 subprograms.
1557
1558 2017-11-08 Yannick Moy <moy@adacore.com>
1559
1560 * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
1561 about unused use-type or use-package clauses inside inlined bodies.
1562
1563 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1564
1565 * sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
1566 In_Partial_Fin along with a comment on its usage. Do not guarantee the
1567 prior elaboration of a unit when the need came from a partial
1568 finalization context.
1569 (In_Initialization_Context): Relocated to Process_Call.
1570 (Is_Partial_Finalization_Proc): New routine.
1571 (Process_Access): Add new parameter In_Partial_Fin along with a comment
1572 on its usage.
1573 (Process_Activation_Call): Add new parameter In_Partial_Fin along with
1574 a comment on its usage.
1575 (Process_Activation_Conditional_ABE_Impl): Add new parameter
1576 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1577 diagnostics when the activation occurs in a partial finalization
1578 context.
1579 (Process_Activation_Guaranteed_ABE_Impl): Add new parameter
1580 In_Partial_Fin along with a comment on its usage.
1581 (Process_Call): Add new parameter In_Partial_Fin along with a comment
1582 on its usage. A call is within a partial finalization context when it
1583 targets a finalizer or primitive [Deep_]Finalize, and the call appears
1584 in initialization actions. Pass this information down to the recursive
1585 steps of the Processing phase.
1586 (Process_Call_Ada): Add new parameter In_Partial_Fin along with a
1587 comment on its usage. Remove the guard which suppresses the generation
1588 of implicit Elaborate[_All] pragmas. This is now done in
1589 Ensure_Prior_Elaboration.
1590 (Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
1591 with a comment on its usage. Do not emit any ABE diagnostics when the
1592 call occurs in a partial finalization context.
1593 (Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
1594 comment on its usage.
1595 (Process_Instantiation): Add new parameter In_Partial_Fin along with a
1596 comment on its usage.
1597 (Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
1598 with a comment on its usage.
1599 (Process_Instantiation_Conditional_ABE): Add new parameter
1600 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1601 diagnostics when the instantiation occurs in a partial finalization
1602 context.
1603 (Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
1604 with a comment on its usage.
1605 (Process_Scenario): Add new parameter In_Partial_Fin along with a
1606 comment on its usage.
1607 (Process_Single_Activation): Add new parameter In_Partial_Fin along
1608 with a comment on its usage.
1609 (Traverse_Body): Add new parameter In_Partial_Fin along with a comment
1610 on its usage.
1611
1612 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1613
1614 * sem_ch13.adb: Add optional parameter to Error_Msg.
1615
1616 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1617
1618 * fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
1619 for the Interfaces.* hierarchy as longer unit names are now allowed.
1620
1621 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1622
1623 * sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
1624 subprogram as well. Support more cases of entities.
1625 (Append_Entity_Name): Add some defensive code.
1626
1627 2017-11-06 Eric Botcazou <ebotcazou@adacore.com>
1628
1629 * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
1630
1631 2017-10-31 Eric Botcazou <ebotcazou@adacore.com>
1632
1633 PR ada/82785
1634 * gcc-interface/Makefile.in (m68k/Linux): Fix typo.
1635
1636 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1637
1638 * gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
1639
1640 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1641
1642 * gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
1643 (convert): Do not use an unchecked conversion for converting from a
1644 type to another type padding it.
1645
1646 2017-10-20 Doug Rupp <rupp@adacore.com>
1647
1648 * libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
1649 needed for using monotonic clock.
1650 * libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
1651 changes.
1652 * libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
1653 out monotonic clock related functions body.
1654 (Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
1655 Compute_Deadline): Move to...
1656 * libgnarl/s-tpopmo.adb: ... here. New separate package body.
1657
1658 2017-10-20 Ed Schonberg <schonberg@adacore.com>
1659
1660 * sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
1661 case where the controlling formal is an anonymous access to interface
1662 type.
1663 * exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
1664 access type, handle properly the the constructed dereference that
1665 designates the object used in the rewritten synchronized call.
1666 (Parameter_Block_Pack): If the type of the actual is by-copy, its
1667 generated declaration in the parameter block does not need an
1668 initialization even if the type is a null-excluding access type,
1669 because it will be initialized with the value of the actual later on.
1670 (Parameter_Block_Pack): Do not add controlling actual to parameter
1671 block when its type is by-copy.
1672
1673 2017-10-20 Justin Squirek <squirek@adacore.com>
1674
1675 * sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
1676 scope stack traversal into the context clause.
1677
1678 2017-10-20 Bob Duff <duff@adacore.com>
1679
1680 * sinfo.ads: Fix a comment typo.
1681
1682 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1683
1684 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
1685 warning against usage in conjunction with -gnatn.
1686 (-fdump-xref): Delete entry.
1687 * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
1688 -fdump-xref switch.
1689 * gnat_ugn.texi: Regenerate.
1690
1691 2017-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1692
1693 * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
1694 Minor reformatting.
1695
1696 2017-10-20 Yannick Moy <moy@adacore.com>
1697
1698 * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
1699 compare a dimensioned expression with a literal.
1700 (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
1701 special value zero.
1702 * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
1703 dimensionality system in GNAT.
1704 * gnat_ugn.texi: Regenerate.
1705
1706 2017-10-20 Yannick Moy <moy@adacore.com>
1707
1708 * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
1709 inadequate silencing of errors.
1710 * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
1711 checking the subprogram body generated from an expression function,
1712 when this is done as part of the preanalysis done on expression
1713 functions, as the subprogram body may not yet be attached in the AST.
1714 The error if any will be issued later during the analysis of the body.
1715 (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
1716
1717 2017-10-20 Arnaud Charlet <charlet@adacore.com>
1718
1719 * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
1720 warning on ineffective use clause.
1721
1722 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1723
1724 * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
1725 * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
1726 to issue the warning on the absence of local raise.
1727 (Possible_Local_Raise): Do not issue the warning for Call_Markers.
1728 (Warn_If_No_Local_Raise): New procedure to issue the warning on the
1729 absence of local raise.
1730 * sem_elab.adb: Add with and use clauses for Exp_Ch11.
1731 (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
1732 where a scenario could give rise to raising Program_Error.
1733 * sem_elab.adb: Typo fixes.
1734 * fe.h (Warn_If_No_Local_Raise): Declare.
1735 * gcc-interface/gigi.h (get_exception_label): Change return type.
1736 * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
1737 simple vector of Entity_Id.
1738 (gnu_storage_error_label_stack): Likewise.
1739 (gnu_program_error_label_stack): Likewise.
1740 (gigi): Adjust to above changes.
1741 (Raise_Error_to_gnu): Likewise.
1742 (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
1743 (N_Push_Constraint_Error_Label): Push the label onto the stack.
1744 (N_Push_Storage_Error_Label): Likewise.
1745 (N_Push_Program_Error_Label): Likewise.
1746 (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
1747 a warning on the absence of local raise.
1748 (N_Pop_Storage_Error_Label): Likewise.
1749 (N_Pop_Program_Error_Label): Likewise.
1750 (push_exception_label_stack): Delete.
1751 (get_exception_label): Change return type to Entity_Id and adjust.
1752 * gcc-interface/utils2.c (build_goto_raise): Change type of first
1753 parameter to Entity_Id and adjust. Set TREE_USED on the label.
1754 (build_call_raise): Adjust calls to get_exception_label and also
1755 build_goto_raise.
1756 (build_call_raise_column): Likewise.
1757 (build_call_raise_range): Likewise.
1758 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
1759 Document actual default behavior.
1760
1761 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1762
1763 * einfo.ads: Minor consistent punctuation in comment. All numbered
1764 items in the comment of Is_Internal are now terminated with a period.
1765
1766 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1767
1768 * exp_util.adb (Build_Temporary): Mark created temporary entity as
1769 internal.
1770
1771 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1772
1773 * sem_type.adb (In_Generic_Actual): Simplified.
1774
1775 2017-10-20 Justin Squirek <squirek@adacore.com>
1776
1777 * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
1778 verify a renaming exists for a generic formal before comparing it to
1779 the actual as defaulted formals will not have a renamed_object.
1780
1781 2017-10-20 Javier Miranda <miranda@adacore.com>
1782
1783 * exp_ch6.adb (Replace_Returns): Fix wrong management of
1784 N_Block_Statement nodes.
1785
1786 2017-10-20 Bob Duff <duff@adacore.com>
1787
1788 * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
1789 component of an array aggregate if it is initialized by a
1790 build-in-place function call.
1791 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
1792 bip for nonlimited types.
1793 * debug.adb: Document -gnatd.9.
1794
1795 2017-10-20 Bob Duff <duff@adacore.com>
1796
1797 * sem_ch12.adb: Remove redundant setting of Parent.
1798
1799 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1800
1801 * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
1802 of the operands is a string literal.
1803
1804 2017-10-20 Bob Duff <duff@adacore.com>
1805
1806 * einfo.ads: Comment fix.
1807
1808 2017-10-20 Clement Fumex <fumex@adacore.com>
1809
1810 * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
1811
1812 2017-10-20 Ed Schonberg <schonberg@adacore.com>
1813
1814 * sem_dim.adb (Extract_Power): Accept dimension values that are not
1815 non-negative integers when the dimensioned base type is an Integer
1816 type.
1817
1818 2017-10-20 Bob Duff <duff@adacore.com>
1819
1820 * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
1821 that an allocator came from a b-i-p return statement.
1822 * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
1823 object of a nonlimited build-in-place function call.
1824 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
1825 Alloc_For_BIP_Return flag on generated allocators.
1826 * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
1827 If the N_Assignment_Statement has been transformed into something else,
1828 then Should_Transform_BIP_Assignment won't work.
1829 * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
1830 "Remove Adjust if we're building the return object of an extended
1831 return statement in place." Back out that part of the change, because
1832 the Alloc_For_BIP_Return flag is now used for that.
1833
1834 2017-10-19 Bob Duff <duff@adacore.com>
1835
1836 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
1837 should be "T". Handle case of a subtype of a class-wide type.
1838
1839 2017-10-19 Bob Duff <duff@adacore.com>
1840
1841 * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
1842 which node kinds can legitimately be ignored, and raise Program_Error
1843 for others.
1844
1845 2017-10-19 Hristian Kirtchev <kirtchev@adacore.com>
1846
1847 * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
1848 instantiation that acts as a compilation unit.
1849 (Find_Code_Unit): Reimplemented.
1850 (Find_Top_Unit): Reimplemented.
1851 (Find_Unit_Entity): New routine.
1852 (Process_Instantiation_SPARK): Correct the elaboration requirement a
1853 package instantiation imposes on a unit.
1854
1855 2017-10-19 Bob Duff <duff@adacore.com>
1856
1857 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
1858 for a narrow set of controlled types.
1859
1860 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1861
1862 * sinput.ads (Line_Start): Add pragma Inline.
1863 * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
1864
1865 2017-10-19 Bob Duff <duff@adacore.com>
1866
1867 * exp_attr.adb (Expand_N_Attribute_Reference): Disable
1868 Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
1869 build-in-place function call so that the temp is declared in the right
1870 place.
1871
1872 2017-10-18 Eric Botcazou <ebotcazou@adacore.com>
1873
1874 * gcc-interface/misc.c (gnat_tree_size): Move around.
1875
1876 * gcc-interface/utils.c (max_size): Deal with SSA names.
1877
1878 2017-10-17 Jakub Jelinek <jakub@redhat.com>
1879
1880 * gcc-interface/misc.c (gnat_tree_size): New function.
1881 (LANG_HOOKS_TREE_SIZE): Redefine.
1882
1883 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1884
1885 * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
1886 Remote_Call_Interface is not a suitable preelaboratd context when the
1887 call appears in the package body.
1888
1889 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
1890
1891 * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
1892 * layout.adb (Set_Elem_Alignment): Likewise. Use M name as maximum
1893 alignment for consistency. If Align is non-zero, use the minimum of
1894 Align and M for the alignment.
1895 * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
1896 setting the alignment directly.
1897
1898 2017-10-14 Ed Schonberg <schonberg@adacore.com>
1899
1900 * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
1901 optional string in an Assert pragma until the expansion of the pragma
1902 has rewritten it as a conditional statement, so that the string
1903 argument is only evaluaed if the assertion fails. This is mandated by
1904 RM 11.4.2.
1905
1906 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1907
1908 * debug.adb: Switch -gnatd.v and associated flag are now used to
1909 enforce the SPARK rules for elaboration in SPARK code.
1910 * sem_elab.adb: Describe switch -gnatd.v.
1911 (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
1912 (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
1913 in effect.
1914 (Process_Variable_Assignment): Clarify why variable assignments are
1915 processed reglardless of whether -gnatd.v is in effect.
1916 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
1917 sections on elaboration code and compilation switches.
1918 * gnat_ugn.texi: Regenerate.
1919
1920 2017-10-14 Gary Dismukes <dismukes@adacore.com>
1921
1922 * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
1923 sem_warn.adb: Minor reformattings.
1924
1925 2017-10-14 Ed Schonberg <schonberg@adacore.com>
1926
1927 * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
1928 for reverse iteration over formal containers.
1929 * gnat_rm.texi: Regenerate.
1930
1931 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1932
1933 * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
1934 Ensure_Prior_Elaboration_Dynamic for consistency reasons.
1935 (Ensure_Static_Prior_Elaboration): Renamed to
1936 Ensure_Prior_Elaboration_Static for consistency reasons.
1937 (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
1938 reflect its new purpose.
1939 (Is_Initialized): New routine.
1940 (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
1941 in order to reflect its new purpose.
1942 (Is_Variable_Read): New routine.
1943 (Output_Variable_Reference): Renamed to Output_Variable_Read in order
1944 to reflect its new purpose.
1945 (Process_Variable_Assignment): This routine now acts as a top level
1946 dispatcher for variable assignments.
1947 (Process_Variable_Assignment_Ada): New routine.
1948 (Process_Variable_Assignment_SPARK): New routine.
1949 (Process_Variable_Reference): Renamed to Process_Variable_Read in order
1950 to reflects its new purpose. A reference to a variable is now suitable
1951 for ABE processing only when it is a read. The logic in the routine now
1952 reflects the latest SPARK elaboration rules.
1953
1954 2017-10-14 Justin Squirek <squirek@adacore.com>
1955
1956 * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
1957 triggers marking on formal subprograms.
1958
1959 2017-10-14 Javier Miranda <miranda@adacore.com>
1960
1961 * checks.adb (Ensure_Valid): Do not skip adding the validity check on
1962 renamings of objects that come from the sources.
1963
1964 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
1965
1966 * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
1967 parameter and set the alignment of the type to Align.
1968 (Copy_Float_Type): Adjust call to Build_Float_Type.
1969 (Register_Float_Type): Add pragma Unreferenced for Precision. Adjust
1970 call to Build_Float_Type and do not set RM_Size and Alignment.
1971
1972 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
1973
1974 * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
1975 GNATRTL_NONTASKING_OBJ.
1976
1977 2017-10-14 Bob Duff <duff@adacore.com>
1978
1979 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
1980 enabling b-i-p for nonlimited controlled types (but disabled).
1981
1982 2017-10-14 Justin Squirek <squirek@adacore.com>
1983
1984 * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
1985 Has_Warnings_Off with Warnings_Off.
1986
1987 2017-10-14 Piotr Trojanek <trojanek@adacore.com>
1988
1989 * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
1990
1991 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1992
1993 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
1994 enclosing package at the end of the visible declarations.
1995 * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
1996 an initialization item which is undefined due to some illegality.
1997
1998 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
1999
2000 * ali.adb: Add new ALI line 'T' to read the number of tasks contain
2001 within each unit that require a default-sized primary and secondary
2002 stack to be generated by the binder.
2003 (Scan_ALI): Scan new 'T' lines.
2004 * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
2005 * bindgen.adb (Gen_Output_File): Count the number of default-sized
2006 stacks within the closure that are to be created by the binder.
2007 (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
2008 stacks and record these in System.Secodnary_Stack.
2009 (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
2010 closure of the program being bound.
2011 * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
2012 * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
2013 (Expand_N_Object_Declaration): Count the number of default-sized stacks
2014 used by task objects contained within the object whose declaration is
2015 being expanded. Only performed when either the restrictions
2016 No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
2017 effect.
2018 * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
2019 (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
2020 the expansion of a task type if the size of the stack is known at
2021 run-time and the restrictions No_Implicit_Heap_Allocations or
2022 No_Implicit_Task_Allocations are in effect.
2023 (Make_Task_Create_Call): If using a restricted profile provide
2024 secondary stack parameter: either the statically created stack or null.
2025 * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
2026 Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
2027 Unit_Record initialization expressions.
2028 * lib-writ.adb (Add_Preprocessing_Dependency,
2029 Ensure_System_Dependency): Include Primary_Stack_Count and
2030 Sec_Stack_Count in Unit_Record initialization expression.
2031 (Write_ALI): Write T lines.
2032 (Write_Unit_Information): Do not output 'T' lines if there are no
2033 stacks for the binder to generate.
2034 * lib-writ.ads: Updated library information documentation to include
2035 new T line entry.
2036 * lib.adb (Increment_Primary_Stack_Count): New routine.
2037 (Increment_Sec_Stack_Count): New routine.
2038 (Primary_Stack_Count): New routine.
2039 (Sec_Stack_Count): New routine.
2040 * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
2041 Unit_Record and updated documentation.
2042 (Increment_Primary_Stack_Count): New routine along with pragma Inline.
2043 (Increment_Sec_Stack_Count): New routine along with pragma Inline.
2044 (Primary_Stack_Count): New routine along with pragma Inline.
2045 (Sec_Stack_Count): New routine along with pragma Inline.
2046 * opt.ads: New constant No_Stack_Size. Flag Default_Stack_Size
2047 redefined. New flag Default_Sec_Stack_Size and
2048 Quantity_Of_Default_Size_Sec_Stacks.
2049 * rtfinal.c Fixed erroneous comment.
2050 * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
2051 System.Secondary_Stack to System.Parameters. Add RE_SS_Stack.
2052 * sem_util.adb (Number_Of_Elements_In_Array): New routine.
2053 * sem_util.ads (Number_Of_Elements_In_Array): New routine.
2054 * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
2055 * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
2056 (Set_Sec_Stack_Addr): Removed routine.
2057 (Get_Sec_Stack): New routine.
2058 (Set_Sec_Stack): New routine.
2059 (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
2060 reflect new procedure and global names.
2061 * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
2062 libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
2063 libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
2064 parameter profile to allow the secondary stack size to be specified.
2065 * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
2066 profile to include Sec_Stack_Address. Update Tasking.Initialize_ATCB
2067 call to remove Secondary_Stack_Size reference. Add secondary stack
2068 address and size to SSL.Create_TSD call.
2069 (Task_Wrapper): Remove secondary stack creation.
2070 * libgnarl/s-tarest.ads (Create_Restricted_Task,
2071 Create_Restricted_Task_Sequential): Update parameter profile to include
2072 Sec_Stack_Address and clarify the Size parameter.
2073 * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
2074 from profile and body.
2075 (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
2076 * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
2077 Common_ATCB.
2078 (Initialize_ATCB): Update the parameter profile to remove
2079 Secondary_Stack_Size.
2080 * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
2081 call to Initialize_ATCB. Add secondary stack address and size to
2082 SSL.Create_TSD call, and catch any storage exception from the call.
2083 (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
2084 new subprogram and component names.
2085 (Task_Wrapper): Remove secondary stack creation.
2086 (Vulnerable_Complete_Master): Update to reflect TSD changes.
2087 * libgnarl/s-tassta.ads: Reformat comments.
2088 (Create_Task): Update parameter profile.
2089 * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
2090 profile to include secondary stack size. Remove secondary size
2091 parameter from Initialize_ATCB call and add it to Create_TSD call.
2092 * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
2093 libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
2094 * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
2095 libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
2096 Percentage. Remove constants Dynamic, Sec_Stack_Percentage and
2097 Sec_Stack_Dynamic. Add constant Runtime_Default_Sec_Stack_Size and
2098 Sec_Stack_Dynamic.
2099 (Default_Sec_Stack_Size): New routine.
2100 * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
2101 now Preelaborate.
2102 * libgnat/s-soflin.adb: Removed unused with-clauses. With
2103 System.Soft_Links.Initialize to initialize non-tasking TSD.
2104 (Create_TSD): Update parameter profile. Initialize the TSD and
2105 unconditionally call SS_Init.
2106 (Destroy_TSD): Update SST.SS_Free call.
2107 (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
2108 Set_Sec_Stack_Addr_Soft): Remove routines.
2109 (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
2110 Set_Sec_Stack_Soft): Add routines.
2111 (NT_TSD): Move to private part of package specification.
2112 * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
2113 with suppressed access checks. Renamed *_Sec_Stack_Addr_* routines and
2114 objects to *_Sec_Stack_*. TSD: removed warning suppression and
2115 component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
2116 (Create_TSD): Update parameter profile.
2117 (NT_TSD): Move to private section from body.
2118 * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
2119 * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
2120 * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
2121 Remove routine.
2122 (Get_Sec_Stack, Set_Sec_Stack): Add routine.
2123 (Thread_Body_Enter): Update parameter profile and body to adapt to new
2124 System.Secondary_Stack.
2125 (Init_RTS): Update body for new System.Soft_Links names.
2126 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
2127 s-soliin.o.
2128
2129 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2130
2131 * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
2132 operating on trees as wide_ints.
2133
2134 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2135
2136 * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
2137 as a scoping construct when it is byproduct of exception handling.
2138
2139 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2140
2141 * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
2142 semantic field Target of node N_Call_Marker.
2143
2144 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2145
2146 * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
2147 attempts to copy a limited value, when the allocator is the expression
2148 in an expression function.
2149
2150 2017-10-09 Joel Brobecker <brobecker@adacore.com>
2151
2152 * doc/share/conf.py: Tell the style checker that this is a Python
2153 fragment, and therefore that pyflakes should not be run to validate
2154 this file.
2155
2156 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
2157
2158 * einfo.ads (Is_Boolean_Type): Add pragma Inline.
2159 (Is_Entity_Name): Likewise.
2160 (Is_String_Type): Likewise.
2161 * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
2162 and remove useless comparisons on the base types.
2163 (Covers): Use simple tests for Standard_Void_Type. Move up cheap tests
2164 on T2. Always test Is_Private_Type before Full_View_Covers.
2165
2166 2017-10-09 Bob Duff <duff@adacore.com>
2167
2168 * exp_ch4.adb: Minor refactoring.
2169
2170 2017-10-09 Javier Miranda <miranda@adacore.com>
2171
2172 * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
2173 not components.
2174
2175 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2176
2177 * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
2178 are verified only in the static model.
2179
2180 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2181
2182 * sem_ch5.adb (Analyze_Iterator_Specification,
2183 Check_Reverse_Iteration): Check that the domain of iteration supports
2184 reverse iteration when it is a formal container. This requires the
2185 presence of a Previous primitive in the Iterable aspect.
2186 * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
2187 primitives Last and Previous to support reverse iteration over formal
2188 containers.
2189 (Validate_Iterable_Aspect): Add check for reverse iteration operations.
2190 * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
2191 for reverse iteration using primitives Last and Previous in generated
2192 loop.
2193
2194 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2195
2196 * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
2197 of the Defining_Program_Unit_Name, which is an identifier, in order to
2198 construct the string for the fully qualified name.
2199
2200 2017-10-09 Justin Squirek <squirek@adacore.com>
2201
2202 * sem_ch3.adb: Rename Uses_Unseen_Priv into
2203 Contains_Lib_Incomplete_Type.
2204
2205 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2206
2207 * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
2208 sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
2209 exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
2210 prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
2211 sem_ch10.adb, par-ch8.adb: Minor reformatting.
2212
2213 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2214
2215 * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
2216 in the static model.
2217 (Is_Suitable_Variable_Assignment): This scenario is now only relevant
2218 in the static model.
2219 (Is_Suitable_Variable_Reference): This scenario is now only relevant in
2220 the static model.
2221
2222 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2223
2224 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
2225 expressions when the enclosing scope is a subprogram body and the next
2226 declaration is a body that freezes entities previously declared in the
2227 scope.
2228
2229 2017-10-09 Justin Squirek <squirek@adacore.com>
2230
2231 * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
2232 ghost packages and living packages in use clauses.
2233 (Use_One_Type, Note_Redundant_Use): Correct warning messages
2234
2235 2017-10-09 Justin Squirek <squirek@adacore.com>
2236
2237 * osint.ads: Document new parameter FD for Read_Source_File.
2238
2239 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2240
2241 * exp_util.adb (Make_Predicate_Call): If the type of the expression to
2242 which the predicate check applies is tagged, convert the expression to
2243 that type. This is in most cases a no-op, but is relevant if the
2244 expression is clas-swide, because the predicate function being invoked
2245 is not a primitive of the type and cannot take a class-wide actual.
2246
2247 2017-10-09 Gary Dismukes <dismukes@adacore.com>
2248
2249 * exp_disp.adb: Minor reformatting.
2250
2251 2017-10-09 Arnaud Charlet <charlet@adacore.com>
2252
2253 * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
2254
2255 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2256
2257 * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
2258 GNATprove.
2259 (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
2260
2261 2017-10-09 Bob Duff <duff@adacore.com>
2262
2263 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
2264 immediately if the call has already been processed (by a previous call
2265 to Make_Build_In_Place_Call_In_Anonymous_Context).
2266 * sem_elab.adb: Minor typo fixes.
2267
2268 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2269
2270 * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
2271 predicate, do not replace an identifier that matches the type if the
2272 identifier is a selector in a selected component, because this
2273 indicates a reference to some homograph of the type itself, and not to
2274 the current occurence in the predicate.
2275
2276 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
2277
2278 * repinfo.adb (List_Record_Layout): Tweak formatting.
2279 (Write_Val): Remove superfluous spaces in back-end layout mode.
2280
2281 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2282
2283 * sem_res.adb (Property_Error): Remove.
2284 (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
2285 current wording of the rule.
2286
2287 2017-10-09 Justin Squirek <squirek@adacore.com>
2288
2289 * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
2290 before analyzing a given scope due to an expression function.
2291 (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
2292
2293 2017-10-09 Bob Duff <duff@adacore.com>
2294
2295 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
2296 Defining_Identifier (Obj_Decl) in two places, because it might have
2297 changed.
2298 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
2299 involving 'Input on (not visibly) derived types.
2300
2301 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2302
2303 * atree.adb: Add new soft link Rewriting_Proc.
2304 (Rewrite): Invoke the subprogram attached to the rewriting soft link.
2305 (Set_Rewriting_Proc): New routine.
2306 * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
2307 (Set_Rewriting_Proc): New routine.
2308 * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
2309 for *E*laboration flag to maintain consistency with other elaboration
2310 flag generating subprograms.
2311 * debug.adb: Document the new usage of flag -gnatdL.
2312 * einfo.adb: Node19 is now used as Receiving_Entry. Node39 is now used
2313 as Protected_Subprogram. Flag148 is now used as
2314 Is_Elaboration_Checks_OK_Id. Flag302 is now used as
2315 Is_Initial_Condition_Procedure.
2316 (Is_Elaboration_Checks_OK_Id): New routine.
2317 (Is_Initial_Condition_Procedure): New routine.
2318 (Protected_Subprogram): New routine.
2319 (Receiving_Entry): New routine.
2320 (SPARK_Pragma): Update assertion.
2321 (SPARK_Pragma_Inherited): Update assertion.
2322 (Suppress_Elaboration_Warnings): Removed.
2323 (Set_Is_Elaboration_Checks_OK_Id): New routine.
2324 (Set_Is_Initial_Condition_Procedure): New routine.
2325 (Set_Protected_Subprogram): New routine.
2326 (Set_Receiving_Entry): New routine.
2327 (Set_SPARK_Pragma): Update assertion.
2328 (Set_SPARK_Pragma_Inherited): Update assertion.
2329 (Write_Entity_Flags): Update the output for Flag148 and Flag302.
2330 (Write_Field19_Name): Add output for Receiving_Entry.
2331 (Write_Field39_Name): Add output for Protected_Subprogram.
2332 (Write_Field40_Name): Update the output for SPARK_Pragma.
2333 * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
2334 Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
2335 Remove attribute Suppress_Elaboration_Warnings. Update the stricture
2336 of various entities.
2337 (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
2338 (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
2339 (Protected_Subprogram): New routine along with pragma Inline.
2340 (Receiving_Entry): New routine along with pragma Inline.
2341 (Suppress_Elaboration_Warnings): Removed.
2342 (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
2343 Inline.
2344 (Set_Is_Initial_Condition_Procedure): New routine along with pragma
2345 Inline.
2346 (Set_Protected_Subprogram): New routine along with pragma Inline.
2347 (Set_Receiving_Entry): New routine along with pragma Inline.
2348 (Set_Suppress_Elaboration_Warnings): Removed.
2349 * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
2350 consistency with other finalizer generating subprograms.
2351 (Default_Initialize_Object): Mark the block which wraps the call to
2352 finalize as being part of initialization.
2353 * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
2354 Initial_Condition.
2355 (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
2356 (Next_Suitable_Statement): Update the comment on usage. Skip over call
2357 markers generated by the ABE mechanism.
2358 * exp_ch9.adb (Activation_Call_Loc): New routine.
2359 (Add_Accept): Link the accept procedure to the original entry.
2360 (Build_Protected_Sub_Specification): Link the protected or unprotected
2361 version to the original subprogram.
2362 (Build_Task_Activation_Call): Code cleanup. Use a source location which
2363 is very close to the "begin" or "end" keywords when generating the
2364 activation call.
2365 * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
2366 * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
2367 process loops.
2368 (Expand_SPARK_N_Loop_Statement): New routine.
2369 (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
2370 call to the Default_Initial_Condition procedure.
2371 (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
2372 * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
2373 effect.
2374 (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
2375 (Insert_Actions): Add processing for N_Call_Marker.
2376 (Kill_Dead_Code): Explicitly kill an elaboration scenario.
2377 * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
2378 * frontend.adb: Initialize Sem_Elab. Process all saved top level
2379 elaboration scenarios for ABE issues.
2380 * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
2381 nodes.
2382 * lib.adb (Earlier_In_Extended_Unit): New variant.
2383 * sem.adb (Analyze): Ignore N_Call_Marker nodes.
2384 (Preanalysis_Active): New routine.
2385 * sem.ads (Preanalysis_Active): New routine.
2386 * sem_attr.adb (Analyze_Access_Attribute): Save certain
2387 elaboration-related attributes. Save the scenario for ABE processing.
2388 * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
2389 effect. Save certain elaboration-related attributes.
2390 * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
2391 attributes. Save the scenario for ABE processing.
2392 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
2393 mode in effect. Save certain elaboration-related attributes.
2394 (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
2395 locating the first real statement.
2396 (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
2397 certain elaboration-related attributes.
2398 * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
2399 elaboration warnings.
2400 * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
2401 generated for purposes of wrapping an attribute used as a generic
2402 actual.
2403 (Find_Direct_Name): Save certain elaboration-related attributes. Save
2404 the scenario for ABE processing.
2405 (Find_Expanded_Name): Save certain elaboration-related attributes. Save
2406 the scenario for ABE processing.
2407 * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
2408 elaboration-related attributes.
2409 (Analyze_Requeue): Save certain elaboration-related attributes. Save
2410 the scenario for ABE processing.
2411 (Analyze_Single_Task_Declaration): Save certain elaboration-related
2412 attributes.
2413 (Analyze_Task_Type_Declaration): Save certain elaboration-related
2414 attributes.
2415 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
2416 elaboration-related attributes.
2417 (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
2418 effect. Save certain elaboration-related attributes.
2419 (Analyze_Package_Instantiation): Save certain elaboration-related
2420 attributes. Save the scenario for ABE processing. Create completing
2421 bodies in case the instantiation results in a guaranteed ABE.
2422 (Analyze_Subprogram_Instantiation): Save certain elaboration-related
2423 attributes Save the scenario for ABE processing. Create a completing
2424 body in case the instantiation results in a guaranteed ABE.
2425 (Provide_Completing_Bodies): New routine.
2426 * sem_elab.ads: Brand new implementation.
2427 * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
2428 Elaborate_Body): Do not suppress elaboration warnings.
2429 * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
2430 operator.
2431 (Resolve_Call): Save certain elaboration-related attributes. Save the
2432 scenario for ABE processing.
2433 (Resolve_Entity_Name): Do not perform any ABE processing here.
2434 (Resolve_Entry_Call): Inherit certain attributes from the original call.
2435 * sem_util.adb (Begin_Keyword_Location): New routine.
2436 (Defining_Entity): Update the parameter profile. Add processing for
2437 concurrent subunits that are rewritten as null statements.
2438 (End_Keyword_Location): New routine.
2439 (Find_Enclosing_Scope): New routine.
2440 (In_Instance_Visible_Part): Code cleanup.
2441 (In_Subtree): Update the parameter profile. Add new version.
2442 (Is_Preelaborable_Aggregate): New routine.
2443 (Is_Preelaborable_Construct): New routine.
2444 (Mark_Elaboration_Attributes): New routine.
2445 (Scope_Within): Update the parameter profile.
2446 (Scope_Within_Or_Same): Update the parameter profile.
2447 * sem_util.ads (Begin_Keyword_Location): New routine.
2448 (Defining_Entity): Update the parameter profile and the comment on
2449 usage.
2450 (End_Keyword_Location): New routine.
2451 (Find_Enclosing_Scope): New routine.
2452 (In_Instance_Visible_Part): Update the parameter profile.
2453 (In_Subtree): Update the parameter profile. Add new version.
2454 (Is_Preelaborable_Aggregate): New routine.
2455 (Is_Preelaborable_Construct): New routine.
2456 (Mark_Elaboration_Attributes): New routine.
2457 (Scope_Within): Update the parameter profile and the comment on usage.
2458 (Scope_Within_Or_Same): Update the parameter profile and the comment on
2459 usage.
2460 * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
2461 to determine whether a loop has meaningful condition actions.
2462 (Has_Condition_Actions): New routine.
2463 * sinfo.adb (ABE_Is_Certain): Removed.
2464 (Is_Declaration_Level_Node): New routine.
2465 (Is_Dispatching_Call): New routine.
2466 (Is_Elaboration_Checks_OK_Node): New routine.
2467 (Is_Initialization_Block): New routine.
2468 (Is_Known_Guaranteed_ABE): New routine.
2469 (Is_Recorded_Scenario): New routine.
2470 (Is_Source_Call): New routine.
2471 (Is_SPARK_Mode_On_Node): New routine.
2472 (No_Elaboration_Check): Removed.
2473 (Target): New routine.
2474 (Was_Attribute_Reference): New routine.
2475 (Set_ABE_Is_Certain): Removed.
2476 (Set_Is_Declaration_Level_Node): New routine.
2477 (Set_Is_Dispatching_Call): New routine.
2478 (Set_Is_Elaboration_Checks_OK_Node): New routine.
2479 (Set_Is_Initialization_Block): New routine.
2480 (Set_Is_Known_Guaranteed_ABE): New routine.
2481 (Set_Is_Recorded_Scenario): New routine.
2482 (Set_Is_Source_Call): New routine.
2483 (Set_Is_SPARK_Mode_On_Node): New routine.
2484 (Set_No_Elaboration_Check): Removed.
2485 (Set_Target): New routine.
2486 (Set_Was_Attribute_Reference): New routine.
2487 * sinfo.ads: Remove attribute ABE_Is_Certain. Attribute
2488 Do_Discriminant_Check now utilizes Flag3. Attribute
2489 No_Side_Effect_Removal now utilizes Flag17. Add new node
2490 N_Call_Marker. Update the structure of various nodes.
2491 (ABE_Is_Certain): Removed along with pragma Inline.
2492 (Is_Declaration_Level_Node): New routine along with pragma Inline.
2493 (Is_Dispatching_Call): New routine along with pragma Inline.
2494 (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
2495 (Is_Initialization_Block): New routine along with pragma Inline.
2496 (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2497 (Is_Recorded_Scenario): New routine along with pragma Inline.
2498 (Is_Source_Call): New routine along with pragma Inline.
2499 (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2500 (No_Elaboration_Check): Removed along with pragma Inline.
2501 (Target): New routine along with pragma Inline.
2502 (Was_Attribute_Reference): New routine along with pragma Inline.
2503 (Set_ABE_Is_Certain): Removed along with pragma Inline.
2504 (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
2505 (Set_Is_Dispatching_Call): New routine along with pragma Inline.
2506 (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
2507 Inline.
2508 (Set_Is_Initialization_Block): New routine along with pragma Inline.
2509 (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2510 (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
2511 (Set_Is_Source_Call): New routine along with pragma Inline.
2512 (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2513 (Set_No_Elaboration_Check): Removed along with pragma Inline.
2514 (Set_Target): New routine along with pragma Inline.
2515 (Set_Was_Attribute_Reference): New routine along with pragma Inline.
2516 * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
2517
2518 2017-10-09 Bob Duff <duff@adacore.com>
2519
2520 * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
2521
2522 2017-10-09 Bob Duff <duff@adacore.com>
2523
2524 * freeze.ads: Minor comment fixed.
2525
2526 2017-10-09 Bob Duff <duff@adacore.com>
2527
2528 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
2529 care of unchecked conversions in addition to regular conversions. This
2530 takes care of a case where a type is derived from a private untagged
2531 type that is completed by a tagged controlled type.
2532
2533 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2534
2535 * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
2536 rewriting a class-wide condition, handle properly the case where the
2537 controlling argument of the operation to which the condition applies is
2538 an access to a tagged type, and the condition includes a dispatching
2539 call with an implicit dereference.
2540
2541 2017-10-09 Bob Duff <duff@adacore.com>
2542
2543 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
2544 the code at the end of this procedure that was setting the type of a
2545 class-wide object to the specific type returned by a function call.
2546 Treat this case as indefinite instead.
2547
2548 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2549
2550 * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
2551 Suppress spurious ambiguity error when two traversals of the homonym
2552 chain (first directly, and then through an examination of relevant
2553 interfaces) retrieve the same operation, when other irrelevant homonyms
2554 of the operatioh are also present.
2555
2556 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2557
2558 * sem_util.adb (Object_Access_Level): If the object is the return
2559 statement of an expression function, return the level of the function.
2560 This is relevant when the object involves an implicit conversion
2561 between access types and the expression function is a completion, which
2562 forces the analysis of the expression before rewriting it as a body, so
2563 that freeze nodes can appear in the proper scope.
2564
2565 2017-10-09 Bob Duff <duff@adacore.com>
2566
2567 * atree.adb: Make nnd apply to everything "interesting", including
2568 Rewrite. Remove rrd.
2569
2570 2017-10-09 Javier Miranda <miranda@adacore.com>
2571
2572 * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
2573 processing the declaration of the dummy object internally created by
2574 Make_DT to compute the offset to the top of components referencing
2575 secondary dispatch tables.
2576 (Initialize_Tag): Do not initialize the offset-to-top field if it has
2577 been initialized initialized.
2578 * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
2579 * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
2580 (Make_DT): Create a dummy constant object if we can statically build
2581 secondary dispatch tables.
2582 (Make_Secondary_DT): For statically allocated secondary dispatch tables
2583 use the dummy object to compute the offset-to-top field value by means
2584 of the attribute 'Position.
2585
2586 2017-10-09 Bob Duff <duff@adacore.com>
2587
2588 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
2589 code so if BIPAlloc is not passed in, it will likely raise
2590 Program_Error instead of cause miscellaneous chaos.
2591 (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
2592 as for the other Is_B-I-P... functions.
2593 * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
2594 aggregate whose ancestor part is a build-in-place call returning a
2595 nonlimited type, transform the assignment to the ancestor part to use a
2596 temp.
2597 * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
2598 creating an Itype for a library unit entity.
2599 (Check_Initialization): Avoid spurious error message on
2600 internally-generated call.
2601 * sem_ch5.adb (Analyze_Assignment): Handle the case where the
2602 right-hand side is a build-in-place call. This didn't happen when b-i-p
2603 was only for limited types.
2604 * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
2605 implies >= Ada 2005.
2606 * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
2607 repeatedly.
2608 * sem_util.adb (Next_Actual): Handle case of build-in-place call.
2609
2610 2017-10-09 Arnaud Charlet <charlet@adacore.com>
2611
2612 * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
2613
2614 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2615
2616 * libgnarl/s-taprob.adb: Minor whitespace fix.
2617
2618 2017-10-09 Bob Duff <duff@adacore.com>
2619
2620 * namet.ads: Minor comment fix.
2621
2622 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2623
2624 * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
2625 just like other program units listed in Ada RM 10.1(1).
2626
2627 2017-10-09 Justin Squirek <squirek@adacore.com>
2628
2629 * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
2630
2631 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2632
2633 * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
2634 actual for a formal package is an instantiation of a child unit, create
2635 a freeze node for the instance of the parent if it appears in the same
2636 scope and is not frozen yet.
2637
2638 2017-10-09 Pierre-Marie de Rodat <derodat@adacore.com>
2639
2640 * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
2641 in-source documentation for tagged types's Offset_To_Top.
2642
2643 2017-10-09 Bob Duff <duff@adacore.com>
2644
2645 * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
2646 confusing. Same for N_Loc. Remove assumption that b-i-p implies
2647 limited. This is for the case of a function call that occurs as the
2648 default for a record component.
2649 (Expand_N_Object_Declaration): Deal with the case where expansion has
2650 created an object declaration initialized with something like
2651 F(...)'Reference.
2652 * exp_ch3.adb: Minor reformatting.
2653
2654 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2655
2656 * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
2657 the attribute is an object, but it may appear within a conversion. The
2658 object itself must be retrieved when generating the range test that
2659 implements the validity check on a scalar type.
2660
2661 2017-10-05 Eric Botcazou <ebotcazou@adacore.com>
2662
2663 PR ada/82393
2664 * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
2665 * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
2666
2667 2017-10-02 Eric Botcazou <ebotcazou@adacore.com>
2668 Pierre-Marie de Rodat <derodat@adacore.com>
2669
2670 PR ada/82384
2671 * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
2672 (time_t): Change from derived type to subtype.
2673 (timeval): Use suseconds_t for tv_usec.
2674 * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
2675
2676 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2677
2678 * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
2679 handling the form (plus/mult (convert @0) @1).
2680
2681 2017-09-29 Bob Duff <duff@adacore.com>
2682
2683 * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
2684 what we had before.
2685 (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
2686 change. Set the Etype in the class-wide case. This fixes a regression
2687 in the libadalang test suite.
2688
2689 2017-09-29 Joel Brobecker <brobecker@adacore.com>
2690
2691 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2692 doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
2693 in comment markup.
2694 * gnat_ugn.texi: Regenerate.
2695
2696 2017-09-29 Justin Squirek <squirek@adacore.com>
2697
2698 * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
2699 fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
2700 gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
2701 sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
2702 for checking source file status and error message and/or call to
2703 Read_Source_File.
2704 * libgnat/s-os_lib.ads: Add new potential value constant for
2705 uninitialized file descriptors.
2706 * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
2707 return result of IO to encompass a read access failure in addition to a
2708 file-not-found error.
2709
2710 2017-09-29 Bob Duff <duff@adacore.com>
2711
2712 * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
2713 functions returning nonlimited types. Allow for qualified expressions
2714 and type conversions.
2715 (Expand_N_Extended_Return_Statement): Correct the computation of
2716 Func_Bod to allow for child units.
2717 (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
2718 limited (initialization of In_Place_Expansion), and implies >= Ada
2719 2005.
2720 (Is_Build_In_Place_Result_Type): New function to accompany
2721 Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
2722 sometimes we just have the type on our hands, not the function. For
2723 now, does the same thing as the old version, so build-in-place is
2724 disabled for nonlimited types, except that you can use -gnatd.9 to
2725 enable it.
2726 * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
2727 accompany Is_Build_In_Place_Function and
2728 Is_Build_In_Place_Function_Call, because sometimes we just have the
2729 type on our hands, not the function.
2730 (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
2731 cases.
2732 (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
2733 questionable code at the end that was setting the Etype.
2734 * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
2735 determine whether "return (...agg...);" is returning from a
2736 build-in-place function.
2737 (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
2738 Remove assumption that b-i-p implies limited (initialization of
2739 In_Place_Expansion).
2740 (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
2741 an unchecked conversion. Add assertions.
2742 (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
2743 secondary stack here, just because the type needs finalization. That
2744 code is obsolete.
2745 (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
2746 For "return (...agg...);" don't assume b-i-p implies limited.
2747 Needs_Finalization does not imply secondary stack.
2748 (Expand_Array_Aggregate): Named notation. Reverse the sense of
2749 Component_OK_For_Backend -- more readability with fewer double
2750 negatives.
2751 * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
2752 b-i-p implies >= Ada 2005.
2753 * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
2754 b-i-p implies >= Ada 2005. Remove Adjust if we're building the return
2755 object of an extended return statement in place.
2756 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
2757 Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
2758 b-i-p implies >= Ada 2005.
2759 * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
2760 b-i-p implies >= Ada 2005.
2761 * exp_ch7.adb: Comment fix.
2762 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
2763 assumptions that b-i-p implies >= Ada 2005.
2764 * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
2765 b-i-p implies >= Ada 2005.
2766 * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
2767 (Expr), in case Pool_Id is not set.
2768 (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
2769 qualified or converted.
2770 (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
2771 (Param)) = N_Identifier; that's all it could be.
2772 * sinfo.ads: Comment fixes.
2773 * snames.ads-tmpl: Comment fixes.
2774 * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
2775
2776 2017-09-29 Justin Squirek <squirek@adacore.com>
2777
2778 * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
2779 all cases related to marking entity identifiers.
2780
2781 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2782
2783 * adaint.c (win32_wait): Properly handle error and take into account
2784 the WIN32 limitation on the number of simultaneous wait objects.
2785
2786 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2787
2788 * cal.c: Minor proofreading.
2789
2790 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2791
2792 * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
2793 * gnat_ugn.texi: Regenerate.
2794
2795 2017-09-29 Bob Duff <duff@adacore.com>
2796
2797 * lib-xref.ads: Comment fix.
2798
2799 2017-09-29 Bob Duff <duff@adacore.com>
2800
2801 * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
2802 Discriminants can't need finalization.
2803
2804 2017-09-29 Ed Schonberg <schonberg@adacore.com>
2805
2806 * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
2807 for types in expression if the function is within a generic unit.
2808 * sem_res.adb (Resolve): In a generic context do not freeze an
2809 expression, unless it is an entity. This exception is solely for the
2810 purpose of detecting illegal uses of deferred constants in generic
2811 units.
2812 * sem_res.adb: Minor reformatting.
2813
2814 2017-09-29 Justin Squirek <squirek@adacore.com>
2815
2816 * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
2817 redundant warnings.
2818
2819 2017-09-29 Yannick Moy <moy@adacore.com>
2820
2821 * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
2822
2823 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2824
2825 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
2826 * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
2827 Document the effect of pragma Optimize_Alignment (Space) on non-packed
2828 record types.
2829 * gnat_rm.texi: Regenerate.
2830
2831 2017-09-25 Justin Squirek <squirek@adacore.com>
2832
2833 * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
2834 exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
2835 gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
2836 gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
2837 libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
2838 libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
2839 libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
2840 libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
2841 libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
2842 libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
2843 put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
2844 sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
2845 Removal of ineffective use-clauses.
2846 * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
2847 constant folded barriers.
2848 * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
2849 Subtype_Marks and Names list in use-clause nodes to their new singular
2850 counterparts (e.g. Subtype_Mark, Name).
2851 * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
2852 Prev_Ids and More_Ids in use-clause nodes.
2853 (P_Use_Clause): Modify to take a list as a parameter.
2854 (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
2855 subtype_marks within an aggregate use-clauses into individual clauses.
2856 * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
2857 P_Use_Clause to match its new behavior.
2858 * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
2859 * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
2860 errors.
2861 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
2862 Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
2863 the declarative region.
2864 * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
2865 after analysis (Analyze_Package_Specification): Update use clause chain
2866 when there is no body.
2867 * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
2868 parameter to determine weither the installation of scopes should also
2869 propagate on the use-clause "chain".
2870 (Mark_Use_Clauses): Created to traverse use-clause chains and determine
2871 what constitutes a valid "use" of a clause.
2872 (Update_Use_Clause_Chain): Created to aggregate common machinary used
2873 to clean up use-clause chains (and warn on ineffectiveness) at the end
2874 of declaritive regions.
2875 * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
2876 package name from a use-package clause.
2877 (Analyze_Package_Name_List): Created to perform analysis on a list of
2878 package names (similar to Analyze_Package_Name).
2879 (Find_Most_Prev): Created to traverse to the beginning of a given
2880 use-clause chain.
2881 (Most_Decendant_Use_Clause): Create to identify which clause from a
2882 given set is highest in scope (not always the most prev).
2883 (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
2884 handle the new chaining algorithm, also many changes related to
2885 redundant clauses. A new parameter has also been added to force
2886 installation to handle certain cases.
2887 * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
2888 Analyze_Task_Body): Mark use clauses on relevant entities.
2889 * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
2890 Install_Parents): Add parameter to determine weither the installation
2891 of scopes should also propagate on the use-clause "chain".
2892 * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
2893 Install_Context to avoid redundant chaining of use-clauses.
2894 * sem_ch13.adb: Minor reformatting.
2895 * sem_res.adb (Resolve): Mark use clauses on operators.
2896 (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
2897 entities.
2898 * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
2899 Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
2900 represent any given clause's usage/reference/necessity.
2901 (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
2902 nodes to allow loose chaining of redundant clauses.
2903 (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
2904 Set_More_Ids, Set_Name): Modify set procedure calls to reflect
2905 reorganization in node fields.
2906 * types.ads (Source_File_Index): Adjust index bounds.
2907 (No_Access_To_Source_File): New constant.
2908
2909 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2910
2911 * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
2912 the expression to be used in the generated attribute specification
2913 (rather than relocating it) to avoid resolving a potentially malformed
2914 tree when the expression is resolved through an ASIS-specific call to
2915 Resolve_Aspect_Expressions. This manifests itself as a crash on a
2916 function with parameter associations.
2917
2918 2017-09-25 Yannick Moy <moy@adacore.com>
2919
2920 * exp_spark.adb (Expand_SPARK_Indexed_Component,
2921 Expand_SPARK_Selected_Component): New procedures to insert explicit
2922 dereference if required.
2923 (Expand_SPARK): Call the new procedures.
2924
2925 2017-09-25 Patrick Bernardi <bernardi@adacore.com>
2926
2927 * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
2928 libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
2929 libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
2930 libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
2931 libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
2932
2933 2017-09-25 Vasiliy Fofanov <fofanov@adacore.com>
2934
2935 * adaint.c (win32_wait): Properly handle error and take into account
2936 the WIN32 limitation on the number of simultaneous wait objects.
2937
2938 2017-09-25 Yannick Moy <moy@adacore.com>
2939
2940 * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
2941 invariant procedure in GNATprove mode.
2942 * sem_ch5.adb (Analyze_Assignment): Likewise.
2943
2944 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
2945
2946 * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
2947 "back-end" in comments.
2948
2949 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2950
2951 * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
2952 call that appears in a classwide precondition and that mentions an
2953 access formal of the subprogram, must use the accessibility level of
2954 the actual in the call. This is one case in which a reference to a
2955 formal parameter appears outside of the body of the subprogram.
2956
2957 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2958
2959 * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
2960 for GNATprove.
2961 (Resolve_Entry): Clean up predicate
2962
2963 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2964
2965 * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
2966 than Program_Error because U_E is more in line with respect to the
2967 intended behavior.
2968
2969 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2970
2971 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
2972 Storage_Size does not freeze, and thus can include references to
2973 deferred constants.
2974
2975 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2976
2977 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
2978 reference when it appears within a pragma of no significance to SPARK.
2979 (In_Insignificant_Pragma): New routine.
2980 * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
2981
2982 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2983
2984 * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
2985 actual is a renaming, indicate that it is the renamed package that must
2986 be frozen before the instantiation.
2987
2988 2017-09-25 Yannick Moy <moy@adacore.com>
2989
2990 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
2991 of dimensionality system in GNAT UG.
2992 * gnat_ugn.texi: Regenerate.
2993
2994 2017-09-25 Yannick Moy <moy@adacore.com>
2995
2996 * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
2997 GNATprove_Mode when switch -gnatdF used.
2998
2999 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
3000
3001 * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
3002 the backend.
3003
3004 2017-09-25 Javier Miranda <miranda@adacore.com>
3005
3006 * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
3007 expansion of user-defined enumeration types when the generation of
3008 names for enumeration literals is suppressed.
3009
3010 2017-09-25 Gary Dismukes <dismukes@adacore.com>
3011
3012 * libgnarl/s-taprop__linux.adb: Minor reformatting.
3013
3014 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3015
3016 * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
3017 that appear as selector names of parameter associations, as these are
3018 never resolved by visibility.
3019
3020 2017-09-25 Justin Squirek <squirek@adacore.com>
3021
3022 * sem_res.adb (Resolve_Entry): Generate reference for index entities.
3023
3024 2017-09-25 Doug Rupp <rupp@adacore.com>
3025
3026 * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
3027
3028 2017-09-25 Javier Miranda <miranda@adacore.com>
3029
3030 * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
3031 (Expand_User_Defined_Enumeration_Image): New subprogram.
3032 (Expand_Image_Attribute): Enable speed-optimized expansion of
3033 user-defined enumeration types when we are compiling with optimizations
3034 enabled.
3035
3036 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
3037
3038 * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
3039 routine is already provided by Einfo.
3040 * einfo.adb (Has_Null_Abstract_State): Replace with the body from
3041 Sem_Util, which had better comments and avoided double calls to
3042 Abstract_State.
3043
3044 2017-09-25 Bob Duff <duff@adacore.com>
3045
3046 * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
3047
3048 2017-09-25 Doug Rupp <rupp@adacore.com>
3049
3050 * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
3051 (Compute_Base_Monotonic_Clock): New function.
3052 (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
3053 (Timed_Delay): Likewise.
3054 (Monotonic_Clock): Likewise.
3055 * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
3056
3057 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3058
3059 * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
3060 previous change.
3061
3062 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3063
3064 * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
3065 Minor reformatting.
3066
3067 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
3068
3069 * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
3070
3071 2017-09-18 Bob Duff <duff@adacore.com>
3072
3073 * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
3074 reference types in the access-to-access case.
3075
3076 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
3077
3078 * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
3079 of the "aliased" keyword on the prefix from here to...
3080 (Resolve_Attribute) <Attribute_Access>: ...here. Remove useless call
3081 to Check_No_Implicit_Aliasing.
3082 * sinfo.ads (Non_Aliased_Prefix): Delete.
3083 (Set_Non_Aliased_Prefix): Likewise.
3084 * sinfo.adb (Non_Aliased_Prefix): Delete.
3085 (Set_Non_Aliased_Prefix): Likewise.
3086
3087 2017-09-18 Bob Duff <duff@adacore.com>
3088
3089 * exp_ch5.adb (Build_Formal_Container_Iteration,
3090 Expand_Formal_Container_Element_Loop): Convert the container to the
3091 root type before passing it to the iteration operations, so it will be
3092 of the right type.
3093
3094 2017-09-18 Bob Duff <duff@adacore.com>
3095
3096 * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
3097
3098 2017-09-18 Bob Duff <duff@adacore.com>
3099
3100 * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
3101 and it's a bit-packed array, pass False to the Consider_IS parameter of
3102 Needs_Simple_Initialization.
3103
3104 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
3105
3106 * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
3107 the preexisting body.
3108 * sem_prag.adb (Check_Inline_Always_Placement): New routine.
3109 (Process_Inline): Verify the placement of pragma Inline_Always. The
3110 pragma must now appear on the initial declaration of the related
3111 subprogram.
3112
3113 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3114
3115 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, At the end of the
3116 declarative list in a subprogram body, analyze aspext specifications to
3117 provide basic semantic information, because otherwise the aspect
3118 specifications might only be snalyzed during expansion, when related
3119 subprograms are generated.
3120
3121 2017-09-18 Bob Duff <duff@adacore.com>
3122
3123 * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
3124 validity checks have rewritten the tree.
3125
3126 2017-09-18 Bob Duff <duff@adacore.com>
3127
3128 * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
3129
3130 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3131
3132 * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
3133 qualified exxpression for an aggregate in a generic unit, verify that
3134 the scope of the type is itself visible and not hidden, so that the
3135 qualified expression is correctly resolved in any instance.
3136
3137 2017-09-18 Bob Duff <duff@adacore.com>
3138
3139 * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
3140 mark refers to the current instance. Set the type to Any_Type in that
3141 case, to avoid later crashes.
3142
3143 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3144
3145 * exp_ch3.adb (Replace_Discriminant_References): New procedure,
3146 subsidiary of Build_Assignment, used to handle the initialization code
3147 for a mutable record component whose default value is an aggregate that
3148 sets the values of the discriminants of the components.
3149
3150 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
3151
3152 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
3153 the entity as being volatile for an overlay that toggles the scalar
3154 storage order.
3155
3156 2017-09-18 Fedor Rybin <frybin@adacore.com>
3157
3158 * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
3159 options -U main and --harness-only are not compatible.
3160
3161 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
3162
3163 * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
3164
3165 2017-09-18 Piotr Trojanek <trojanek@adacore.com>
3166
3167 * einfo.ads (Is_Imported): Update comment, as this
3168 routine also applies to constants.
3169
3170 2017-09-18 Yannick Moy <moy@adacore.com>
3171
3172 * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
3173 holding state.
3174
3175 2017-09-18 Justin Squirek <squirek@adacore.com>
3176
3177 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
3178 constant indication for Pragma_Linker_Section.
3179
3180 2017-09-18 Bob Duff <duff@adacore.com>
3181
3182 Alternate fix for PR ada/71358
3183 * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
3184 Instead, make a local copy of Config, and if it's null, allocate an
3185 empty Command_Line_Configuration_Record, so we won't crash on null
3186 pointer dereference.
3187
3188 2017-09-16 Eric Botcazou <ebotcazou@adacore.com>
3189
3190 * libgnarl/a-intnam__rtems.ads: Update copyright date.
3191 * libgnarl/s-interr__hwint.adb: Likewise.
3192 * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
3193 * libgnarl/s-osinte__rtems.adb: Likewise.
3194 * libgnarl/s-osinte__rtems.ads: Likewise.
3195
3196 2017-09-13 Nicolas Roche <roche@adacore.com>
3197
3198 * Make-lang.in: In the fallback mechanim, parse the associated .ali
3199 file and try to guess the locations of dependencies.
3200
3201 2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
3202
3203 * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
3204 the suppression status of Alignment_Check on the current scope.
3205 (Alignment_Checks_Suppressed): New function to use the saved instead of
3206 the current suppression status of Alignment_Check.
3207 (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
3208 (Analyze_Attribute_Definition_Clause): Instead of manually appending to
3209 the table, call Register_Address_Clause_Check.
3210 (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
3211 recorded address clause instead of its entity.
3212
3213 2017-09-13 Jerome Guitton <guitton@adacore.com>
3214
3215 * libgnarl/s-tpopsp__vxworks-tls.adb,
3216 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
3217 (Self): Register thread if task id is null.
3218
3219 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3220
3221 * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
3222
3223 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3224
3225 * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
3226 from an entity to only scope index, as a mapping from an entity to the
3227 same entity was useless.
3228 (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
3229 to E.
3230 (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
3231 to E.
3232 (Is_Constant_Object_Without_Variable_Input): remove local "Result"
3233 variable, just use return statements.
3234
3235 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3236
3237 * libgnarl/s-vxwext__kernel-smp.adb,
3238 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
3239 New file.
3240
3241 2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
3242
3243 * einfo.adb: Flag42 is now Is_Controlled_Active.
3244 (Is_Controlled): This attribute is now synthesized.
3245 (Is_Controlled_Active): This attribute is now an explicit flag rather
3246 than a synthesized attribute. (Set_Is_Controlled): Removed.
3247 (Set_Is_Controlled_Active): New routine.
3248 (Write_Entity_Flags): Update the output for Flag42.
3249 * einfo.ads: Update the documentation of the following attributes:
3250 Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
3251 and Is_Controlled_Active have swapped their functionality.
3252 (Is_Controlled): Renamed to Is_Controlled_Active.
3253 (Is_Controlled_Active): Renamed to Is_Controlled.
3254 (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
3255 * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
3256 Is_Controlled.
3257 * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
3258 (Needs_Finalization): Code clean up. Remove the tests for
3259 Disable_Controlled because a) they were incorrect as they would reject
3260 a type which is sublect to the aspect, but may contain controlled
3261 components, and b) they are no longer necessary.
3262 * exp_util.ads (Needs_Finalization): Update comment on documentation.
3263 * freeze.adb (Freeze_Array_Type): Restore the original use of
3264 Is_Controlled.
3265 (Freeze_Record_Type): Restore the original use of Is_Controlled.
3266 * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
3267 Is_Controlled.
3268 (Array_Type_Declaration): Restore the original use of Is_Controlled.
3269 (Build_Derived_Private_Type): Restore the original use of
3270 Is_Controlled.
3271 (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
3272 type derived from Ada.Finalization.[Limited_]Controlled.
3273 (Build_Derived_Type): Restore the original use of Is_Controlled.
3274 (Record_Type_Definition): Restore the original use of Is_Controlled.
3275 * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
3276 Is_Controlled.
3277 * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
3278 (Analyze_Aspect_Specifications): Use routine
3279 Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
3280
3281 2017-09-13 Vincent Celier <celier@adacore.com>
3282
3283 * clean.adb (Gnatclean): Fix error when looking for target
3284 of <target>-gnatclean
3285
3286 2017-09-13 Javier Miranda <miranda@adacore.com>
3287 Ed Schonberg <schonberg@adacore.com>
3288
3289 * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
3290 expanded name that designates the current instance of a child unit in
3291 its own body and appears as the prefix of a reference to an entity
3292 local to the child unit.
3293
3294 2017-09-12 Bob Duff <duff@adacore.com>
3295
3296 * sem_warn.adb: Minor comment.
3297
3298 2017-09-12 Bob Duff <duff@adacore.com>
3299
3300 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
3301 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
3302 be Default_Initialized_Item, and apply pragma Unmodified to it,
3303 to suppress the warning.
3304
3305 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3306
3307 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
3308 for access types.
3309
3310 2017-09-12 Yannick Moy <moy@adacore.com>
3311
3312 * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
3313 together with Global when ignoring one in CodePeer mode.
3314
3315 2017-09-12 Javier Miranda <miranda@adacore.com>
3316
3317 * sem_ch3.adb (Analyze_Declarations): In nested
3318 package declarations that have a private part enable missing check
3319 of the RM rule 13.1.1(11/3): usage names in aspect definitions are
3320 resolved at the end of the immediately enclosing declaration list.
3321
3322 2017-09-12 Bob Duff <duff@adacore.com>
3323
3324 * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
3325 Empty.
3326
3327 2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
3328
3329 * debug.adb: Reserving flag -gnatdF for safe pointer checking.
3330 * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
3331 dF flag.
3332 * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
3333 in preparation for the evolution of the SPARK language that
3334 includes a pointer analysis for checking non-aliasing of access
3335 types. The Check_Safe_Pointers function is the entry point, and
3336 will traverse the AST and raise compile-time errors everytime
3337 it detects non-begign aliasing. Detailed comments are present
3338 in the sem_spark.ads file.
3339 * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
3340 functions to iterate over the list of globals of a subprogram.
3341 * libgnat/system.ads: Add restriction No_Finalization.
3342 * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
3343 dependency on g-dynhta.adb.
3344
3345 2017-09-12 Bob Duff <duff@adacore.com>
3346
3347 * sem_ch6.adb (Analyze_Expression_Function): Call
3348 Check_Dynamically_Tagged_Expression.
3349 * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
3350 "and then Is_Tagged_Type (Typ)" because there is an earlier
3351 "Assert (Is_Tagged_Type (Typ))".
3352
3353 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3354
3355 * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
3356
3357 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3358
3359 * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
3360 * doc/gnat_ugn/platform_specific_information.rst: Remove doc
3361 for no longer supported platforms.
3362 * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
3363 description of the semantics for dimensionality analysis.
3364 * gnat_ugn.texi: Regenerated.
3365
3366 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3367
3368 * freeze.adb (Has_Incomplete_Compoent): Delete.
3369 (Freeze_Profile):
3370 Do not inhibit the freezing of the profile of an expression
3371 function here.
3372 (Freeze_Subprogram): Do not re-create extra formals.
3373 * sem_ch6.adb (Analyze_Expression_Function): Always
3374 pre-analyze the expression if the function is not a completion.
3375 (Analyze_Subprogram_Body_Helper): For the body generated
3376 from an expression function that is not a completion, do
3377 not freeze the profile and temporary mask the types declared
3378 outside the expression that are not yet frozen.
3379 * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
3380 during the pre-analysis of an expression function.
3381
3382 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3383
3384 * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
3385 (gigi): Likewise.
3386
3387 2017-09-11 Yannick Moy <moy@adacore.com>
3388
3389 * lib-xref-spark_specific.adb: Minor rewrite.
3390
3391 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3392
3393 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
3394 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
3395 renaming into account.
3396
3397 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3398
3399 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
3400 * gcc-interface/Makefile.in: Take this renaming into account.
3401
3402 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3403
3404 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
3405 longer used.
3406
3407 2017-09-11 Yannick Moy <moy@adacore.com>
3408
3409 * sem_util.adb (Check_Result_And_Post_State):
3410 Do not issue a warning about missing reference to an outcome if
3411 the subprogram is ghost and has no outputs.
3412 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
3413 reformatting.
3414
3415 2017-09-11 Yannick Moy <moy@adacore.com>
3416
3417 * gnat1drv.adb (Adjust_Global_Switches): Set
3418 Check_Validity_Of_Parameters to False in GNATprove mode.
3419 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3420 set option.
3421
3422 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
3423
3424 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
3425 generate debug info for inner record types if -fgnat-encodings=minimal.
3426 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
3427 type as the debug type.
3428
3429 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3430
3431 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
3432 packed record types if pragma Optimize_Alignment (Space) is enabled.
3433
3434 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3435
3436 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
3437 limits for expression functions.
3438 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
3439
3440 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3441
3442 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
3443 layout of the record from the parent type only if both are or are not
3444 unchecked unions.
3445 (is_stored_discriminant): Return false for an unchecked union.
3446
3447 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3448
3449 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
3450 return NULL_EXPR.
3451
3452 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3453
3454 * gcc-interface/decl.c (promote_object_alignment): New function taken
3455 from...
3456 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
3457 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
3458 create a padding type on success before doing the atomic check.
3459
3460 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3461
3462 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
3463 promotion to static memory earlier in the processing.
3464
3465 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3466
3467 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
3468 and TYPE_BY_REFERENCE_P flags on types after various promotions.
3469 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
3470 Consider all kinds of entities.
3471
3472 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3473
3474 * gcc-interface/utils.c (convert): When converting to a padding type,
3475 reuse an existing CONSTRUCTOR if it has got the right size.
3476
3477 2017-09-08 Nicolas Roche <roche@adacore.com>
3478
3479 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
3480 source in libgnat/
3481 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
3482 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
3483 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
3484 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
3485 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
3486 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
3487 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
3488 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
3489 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
3490 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
3491 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
3492 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
3493 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
3494 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
3495 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
3496 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
3497 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
3498 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
3499 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
3500 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
3501 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
3502 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
3503 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
3504 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
3505 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
3506 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
3507 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
3508 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
3509 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
3510 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
3511 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
3512 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
3513 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
3514 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
3515 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
3516 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
3517 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
3518 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
3519 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
3520 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
3521 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
3522 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
3523 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
3524 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
3525 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
3526 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
3527 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
3528 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
3529 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
3530 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
3531 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
3532 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
3533 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
3534 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
3535 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
3536 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
3537 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
3538 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
3539 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
3540 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
3541 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
3542 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
3543 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
3544 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
3545 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
3546 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
3547 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
3548 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
3549 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
3550 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
3551 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
3552 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
3553 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
3554 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
3555 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
3556 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
3557 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
3558 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
3559 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
3560 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
3561 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
3562 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
3563 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
3564 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
3565 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
3566 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
3567 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
3568 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
3569 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
3570 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
3571 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
3572 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
3573 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
3574 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
3575 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
3576 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
3577 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
3578 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
3579 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
3580 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
3581 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
3582 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
3583 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
3584 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
3585 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
3586 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
3587 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
3588 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
3589 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
3590 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
3591 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
3592 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
3593 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
3594 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
3595 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
3596 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
3597 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
3598 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
3599 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
3600 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
3601 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
3602 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
3603 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
3604 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
3605 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
3606 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
3607 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
3608 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
3609 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
3610 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
3611 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
3612 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
3613 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
3614 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
3615 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
3616 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
3617 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
3618 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
3619 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
3620 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
3621 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
3622 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
3623 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
3624 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
3625 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
3626 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
3627 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
3628 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
3629 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
3630 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
3631 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
3632 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
3633 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
3634 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
3635 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
3636 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
3637 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
3638 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
3639 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
3640 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
3641 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
3642 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
3643 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
3644 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
3645 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
3646 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
3647 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
3648 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
3649 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
3650 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
3651 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
3652 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
3653 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
3654 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
3655 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
3656 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
3657 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
3658 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
3659 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
3660 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
3661 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
3662 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
3663 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
3664 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
3665 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
3666 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
3667 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
3668 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
3669 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
3670 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
3671 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
3672 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
3673 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
3674 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
3675 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
3676 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
3677 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
3678 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
3679 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
3680 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
3681 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
3682 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
3683 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
3684 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
3685 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
3686 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
3687 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
3688 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
3689 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
3690 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
3691 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
3692 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
3693 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
3694 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
3695 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
3696 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
3697 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
3698 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
3699 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
3700 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
3701 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
3702 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
3703 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
3704 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
3705 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
3706 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
3707 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
3708 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
3709 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
3710 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
3711 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
3712 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
3713 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
3714 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
3715 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
3716 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
3717 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
3718 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
3719 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
3720 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
3721 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
3722 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
3723 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
3724 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
3725 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
3726 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
3727 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
3728 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
3729 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
3730 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
3731 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
3732 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
3733 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
3734 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
3735 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
3736 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
3737 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
3738 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
3739 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
3740 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
3741 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
3742 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
3743 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
3744 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
3745 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
3746 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
3747 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
3748 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
3749 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
3750 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
3751 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
3752 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
3753 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
3754 to libgnat subdirectory.
3755
3756 2017-09-08 Yannick Moy <moy@adacore.com>
3757
3758 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
3759 return the entity associated with the call.
3760 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
3761 Replace the internal Get_Function_Id with the new
3762 Sem_Aux.Get_Called_Entity.
3763 (Iterate_Call_Parameters): New
3764 procedure to iterate on formals and actuals at the same time.
3765 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
3766 Set SPARK_Mode from spec when set, for analysis
3767 of instance. Restore after analysis of instance.
3768 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
3769 set, for analysis of body instance. Restored automatically at
3770 the end of the subprogram.
3771 * gnat1drv.adb (Adjust_Global_Switches): Set
3772 Check_Validity_Of_Parameters to False in GNATprove mode.
3773 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3774 set option.
3775
3776 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3777
3778 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
3779 (New_Copy_Tree): ...there. Reset the hash tables only if they
3780 were used in the previous invocation.
3781 * s-htable.adb: Fix typo.
3782
3783 2017-09-08 Bob Duff <duff@adacore.com>
3784
3785 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
3786
3787 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3788
3789 * sem_aggr.adb: minor style fix.
3790
3791 2017-09-08 Bob Duff <duff@adacore.com>
3792
3793 * sprint.adb (Write_Corresponding_Source): Ignore if there is
3794 no current source file.
3795 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
3796 Print something helpful in case N is invalid.
3797 * sprint.ads: Minor comment fix.
3798
3799 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3800
3801 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
3802 access types.
3803
3804 2017-09-08 Bob Duff <duff@adacore.com>
3805
3806 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
3807 Ada_2020, along the same lines as the other Ada version pragmas.
3808
3809 2017-09-08 Gary Dismukes <dismukes@adacore.com>
3810
3811 * sem_ch12.adb: Minor typo fixes and reformatting.
3812
3813 2017-09-08 Yannick Moy <moy@adacore.com>
3814
3815 * sem_aggr.adb (Resolve_Record_Aggregate):
3816 Rewrite bounds of aggregate subexpressions which may depend on
3817 discriminants of the enclosing aggregate.
3818
3819 2017-09-08 Yannick Moy <moy@adacore.com>
3820
3821 * sem_ch5.adb: Prevent assertion failure on illegal code.
3822
3823 2017-09-08 Yannick Moy <moy@adacore.com>
3824
3825 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
3826 calling Renamed_Entity on an entity which cannot be a renaming.
3827
3828 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3829
3830 * exp_aggr.adb: Add with & use clause for Urealp.
3831 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
3832 elementary types instead of just discrete types.
3833 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
3834 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
3835 Be prepared for the FP zero value in the memset case. Add small
3836 guard.
3837
3838 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3839
3840 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
3841 of loop.
3842
3843 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3844
3845 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
3846 of New_Copy because the latter leaves the syntactic structure of
3847 the tree inconsistent (a child is accessible through two parents)
3848 and prevents proper replication of itypes by subsequent calls
3849 to New_Copy_Tree.
3850 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
3851 New_Copy because the latter leaves the syntactic structure of the
3852 tree inconsistent (a child is accessible through two parents)
3853 and prevents proper replication of itypes by subsequent calls
3854 to New_Copy_Tree.
3855 * sem_util.adb (In_Subtree): New routine.
3856 (New_Copy_Tree): Reimplemented.
3857 * sem_util.ads (In_Subtree): New routine.
3858 (New_Copy_Tree): Reimplemented.
3859
3860 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3861
3862 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
3863 for aspect Default_Value is a static scalar value, but it does
3864 not freeze the type. Yhis allows for subsequent representation
3865 clauses for the type.
3866
3867 2017-09-08 Javier Miranda <miranda@adacore.com>
3868
3869 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
3870 not add entries into the undefined reference table when we are
3871 compiling with errors ignored.
3872
3873 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3874
3875 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
3876 check if the instance is within an enclosing instance body. The
3877 formal package was legal in the enclosing generic, and is
3878 legal in the enclosing instantiation. This optimisation may be
3879 applicable elsewhere, and it also removes spurious errors that
3880 may arise with on-the-fly processing of instantiations that
3881 contain Inline_Always subprograms.
3882
3883 2017-09-08 Vincent Celier <celier@adacore.com>
3884
3885 * gnatcmd.adb: Disregard empty argument of GNAT driver.
3886
3887 2017-09-08 Justin Squirek <squirek@adacore.com>
3888
3889 * checks.adb (Insert_Valid_Check): Manually decorate
3890 the generated temporary for range valdity checks.
3891
3892 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3893
3894 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
3895
3896 2017-09-08 Justin Squirek <squirek@adacore.com>
3897
3898 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
3899 case to handle underscore flags.
3900 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
3901 new procedure to handle underscores.
3902
3903 2017-09-08 Javier Miranda <miranda@adacore.com>
3904
3905 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
3906 divisions with fixed point results to avoid generating twice
3907 the runtime check on divide by zero.
3908 * checks.adb (Apply_Divide_Checks): Ensure that operands are
3909 not evaluated twice (once for their runtime checks and once for
3910 their regular computation).
3911
3912 2017-09-08 Yannick Moy <moy@adacore.com>
3913
3914 * sem_prag.adb (Analyze_Part_Of): Add missing
3915 return statements after issuing errors. Add detection of
3916 out-of-order item and single concurrent type.
3917
3918 2017-09-08 Nicolas Roche <roche@adacore.com>
3919
3920 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
3921 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
3922 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
3923 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
3924 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
3925 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
3926 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
3927 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
3928 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
3929 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
3930 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
3931 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
3932 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
3933 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
3934 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
3935 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
3936 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
3937 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
3938 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
3939 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
3940 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
3941 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
3942 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
3943 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
3944 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
3945 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
3946 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
3947 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
3948 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
3949 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
3950 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
3951 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
3952 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
3953 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
3954 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
3955 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
3956 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
3957 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
3958 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
3959 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
3960 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
3961 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
3962 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
3963 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
3964 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
3965 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
3966 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
3967 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
3968 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
3969 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
3970 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
3971 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
3972 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
3973 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
3974
3975 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3976
3977 * doc/share/conf.py, doc/share/latex_elements.py,
3978 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
3979 highlighting.
3980
3981 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3982
3983 * gnat_rm.texi, gnat_ugn.texi,
3984 doc/gnat_ugn/the_gnat_compilation_model.rst,
3985 doc/gnat_ugn/getting_started_with_gnat.rst,
3986 doc/gnat_ugn/inline_assembler.rst,
3987 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3988 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
3989 doc/gnat_ugn/about_this_guide.rst,
3990 doc/gnat_ugn/platform_specific_information.rst,
3991 doc/gnat_ugn/example_of_binder_output.rst,
3992 doc/gnat_ugn/gnat_and_program_execution.rst,
3993 doc/gnat_ugn/gnat_utility_programs.rst,
3994 doc/gnat_rm/implementation_of_specific_ada_features.rst,
3995 doc/gnat_rm/interfacing_to_other_languages.rst,
3996 doc/gnat_rm/implementation_defined_aspects.rst,
3997 doc/gnat_rm/intrinsic_subprograms.rst,
3998 doc/gnat_rm/implementation_defined_characteristics.rst,
3999 doc/gnat_rm/implementation_advice.rst,
4000 doc/gnat_rm/implementation_defined_attributes.rst,
4001 doc/gnat_rm/compatibility_and_porting_guide.rst,
4002 doc/gnat_rm/standard_library_routines.rst,
4003 doc/gnat_rm/the_gnat_library.rst,
4004 doc/gnat_rm/implementation_defined_pragmas.rst,
4005 doc/gnat_rm/representation_clauses_and_pragmas.rst,
4006 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
4007 doc/gnat_rm/obsolescent_features.rst,
4008 doc/gnat_rm/about_this_guide.rst,
4009 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
4010 doc/gnat_rm/implementation_of_ada_2012_features.rst,
4011 doc/gnat_ugn.rst,
4012 doc/gnat_rm.rst: Update documentation.
4013
4014 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4015
4016 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
4017 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
4018 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
4019
4020 2017-09-08 Bob Duff <duff@adacore.com>
4021
4022 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
4023 New routine to read the Tag robustly.
4024 * exp_attr.adb (Input): Change the expansion of 'Input,
4025 in the class-wide case, to call String_Input_Tag instead of
4026 String_Input_Blk_IO.
4027
4028 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4029
4030 * s-rident.ads (Restriction_Id): reorder enum
4031 literals, so that Pure_Barriers is no longer in range of the
4032 Cunit_Boolean_Restrictions subtype.
4033
4034 2017-09-08 Nicolas Roche <roche@adacore.com>
4035
4036 * a-taster.ads, a-taster.adb: Move to libgnarl
4037 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
4038 Add support for files in libgnarl.
4039
4040 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4041
4042 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
4043 accessibility check to an interface conversion, whose purpose
4044 is to perform a pointer adjustment in a dispatching call.
4045 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
4046 when the actual is a construct that involves a dereference of an
4047 expression that includes a formal of the enclosing subprogram,
4048 In such cases, the accessibility level of the actual is that of
4049 the corresponding formal, which is passed in as an additional
4050 actual in the outer call.
4051
4052 2017-09-08 Bob Duff <duff@adacore.com>
4053
4054 * exp_intr.adb (Add_Source_Info): Do not decode
4055 file names; they were not encoded in the first place.
4056
4057 2017-09-08 Bob Duff <duff@adacore.com>
4058
4059 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
4060 exceptions instead of crashes. Check for absurdly long strings
4061 and empty strings. Empty strings cause trouble because they can
4062 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
4063 be empty, which causes an array index out of bounds.
4064 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
4065 instead of crashes.
4066
4067 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4068
4069 * sem_util.adb (Is_CCT_Instance): allow use in
4070 the context of protected types.
4071
4072 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4073
4074 * a-tigeli.adb: minor remove extra whitespace.
4075
4076 2017-09-08 Gary Dismukes <dismukes@adacore.com>
4077
4078 * par-ch4.adb: Reformatting of an error message.
4079
4080 2017-09-08 Javier Miranda <miranda@adacore.com>
4081
4082 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
4083 identifiers to ensure their correct decoration of names on
4084 aspect expressions.
4085
4086 2017-09-08 Yannick Moy <moy@adacore.com>
4087
4088 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
4089 not skip a loop coming from source which is rewritten into a loop.
4090
4091 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4092
4093 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4094 wrapper has convention Ada, to prevent spurious warnings on
4095 unconstrained array parameters.
4096
4097 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4098
4099 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
4100 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
4101
4102 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4103
4104 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
4105
4106 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4107
4108 * exp_intr.adb (Append_Entity_Name): Move to ...
4109 * sem_util.ads, sem_util.adb: ... here to share it.
4110 (Subprogram_Name): New subprogram, to compute the name of the enclosing
4111 subprogram/entity.
4112 * errutil.adb (Error_Msg): Fill new field Node.
4113 * erroutc.ads (Subprogram_Name_Ptr): New.
4114 (Error_Msg_Object): New field Node.
4115 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
4116 * errout.adb (Error_Msg): New variant with node id parameter.
4117 Fill new parameter Node when emitting messages. Revert previous
4118 changes for Include_Subprogram_In_Messages.
4119 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
4120 generating warning message.
4121
4122 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4123
4124 * par-ch4.adb (P_Iterated_Component_Association): Place construct
4125 under -gnat2020 flag, given that it is a future feature of
4126 the language.
4127 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
4128 defining identifier as referenced to prevent spurious warnings:
4129 corresponding loop is expanded into one or more loops whose
4130 variable has the same name, and the expression uses those names
4131 and not the original one.
4132
4133 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4134
4135 * sem_elab.adb (Check_A_Call): Do not consider
4136 references to internal variables for SPARK semantics.
4137
4138 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4139
4140 * inline.adb (In_Package_Spec): refine type of
4141 the parameter from Node_Id to Entity_Id.
4142
4143 2017-09-08 Justin Squirek <squirek@adacore.com>
4144
4145 * exp_ch5.adb (Expand_Formal_Container_Loop):
4146 Reset the scope of the loop parameter after it is reanalyzed.
4147
4148 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4149
4150 * sem_util.ads (Set_Rep_Info): New inline procedure.
4151 * sem_util.adb (Set_Rep_Info): Implement it.
4152 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
4153 always copy the representation aspects onto the subtype.
4154
4155 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
4156
4157 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
4158 Correction of the return type from access type to option type.
4159 (Simple_HTable): Moving the Instance_Data to ads file.
4160
4161 2017-09-08 Yannick Moy <moy@adacore.com>
4162
4163 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
4164
4165 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4166
4167 * opt.ads (Include_Subprogram_In_Messages): New variable.
4168 * errout.ads (Current_Subprogram_Ptr): New variable.
4169 * errout.adb (Error_Msg): Prepend current subprogram info
4170 in messages if Include_Subprogram_In_Messages is set.
4171 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
4172 Current_Subprogram.
4173 * gnat1drv.adb (Adjust_Global_Switches): Set
4174 Include_Subprogram_In_Messages when -gnatdJ is set.
4175 * debug.adb: Document and reserve -gnatdJ.
4176
4177 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
4178
4179 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
4180 functions to iterate over simple hastables.
4181 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
4182
4183 2017-09-08 Javier Miranda <miranda@adacore.com>
4184
4185 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
4186 missing checks on the presence of Entity() before checking the
4187 entity attributes.
4188
4189 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4190
4191 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
4192 statements, use local variable and remove unnecessary processing.
4193
4194 2017-09-08 Javier Miranda <miranda@adacore.com>
4195
4196 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
4197 subprogram.
4198 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
4199 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4200 subprogram.
4201 (Unqual_BIP_Iface_Function_Call): New subprogram.
4202 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
4203 subprogram containing code that was previously inside
4204 Make_Build_In_Place_Call_In_Object_Declaration since it is also
4205 required for one of the new subprograms.
4206 (Expand_Actuals):
4207 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
4208 (Expand_N_Extended_Return_Statement): Extend the
4209 cases covered by an assertion on expected BIP object
4210 declarations.
4211 (Make_Build_In_Place_Call_In_Assignment):
4212 Removing unused code; found working on this ticket.
4213 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
4214 that replaces the internal name of the renaming declaration
4215 into the new subprogram Replace_Renaming_Declaration_Id.
4216 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
4217 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
4218 New subprogram.
4219 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4220 subprogram.
4221 (Unqual_BIP_Iface_Function_Call): New subprogram.
4222 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
4223 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
4224 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
4225 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4226 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
4227 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
4228 (Expand_N_Indexed_Component): Invoke the new subprogram
4229 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4230 (Expand_N_Selected_Component): Invoke the new subprogram
4231 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4232 (Expand_N_Slice): Invoke the new subprogram
4233 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4234 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
4235 Invoke the new subprogram
4236 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4237
4238 2017-09-08 Javier Miranda <miranda@adacore.com>
4239
4240 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
4241 access to interface types. Remove also the accessibility check.
4242
4243 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4244
4245 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
4246 all the types that are referenced by the expression.
4247 (Analyze_Expression_Function): Call Freeze_Expr_Types for
4248 a completion instead of manually freezing the type of the
4249 expression.
4250 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
4251
4252 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4253
4254 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
4255 New procedure, auxiliary to Expand_Pragma_Check, to handle
4256 references to the discriminants of a protected type within a
4257 precondition of a protected operation. This is needed because
4258 the original precondition has been analyzed in the context of
4259 the protected declaration, but in the body of the operation
4260 references to the discriminants have been replaved by references
4261 to the discriminants of the target object, and these references
4262 are only created when expanding the protected body.
4263
4264 2017-09-08 Yannick Moy <moy@adacore.com>
4265
4266 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
4267 Loop_Variant.
4268
4269 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4270
4271 * exp_attr.adb (Build_Record_VS_Func): If the record is an
4272 unchecked union, do not emit checks for its (non-existent)
4273 discriminants, or for variant parts that depend on them.
4274
4275 2017-09-08 Justin Squirek <squirek@adacore.com>
4276
4277 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
4278 Find_Comparison_Type.Try_One_Interp): Add check for generic
4279 instances.
4280
4281 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4282
4283 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
4284 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
4285 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
4286 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
4287 remaining references to AAMP_On_Target.
4288
4289 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4290
4291 * style.adb: Fix typo.
4292
4293 2017-09-08 Javier Miranda <miranda@adacore.com>
4294
4295 * einfo.adb (Underlying_Type): Add missing support for class-wide
4296 types that come from the limited view.
4297 * exp_attr.adb (Attribute_Address): Check class-wide type
4298 interfaces using the underlying type to handle limited-withed
4299 types.
4300 (Attribute_Tag): Check class-wide type interfaces using
4301 the underlying type to handle limited-withed types.
4302
4303 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4304
4305 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
4306 over a subtype of a type with a static predicate, taking into
4307 account the predicate function of the parent type and the bounds
4308 given in the loop specification.
4309 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
4310 a loop specification that is a subtype indication whose type mark
4311 is a type with a static predicate, inherit predicate function,
4312 used to build case statement for rewritten loop.
4313
4314 2017-09-08 Justin Squirek <squirek@adacore.com>
4315
4316 * lib-load.adb: Modify printing of error message to exclude file
4317 line number.
4318
4319 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4320
4321 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
4322 don't inline subprograms declared in both visible and private
4323 parts of a package.
4324 (In_Package_Spec): previously In_Package_Visible_Spec; now
4325 detects subprograms declared both in visible and private parts
4326 of a package spec.
4327
4328 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4329
4330 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
4331 the type is an anonymous array in an object declaration, whose
4332 component type has an invariant, use the object declaration
4333 as the insertion point for the invariant procedure, given that
4334 there is no explicit type declaration for an anonymous array type.
4335
4336 2017-09-08 Bob Duff <duff@adacore.com>
4337
4338 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
4339
4340 2017-09-08 Bob Duff <duff@adacore.com>
4341
4342 * a-strfix.adb (Trim): Compute Low and High only if needed.
4343
4344 2017-09-08 Justin Squirek <squirek@adacore.com>
4345
4346 * lib-load.adb (Load_Main_Source): Add error output in the case a
4347 source file is missing.
4348
4349 2017-09-08 Bob Duff <duff@adacore.com>
4350
4351 PR ada/80888
4352 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
4353 Default_WCEM by default (i.e. if the encoding is not specified
4354 by the Form string).
4355
4356 2017-09-08 Bob Duff <duff@adacore.com>
4357
4358 * s-trasym.ads (Hexa_Traceback): If
4359 Suppress_Hex is True, print "..." instead of a hexadecimal
4360 address.
4361 * s-trasym.adb: Ignore No_Hex in this version.
4362 Misc cleanup.
4363
4364 2017-09-08 Bob Duff <duff@adacore.com>
4365
4366 * debug.adb: Minor reformatting.
4367
4368 2017-09-08 Bob Duff <duff@adacore.com>
4369
4370 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
4371 code so it doesn't trigger an "uninit var" warning.
4372
4373 2017-09-08 Nicolas Roche <roche@adacore.com>
4374
4375 * s-hibaen.ads: Remove obsolete file.
4376
4377 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4378
4379 * a-locale.ads: Add comment explaining the state of this package.
4380
4381 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4382
4383 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
4384 of packages.
4385 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
4386 allow calls in the context of package spec (for pragma
4387 Initializes) and bodies (for pragma Refined_State).
4388
4389 2017-09-08 Bob Duff <duff@adacore.com>
4390
4391 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
4392 new Exp.
4393
4394 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4395
4396 * debug.adb (dA): Adjust comment.
4397 * gnat1drv.adb (Gnat1drv): Likewise.
4398 * opt.ads (List_Representation_Info_Extended): New variable.
4399 * repinfo.adb (List_Record_Info): Split implementation into...
4400 (Compute_Max_Length): ...this. Recurse on records if requested.
4401 (List_Record_Layout): Likewise.
4402 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
4403 statement, accept '0' and set List_Representation_Info_Extended
4404 on 'e'.
4405 * usage.adb (Usage): Document new -gnatRe variant.
4406
4407 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4408
4409 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
4410 Do not save the given entity in the global variable Default_Pool
4411 if the pragma appears within a generic unit.
4412
4413 2017-09-08 Bob Duff <duff@adacore.com>
4414
4415 * errout.adb (Delete_Warning): Do not
4416 decrement Warnings_Treated_As_Errors. This is called before
4417 Warnings_Treated_As_Errors has been incremented to account for
4418 this warning. Decrementing it here can lead to negative values
4419 of Warnings_Treated_As_Errors, raising Constraint_Error in
4420 checks-on builds, and causing the compiler to return an error
4421 code in checks-off builds.
4422
4423 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4424
4425 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
4426 entities of named concurrent types as Ref_Id and not of anonymous
4427 concurrent objects (because callers already know when a conversion
4428 is necessary and can easily do it); also, do not expect protected
4429 types or protected objects as Context_Id (because no flow-related
4430 SPARK pragmas are attached there); reflect these changes in a
4431 more precise comment.
4432
4433 2017-09-08 Olivier Hainque <hainque@adacore.com>
4434
4435 * g-altive.ads: Add documentation.
4436
4437 2017-09-08 Bob Duff <duff@adacore.com>
4438
4439 * sem_util.ads, debug.adb: Minor comment fix.
4440 * erroutc.ads: Comment fix.
4441
4442 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4443
4444 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
4445 for compatibility of component types of formal and actual in an
4446 instantiation of a child unit, when the component type of the
4447 formal is itself a formal of an enclosing generic.
4448
4449 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4450
4451 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
4452 sem_prag.adb to make it available for GNATprove; for concurrent
4453 types replace custom scope climbing with Scope_Same_Or_Within; for
4454 single concurrent objects add scope climbing (with Scope_Within),
4455 which was not there (that's the primary semantic change of this
4456 commit); also, when comparing a single concurrent object with
4457 its corresponding concurrent type rely on equality of types,
4458 not of objects (because that's simpler to code).
4459 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
4460 (Analyze_Global_Item): adjust special-casing of references to the
4461 current instance of a concurrent unit in the Global contracts
4462 of task types and single tasks objects; similar for references
4463 in the protected operations and entries of protected types and
4464 single protected objects (in all these cases the current instance
4465 behaves as an implicit parameter and must not be mentioned in
4466 the Global contract).
4467
4468 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4469
4470 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
4471 function calls returning a record within a subprogram call,
4472 for C generation.
4473
4474 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4475
4476 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
4477 name that designates the current instance of a child unit in its
4478 own body and appears as the prefix of a reference to an entity
4479 local to the child unit.
4480 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
4481 Minor reformatting.
4482
4483 2017-09-08 Yannick Moy <moy@adacore.com>
4484
4485 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
4486 may be intentional.
4487
4488 2017-09-08 Tristan Gingold <gingold@adacore.com>
4489
4490 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
4491 warnings on internal units in configurable run time mode.
4492
4493 2017-09-08 Bob Duff <duff@adacore.com>
4494
4495 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
4496 representation items from interfaces that the derived type
4497 implements, not just from the parent type.
4498 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
4499 this to return an empty list when there are no interfaces.
4500 * einfo.ads, sem_ch13.adb: Minor comment fixes.
4501 * sem_attr.adb: Minor comment fix.
4502
4503 2017-09-08 Doug Rupp <rupp@adacore.com>
4504
4505 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
4506 x86-vx7.
4507
4508 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4509
4510 * exp_ch4.adb (Expand_N_Allocator): Generate a
4511 call to Allocate_Any_Controlled when the allocation does not
4512 require any initialization.
4513
4514 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4515
4516 * sem_util.adb (Copy_Node_With_Replacement):
4517 Update the Renamed_Object field of a replicated object renaming
4518 declaration.
4519
4520 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
4521
4522 * exp_ch9.adb (Is_Pure_Barrier): Allow type
4523 conversions and components of objects. Simplified the detection
4524 of the Count attribute by identifying the corresponding run-time
4525 calls.
4526
4527 2017-09-08 Yannick Moy <moy@adacore.com>
4528
4529 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
4530 sem_type.adb, sinfo.ads: Minor reformatting.
4531
4532 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4533
4534 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
4535 of Freeze_Profile, used to inhibit the freezing of the profile
4536 of an expression function declared within a nested package, when
4537 some type in the profile depends on a private type declared in
4538 an enclosing package.
4539
4540 2017-09-08 Bob Duff <duff@adacore.com>
4541
4542 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
4543 the subunit case. It's still OK to set it in the "missing subunits"
4544 case, because that won't cause the obsolete .ali files that cause
4545 confusion.
4546
4547 2017-09-08 Bob Duff <duff@adacore.com>
4548
4549 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
4550 unclear why this didn't cause a warning.
4551 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
4552 pragmas. It's unclear why this didn't cause an error.
4553
4554 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4555
4556 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
4557 Reimplemented.
4558 (Expand_SPARK_Potential_Renaming): Code clean up.
4559 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
4560 the item does not have a proper entity.
4561 (Analyze_Input_Item): Add a guard in case the item does not have a
4562 proper entity.
4563 (Collect_States_And_Objects): Include object renamings in the
4564 items being collected.
4565 (Resolve_State): Update the documentation of this routine.
4566 * sem_util.adb (Entity_Of): Add circuitry to handle
4567 renamings of function results.
4568 (Remove_Entity): New routine.
4569 (Remove_Overloaded_Entity): Take advantage of factorization.
4570 * sem_util.ads (Entity_Of): Update the documentation
4571 of this routine.
4572 (Remove_Entity): New routine.
4573 (Remove_Overloaded_Entity): Update the documentation of this
4574 routine.
4575
4576 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4577
4578 * repinfo.adb (List_Record_Info): During first loop,
4579 do not override the normalized position and first bit
4580 if they have already been set. Move fallback code
4581 for the packed case to the case where it belongs.
4582 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
4583 Also adjust the normalized position of components.
4584 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
4585
4586 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4587
4588 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
4589 the placement of a primitive operation O that renames an operation
4590 R declared in an inner package, and which is thus not a primitive
4591 of the dispatching type of O. In this case O is a new primitive
4592 and does not inherit its dispatch table position from R (which
4593 has none).
4594
4595 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4596
4597 * sem_dim.adb (Analyze_Dimension_If_Expression,
4598 Analyze_Dimension_Case_Expression): new subprograms to verify
4599 the dimensional correctness of Ada2012 conditional expressions,
4600 and set properly the dimensions of the construct.
4601 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
4602 call Analyze_Dimension.
4603
4604 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4605
4606 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
4607 loop on an interface declared as a private extension of another
4608 synchronized interface.
4609
4610 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4611
4612 * sem_ch12.adb (Check_Generic_Parent): New procedure within
4613 Analyze_Associations, to handle actual packages that depend on
4614 previous instances. If a package IAP that is an instantiation is
4615 used as an actual in a subsequent instantiation SI in the same
4616 scope, and IAP has a body, IAP must be frozen before SI. If
4617 the generic parent of IAP is itself declared in a previous
4618 instantiation in the same scope, that instantiation must also
4619 be frozen before SI.
4620 (Install_Body): Prevent double insertion of freeze node for
4621 instance.
4622
4623 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4624
4625 * sem_prag.adb (Resolve_State): Update the
4626 comment on documentation. Generate a reference to the state once
4627 resolution takes place.
4628
4629 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4630
4631 * sem_ch13.adb (Analyze_Aspect_Specifications, case
4632 Linker_Section): If the aspect applies to an object declaration
4633 with explicit initialization, do not delay the freezing of the
4634 object, to prevent access-before-elaboration in the generated
4635 initialization code.
4636
4637 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4638
4639 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
4640 (Integer_Value (Item)) when the size of the fixed decimal type
4641 is larger than Integer.
4642
4643 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4644
4645 PR ada/82127
4646 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
4647 in order of increasing position in more cases.
4648
4649 2017-09-07 Yannick Moy <moy@adacore.com>
4650
4651 * a-exetim-mingw.ads: Add contract Global=>null
4652 on all operations that are modeled as having no read or write
4653 of global variables in SPARK.
4654
4655 2017-09-07 Raphael Amiard <amiard@adacore.com>
4656
4657 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
4658 to Hmaps.Generic_Ops.
4659 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
4660 cursors.
4661 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
4662 cursors.
4663 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
4664 position in cursors.
4665
4666 2017-09-07 Javier Miranda <miranda@adacore.com>
4667
4668 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
4669 allow disabling the generation of implicit pragma Elaborate_All
4670 on task bodies.
4671
4672 2017-09-07 Javier Miranda <miranda@adacore.com>
4673
4674 * exp_disp.adb (Make_Tags): Avoid suffix counter
4675 in the external name of the elaboration flag. Required to fix
4676 the regressions introduced by the initial version of this patch.
4677
4678 2017-09-07 Bob Duff <duff@adacore.com>
4679
4680 * sem_ch6.adb (Analyze_Function_Return): Do not
4681 insert an explicit conversion to force the displacement of the
4682 "this" pointer to reference the secondary dispatch table in the
4683 case where the return statement is returning a raise expression,
4684 as in "return raise ...".
4685
4686 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4687
4688 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
4689 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
4690 procedure from sem_disp.adb.
4691 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
4692 with Unit.
4693 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
4694 return the instantiation node for subprograms. Update references
4695 to Get_Unit_Instantiation_Node.
4696 * sem_ch7.adb (Install_Parent_Private_Declarations): update
4697 reference to Get_Unit_Instantiation_Node.
4698 * exp_dist.adb (Build_Package_Stubs): update reference to
4699 Get_Unit_Instantiation_Node.
4700 * sem_ch9.adb: minor typo in comment.
4701 * lib-xref-spark_specific.adb
4702 (Traverse_Declaration_Or_Statement): traverse into task type
4703 definition.
4704
4705 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4706
4707 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
4708 to handle properly various cases of type conversions where the
4709 target type and/or the expression carry dimension information.
4710 (Dimension_System_Root); If a subtype carries dimension
4711 information, obtain the source parent type that carries the
4712 Dimension aspect.
4713
4714 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
4715
4716 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
4717
4718 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4719
4720 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
4721 If the prefix is a reference to an object, rewrite it as an
4722 explicit dereference, as required by 3.7.2 (2) and as is done
4723 with most other attributes whose prefix is an access value.
4724
4725 2017-09-07 Bob Duff <duff@adacore.com>
4726
4727 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
4728 Refined_Depends aspect.
4729 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
4730 Refined_Depends pragma.
4731 * scans.ads: Fix documentation of Inside_Depends flag.
4732 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
4733
4734 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
4735
4736 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
4737 Account for the case where the are no lists to insert, but the
4738 secondary stack still requires management.
4739 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
4740 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
4741 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
4742 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
4743 Minor reformatting.
4744
4745 2017-09-07 Vincent Celier <celier@adacore.com>
4746
4747 * clean.adb: Do not get the target parameters before calling
4748 gprclean.
4749
4750 2017-09-07 Nicolas Roche <roche@adacore.com>
4751
4752 * s-osinte-solaris-posix.ads: Removed.
4753
4754 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4755
4756 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
4757 single concurrent objects.
4758
4759 2017-09-07 Javier Miranda <miranda@adacore.com>
4760
4761 * s-regexp.ads: Fix documentation of the globbing grammar.
4762
4763 2017-09-07 Gary Dismukes <dismukes@adacore.com>
4764
4765 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
4766
4767 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4768
4769 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
4770 in CodePeer mode, to support more legacy code automatically.
4771
4772 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4773
4774 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
4775 and thus not a controlling argument, preserve its type after
4776 rewriting because it may appear in an nested call with a classwide
4777 parameter.
4778
4779 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4780
4781 * comperr.adb (Delete_SCIL_Files): Handle case of
4782 N_Package_Instantiation.
4783
4784 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4785
4786 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
4787 clause for a unit U appears in a context that includes a regular
4788 with_clause on U, rewrite the redundant private clause into a null
4789 statement, rather than removing it altogether from the context,
4790 so that ASIS tools can reconstruct the original source.
4791
4792 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4793
4794 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
4795 for aspect Small can be of any real type (not only a universal
4796 real literal) as long as it is a static constant.
4797
4798 2017-09-07 Thomas Quinot <quinot@adacore.com>
4799
4800 * par_sco.adb: Minor reformatting.
4801
4802 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4803
4804 * s-parame-ae653.ads: Removed.
4805
4806 2017-09-07 Nicolas Roche <roche@adacore.com>
4807
4808 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
4809 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
4810 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
4811 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
4812 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
4813 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
4814
4815 2017-09-07 Yannick Moy <moy@adacore.com>
4816
4817 * a-ngelfu.ads Add preconditions to all functions
4818 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
4819
4820 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4821
4822 * lib-xref.adb (Generate_Reference): ignore
4823 references to entities which are Part_Of single concurrent
4824 objects.
4825
4826 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4827
4828 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
4829 comment.
4830
4831 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4832
4833 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
4834 Null_Task_Id is passed.
4835
4836 2017-09-07 Javier Miranda <miranda@adacore.com>
4837
4838 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
4839 attribute. Defined for record types and subtypes.
4840 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
4841 (Init_Tags_List) to facilitate generating separate code in the
4842 IP routine to initialize the object components and for completing
4843 the elaboration of dispatch tables.
4844 * exp_ch3.adb (Build_Init_Procedure): Improve the code
4845 generated in the IP routines by means of keeping separate
4846 the initialization of the object components from the
4847 initialization of its dispatch tables. (Init_Secondary_Tags):
4848 Adding new formal (Init_Tags_List) and adjusting calls to
4849 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
4850 adjusting also calls to Ada.Tags.Register_Interface_Offset
4851 because the type of one of its formals has been changed.
4852 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
4853 modified. Instead of receiving a pointer to an object this
4854 routine receives now a primary tag.
4855 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
4856 additional formal: the tag of the primary dispatch table.
4857 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
4858 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
4859 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
4860 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
4861 formal in calls to Init_Secondary_Tags.
4862
4863 2017-09-07 Javier Miranda <miranda@adacore.com>
4864
4865 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
4866 subprogram.
4867 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
4868 applied to generic subprograms.
4869
4870 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4871
4872 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
4873 (because it refers to the anonymous concurrent object, not its type);
4874 fix condition for emitting error message about task/protected type,
4875
4876 2017-09-07 Bob Duff <duff@adacore.com>
4877
4878 * binde.adb (Debug_Flag_Old): If both -do and -dp
4879 are specified, behave as if just -do was specified, rather than
4880 using a mixture.
4881
4882 2017-09-07 Nicolas Roche <roche@adacore.com>
4883
4884 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
4885 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
4886
4887 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4888
4889 * sem_prag.adb (Find_Role): The Global_Seen flag
4890 is now consulted not only for abstract states and variables,
4891 but for all kinds of items.
4892 (Collect_Subprogram_Inputs_Outputs): Do not process formal
4893 generic parameters, because unlike ordinary formal parameters,
4894 generic formals only act as input/ outputs if they are explicitly
4895 mentioned in a Global contract.
4896
4897 2017-09-07 Yannick Moy <moy@adacore.com>
4898
4899 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
4900 predicate procedure. Check predicate pragma/aspect with Ghost entity.
4901 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
4902 reformatting.
4903
4904 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4905
4906 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
4907 (code cleanup);
4908 * sem_ch3.adb (Build_Derived_Record_Type):i Call
4909 Copy_Dimensions_Of_Components after creating the copy of the
4910 record declaration.
4911 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
4912 derived recor type, copy the dikensions if any of each component
4913 of the parent record to the corresponding component declarations
4914 of the derived record. These expressions are used among other
4915 things as default values in aggregates with box associations.
4916 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
4917 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
4918 Minor reformatting.
4919
4920 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4921
4922 * sem_util.adb: Remove extra space after THEN.
4923
4924 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4925
4926 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
4927 also mark the renamed subprogram as referenced.
4928
4929 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4930
4931 * par-ch6.adb (P_Subprogram): Improve error message on null
4932 procedure with misplaced aspect specification, which the parser
4933 first attempts to interpret as a malformed expression function.
4934
4935 2017-09-07 Gary Dismukes <dismukes@adacore.com>
4936
4937 * sem_attr.adb (Analyze_Attribute_Old_Result):
4938 Allow attributes Result and Old in the case of an expression
4939 function.
4940
4941 2017-09-07 Justin Squirek <squirek@adacore.com>
4942
4943 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
4944 Volatile to subcomponents.
4945
4946 2017-09-07 Bob Duff <duff@adacore.com>
4947
4948 * exp_ch7.adb (Find_Last_Init): Check for the
4949 case where a build-in-place function call has been replaced by a
4950 'Reference attribute reference.
4951
4952 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4953
4954 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
4955 nodes.
4956
4957 2017-09-07 Bob Duff <duff@adacore.com>
4958
4959 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
4960 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
4961 secondary stack for all functions that return limited tagged
4962 types -- just do it for dispatching calls. Misc cleanup.
4963 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
4964 remove qualifications and type conversions. Fix various bugs
4965 where only a single level of qualification or conversion was
4966 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
4967 instead of "X".
4968 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
4969 cleanup.
4970
4971 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4972
4973 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
4974 do not create actual subtypes that may generate further predicate
4975 functions.
4976 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
4977 of body is a predicate function as well.
4978 (Resolve_Aspect_Expressions, Resolve_Name): For a component
4979 association, only the expression needs resolution, not the name.
4980 (Resolve_Aspect_Expressions, case Predicates): Construct and
4981 analyze the predicate function declaration in the scope of the
4982 type, before making the type and its discriminants visible.
4983
4984 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4985
4986 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
4987 only if the record type itself comes from source.
4988
4989 2017-09-06 Gary Dismukes <dismukes@adacore.com>
4990
4991 * sem_ch5.adb: Minor reformatting and a typo fix
4992
4993 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4994
4995 * sinput-l.ads: minor remove extra period at the end of comment
4996
4997 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4998
4999 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
5000 E_Discriminant.
5001 (Find_Role): remove support for E_Discriminant.
5002
5003 2017-09-06 Javier Miranda <miranda@adacore.com>
5004
5005 * exp_ch6.adb (Expand_Simple_Function_Return):
5006 Add missing implicit type conversion to force displacement of the
5007 "this" pointer.
5008
5009 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5010
5011 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
5012
5013 2017-09-06 Yannick Moy <moy@adacore.com>
5014
5015 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
5016 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
5017
5018 2017-09-06 Bob Duff <duff@adacore.com>
5019
5020 * sem_ch8.adb: Change Assert to be consistent with
5021 other similar ones.
5022
5023 2017-09-06 Bob Duff <duff@adacore.com>
5024
5025 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
5026 requested. Previously, the -do switch meant "run Elab_New and
5027 Elab_Old and use the order chosen by Elab_Old, possibly with
5028 debugging printouts comparing the two orders." Now it means
5029 "do not run Elab_New." This is of use if there are bugs that
5030 cause Elab_New to crash.
5031 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
5032 type conversions.
5033 * ali.ads (Elab_Position): Change type to Nat, to avoid various
5034 type conversions.
5035
5036 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5037
5038 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
5039 reference to SPARK RM.
5040
5041 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5042
5043 * layout.adb: Use SSU short hand consistently throughout the file.
5044
5045 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5046
5047 * freeze.adb (Freeze_Record_Type)
5048 <Sized_Component_Total_Round_RM_Size>: New local variable to
5049 accumulate the rounded RM_Size of components. Update it for
5050 every component whose RM_Size is statically known. Add missing
5051 guard to check that bit packing is really required before issuing
5052 the error about packing. Swap condition for clarity's sake.
5053 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
5054
5055 2017-09-06 Fedor Rybin <frybin@adacore.com>
5056
5057 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
5058 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
5059 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
5060 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
5061 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
5062 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
5063 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
5064 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
5065 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
5066 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
5067 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
5068 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
5069 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
5070 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
5071 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
5072 project manager sources.
5073
5074 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5075
5076 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
5077 entity of a mutable type and the right-hand side is a conditional
5078 expression, resolve the alternatives of the conditional using
5079 the base type of the target entity, because the alternatives
5080 may have distinct subtypes. This is particularly relevant if
5081 the alternatives are aggregates.
5082
5083 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5084
5085 * checks.adb (Apply_Predicate_Check): If the expression is an
5086 aggregate that is the RHS of an assignment, apply the check to
5087 the LHS after the assignment, rather than to the aggregate. This
5088 is more efficient than creating a temporary for the aggregate,
5089 and prevents back-end crashes when the aggregate includes a
5090 dynamic "others' association.
5091
5092 2017-09-06 Yannick Moy <moy@adacore.com>
5093
5094 * sem_ch12.adb (Analyze_Instance_And_Renamings):
5095 Set variable to ignore SPARK_Mode in instance before the analysis
5096 of the generated package declaration.
5097
5098 2017-09-06 Yannick Moy <moy@adacore.com>
5099
5100 * sem_res.adb (Resolve_Call): Do not issue a
5101 message for calls inside expression function, unless body was
5102 seen and is candidate for inlining.
5103
5104 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5105
5106 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
5107 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
5108 body. do not freeze the formals of the generic unit.
5109
5110 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5111
5112 * errout.adb (Error_Msg): Separate the
5113 treatment for warning vs. style messages in inlinings and
5114 instantiations. Prevents blowups on calls to Warn_Insertion for
5115 style messages, which should not be called in that case because
5116 Warning_Msg_Char is not set.
5117
5118 2017-09-06 Justin Squirek <squirek@adacore.com>
5119
5120 * sem_prag.adb (Check_VFA_Conflicts): Created
5121 to group all Volatile_Full_Access checks relating to other
5122 representation pragmas (Mark_Component_Or_Object): Created
5123 to centeralize the flagging of attributes for the record type
5124 component case, a pragma applied individually to a component, and
5125 the object case.
5126 (Process_Atomic_Independent_Shared_Volatile):
5127 Add propagation of certain pragmas to record components and move
5128 evaluation of VFA checks
5129
5130 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5131
5132 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
5133 Do not warn on conditions that are not obeyed for Inline_Always
5134 subprograms, when assertions are not enabled.
5135
5136 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5137
5138 * sem_util.adb (Unique_Entity): For abstract states return their
5139 non-limited view.
5140
5141 2017-09-06 Bob Duff <duff@adacore.com>
5142
5143 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
5144 that is a proper body corresponding to a stub, we defer the
5145 adjustment of the sloc until after the correct adjustment has
5146 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
5147 the adjustment, because it will be outside the range in (the old,
5148 incorrect) S_Adjustment.
5149 * inline.adb: Use named notation for readability and uniformity.
5150 * sinput-l.adb: Minor improvements to debugging output printed
5151 for Debug_Flag_L.
5152 * sinput-l.ads (Create_Instantiation_Source): Minor comment
5153 correction.
5154
5155 2017-09-06 Vincent Celier <celier@adacore.com>
5156
5157 * make.adb: Do not invoke gprbuild for -bargs -P.
5158
5159 2017-09-06 Sylvain Dailler <dailler@adacore.com>
5160
5161 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
5162 case when Op is of kind N_Qualified_Expression. In this case,
5163 the function is called recursively on the subexpression like in
5164 other cases.
5165 * make.adb: Minor reformatting
5166
5167 2017-09-06 Justin Squirek <squirek@adacore.com>
5168
5169 * einfo.adb (Set_Linker_Section_Pragma): Modify
5170 Set_Linker_Section_Pragma to be consistant with the "getter"
5171 Linker_Section_Pragma.
5172 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
5173 checking for container loops so that the index cursor is not
5174 directly changable by the user with the use of E_Loop_Parameter.
5175 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
5176 * sem_warn.adb (Check_References): Revert previous change.
5177
5178 2017-09-06 Bob Duff <duff@adacore.com>
5179
5180 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
5181 calls and the like.
5182
5183 2017-09-06 Yannick Moy <moy@adacore.com>
5184
5185 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
5186 declarations to only consider valid uses of Global/Depends those on
5187 single concurrent objects.
5188
5189 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5190
5191 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
5192 error as soon as one of the specified components overlaps the
5193 parent field.
5194
5195 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5196
5197 * sem_prag.ads: minor fix typo in comment.
5198
5199 2017-09-06 Justin Squirek <squirek@adacore.com>
5200
5201 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
5202 from source before checking source references.
5203 * sem_warn.adb (Check_References): Add check for internal block
5204 before recursing.
5205
5206 2017-09-06 Vincent Celier <celier@adacore.com>
5207
5208 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
5209 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
5210 gnatname.adb: Remove the Project Manager from the GNAT tools.
5211 * gcc-interface/Makefile.in: ditto.
5212
5213 2017-09-06 Bob Duff <duff@adacore.com>
5214
5215 * sem_util.ads: Minor comment fix.
5216
5217 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5218
5219 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
5220 Generate a freeze node for the actual of a formal package, if
5221 the actual is declared in the same unit and has a corresponding
5222 body, to prevent the current instance from being frozen before
5223 the actual is.
5224
5225 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5226
5227 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
5228
5229 2017-09-06 Yannick Moy <moy@adacore.com>
5230
5231 * sem_warn.adb: Minor refactoring.
5232
5233 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5234
5235 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
5236 to retrieve the inherited classwide precondition/postcondition
5237 of a subprogram.
5238 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
5239 freezing a subprogram, to complete the generation of the
5240 corresponding checking code.
5241
5242 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5243
5244 * exp_util.adb (Is_Controlled_Indexing): New routine.
5245 (Is_Displace_Call): Use routine Strip to remove indirections.
5246 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
5247 missing case of controlled generalized indexing.
5248 (Is_Source_Object): Use routine Strip to remove indirections.
5249 (Strip): New routine.
5250
5251 2017-09-06 Bob Duff <duff@adacore.com>
5252
5253 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
5254 we include the proper header. Otherwise, we just declare the necessary
5255 things from the capabilities library. This is so we can build on
5256 machines without that library, while still enabling that library.
5257 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
5258 simply return 0 if the library is not present, or not included
5259 in the link.
5260
5261 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
5262
5263 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
5264 for renamings that involve function calls in prefix form.
5265
5266 2017-09-06 Bob Duff <duff@adacore.com>
5267
5268 * sem_ch3.adb (Analyze_Subtype_Declaration):
5269 Set Has_Delayed_Freeze on a subtype of an incomplete type.
5270
5271 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
5272
5273 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
5274 has no parameter specification and no entry index, use the entry name
5275 as the end of the generated SCO statement.
5276
5277 2017-09-06 Steve Baird <baird@adacore.com>
5278
5279 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
5280 uses of 'Image and related attributes as having side effects in
5281 order to avoid replicating such uses.
5282 * pprint.ads (Expression_Image) Add new generic formal flag
5283 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
5284 (eventually) override the default.
5285 * pprint.adb (Expression_Image) If the new flag is set, then
5286 suppress the ".all" suffix when displaying a dereference whose
5287 prefix is a use of a value-capturing compiler temp of the sort
5288 generated by Expr_Util.Remove_Side_Effects .
5289 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
5290 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
5291 Minor reformatting.
5292 * inline.adb: Minor wording change.
5293
5294 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5295
5296 * sem_ch7.adb: Update comment.
5297
5298 2017-09-06 Yannick Moy <moy@adacore.com>
5299
5300 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
5301 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
5302 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
5303 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
5304 so that applies to any entity.
5305
5306 2017-09-06 Yannick Moy <moy@adacore.com>
5307
5308 * sem_ch3.adb (Derived_Type_Declaration): Use
5309 Incomplete_Or_Partial_View rather than local Find_Partial_View.
5310
5311 2017-09-06 Javier Miranda <miranda@adacore.com>
5312
5313 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
5314 following ISO-8861.
5315
5316 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5317
5318 * sem_dim.adb (Analyze_Dimension): In an instance, a type
5319 conversion takes its dimensions from the expression, not from
5320 the context type.
5321 (Dimensions_Of_Operand): Ditto.
5322
5323 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5324
5325 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
5326 null procedures when GNAT coverage is used, so that their (empty)
5327 bodies are properly covered.
5328
5329 2017-09-06 Bob Duff <duff@adacore.com>
5330
5331 * sem_ch13.adb (Resolve_Aspect_Expressions): If
5332 the entity is a type with discriminants, make the discriminants
5333 directly visible in aspect clauses.
5334
5335 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5336
5337 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
5338 Universal_Real and the context is a floating-point type, resolve
5339 both operands to the target type.
5340
5341 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5342
5343 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
5344 sem_ch3.adb, sem_util.adb: Minor reformatting.
5345
5346 2017-09-06 Yannick Moy <moy@adacore.com>
5347
5348 * freeze.adb (Check_Inherited_Conditions): Rewriting
5349 of inherited preconditions and postconditions should only occur
5350 in GNATprove mode, that is, when GNATprove_Mode is True, not to
5351 be confused with SPARK_Mode being On.
5352
5353 2017-09-06 Yannick Moy <moy@adacore.com>
5354
5355 * sem_warn.adb (Check_References): Take into
5356 account possibility of attribute reference as original node.
5357
5358 2017-09-06 Yannick Moy <moy@adacore.com>
5359
5360 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
5361 use of attribute.
5362
5363 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5364
5365 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
5366 on the procedure created to encapsulate the body.
5367 * sem_ch7.adb: Add with clause for GNAT.HTable.
5368 (Entity_Table_Size): New constant.
5369 (Entity_Hash): New function.
5370 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
5371 (Is_Subprogram_Ref): Rename into...
5372 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
5373 the table instead of bailing out on them. Scan the value of constants
5374 if it is not known at compile time.
5375 (Contains_Subprograms_Refs): Rename into...
5376 (Scan_Subprogram_Refs): ...this.
5377 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
5378 Is_Public flag on subprograms if they are not actually referenced.
5379 (Hide_Public_Entities): Beef up comment on the algorithm.
5380 Reset the table of subprograms on entry.
5381
5382 2017-09-06 Yannick Moy <moy@adacore.com>
5383
5384 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
5385
5386 2017-09-06 Javier Miranda <miranda@adacore.com>
5387
5388 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
5389 cannot handle a type conversion of an array as an aggregate
5390 component.
5391
5392 2017-09-06 Bob Duff <duff@adacore.com>
5393
5394 * g-comlin.adb (Try_Help): Remove ".exe" so we
5395 get the same results on windows and unix.
5396
5397 2017-09-06 Justin Squirek <squirek@adacore.com>
5398
5399 * exp_imgv.adb (Expand_Image_Attribute),
5400 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
5401 Added case to handle new-style 'Image expansion
5402 (Rewrite_Object_Image): Moved from exp_attr.adb
5403 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5404 attribute cases so that the relevant subprograms in exp_imgv.adb
5405 handle all expansion.
5406 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
5407 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
5408 cases to call common function Analyze_Image_Attribute.
5409 (Analyze_Image_Attribute): Created as a common path for all
5410 image attributes (Check_Object_Reference_Image): Removed
5411 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5412 Removed and refactored into Is_Object_Image (Is_Object_Image):
5413 Created as a replacement for Is_Image_Applied_To_Object
5414
5415 2017-09-06 Yannick Moy <moy@adacore.com>
5416
5417 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
5418 message for missing input.
5419
5420 2017-09-06 Yannick Moy <moy@adacore.com>
5421
5422 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
5423 of protected subprograms and entries.
5424 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
5425 New function to detect when a subprogram of entry is defined
5426 inside a protected object.
5427
5428 2017-09-06 Bob Duff <duff@adacore.com>
5429
5430 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
5431 whether the current process has the CAP_SYS_NICE capability.
5432 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
5433 ceiling priorities if the current process has the CAP_SYS_NICE
5434 capability.
5435
5436 2017-09-06 Bob Duff <duff@adacore.com>
5437
5438 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
5439 check back to the body, because SPARK is not yet ready for
5440 "or else raise Constraint_Error".
5441
5442 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5443
5444 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
5445 procedure by a single null statement, after evaluating the
5446 actuals that require it.
5447
5448 2017-09-06 Javier Miranda <miranda@adacore.com>
5449
5450 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
5451 Generating C code improve the code that checks the use of nested
5452 aggregates to initialize object declarations.
5453
5454 2017-09-06 Yannick Moy <moy@adacore.com>
5455
5456 * sem_ch3.adb (Derived_Type_Declaration): Detect
5457 violations of new rule SPARK RM 3.4(1). Also refactor existing
5458 check to use the new function Find_Partial_View.
5459
5460 2017-09-06 Vincent Celier <celier@adacore.com>
5461
5462 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
5463 from the Prj hierarchy has been removed from the GNAT driver.
5464
5465 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5466
5467 * sem_type.adb (Interface_Present_In_Ancestor): Within an
5468 expression function, or within a spec expression (default value,
5469 etc) a reference to an incomplete type is legal: legality of
5470 the operation will be checked when some related entity (type,
5471 object or subprogram) is frozen.
5472
5473 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5474
5475 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
5476 adjustments and a typo fix.
5477
5478 2017-09-06 Yannick Moy <moy@adacore.com>
5479
5480 * sem_res.adb (Resolve_Call): Do not issue info
5481 message about inlining of calls to functions in assertions,
5482 for functions whose body has not been seen yet.
5483
5484 2017-09-06 Bob Duff <duff@adacore.com>
5485
5486 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
5487 we can use modern Ada in this package.
5488 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
5489 Move Ada.Command_Line.Response_File to System.Response_File,
5490 and make Ada.Command_Line.Response_File into a rename of
5491 System.Response_File. This is to avoid having gnatbind depend
5492 Ada.Command_Line, which would damage the bootstrap process now
5493 that Ada.Command_Line contains modern Ada (the raise expression).
5494 * gnatbind.adb: Avoid dependence on
5495 Ada.Command_Line. Depend on System.Response_File instead
5496 of Ada.Command_Line.Response_File. Change one call to
5497 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
5498 to Ada.Command_Line.Argument_Count to use Arg_Count.
5499 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
5500
5501 2017-09-06 Bob Duff <duff@adacore.com>
5502
5503 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
5504 switch, because we've already read gnat.adc by default.
5505
5506 2017-09-06 Bob Duff <duff@adacore.com>
5507
5508 * exp_ch5.adb (Get_Default_Iterator): Replace
5509 "Assert(False)" with "return Iter", because if an iterable
5510 type is derived from a noniterable one, then we won't find an
5511 overriding or inherited default iterator.
5512
5513 2017-09-06 Yannick Moy <moy@adacore.com>
5514
5515 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
5516 literal index used to access a string is null or negative.
5517
5518 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5519
5520 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
5521 allowed on loop parameters.
5522 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
5523 on loop parameters.
5524 (Write_Field15_Name): Update the output for
5525 Status_Flag_Or_Transient_Decl.
5526 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
5527 to loop parameters. Update the documentation of the attribute
5528 and the E_Loop_Parameter entity.
5529 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
5530 which assumes that cursors can never be controlled.
5531 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
5532 guard which assumes that cursors can never be controlled.
5533
5534 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5535
5536 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
5537 sem_warn.adb: Minor reformatting.
5538
5539 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5540
5541 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
5542 fix and preserve older GNAT warning on overlapping actuals that
5543 are not elementary types.
5544
5545 2017-09-06 Justin Squirek <squirek@adacore.com>
5546
5547 * sem_attr.adb: Comment correction.
5548
5549 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5550
5551 * sem_util.adb: Minor reformatting.
5552
5553 2017-09-06 Yannick Moy <moy@adacore.com>
5554
5555 * a-comlin.ads (Argument): Add precondition for analysis.
5556
5557 2017-09-06 Yannick Moy <moy@adacore.com>
5558
5559 * sem_res.adb (Resolve): Update message for function call as statement.
5560
5561 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5562
5563 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
5564 generated bodies for renamings that are completions, when renamed
5565 procedure is No_Return.
5566 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5567 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
5568 with No_Return, the renamed entity must be No_Return as well.
5569
5570 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5571
5572 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
5573 Minor reformatting.
5574
5575 2017-09-06 Justin Squirek <squirek@adacore.com>
5576
5577 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5578 attribute cases (Rewrite_Object_Reference_Image): Created to
5579 aid the rewriting of new-style 'Image attributes.
5580 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
5581 (Check_Object_Reference_Image): Created to handle verification of
5582 'Image with object-references as prefixes.
5583 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5584 Create predicate to identify cases where an 'Image attribute's
5585 prefix applies to an object reference.
5586
5587 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5588
5589 * freeze.adb (Freeze_Entity): Do not generate a freeze
5590 node for a generic unit, even if it includes delayed aspect
5591 specifications. Freeze nodes for generic entities must never
5592 appear in the tree that reaches the back-end of the compiler.
5593
5594 2017-09-06 Yannick Moy <moy@adacore.com>
5595
5596 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
5597
5598 2017-09-06 Yannick Moy <moy@adacore.com>
5599
5600 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
5601 to subprograms in other units as possibly inlined.
5602
5603 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5604
5605 * freeze.adb (Freeze_Entity): For a derived type that has no
5606 explicit delayed aspects but may inherit delayed aspects from its
5607 parent type, analyze aspect at freeze point for proper capture
5608 of an inherited aspect.
5609
5610 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5611
5612 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
5613 renamings; also, avoid repeated calls to Renamed_Object when getting
5614 through object renamings.
5615
5616 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5617
5618 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
5619 array type declaration in a private part, when an index is a
5620 subtype indication of a discrete type with a private partial view.
5621
5622 2017-09-06 Javier Miranda <miranda@adacore.com>
5623
5624 * exp_ch4.adb (Expand_Modular_Op): Force generating
5625 temporary to improve the generated code.
5626
5627 2017-09-06 Tristan Gingold <gingold@adacore.com>
5628
5629 * s-fatgen.adb: Minor typo fix in comment.
5630
5631 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5632
5633 * exp_ch5.adb (Make_Field_Assign): If the type
5634 of the right-hand side has stored constraint, use its values
5635 (except for those that are renamings of parent discriminants)
5636 to produce additional assignments for the discriminants of the
5637 left-hand side, which are invisible in the righ-hand side and
5638 not retrievable as selected components.
5639
5640 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5641
5642 * sem_util.adb (Needs_One_Formal): The first formal of such a
5643 function must be a controlling formal, so that Obj.F (X, Y)
5644 can have the interpretation F(Obj)(X, Y).
5645 * sem_util.ads: Clarify documentation.
5646
5647 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5648
5649 * table.ads, table.adb: Restore original implementation.
5650 * namet.h (Names_Ptr): Adjust back.
5651 (Name_Chars_Ptr): Likewise.
5652 * uintp.h (Uints_Ptr): Likewise.
5653 (Udigits_Ptr): Likewise.
5654 * g-table.ads: Remove pragma Compiler_Unit_Warning.
5655 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
5656 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
5657 * spark_xrefs.ads: Likewise.
5658 * scos.h: Undo latest changes.
5659
5660 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5661
5662 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
5663 No_Return flag to instance if pragma applies to generic unit. This
5664 must be done explicitly because the pragma does not appear
5665 directly in the generic declaration (unlike the corresponding
5666 aspect specification).
5667
5668 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5669
5670 * sem_ch7.adb (Has_Referencer): Move up and expand comment
5671 explaining the test used to detect inlining. Use same test
5672 in second occurrence.
5673 (Analyze_Package_Body_Helper): Minor formatting fixes.
5674
5675 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5676
5677 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
5678 derived type with a mixture of renamed and constrained parent
5679 discriminants, the constraint for the target must obtain the
5680 discriminant values from both the operand and from the stored
5681 constraint for it, given that the constrained discriminants are
5682 not visible in the object.
5683 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
5684 side may be derived from that of the left-hand side (as in the
5685 case of an assignment with a change of representation) so the
5686 discriminant to be used in the retrieval of the value of the
5687 component must be the entity in the type of the right-hand side.
5688
5689 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5690
5691 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
5692 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5693 * exp_util.adb (Is_Source_Object): Account for
5694 the cases where the source object may appear as a dereference
5695 or within a type conversion.
5696 * exp_ch6.adb: Fix missing space in error message.
5697
5698 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5699
5700 * sem_prag.adb: Update description of Eliminate.
5701
5702 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5703
5704 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
5705 properly an attribute reference 'Loop_Entry that appears in the
5706 list of indices of an indexed expression, to prevent an infinite
5707 loop in the compiler.
5708
5709 2017-09-06 Bob Duff <duff@adacore.com>
5710
5711 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
5712
5713 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5714
5715 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
5716 in a set membership is an overloaded enumeration literal, and
5717 the type of the alternative is resolved from a previous one,
5718 replace the entity of the alternative as well as the type,
5719 to prevent inconsistencies between the entity and the type.
5720
5721 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5722
5723 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
5724 (No_Component_Reordering_Specified): New switch.
5725 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
5726 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
5727 * bcheck.adb (Check_Consistent_No_Component_Reordering):
5728 New check.
5729 (Check_Configuration_Consistency): Invoke it.
5730 * debug.adb (d.r): Toggle the effect of the switch.
5731 (d.v): Change to no-op.
5732 * einfo.ads (Has_Complex_Representation):
5733 Restrict to record types.
5734 (No_Reordering): New alias for Flag239.
5735 (OK_To_Reorder_Components): Delete.
5736 (No_Reordering): Declare.
5737 (Set_No_Reordering): Likewise.
5738 (OK_To_Reorder_Components): Delete.
5739 (Set_OK_To_Reorder_Components): Likewise.
5740 * einfo.adb (Has_Complex_Representation): Expect record types.
5741 (No_Reordering): New function.
5742 (OK_To_Reorder_Components): Delete.
5743 (Set_Has_Complex_Representation): Expect base record types.
5744 (Set_No_Reordering): New procedure.
5745 (Set_OK_To_Reorder_Components): Delete.
5746 (Write_Entity_Flags): Adjust to above change.
5747 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
5748 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
5749 OK_To_Reorder_Components on record types with convention Ada.
5750 * lib-writ.adb (Write_ALI): Deal with NC marker.
5751 * opt.ads (No_Component_Reordering): New flag.
5752 (No_Component_Reordering_Config): Likewise.
5753 (Config_Switches_Type): Add No_Component_Reordering component.
5754 * opt.adb (Register_Opt_Config_Switches): Copy
5755 No_Component_Reordering onto No_Component_Reordering_Config.
5756 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
5757 (Save_Opt_Config_Switches): Save No_Component_Reordering.
5758 (Set_Opt_Config_Switches): Set No_Component_Reordering.
5759 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
5760 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
5761 No_Reordering flag from the default.
5762 (Build_Derived_Private_Type): Likewise.
5763 (Build_Derived_Record_Type): Likewise. Then inherit it
5764 for untagged types and clean up handling of similar flags.
5765 (Record_Type_Declaration): Likewise.
5766 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
5767 remove redundant test on Is_Tagged_Type.
5768 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
5769 (Sig_Flags): Likewise.
5770 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
5771 (Pragma_Id): Add Pragma_No_Component_Reordering value.
5772 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
5773 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
5774 Copy the layout of the parent type only if the No_Reordering
5775 settings match.
5776 (components_to_record): Reorder record types with
5777 convention Ada by default unless No_Reordering is set or -gnatd.r
5778 is specified and do not warn if No_Reordering is set in GNAT mode.
5779
5780 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5781
5782 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
5783 new predicate to reject declarations that can be completions,
5784 when there is a visible prior homograph that is a null procedure.
5785 * sem_ch6.adb (Analyze_Null_Procedure): use it.
5786 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
5787
5788 2017-09-06 Thomas Quinot <quinot@adacore.com>
5789
5790 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
5791 run of 253 characters or more.
5792
5793 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5794
5795 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
5796 properly incomplete subtypes that may be created by explicit or
5797 implicit declarations.
5798 (Is_Base_Type): Take E_Incomplete_Subtype into account.
5799 (Subtype_Kind): Ditto.
5800 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
5801 Ekind of a subtype of a discriminated incomplete type.
5802 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
5803 incomplete types, to preserve error reporting.
5804 (Process_Incomplete_Dependents): Do not create a subtype
5805 declaration for an incomplete subtype that is created internally.
5806 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
5807 incomplete subtypes that do not require a completion, either
5808 because they are limited views, of they are generic actuals.
5809
5810 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5811
5812 * checks.adb (Insert_Valid_Check): Remove the
5813 suspicious manipulation of the Do_Range_Check flag as ths is
5814 no linger needed. Suppress validity check when analysing the
5815 validation variable.
5816
5817 2017-09-06 Philippe Gil <gil@adacore.com>
5818
5819 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
5820 GNATCOLL.Memory
5821
5822 2017-09-06 Bob Duff <duff@adacore.com>
5823
5824 * sem_elim.adb: Minor comment fix.
5825
5826 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5827
5828 * sem_util.adb (Is_Object_Reference): A function call is an
5829 object reference, and thus attribute references for attributes
5830 that are functions (such as Pred and Succ) as well as predefined
5831 operators are legal in contexts that require an object, such as
5832 the prefix of attribute Img and the Ada2020 version of 'Image.
5833
5834 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5835
5836 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
5837 exp_ch3.adb, xoscons.adb: Minor reformatting.
5838
5839 2017-09-06 Raphael Amiard <amiard@adacore.com>
5840
5841 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
5842 Position parameter. If supplied, use it to provide efficient iteration.
5843 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
5844 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
5845 iteration.
5846
5847 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5848
5849 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
5850 designated type is class-wide and the expression is an unchecked
5851 conversion, preserve the conversion when checking the tag of the
5852 designated object, to prevent spurious semantic errors when the
5853 expression in the conversion has an untagged type (for example
5854 an address attribute).
5855
5856 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5857
5858 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
5859 operation is subject to a pragma Eliminate.
5860
5861 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5862
5863 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
5864
5865 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5866
5867 * fe.h (Eliminate_Error_Msg): Remove.
5868
5869 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
5870
5871 * gcc-interface/utils.c (make_packable_type): Update call to
5872 mode_for_size_tree.
5873
5874 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
5875
5876 * gcc-interface/utils2.c (build_load_modify_store):
5877 Use int_mode_for_size.
5878
5879 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5880
5881 PR ada/62235
5882 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5883 for Itypes that are E_Record_Subtype with a cloned subtype.
5884 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
5885
5886 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5887
5888 * gcc-interface/trans.c (convert_with_check): Use a custom base type
5889 if the base type of the expression has a different machine mode.
5890 Rename a couple of parameters and local variable.
5891
5892 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5893
5894 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
5895 conversions around prefixes that are not references.
5896
5897 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5898
5899 * gcc-interface/utils.c (unchecked_convert): When the result type is a
5900 non-biased integral type with size 0, set the result to 0 directly.
5901
5902 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5903
5904 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
5905 (renaming_from_instantiation_p): ...this.
5906 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
5907 instead of explicit tests on kind of entities. Adjust for renaming.
5908 (gnat_to_gnu_profile_type): Likewise.
5909 (gnat_to_gnu_subprog_type): Likewise.
5910 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
5911 (Case_Statement_to_gnu): Likewise.
5912 (gnat_to_gnu): Likewise.
5913 (process_freeze_entity): Likewise.
5914 (process_type): Likewise.
5915 (add_stmt_with_node): Adjust for renaming.
5916 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
5917 (renaming_from_generic_instantiation_p): Rename to...
5918 (renaming_from_instantiation_p): ...this. Use inline predicate.
5919 (pad_type_hasher::keep_cache_entry): Fold.
5920
5921 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5922
5923 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
5924 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
5925 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
5926 (N_Slice): Likewise.
5927 (N_Selected_Component): Likewise. Do not try again to translate it.
5928 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
5929
5930 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5931
5932 * repinfo.ads: Document new treatment of dynamic values.
5933 (TCode): Bump upper bound to 29.
5934 (Dynamic_Val): New constant set to 29.
5935 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
5936 (Rep_Value) <Dynamic_Val>: Likewise.
5937 * repinfo.h (Dynamic_Val): New macro.
5938 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
5939 DECL_P nodes too.
5940 <INTEGER_CST>: Set TCODE instead of recursing.
5941 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
5942 <VAR_DECL>: New case.
5943 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
5944 <BIT_AND_EXPR>: Adjust.
5945 <CALL_EXPR>: Do not fall through.
5946
5947 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5948
5949 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
5950 there is no target, do not create a temporary for the return value for
5951 an allocator either.
5952
5953 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5954
5955 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
5956 unconstrained array type.
5957
5958 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5959 Alan Hayward <alan.hayward@arm.com>
5960 David Sherwood <david.sherwood@arm.com>
5961
5962 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
5963 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
5964
5965 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5966 Alan Hayward <alan.hayward@arm.com>
5967 David Sherwood <david.sherwood@arm.com>
5968
5969 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
5970 is_a <scalar_int_mode>.
5971 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
5972 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
5973
5974 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5975 Alan Hayward <alan.hayward@arm.com>
5976 David Sherwood <david.sherwood@arm.com>
5977
5978 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
5979 instead of mode_for_size.
5980 (gnat_to_gnu_subprog_type): Likewise.
5981 * gcc-interface/utils.c (make_type_from_size): Likewise.
5982
5983 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5984 Alan Hayward <alan.hayward@arm.com>
5985 David Sherwood <david.sherwood@arm.com>
5986
5987 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
5988 (fp_size_to_prec): Likewise.
5989
5990 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5991 Alan Hayward <alan.hayward@arm.com>
5992 David Sherwood <david.sherwood@arm.com>
5993
5994 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
5995 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
5996
5997 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5998 Alan Hayward <alan.hayward@arm.com>
5999 David Sherwood <david.sherwood@arm.com>
6000
6001 * gcc-interface/decl.c (validate_size): Update use of
6002 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
6003
6004 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6005 Alan Hayward <alan.hayward@arm.com>
6006 David Sherwood <david.sherwood@arm.com>
6007
6008 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
6009 (fp_size_to_prec): Likewise.
6010
6011 2017-08-29 Martin Liska <mliska@suse.cz>
6012
6013 PR other/39851
6014 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
6015
6016 2017-08-08 Martin Liska <mliska@suse.cz>
6017
6018 * gcc-interface/trans.c: Include header files.
6019
6020 2017-07-29 Jakub Jelinek <jakub@redhat.com>
6021
6022 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
6023 as new argument to the imported_module_or_decl debug hook.
6024
6025 2017-07-25 Javier Miranda <miranda@adacore.com>
6026
6027 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
6028 evaluated twice.
6029
6030 2017-07-19 Jakub Jelinek <jakub@redhat.com>
6031
6032 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
6033 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
6034 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
6035
6036 2017-07-18 Mike Frysinger <vapier@chromium.org>
6037
6038 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
6039 (../../gnatlink$(exeext)): Likewise.
6040
6041 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
6042
6043 PR ada/81446
6044 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
6045 (Backend_Overflow_Checks): Set to True.
6046
6047 2017-06-23 Jakub Jelinek <jakub@redhat.com>
6048
6049 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
6050
6051 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
6052
6053 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
6054 notice. New macro.
6055 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
6056 as a definition.
6057 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
6058 definition.
6059 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
6060 imported subprograms for the current compilation unit as
6061 definitions. Disable debug info for references to variables.
6062 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
6063 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
6064 not built-in functions to their binding scope.
6065 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
6066 the function as a definition. Update all callers.
6067 (gnat_write_global_declarations): Emit debug info for imported
6068 functions. Filter out external variables for which debug info
6069 is disabled.
6070
6071 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
6072
6073 PR ada/81105
6074 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
6075 (i[3456]86-pc-gnu): Likewise.
6076 (x86_64 kfreebsd): Likewise.
6077
6078 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
6079
6080 PR bootstrap/80897
6081 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
6082
6083 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
6084
6085 PR ada/81070
6086 * s-interr-hwint.adb: Reinstate.
6087 * gcc-interface/Makefile.in (RTEMS): Use it again.
6088
6089 2017-06-08 Olivier Hainque <hainque@adacore.com>
6090
6091 * vx_crtbegin_auto.c: Update year in copyright notice.
6092 * vx_crtbegin.c: Likewise.
6093 * vx_crtbegin.inc: Likewise.
6094 * vx_crtend.c: Likewise.
6095
6096 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
6097
6098 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
6099 * s-tpopsp-rtems.adb: Delete.
6100
6101 2017-06-02 Olivier Hainque <hainque@adacore.com>
6102
6103 * vx_crtbegin_auto.c: New file.
6104 * vx_crtbegin.c: New file.
6105 * vx_crtbegin.inc: New file.
6106 * vx_crtend.c: New file.
6107
6108 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
6109
6110 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
6111 const qualifiers that cause -Wignored-qualifiers warnings.
6112
6113 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
6114
6115 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
6116 for Itypes that are E_Access_Subtype.
6117 <E_Access_Subtype>: Use the DECL of the base type directly.
6118
6119 2017-05-22 Ed Schonberg <schonberg@adacore.com>
6120 Eric Botcazou <ebotcazou@adacore.com>
6121
6122 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
6123 limited view may appear in the profile of a function, and a call to
6124 that function in another unit in which the full view is available must
6125 use this full view to spurious type errors at the point of call.
6126 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
6127 of parent body with a with clause for the main unit.
6128 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
6129 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
6130 types declared in external units like types from limited with clauses.
6131 Adjust final processing of defer_limited_with_list accordingly.
6132 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
6133 again to translate the prefix after the field if it is incomplete.
6134
6135 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
6136
6137 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
6138 alignment for simple volatile fields and remove associated errors.
6139
6140 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6141
6142 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
6143 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
6144
6145 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
6146
6147 * gcc-interface/utils.c (can_materialize_object_renaming_p):
6148 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
6149 process Original_Node instead of expanded names.
6150
6151 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6152
6153 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
6154 addressability check in the constrained case.
6155
6156 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6157
6158 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
6159 types not coming from a limited context.
6160
6161 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6162
6163 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
6164 the inlined list that are not public.
6165 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
6166 there is a pragma Inline_Always on the subprogram.
6167
6168 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6169
6170 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
6171 <N_Allocator>: Use properly typed constants.
6172 (extract_values): Move around.
6173 (pos_to_constructor): Minor tweaks.
6174 (Sloc_to_locus): Fix formatting.
6175 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
6176 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
6177 (Gigi_Equivalent_Type): Adjust head comment.
6178 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
6179
6180 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6181
6182 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
6183 is a representation clause on an extension, propagate the alignment of
6184 the parent type only if the platform requires strict alignment.
6185
6186 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
6187
6188 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
6189 instead of Word_Size.
6190
6191 Revert
6192 2017-03-28 Andreas Schwab <schwab@suse.de>
6193
6194 PR ada/80117
6195 * system-linux-aarch64-ilp32.ads: New file.
6196 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6197 from LIBGNAT_TARGET_PAIRS.
6198 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6199 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6200 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6201 or -mabi=ilp32, resp.
6202
6203 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
6204
6205 PR ada/80626
6206 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
6207 instead of Word_Size.
6208
6209 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
6210
6211 * raise-gcc.c (exception_class_eq): Make ec parameter const.
6212
6213 2017-05-02 Richard Biener <rguenther@suse.de>
6214
6215 * gcc-interface/misc.c (gnat_post_options): Do not set
6216 -fstrict-overflow.
6217
6218 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6219
6220 * gcc-interface/trans.c (assoc_to_constructor): Make sure
6221 Corresponding_Discriminant is only called on discriminants.
6222 Skip the saving of the result only for them.
6223 (gnat_to_gnu) <N_Selected_Component>: Likewise.
6224 <N_Unchecked_Type_Conversion>: Translate the result type first.
6225 (gigi): Set TREE_NOTHROW on Begin_Handler.
6226 (stmt_list_cannot_raise_p): New predicate.
6227 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
6228 a cleanup if the statements of the handler cannot raise.
6229 (process_freeze_entity): Use Is_Record_Type.
6230 (process_type): Likewise.
6231
6232 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6233
6234 * einfo.ads (Corresponding_Record_Component): New alias
6235 for Node21 used for E_Component and E_Discriminant.
6236 * einfo.adb (Corresponding_Record_Component): New function.
6237 (Set_Corresponding_Record_Component): New procedure.
6238 (Write_Field21_Name): Handle Corresponding_Record_Component.
6239 * sem_ch3.adb (Inherit_Component): Set
6240 Corresponding_Record_Component for every component in
6241 the untagged case. Clear it afterwards for non-girder
6242 discriminants.
6243 * gcc-interface/decl.c (gnat_to_gnu_entity)
6244 <E_Record_Type>: For a derived untagged type with discriminants
6245 and constraints, apply the constraints to the layout of the
6246 parent type to deduce the layout.
6247 (field_is_aliased): Delete.
6248 (components_to_record): Test DECL_ALIASED_P directly.
6249 (annotate_rep): Check that fields are present except for
6250 an extension.
6251 (create_field_decl_from): Add DEBUG_INFO_P
6252 parameter and pass it in recursive and other calls. Add guard
6253 for the manual CSE on the size.
6254 (is_stored_discriminant): New predicate.
6255 (copy_and_substitute_in_layout): Consider only
6256 stored discriminants and check that original fields are present
6257 in the old type. Deal with derived types. Adjust call to
6258 create_variant_part_from.
6259
6260 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6261
6262 * exp_ch6.adb (Expand_Call_Helper): When locating the
6263 accessibility entity created for an access parameter, handle
6264 properly a reference to a formal of an enclosing subprogram. if
6265 the reference appears in an inherited class-wide condition, it
6266 is the rewriting of the reference in the ancestor expression,
6267 but the accessibility entity must be that of the current formal.
6268
6269 2017-05-02 Javier Miranda <miranda@adacore.com>
6270
6271 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
6272 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
6273 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
6274 Call Expand_Non_Binary_Modular_Op.
6275
6276 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6277
6278 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
6279 has discriminants, do not override the Stored_Constraint list of
6280 the full view of the derived type with that of the derived type.
6281
6282 2017-05-02 Bob Duff <duff@adacore.com>
6283
6284 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
6285
6286 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6287
6288 * s-os_lib.ads: Minor typo fix.
6289
6290 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6291
6292 * gnatls.adb: Merge and refactor code from Prj.Env and remove
6293 this deprecated dependency.
6294
6295 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6296
6297 * exp_util.ads: minor comment addition.
6298
6299 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6300
6301 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
6302 pastos in part #3 of the head comment.
6303
6304 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6305
6306 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
6307 procedure body for a local (sub)type declaration within a
6308 predicate function. Invariant checks do not apply to these, and
6309 the expansion of the procedure will happen in the wrong scope,
6310 leading to misplaced freeze nodes.
6311
6312 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6313
6314 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
6315 to analyze generated actions. If the main unit is a body,
6316 the required scope is that of the corresponding unit declaration.
6317
6318 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6319
6320 * einfo.adb (Declaration_Node): flip branches of
6321 an IF statement to avoid repeated negations in its condition;
6322 no change in semantics, only to improve readability.
6323
6324 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6325
6326 * sem_case.adb: Remove extra spaces in parameter declarations.
6327
6328 2017-05-02 Justin Squirek <squirek@adacore.com>
6329
6330 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
6331 in usage line for new -gnatwE switch.
6332
6333 2017-05-02 Claire Dross <dross@adacore.com>
6334
6335 * a-cofuve.ads (Remove): Remove unnecessary
6336 conditions in precondition.
6337
6338 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6339
6340 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
6341 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
6342
6343 2017-05-02 Justin Squirek <squirek@adacore.com>
6344
6345 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6346 alternative expression.
6347 * sem_res.adb (Resolve_Case_Expression): Ditto.
6348
6349 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6350
6351 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
6352 Refine predicate for the case where the primitive operation
6353 is a renaming of equality. An overriding operation that is
6354 a user-defined renaming of predefined equality inherits its
6355 slot from the overridden operation. Otherwise it is treated
6356 as a predefined op and occupies the same predefined slot as
6357 equality. A call to it is transformed into a call to its alias,
6358 which is the predefined equality. A dispatching call thus uses
6359 the proper slot if operation is further inherited and called
6360 with class-wide arguments.
6361
6362 2017-05-02 Justin Squirek <squirek@adacore.com>
6363
6364 * errout.adb (Set_Msg_Text): Add a case to switch the message
6365 type when the character '[' is detected signifying a warning
6366 about a run-time exception.
6367 * opt.ads Add a new Warning_Mode value for new switch
6368 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
6369 to handle new warning mode
6370 * usage.adb (Usage): Add usage entry for -gnatwE
6371 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
6372
6373 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6374
6375 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
6376 declaration that operates on some fixed point type.
6377
6378 2017-05-02 Justin Squirek <squirek@adacore.com>
6379
6380 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
6381
6382 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6383
6384 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
6385
6386 2017-05-02 Justin Squirek <squirek@adacore.com>
6387
6388 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6389 expression (Analyze_If_Expression): Add check for valid condition
6390 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
6391 on case-expression
6392 * sem_res.adb (Resolve_If_Expression): Add check for valid
6393 condition and then-expression.
6394
6395 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6396
6397 * exp_ch3.adb (Build_Initialization_Call): Generate a null
6398 statement if the initialization call is a null procedure, as
6399 can happen with a controlled type with no explicit Initialize
6400 procedure, or an array of such.
6401 * exp_ch7.adb (Process_Object_Declaration): For a type with
6402 controlled components that has a trivial Initialize procedure,
6403 insert declaration for finalization counter after object
6404 declaration itself.
6405 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
6406 finalization block and attendant declarations if component has
6407 a trivial Initialize procedure.
6408 (Make_Init_Call): Do not generate a call if controlled type has
6409 a trivial Initialize procedure.
6410
6411 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6412
6413 * g-forstr.ads (Data): Move Format component last.
6414 * g-forstr.adb ("+"): Adjust for above change.
6415 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
6416 * g-sechas.ads (Context): Move Key last.
6417 * g-socket.ads (Service_Entry_Type): Move Aliases last.
6418 * s-fileio.adb (Temp_File_Record): Move Name last.
6419 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
6420 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
6421
6422 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
6423
6424 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
6425 switch introduced recently. finally not needed.
6426
6427 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6428
6429 * sem_ch6.adb (Analyze_Null_Procedure): Set the
6430 Corresponding_Body link for a null procedure declaration.
6431
6432 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6433
6434 * atree.h (Flag290): Add missing terminating parenthesis.
6435 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
6436 (Set_Is_Class_Wide_Clone): Likewise.
6437 * einfo.ads (Is_Class_Wide_Clone): Likewise.
6438
6439 2017-05-02 Gary Dismukes <dismukes@adacore.com>
6440
6441 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
6442 parameter Array_Comp to indicate the case of an array object
6443 with null-excluding components.
6444 * checks.adb (Null_Exclusion_Static_Checks):
6445 Call Compile_Time_Constraint_Error instead of
6446 Apply_Compile_Time_Constraint_Error in the component case. Also
6447 call that when Array_Comp is True, with an appropriate warning for
6448 the array component case. Only create an explicit initialization
6449 by null in the case of an object of a null-excluding access type
6450 (and no longer do that in the component case).
6451 * sem_ch3.adb (Check_Component): Add a Boolean parameter
6452 Array_Comp defaulted to False. Pass Empty for the Comp
6453 actual when calling Null_Exclusion_Static_Checks in the case
6454 where Comp_Decl matches Object_Decl, because we don't have a
6455 component in that case. In the case of an object or component
6456 of an array type, pass True for Array_Comp on the recursive call
6457 to Check_Component.
6458
6459 2017-05-02 Bob Duff <duff@adacore.com>
6460
6461 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
6462 compute the linux priority from the Ada priority. Call this everywhere
6463 required. In particular, the previous version was not doing this
6464 computation when setting the ceiling priority in various places. It
6465 was just converting to C.int, which results in a ceiling that is off
6466 by 1.
6467
6468 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6469
6470 * sem_ch3.adb: Comment predicate inheritance.
6471
6472 2017-05-02 Tristan Gingold <gingold@adacore.com>
6473
6474 * s-trasym.ads: Add comment.
6475
6476 2017-05-02 Bob Duff <duff@adacore.com>
6477
6478 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
6479 * sem_ch4.adb: Minor reformatting.
6480 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
6481 * s-taspri-posix-noaltstack.ads: Minor refactoring.
6482 * sinput.ads: Minor typo fix.
6483
6484 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6485
6486 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
6487 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
6488 here from exp_ch9, to recognize objects whose creation requires
6489 dynamic allocation, so that the proper warning can be emitted
6490 when restriction No_Implicit_Heap_Allocation is in effect.
6491 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
6492 to emit proper warning when an object that requires dynamic
6493 allocation is declared.
6494
6495 2017-05-02 Tristan Gingold <gingold@adacore.com>
6496
6497 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
6498
6499 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6500
6501 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
6502 visibility rules for equality operators that apply within an
6503 instantiation apply within an inlined body.
6504 * sem_type.adb (Add_One_Interp): ditto.
6505
6506 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6507
6508 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
6509 procedures.
6510
6511 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6512
6513 * snames.ads-tmpl
6514 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
6515 Name_No_Tagged_Streams): Move to regular pragmas. Add
6516 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
6517 and Secondary_Stack_Size.
6518 (Pragma_Id): Move Pragma_Assume,
6519 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
6520 Pragma_No_Tagged_Streams to second part.
6521
6522 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6523
6524 * exp_attr.adb: Minor reformatting.
6525
6526 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6527
6528 * sem_ch4.adb (Analyze_Selected_Component): Improve error
6529 detection for illegal references to private components or
6530 operations of a protected type in the body of the type.
6531
6532 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6533
6534 * opt.ads: Add missing GNAT markers in comments.
6535 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
6536 settings of Optimize_Alignment at the end.
6537
6538 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6539
6540 * checks.adb (Apply_Constraint_Check): Do not apply
6541 a discriminant check when the associated type is a constrained
6542 subtype created for an unconstrained nominal type.
6543 * exp_attr.adb: Minor reformatting.
6544
6545 2017-05-02 Bob Duff <duff@adacore.com>
6546
6547 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
6548 the N_Raise_Expression case.
6549 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
6550 and add assertions.
6551
6552 2017-05-02 Yannick Moy <moy@adacore.com>
6553
6554 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
6555 optimize length comparison in GNATprove mode.
6556 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
6557 operator /= into negation of operator = when needed.
6558 (Expand_SPARK): Call new
6559 function to expand operator /=.
6560
6561 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6562
6563 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
6564 Simplify the expression for a fixed-fixed division to remove
6565 divisions by constants whenever possible, as an optimization
6566 for restricted targets.
6567
6568 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6569
6570 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
6571
6572 2017-05-02 Bob Duff <duff@adacore.com>
6573
6574 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
6575 to find primitive ops, instead of using an Identifier that will
6576 later be looked up. This is necessary because these ops are not
6577 necessarily visible at all places where we need to call them.
6578 * exp_util.ads: Minor comment fix.
6579
6580 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6581
6582 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
6583 references are fully conformant if they are both expansions
6584 of the discriminant of a protected type, within one of the
6585 protected operations. One occurrence may be expanded into a
6586 constant declaration while the other is an input parameter to
6587 the corresponding generated subprogram.
6588
6589 2017-05-02 Justin Squirek <squirek@adacore.com>
6590
6591 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
6592 recursivly searching composite-types for null-excluding access
6593 types and verifying them.
6594 (Analyze_Object_Declaration): Add a
6595 call to Check_Null_Excluding_Components for static verification
6596 of non-initialized objects.
6597 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
6598 a parameter for a composite-type's component and an extra case
6599 for printing component information.
6600
6601 2017-05-02 Yannick Moy <moy@adacore.com>
6602
6603 * sem_ch10.adb (Analyze_Subunit): Take
6604 configuration pragma into account when restoring appropriate
6605 pragma for analysis of subunit.
6606
6607 2017-05-02 Justin Squirek <squirek@adacore.com>
6608
6609 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
6610 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
6611 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
6612 clauses from the runtime.
6613
6614 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6615
6616 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
6617 array components specially.
6618
6619 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6620
6621 * sem_ch8.adb (Premature_Usage): If the premature usage of
6622 an entity is as the expression in its own object decaration,
6623 rewrite the reference as Any_Id to prevent cascaded errors or
6624 compiler loops when such an entity is used in an address clause.
6625
6626 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6627
6628 * gcc-interface/decl.c (components_to_record): Add missing guard.
6629
6630 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6631
6632 * gcc-interface/decl.c (components_to_record): Add more comments.
6633 Put back pending fields onto the regular list if the misalignment
6634 happens to cancel itself.
6635
6636 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6637
6638 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
6639 controlling actual in a prefixed call, preserve the original node
6640 information if the prefix itself has been rewritten, for ASIS use.
6641
6642 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6643
6644 * exp_ch6.adb (Insert_Post_Call_Actions):
6645 Code clean up. Insert the post-call actions after an enclosing
6646 procedure call when N denotes a function call and appears as an
6647 actual parameter in the procedure call.
6648
6649 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6650
6651 * freeze.adb (Check_Component_Storage_Order): If there is a clause
6652 for the component, also reject the attribute if the component
6653 doesn't end on a byte boundary and its scalar storage order is
6654 different from that of the enclosing record type.
6655
6656 2017-04-28 Javier Miranda <miranda@adacore.com>
6657
6658 * atree.ads (Info_Messages): Removed.
6659 (Warning_Info_Messages): New counter.
6660 (Report_Info_Messages): New counter.
6661 * err_vars.ads Update documentation.
6662 * errout.adb (Delete_Warning_And_Continuations): Update
6663 Info_Message occurrences.
6664 (Error_Msg_Internal): Update Info_Message occurrences.
6665 (Delete_Warning): Update Info_Message occurrences.
6666 (Write_Error_Summary): Update Info_Message occurrences.
6667 (Output_Messages): Update Info_Message occurrences.
6668 (To_Be_Removed): Update Info_Message occurrences.
6669 (Reset_Warnings): Update Info_Message occurrences.
6670 * errutil.adb (Error_Msg): Update Info_Message occurrences.
6671 (Finalize): Update Info_Message occurrences.
6672 (Initialize): Update Info_Message occurrences.
6673 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
6674 (Compilation_Errors): Update Info_Message_Occurences.
6675
6676 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6677
6678 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
6679 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
6680 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
6681 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
6682 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
6683 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
6684 Y_Size.
6685 * sem_eval.adb (Why_Not_Static): Initialize Typ.
6686 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
6687
6688 2017-04-28 Bob Duff <duff@adacore.com>
6689
6690 * sem_util.ads, sem_util.adb (Might_Raise): New function
6691 that replaces Is_Exception_Safe, but has the opposite
6692 sense. Is_Exception_Safe was missing various cases -- calls inside
6693 a pragma Debug, calls inside an 'if' or assignment statement,
6694 etc. Might_Raise now walks the entire subtree looking for things
6695 that can raise.
6696 * exp_ch9.adb (Is_Exception_Safe): Remove.
6697 (Build_Protected_Subprogram_Body): Replace call to
6698 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
6699 constants where possible).
6700 * exp_ch7.adb: Rename Is_Protected_Body -->
6701 Is_Protected_Subp_Body. A protected_body is something different
6702 in the grammar.
6703
6704 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6705
6706 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
6707 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
6708 (P_Discrete_Choice_List): Initialize Expr_Node variable.
6709 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
6710 (P_Protected): Likewise.
6711 * sem_case.adb (Check_Duplicates):
6712 Add pragma Warnings on variable.
6713 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
6714 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
6715 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
6716 (Analyze_Exit_Statement): Initialize Scope_Id variable.
6717 (Analyze_Iterator_Specification): Initialize Bas variable.
6718 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
6719 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
6720 (Analyze_Accept_Statement): Initialize Task_Nam.
6721
6722 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6723
6724 * checks.adb (Install_Primitive_Elaboration_Check):
6725 Do not generate an elaboration check if all checks have been
6726 suppressed.
6727
6728 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6729
6730 * sem_ch13.adb (Analyze_Aspect_Specifications, case
6731 Interrupt_Handler and Attach_Handler): Generate reference
6732 to protected operation to prevent spurious warnings about
6733 unreferenced entities. Previous scheme failed with style checks
6734 enabled.
6735
6736 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6737
6738 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
6739 that follows an expression function must not be relocated to
6740 the generated body, because it applies to the code that follows.
6741
6742 2017-04-28 Gary Dismukes <dismukes@adacore.com>
6743
6744 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
6745 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
6746 code that might violate the more stringent checking for 'Access
6747 introduced in Ada 2005.
6748
6749 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6750
6751 * a-cforse.adb: minor style fix in comment.
6752
6753 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6754
6755 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
6756 initialize Block_Decls variable.
6757 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
6758 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
6759 * exp_disp.adb (Expand_Interface_Actuals): Initialize
6760 Formal_DDT and Actual_DDT variables.
6761 (Expand_Interface_Thunk): Initialize Iface_Formal.
6762 (Make_DT): Initialize Size_Comp.
6763 (Make_Select_Specific_Data_Table): Initialize Decls.
6764 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
6765 Also initialize more RPC_Receiver_* variables.
6766 (Build_To_Any_Function): Initialize Cstr_Formal.
6767 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
6768
6769 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6770
6771 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
6772 node between access types, freeze the designated type as well,
6773 so that dispatch table pointers are created in the proper scope,
6774 and not in the constructed body of the expression function.
6775
6776 2017-04-28 Bob Duff <duff@adacore.com>
6777
6778 * alloc.ads (Nodes_Initial): Go back to previous value. The large
6779 value makes large compilations faster, but small compilations slower.
6780
6781 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6782
6783 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
6784
6785 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6786
6787 * erroutc.adb (Compilation_Errors): Do not consider info messages
6788 as suitable warnings when warnings must be treated as errors.
6789 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
6790 internally-generated packages when outputting completion
6791 information.
6792 * errout.adb (Output_Messages): Do not consider info messages as
6793 suitable warnings when warnings must be treated as errors.
6794 * errutil.adb (Finalize): Do not consider info messages as
6795 suitable warnings when warnings must be treated as errors.
6796
6797 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6798
6799 * warnsw.ads: Minor fix for incorrect wording in comment.
6800
6801 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6802
6803 * sem_res.adb (In_Instance_Code): New predicate in
6804 Valid_Conversion, to determine whether a type conversion appears
6805 as (or within) an actual for a formal object. Type conversions
6806 in instances are not rechecked in Valid_Conversion because
6807 visibility changes between generic location andi instance may
6808 lead to spurious errors, but conversions within an actual must be
6809 fully checked, and they are not fully resolved when pre-analyzing
6810 the actuals.
6811
6812 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6813
6814 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
6815 New_Copy_Tree instead of Relocate_Node as any subsequent copies
6816 of the relocated node will have mangled Parent pointers.
6817 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
6818 tables used in conjunction with entity and itype replication.
6819 (Visit_Entity): Rewrite the restriction on which entities
6820 require duplication. The restriction now includes all types.
6821
6822 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6823
6824 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
6825 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
6826 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
6827 cleanups.
6828
6829 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6830
6831 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
6832 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
6833
6834 2017-04-28 Gary Dismukes <dismukes@adacore.com>
6835
6836 * exp_util.adb: Minor reformatting.
6837
6838 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6839
6840 * sem_ch4.adb: Fix copy/pasto.
6841
6842 2017-04-27 Tristan Gingold <gingold@adacore.com>
6843
6844 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
6845 raise-gcc.c. Fix include search path for raise-gcc.c
6846
6847 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
6848
6849 * fe.h (Warn_On_Questionable_Layout): Declare.
6850 * warnsw.ads (Warn_On_Record_Holes): Move down.
6851 (Warn_On_Questionable_Layout): New boolean variable.
6852 (Warning_Record): Add Warn_On_Questionable_Layout field.
6853 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
6854 (Restore_Warnings): Likewise.
6855 (Save_Warnings): Likewise.
6856 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
6857 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
6858 components_to_record.
6859 (gnu_field_to_gnat): New function.
6860 (warn_on_field_placement): Likewise.
6861 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
6862 parameters. Rename local variables and adjust recursive call.
6863 Rework final scan of the field list and implement warnings on the
6864 problematic placement of specific sorts of fields.
6865
6866 2017-04-27 Bob Duff <duff@adacore.com>
6867
6868 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
6869 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
6870 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
6871 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
6872 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
6873 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
6874 For efficiency, cache results of Is_Internal_File_Name and
6875 Is_Predefined_File_Name in the Units table. This avoids a lot
6876 of repeated text processing.
6877
6878 2017-04-27 Emmanuel Briot <briot@adacore.com>
6879
6880 * g-comlin.adb (Sort_Sections): remove useless test.
6881
6882 2017-04-27 Claire Dross <dross@adacore.com>
6883
6884 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
6885 allow the use of regular equality over elements in contracts.
6886 (Formal_Model): Ghost package containing model functions that are
6887 used in subprogram contracts.
6888 (Current_To_Last): Removed, model functions should be used instead.
6889 (First_To_Previous): Removed, model functions should be used instead.
6890 (Strict_Equal): Removed, model functions should be used instead.
6891 (No_Overlap): Removed, model functions should be used instead.
6892 (Equivalent_Keys): Functions over cursors are removed. They were
6893 awkward with explicit container parameters.
6894 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
6895 allow the use of regular equality over elements in contracts.
6896 (Formal_Model): Ghost package containing model functions that
6897 are used in subprogram contracts.
6898 (Current_To_Last): Removed, model functions should be used instead.
6899 (First_To_Previous): Removed, model functions should be used instead.
6900 (Strict_Equal): Removed, model functions should be used instead.
6901 (No_Overlap): Removed, model functions should be used instead.
6902
6903 2017-04-27 Yannick Moy <moy@adacore.com>
6904
6905 * gnat1drv.adb: Code cleanup.
6906
6907 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6908
6909 * exp_util.adb (Replace_Entity): The prefix of a 'Result
6910 attribute reference in a post- condition is the subprogram to
6911 which the condition applies. If the condition is inherited
6912 by a type extension, the prefix becomes a reference to the
6913 inherited operation, but there is no need to create a wrapper
6914 for this operation, because 'Result is expanded independently
6915 when elaborating the postconditions.
6916
6917 2017-04-27 Bob Duff <duff@adacore.com>
6918
6919 * sinput.adb: Minor code cleanup.
6920 * namet.adb (Append): Create faster versions of
6921 Append(String) and Append(Name_Id) by using slice assignment
6922 instead of loops.
6923 * sem_util.adb (In_Instance): Speed this up by removing
6924 unnecessary tests; Is_Generic_Instance is defined for all
6925 entities.
6926 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
6927 Remove unused function.
6928 * alloc.ads (Nodes_Initial): Use a much larger value, because
6929 the compiler was spending a lot of time copying the nodes table
6930 when it grows. This number was chosen in 1996, so is rather out
6931 of date with current memory sizes. Anyway, it's virtual memory.
6932 Get rid of Orig_Nodes_...; use Node_... instead.
6933 * atree.adb (Lock): Do not release the Nodes tables; it's a
6934 waste of time.
6935 Orig_Nodes_ ==> Nodes_
6936 * nlists.adb: Orig_Nodes_ ==> Nodes_
6937 * g-table.adb: Remove unused "with" clause.
6938 * g-table.ads, table.ads: Remove Big_Table_Type, which should
6939 not be used by clients.
6940 * g-dyntab.adb (Last_Allocated): New function
6941 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
6942
6943 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6944
6945 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
6946 check.
6947 (Subtypes_Statically_Match): Remove duplicate check.
6948 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
6949
6950 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6951
6952 * exp_aggr.adb (Replace_Type): Remove the special processing
6953 for selected components.
6954 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
6955 processing for attributes Fixed_Value and Integer_Value.
6956 * exp_util.adb (Side_Effect_Free): Merge the processing for
6957 qualified expressions, type conversions, and unchecked type
6958 conversions.
6959 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
6960 and Optional.
6961 * par-ch3.adb (P_Declarative_Items): Merge the processing for
6962 tokens function, not, overriding, and procedure.
6963 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
6964 for qualified expressions, type conversions, and unchecked
6965 type conversions.
6966 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
6967 processing for Ada 83 and instances.
6968 (Object_Access_Level): Merge the processing for indexed components
6969 and selected components.
6970 * uname.adb (Add_Node_Name): Merge the processing for stubs.
6971
6972 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6973
6974 * checks.adb (Install_Primitive_Elaboration_Check):
6975 Do not generate the check when restriction No_Elaboration_Code
6976 is in effect.
6977
6978 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6979
6980 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
6981 of Expand_Dispatching_Call. If the denoted subprogram has a
6982 class-wide precondition, this is the only precondition that
6983 applies to the call, rather that the class-wide preconditions
6984 that may apply to the body that is executed. (This is specified
6985 in AI12-0195).
6986
6987 2017-04-27 Yannick Moy <moy@adacore.com>
6988
6989 * gnat1drv.adb (Adjust_Global_Switches): Issue
6990 a warning in GNATprove mode if the runtime library does not
6991 support IEEE-754 floats.
6992
6993 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6994
6995 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
6996 is itself inherited it does not carry any contract information,
6997 so examine its parent operation which is its Alias.
6998
6999 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7000
7001 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
7002 prefix can be an object reference in which case Obj'Image (X)
7003 can only be interpreted as an indexing of the parameterless
7004 version of the attribute.
7005 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
7006 an indexing or a slice operation if the attribute does not require
7007 parameters. In Ada2012 'Image also belongs in this category,
7008 and A'Image (lo .. hi) is legal and must be parsed as a slice.
7009
7010 2017-04-27 Yannick Moy <moy@adacore.com>
7011
7012 * exp_ch4.adb: Minor reformatting.
7013 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
7014 disable the CodePeer and C generation modes. Similar to the
7015 opposite actions done in CodePeer mode.
7016
7017 2017-04-27 Yannick Moy <moy@adacore.com>
7018
7019 * sem_res.adb: Remove duplicate code.
7020 * sem_attr.adb: Delete duplicate code.
7021
7022 2017-04-27 Bob Duff <duff@adacore.com>
7023
7024 * g-dyntab.adb: Reduce the amount of copying in
7025 Release. No need to copy items past Last.
7026
7027 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7028
7029 * checks.adb Add with and use clauses for Sem_Disp.
7030 (Install_Primitive_Elaboration_Check): New routine.
7031 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
7032 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
7033 processing of 'Elaborated.
7034 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
7035 elaboration check.
7036
7037 2017-04-27 Bob Duff <duff@adacore.com>
7038
7039 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
7040 If the table grows and then shrinks back to empty, we won't necessarily
7041 point back to the empty array. Code cleanups.
7042 * sinput.ads: Add 'Base to Size clause to match the declared
7043 component subtypes.
7044
7045 2017-04-27 Claire Dross <dross@adacore.com>
7046
7047 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
7048 allow the use of regular equality over elements in contracts.
7049 (Formal_Model): Ghost package containing model functions that
7050 are used in subprogram contracts.
7051 (Current_To_Last): Removed, model functions should be used instead.
7052 (First_To_Previous): Removed, model functions should be used instead.
7053 (Strict_Equal): Removed, model functions should be used instead.
7054 (No_Overlap): Removed, model functions should be used instead.
7055 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
7056 Boolean generic parameter to disable contracts for equivalence
7057 between keys.
7058 (Witness): Create a witness of a key that is used for handling of
7059 equivalence between keys.
7060 (Has_Witness): Check whether a witness is contained in a map.
7061 (W_Get): Get the element associated to a witness.
7062 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
7063 directly.
7064 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
7065 Boolean generic parameter to disable contracts for equivalence
7066 between keys.
7067 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
7068 of equivalence on functional maps.
7069 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
7070 of equivalence on functional maps.
7071
7072 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7073
7074 * exp_ch9.adb (Expand_Entry_Barrier): Code
7075 cleanup. Do not perform the optimization which removes the
7076 declarations of the discriminant and component renamings when
7077 validity checks on operands and attributes are in effect.
7078
7079 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7080
7081 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
7082 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
7083 a-cfhama.ads, a-cofove.ads: Minor reformatting.
7084
7085 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7086
7087 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
7088 pointer dereference.
7089 * g-spipat.adb (Dump): Code clean up. Protect against a possible
7090 null pointer dereference.
7091
7092 2017-04-27 Bob Duff <duff@adacore.com>
7093
7094 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
7095 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
7096 Free renames Init, since they do the same thing.
7097 * g-table.ads: Default for Table_Low_Bound.
7098 * table.ads: Default for Table_Low_Bound, Table_Initial, and
7099 Table_Increment.
7100
7101 2017-04-27 Bob Duff <duff@adacore.com>
7102
7103 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
7104 can reallocate.
7105 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
7106 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
7107 Reorder code so that above assertions do not fail.
7108 * table.ads: Remove obsolete comment on Locked.
7109
7110 2017-04-27 Claire Dross <dross@adacore.com>
7111
7112 * a-cfdlli.ads: Code cleanup.
7113
7114 2017-04-27 Yannick Moy <moy@adacore.com>
7115
7116 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
7117 when needed for proof. (Expand_SPARK): Call the new procedure.
7118 * exp_util.ads Fix typo.
7119
7120 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7121
7122 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
7123 fixes.
7124
7125 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7126
7127 * sem_elab.adb Add new type Visited_Element
7128 and update the contents of table Elab_Visited. Various code clean up.
7129 (Check_Elab_Call): Determine whether a prior call to
7130 the same subprogram was already examined within the same context.
7131 (Check_Internal_Call_Continue): Register the subprogram being
7132 called as examined within a particular context. Do not suppress
7133 elaboration warnings.
7134
7135 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7136
7137 * xoscons.adb, osint.ads: Minor reformatting.
7138
7139 2017-04-27 Bob Duff <duff@adacore.com>
7140
7141 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
7142 Table_Count_Type --> Table_Last_Type, because the name
7143 was confusing (a "count" usually starts at zero). Add
7144 functionality supported or needed by other tables packages
7145 (Move, Release_Threshold).
7146 * g-table.ads, g-table.adb: This is now just a thin wrapper
7147 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
7148 or needed by other tables packages (Save, Restore).
7149 * table.ads, table.adb: This is now just a thin wrapper around
7150 * g-table.ads/g-table.adb.
7151 * namet.h, scos.h, uintp.h: These files are reaching into the
7152 private data of some instances of g-table, whose names changed,
7153 so the above change requires some adjustment here. It now uses
7154 public interfaces.
7155
7156 2017-04-27 Bob Duff <duff@adacore.com>
7157
7158 * namet.adb, namet.ads: Minor: remove unused procedures.
7159
7160 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7161
7162 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
7163 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
7164 Add pragma Warnings on Rtype variable in nested block. *
7165 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
7166 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
7167 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
7168 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
7169 (Process_Component_List_For_Finalize): Initialize Counter_Id.
7170 (Build_Finalize_Statements): Initialize Bod_Stmts.
7171 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
7172
7173 2017-04-27 Claire Dross <dross@adacore.com>
7174
7175 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
7176 allow the use of regular equality over elements in contracts.
7177 (Formal_Model): Ghost package containing model functions that are
7178 used in subprogram contracts.
7179 (Current_To_Last): Removed, model
7180 functions should be used instead.
7181 (First_To_Previous): Removed, model functions should be used instead.
7182 (Strict_Equal): Removed, model functions should be used instead.
7183 (No_Overlap): Removed, model functions should be used instead.
7184 (Equivalent_Keys): Functions over cursors are removed. They were
7185 awkward with explicit container parameters.
7186 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
7187 (proof only) procedure to help GNATprove when equivalence over
7188 keys is not equality.
7189
7190 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7191
7192 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
7193 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
7194 Minor reformatting and code cleanups.
7195
7196 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7197
7198 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
7199 subsidiary of Check_Inherited_Conditions, to build pragmas for an
7200 operation whose ancestor has classwide pre/postconditions. This
7201 is used both to check the legality of the inheritance in Ada
7202 and in SPARK, and to determine whether a wrapper is needed for
7203 an inherited operation.
7204 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
7205 Improve placement of error message for inherited classwide
7206 conditions that become illegal on type derivation.
7207
7208 2017-04-27 Yannick Moy <moy@adacore.com>
7209
7210 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
7211 SPARK_Mode from context on generic package.
7212 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
7213 useless test.
7214
7215 2017-04-27 Claire Dross <dross@adacore.com>
7216
7217 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
7218 overflows in computations.
7219 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
7220 overflows in computations.
7221 (Insert): Rewrite precondition to avoid overflows in computations.
7222 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
7223 overflows in computations.
7224 (Insert): Rewrite precondition to avoid overflows in computations.
7225
7226 2017-04-27 Steve Baird <baird@adacore.com>
7227
7228 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
7229 flag when it is declared in order to avoid confusing CodePeer about
7230 the possibility of an uninitialized variable read.
7231
7232 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7233
7234 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
7235 no dimensionality error if the subtype of the expression is
7236 identical to the nominal subtype in the declaration, even though
7237 the expression itself may have been constant-folded and lack a
7238 dimension vector.
7239 * sem_dim.ads: Add comments on setting of dimension vectors and
7240 its interaction with node rewritings and side-effect removal.
7241
7242 2017-04-27 Bob Duff <duff@adacore.com>
7243
7244 * debug.adb: Minor comment correction.
7245 * sem_dim.ads: Minor reformatting and typo fixes.
7246
7247 2017-04-27 Bob Duff <duff@adacore.com>
7248
7249 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
7250 Last of the tables via function calls, rather than relying on layout
7251 of data structures.
7252
7253 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7254
7255 * exp_util.adb: No wrapper in GNATprove mode.
7256
7257 2017-04-27 Yannick Moy <moy@adacore.com>
7258
7259 * sem_res.adb (Resolve_Comparison_Op): Always
7260 evaluate comparisons between values of universal types.
7261
7262 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7263
7264 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
7265 an elaboration counter nor a check when in GNATprove mode.
7266 * sem_util.adb (Build_Elaboration_Entity): Do not create an
7267 elaboration counter when in GNATprove mode.
7268
7269 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7270
7271 * freeze.adb: copy-paste typo.
7272
7273 2017-04-27 Yannick Moy <moy@adacore.com>
7274
7275 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
7276 Use correct test to detect call in GNATprove mode instead of
7277 compilation.
7278
7279 2017-04-27 Claire Dross <dross@adacore.com>
7280
7281 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
7282 New property function expressing that the element of a
7283 sequence are contained in the union of two sequences.
7284 (Formal_Model.M_Elements_Included): New property function
7285 expressing that the element of a sequence are another sequence.
7286 (Generic_Sorting): Use new property functions to state that
7287 elements are preserved by Sort and Merge.
7288 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
7289 allow the use of regular equality over elements in contracts.
7290 (Formal_Model): Ghost package containing model functions
7291 that are used in subprogram contracts. (Capacity):
7292 On unbounded containers, return the maximal capacity.
7293 (Current_To_Last): Removed, model functions should be used instead.
7294 (First_To_Previous): Removed, model functions should be used instead.
7295 (Append): Default parameter value replaced
7296 by new wrapper to allow more precise contracts.
7297 (Insert): Subprogram restored, it seems it was useful to users even if
7298 it is inefficient.
7299 (Delete): Subprogram restored, it seems it was useful to users even if
7300 it is inefficient.
7301 (Prepend): Subprogram restored, it seems it was useful to users even
7302 if it is inefficient.
7303 (Delete_First): Subprogram restored, it seems it
7304 was useful to users even if it is inefficient. (Delete_Last):
7305 Default parameter value replaced by new wrapper to allow more
7306 precise contracts.
7307 (Generic_Sorting.Merge): Subprogram restored.
7308 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
7309 allow the use of regular equality over elements in contracts.
7310 (Formal_Model): Ghost package containing model functions
7311 that are used in subprogram contracts. (Capacity):
7312 On unbounded containers, return the maximal capacity.
7313 (Current_To_Last): Removed, model functions should be used
7314 instead.
7315 (First_To_Previous): Removed, model functions should be used instead.
7316 (Append): Default parameter value replaced
7317 by new wrapper to allow more precise contracts.
7318 (Insert): Subprogram restored, it seems it was useful to users even if
7319 it is inefficient.
7320 (Delete): Subprogram restored, it seems it was useful to users even if
7321 it is inefficient.
7322 (Prepend): Subprogram restored, it seems it was useful to users even
7323 if it is inefficient.
7324 (Delete_First): Subprogram restored, it seems it
7325 was useful to users even if it is inefficient. (Delete_Last):
7326 Default parameter value replaced by new wrapper to allow more
7327 precise contracts.
7328 (Generic_Sorting.Merge): Subprogram restored.
7329 (Vector): Do not reuse formal vectors, as it is no longer possible
7330 to supply them with an equality function over elements.
7331
7332 2017-04-27 Bob Duff <duff@adacore.com>
7333
7334 * g-dyntab.adb (Release): When allocating the new
7335 table, use the correct slice of the old table to initialize it.
7336
7337 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7338
7339 * einfo.ads: Minor fixes in comments.
7340
7341 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7342
7343 * sem_prag.adb: disable clones in SPARK_Mode.
7344
7345 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7346
7347 * sem_util.ads, contracts.adb: Minor reformatting.
7348
7349 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7350
7351 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
7352 Build body of subprogram that has a class-wide condition that
7353 contains calls to other primitives.
7354 (Build_Class_Wide_Clone_Call); Build a call to the common
7355 class-wide clone of a subprogram with classwide conditions. The
7356 body of the subprogram becomes a wrapper for a call to the
7357 clone. The inherited operation becomes a similar wrapper to which
7358 modified conditions apply, and the call to the clone includes
7359 the proper conversion in a call the parent operation.
7360 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
7361 subprogram that has a classwide condition that contains calls to
7362 other primitives, build an internal subprogram that is invoked
7363 through a type-specific wrapper for all inherited subprograms
7364 that may have a modified condition.
7365 * sem_prag.adb (Check_References): If subprogram has a classwide
7366 condition, create entity for corresponding clone, to be invoked
7367 through wrapper subprograns.
7368 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
7369 message about placement if pragma isi internally generated.
7370 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
7371 a classwide clone, build body of clone as copy of original body,
7372 and rewrite original body as a wrapper as a wrapper for a call to
7373 the clone, so that it incorporates the original pre/postconditions
7374 of the subprogram.
7375 * freeze.adb (Check_Inherited_Conditions): For an inherited
7376 subprogram that inherits a classwide condition, build spec and
7377 body of corresponding wrapper so that call to inherited operation
7378 gets the modified conditions.
7379 * contracts.adb (Analyze_Contracts): If analysis of classwide
7380 condition has created a clone for a primitive operation, analyze
7381 declaration of clone.
7382
7383 2017-04-27 Steve Baird <baird@adacore.com>
7384
7385 * exp_util.adb (Build_Allocate_Deallocate_Proc):
7386 Add "Suppress => All_Checks" to avoid generating unnecessary
7387 checks.
7388
7389 2017-04-27 Yannick Moy <moy@adacore.com>
7390
7391 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
7392 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
7393 inlining body in GNATprove mode when switch -gnatdm used.
7394 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
7395 in GNATprove mode when switch -gnatdm used.
7396
7397 2017-04-27 Arnaud Charlet <charlet@adacore.com>
7398
7399 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
7400 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
7401 clauses, so that we keep an indication of the address clause
7402 before removing it from the tree.
7403
7404 2017-04-27 Yannick Moy <moy@adacore.com>
7405
7406 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
7407 of expression being qualified, when not an object name, or else
7408 evaluate the underlying name.
7409
7410 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
7411
7412 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
7413
7414 2017-04-27 Justin Squirek <squirek@adacore.com>
7415
7416 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
7417 Process_Component_List_For_Finalization as a local variable.
7418 (Process_Component_For_Finalize): Add an extra parameter to avoid
7419 global references.
7420 (Process_Component_List_For_Finalization): Correct calls to
7421 Process_Component_For_Finalize to take Num_Comps as a parameter.
7422
7423 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7424
7425 * sem_ch8.adb (Find_Direct_Name): Account for the case where
7426 a use-visible entity is defined within a nested scope of an
7427 instance when giving priority to entities which were visible in
7428 the original generic.
7429 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
7430
7431 2017-04-27 Tristan Gingold <gingold@adacore.com>
7432
7433 * raise-gcc.c: Don't use unwind.h while compiling
7434 for the frontend, but mimic host behavior.
7435
7436 2017-04-27 Javier Miranda <miranda@adacore.com>
7437
7438 * sem_ch3.adb (Build_Discriminated_Subtype):
7439 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
7440
7441 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7442
7443 * sem_prag.adb (Analyze_Global_Item):
7444 Do not consider discriminants because they are not "entire
7445 objects". Remove the discriminant-related checks because they are
7446 obsolete.
7447 (Analyze_Input_Output): Do not consider discriminants
7448 because they are not "entire objects".
7449
7450 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7451
7452 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
7453 perform check if the current scope does not come from source,
7454 as is the case for a rewritten task body, because check has
7455 been performed already, and may not be doable because of changed
7456 visibility.
7457
7458 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7459
7460 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
7461 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
7462 Minor reformatting.
7463
7464 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7465
7466 * sem_ch4.adb (Analyze_Call): If the return type of a function
7467 is incomplete in an context in which the full view is available,
7468 replace the type of the call by the full view, to prevent spurious
7469 type errors.
7470 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
7471 abstract subprogram so that compiler does not reject a parameter
7472 of a primitive operation of a tagged type being frozen, when
7473 the untagged type of that parameter cannot be frozen.
7474
7475 2017-04-27 Bob Duff <duff@adacore.com>
7476
7477 * sem_attr.adb (Compute_Type_Key): Don't walk
7478 representation items for irrelevant types, which could be in a
7479 different source file.
7480
7481 2017-04-27 Steve Baird <baird@adacore.com>
7482
7483 * exp_attr.adb (Expand_N_Attribute_Reference):
7484 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
7485 for CodePeer.
7486
7487 2017-04-27 Yannick Moy <moy@adacore.com>
7488
7489 * exp_unst.ads: Fix typos in comments.
7490
7491 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7492
7493 * sem_eval.adb (Choice_Matches): Handle properly a real literal
7494 whose type has a defined static predicate.
7495
7496 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7497
7498 * exp_ch4.adb (Insert_Dereference_Action):
7499 Do not adjust the address of a controlled object when the
7500 associated access type is subject to pragma No_Heap_Finalization.
7501 Code reformatting.
7502
7503 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
7504
7505 * gcc-interface/utils.c (gnat_type_for_size): Set
7506 TYPE_ARTIFICIAL on created types.
7507
7508 2017-04-27 Claire Dross <dross@adacore.com>
7509
7510 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7511 modifications in functional containers.
7512 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7513 to improve readablity. Subprograms are separated between basic
7514 operations, constructors and properties. Universally quantified
7515 formulas in contracts are factorized in independant functions
7516 with a name and a comment. Names of parameters are improved.
7517
7518 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7519
7520 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7521
7522 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7523
7524 * sem_res.adb (Resolve_Type_Conversion): Do not
7525 install a predicate check here since this is already done during
7526 the expansion phase. Verify whether the operand satisfies the
7527 static predicate (if any) of the target type.
7528 * sem_ch3.adb (Analyze_Object_Declaration): Do
7529 not install a predicate check if the object is initialized by
7530 means of a type conversion because the conversion is subjected
7531 to the same check.
7532
7533 2017-04-27 Tristan Gingold <gingold@adacore.com>
7534
7535 * raise.c (__gnat_builtin_longjmp): Remove.
7536 (__gnat_bracktrace):
7537 Add a dummy definition for the compiler (__gnat_eh_personality,
7538 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
7539 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
7540 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
7541 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
7542 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
7543 and a-except-2005.adb.
7544 * raise-gcc.c: Allow build in compiler, compiled as a C++
7545 file.
7546 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
7547 (db): Constify msg_format.
7548 (get_call_site_action_for): Don't use void arithmetic.
7549 * system.ads (Frontend_Exceptions): Set to False.
7550 (ZCX_By_Default): Set to True.
7551 (GCC_ZC_Support): Set to True.
7552 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
7553 a-except.ad[sb].
7554 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
7555 in gnat1 and gnatbind.
7556 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
7557 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
7558 * s-excmac.ads, s-excmac.adb: Copy of variants.
7559 * a-except.o: Adjust preequisites.
7560 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
7561
7562 2017-04-27 Claire Dross <dross@adacore.com>
7563
7564 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7565 modifications in functional containers.
7566 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7567 to improve readablity. Subprograms are separated between basic
7568 operations, constructors and properties. Universally quantified
7569 formulas in contracts are factorized in independant functions
7570 with a name and a comment. Names of parameters are improved.
7571
7572 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7573
7574 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7575
7576 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7577
7578 * sem_res.adb (Resolve_Type_Conversion): Do not
7579 install a predicate check here since this is already done during
7580 the expansion phase. Verify whether the operand satisfies the
7581 static predicate (if any) of the target type.
7582 * sem_ch3.adb (Analyze_Object_Declaration): Do
7583 not install a predicate check if the object is initialized by
7584 means of a type conversion because the conversion is subjected
7585 to the same check.
7586
7587 2017-04-27 Tristan Gingold <gingold@adacore.com>
7588
7589 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
7590 replaced by their variants).
7591
7592 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7593
7594 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
7595 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
7596 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
7597
7598 2017-04-27 Tristan Gingold <gingold@adacore.com>
7599
7600 * s-excmac-gcc.ads, s-excmac-gcc.adb,
7601 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
7602 Ada95.
7603
7604 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7605
7606 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
7607 the loop which detects potential enclosing transient scopes. The
7608 loop now terminates much earlier as transient scopes are bounded
7609 by packages and subprograms.
7610
7611 2017-04-27 Claire Dross <dross@adacore.com>
7612
7613 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
7614 allow the use of regular equality over elements in contracts.
7615 (Cursor): Type is now public so that it can be used in
7616 model functions.
7617 (Formal_Model): Ghost package containing
7618 model functions that are used in subprogram contracts.
7619 (Current_To_Last): Removed, model functions should be used
7620 instead.
7621 (First_To_Previous): Removed, model functions should
7622 be used instead.
7623 (Strict_Equal): Removed, model functions
7624 should be used instead.
7625 (Append): Default parameter value
7626 replaced by new wrapper to allow more precise contracts.
7627 (Insert): Default parameter value replaced by new wrapper to
7628 allow more precise contracts.
7629 (Delete): Default parameter
7630 value replaced by new wrapper to allow more precise contracts.
7631 (Prepend): Default parameter value replaced by new wrapper to
7632 allow more precise contracts.
7633 (Delete_First): Default parameter
7634 value replaced by new wrapper to allow more precise contracts.
7635 (Delete_Last): Default parameter value replaced by new wrapper
7636 to allow more precise contracts.
7637
7638 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7639
7640 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
7641 for object declarations.
7642 (Expand_SPARK_N_Object_Declaration): New routine.
7643 * sem_elab.adb (Check_A_Call): Include calls to the
7644 Default_Initial_Condition procedure of a type under the SPARK
7645 elaboration checks umbrella.
7646
7647 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7648
7649 * sem.adb (Analyze): Diagnose an illegal iterated component
7650 association.
7651 * sem_util.ads, sem_util.adb
7652 (Diagnose_Iterated_Component_Association): New routine.
7653
7654 2017-04-27 Bob Duff <duff@adacore.com>
7655
7656 * adaint.c (__gnat_get_current_dir): Return 0 in length if
7657 getcwd fails.
7658 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
7659 exception if getcwd failed.
7660
7661 2017-04-27 Yannick Moy <moy@adacore.com>
7662
7663 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
7664 entities with special prefix.
7665
7666 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7667
7668 * debug.adb Change the documentation of switch -gnatd.s.
7669 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
7670 to manage the secondary stack when an enclosing scope already
7671 performs this functionality (aka relaxed management). Switch
7672 -gnatd.s may be used to force strict management in which case
7673 the block will manage the secondary stack unconditionally. Add
7674 a guard to stop the traversal when encountering a package or a
7675 subprogram scope.
7676
7677 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7678
7679 * sem_res.adb (Resolve_Call): Refine further the handling of
7680 limited views of return types in function calls. If the function
7681 that returns a limited view appears in the current unit,
7682 we do not replace its type by the non-limited view because
7683 this transformation is performed int the back-end. However,
7684 the type of the call itself must be the non-limited view, to
7685 prevent spurious resolution errors.
7686
7687 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7688
7689 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
7690 Removed, proposed implementation using generics for class-wide
7691 preconditions proved impractical.
7692 (Class_Wide_Clone): New attribute of subprogram. Designates
7693 subprogram created for primitive operations with class-wide
7694 pre/postconditions that contain calls to other primitives. The
7695 clone holds the body of the original primitive, but the
7696 pre/postonditions do not apply to it. The original body is
7697 rewritten as a wrapper for a call to the clone.
7698 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
7699 the flag is set, no code for the corresponding pre/postconditions
7700 is inserted into its body.
7701
7702 2017-04-27 Bob Duff <duff@adacore.com>
7703
7704 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
7705 Scalar_Storage_Order if -gnatI is given.
7706 * sem_prag.adb (Analyze_Pragma): Ignore
7707 Default_Scalar_Storage_Order if -gnatI is given.
7708
7709 2017-04-27 Claire Dross <dross@adacore.com>
7710
7711 * a-cofuba.ads (Add): Take as an additional input parameter
7712 the position where the element should be inserted.
7713 (Remove): New function that removes an element from the container.
7714 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
7715 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
7716 (Remove): New function that removes an element from a set.
7717 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
7718 (Remove): New function that removes an element from a sequence.
7719 (Insert): New function that adds anywhere in a sequence.
7720
7721 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7722
7723 * checks.adb (Generate_Range_Check): Revert previous change.
7724
7725 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7726
7727 * sem_util.adb: Minor reformatting/rewording.
7728
7729 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7730
7731 * lib-xref.adb (Generate_Reference): The use
7732 of attribute 'Result is not considered a violation of pragma
7733 Unreferenced.
7734
7735 2017-04-27 Justin Squirek <squirek@adacore.com>
7736
7737 * cstand.adb (Create_Standard): Correctly set
7738 Directly_Designated_Type for Any_Access.
7739 * sem_type.adb (Covers): Minor grammar fixes.
7740
7741 2017-04-27 Bob Duff <duff@adacore.com>
7742
7743 * sem_attr.adb: Minor cleanup.
7744
7745 2017-04-27 Claire Dross <dross@adacore.com>
7746
7747 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
7748 private child of Ada.Containers used to implement all functional
7749 containers.
7750 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
7751 child of Ada.Containers. It provides functional indefinite unbounded
7752 maps which can be used as high level models for specification
7753 of data structures.
7754 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
7755 child of Ada.Containers. It provides functional indefinite unbounded
7756 sets which can be used as high level models for specification
7757 of data structures.
7758 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
7759 child of Ada.Containers. It provides functional indefinite unbounded
7760 vectors which can be used as high level models for specification
7761 of data structures.
7762 * Makefile.rtl: Add new packages.
7763 * impunit.adb: Add new packages.
7764
7765 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7766
7767 * sem_ch4.adb: Minor reformatting.
7768
7769 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7770
7771 * sem_ch12.adb (Analyze_Associations): minor reformatting.
7772 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
7773 point type actual that has user-defined arithmetic primitives,
7774 when there is a previous actual for a formal package that defines
7775 a fixed-point type with the parent user-defined operator.
7776
7777 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7778
7779 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
7780 * sem_attr.adb (Resolve_Attribute): Generate a range check when
7781 the component type allows range checks.
7782
7783 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7784
7785 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
7786 corresponding declaration, because formal derived types are
7787 rewritten as private extensions.
7788
7789 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7790
7791 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
7792 dimensions of operands if node has been analyzed already, because
7793 previous analysis and dimension checking will have removed the
7794 dimension information from the operands.
7795
7796 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7797
7798 * debug.adb: Document the use of switch -gnatd.s.
7799 * einfo.ads Update the documentation on attribute
7800 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
7801 the uses of these attributes from certain entities.
7802 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
7803 which determines whether the block should continue to manage
7804 the secondary stack.
7805 (Manages_Sec_Stack): New routine.
7806
7807 2017-04-27 Bob Duff <duff@adacore.com>
7808
7809 * atree.ads: Minor edit.
7810
7811 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7812
7813 * sinfo.ads: Update the section on Ghost mode. Add
7814 a section on SPARK mode. Update the placement of section on
7815 expression functions.
7816
7817 2017-04-27 Bob Duff <duff@adacore.com>
7818
7819 * sinput.adb (Get_Source_File_Index): Don't
7820 assert that S is in the right range in the case where this is
7821 a .dg file under construction.
7822
7823 2017-04-27 Yannick Moy <moy@adacore.com>
7824
7825 * sem_util.adb (Check_Result_And_Post_State):
7826 Handle more precisely each conjunct in expressions formed by
7827 and'ing sub-expressions.
7828
7829 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7830
7831 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
7832
7833 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7834
7835 * gnat_rm.texi, gnat_ugn.texi,
7836 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7837 doc/gnat_ugn/platform_specific_information.rst,
7838 doc/gnat_ugn/gnat_and_program_execution.rst,
7839 doc/gnat_ugn/gnat_utility_programs.rst,
7840 doc/gnat_ugn/the_gnat_compilation_model.rst,
7841 doc/gnat_rm/implementation_defined_attributes.rst,
7842 doc/gnat_rm/the_gnat_library.rst,
7843 doc/gnat_rm/implementation_defined_pragmas.rst,
7844 doc/gnat_rm/representation_clauses_and_pragmas.rst,
7845 doc/gnat_rm/implementation_of_specific_ada_features.rst,
7846 doc/gnat_rm/implementation_defined_aspects.rst,
7847 doc/gnat_rm/implementation_defined_characteristics.rst: Update
7848 documentation.
7849
7850 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7851
7852 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
7853 generating C code on complex case expressions.
7854
7855 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7856
7857 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
7858 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
7859 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
7860 Ada_2012 instead of Ada_2005 to be compatible with the above
7861 change.
7862 * bindgen.adb: Silence new warning on pragma Ada_95.
7863
7864 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7865
7866 * checks.adb (Generate_Range_Check): Revert part of previous change.
7867
7868 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7869
7870 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
7871 container indexing operation that appears as a an actual in a
7872 parameter association in a procedure call.
7873
7874 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
7875
7876 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
7877 Fix spelling mistakes.
7878
7879 2017-04-25 Bob Duff <duff@adacore.com>
7880
7881 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
7882 * sinput-p.adb: Use regular fat pointers, with bounds checking,
7883 for source buffers. Fix misc obscure bugs.
7884 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
7885 checking, for source buffers. Modify representation clause for
7886 Source_File_Record as appropriate. Move Source_File_Index_Table
7887 from spec to body, because it is not used outside the body.
7888 Move Set_Source_File_Index_Table into the private part, because
7889 it is used only in the body and in children. Use trickery to
7890 modify the dope in the generic instantiation case. It's ugly,
7891 but not as ugly as the previous method. Fix documentation.
7892 Remove obsolete code.
7893 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
7894 indexing in source buffers.
7895 * fmap.adb: Avoid conversions from one string type to another.
7896 Remove a use of global name buffer.
7897 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
7898 fixes.
7899
7900 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7901
7902 * exp_util.adb, exp_ch4.adb: Minor reformatting.
7903
7904 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7905
7906 * checks.adb: Code clean up in various routines.
7907 (Generate_Range_Check): Do not generate a range check when the
7908 expander is not active or when index/range checks are suppressed
7909 on the target type.
7910 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
7911 Remove variants that include a Supress parameter. These routines
7912 are never used, and were introduced before the current scope-based
7913 check suppression method.
7914
7915 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
7916
7917 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
7918 code and some subprogram calls that are now noop.
7919
7920 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7921
7922 * exp_ch4.adb (Expand_N_Case_Expression): Take
7923 Minimize_Expression_With_Actions into account when possible.
7924
7925 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7926
7927 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
7928 (Known_Null): Moved to Sem_Util.
7929 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
7930 (Known_Null): Moved to Sem_Util.
7931 * sem_util.adb Add new enumeration type Null_Status_Kind.
7932 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
7933 this routine is now carried out by Null_Status.
7934 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
7935 is now carried out by Null_Status.
7936 (Null_Status): New routine.
7937 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
7938 (Known_Null): Moved from Exp_Util.
7939
7940 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7941
7942 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
7943 error on the return type of an expression function that is a
7944 completion, if the type is derived from a generic formal type.
7945
7946 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7947
7948 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
7949 conversion are those of the target type.
7950
7951 2017-04-25 Bob Duff <duff@adacore.com>
7952
7953 * a-clrefi.adb: Minor cleanup.
7954
7955 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7956
7957 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
7958
7959 2017-04-25 Bob Duff <duff@adacore.com>
7960
7961 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
7962 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
7963 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
7964 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
7965 the Internal_Source buffer. This removes the incorrect call to "="
7966 the customer noticed.
7967 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
7968 eventually need to eliminate them altogether. Or else get rid
7969 of zero-origin addressing.
7970
7971 2017-04-25 Claire Dross <dross@adacore.com>
7972
7973 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
7974 function used in GNATprove to know if an expression contains
7975 non-dispatching calls on primitives of a tagged type.
7976
7977 2017-04-25 Bob Duff <duff@adacore.com>
7978
7979 * rtsfind.adb (Initialize): Initialize
7980 First_Implicit_With. Building the compiler with Normalize_Scalars
7981 and validity checking finds this being used as an uninitialized
7982 variable.
7983
7984 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7985
7986 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
7987 Add a warning about SPARK mode management. The routine now
7988 saves and restores both the mode and associated pragma.
7989 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
7990 SPARK mode management. The routine now saves and restores both
7991 the mode and associated pragma.
7992 (Analyze_Object_Contract):
7993 Add a warning about SPARK mode management. The routine
7994 now saves and restores both the mode and associated pragma.
7995 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
7996 management. The routine now saves and restores both the mode
7997 and associated pragma. (Analyze_Package_Contract): Add a warning
7998 about SPARK mode management. The routine now saves and restores
7999 both the mode and associated pragma.
8000 (Analyze_Task_Contract):
8001 Add a warning about SPARK mode management. The routine now saves
8002 and restores both the mode and associated pragma.
8003 * expander.adb (Expand): Change the way the Ghost mode is saved
8004 and restored.
8005 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
8006 saved and restored.
8007 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
8008 and restored.
8009 * exp_util.adb (Build_DIC_Procedure_Body):
8010 Change the way the Ghost mode is saved and restored.
8011 (Build_DIC_Procedure_Declaration): Change the way the Ghost
8012 mode is saved and restored.
8013 (Build_Invariant_Procedure_Body):
8014 Change the way the Ghost mode is saved and restored.
8015 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
8016 mode is saved and restored.
8017 (Make_Predicate_Call): Change the
8018 way the Ghost mode is saved and restored.
8019 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
8020 saved and restored.
8021 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
8022 and its assignment.
8023 (Mark_And_Set_Ghost_Body): Remove parameter
8024 Mode and its assignment.
8025 (Mark_And_Set_Ghost_Completion):
8026 Remove parameter Mode and its assignment.
8027 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
8028 assignment.
8029 (Mark_And_Set_Ghost_Instantiation): Remove parameter
8030 Mode and its assignment.
8031 (Mark_And_Set_Ghost_Procedure_Call):
8032 Remove parameter Mode and its assignment.
8033 (Set_Ghost_Mode):
8034 Remove parameter Mode and its assignment.
8035 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
8036 and update the comment on usage.
8037 (Mark_And_Set_Ghost_Body):
8038 Remove parameter Mode and update the comment on usage.
8039 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
8040 update the comment on usage.
8041 (Mark_And_Set_Ghost_Declaration):
8042 Remove parameter Mode and update the comment on usage.
8043 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
8044 update the comment on usage.
8045 (Mark_And_Set_Ghost_Procedure_Call):
8046 Remove parameter Mode and update the comment on usage.
8047 (Set_Ghost_Mode): Remove parameter Mode and update the comment
8048 on usage.
8049 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
8050 types.
8051 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
8052 of obsolete field SPARK_Mode_Pragma.
8053 (Load_Main_Source): Remove
8054 the assignment of obsolete field SPARK_Mode_Pragma.
8055 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
8056 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
8057 the assignment of obsolete field SPARK_Mode_Pragma.
8058 (Ensure_System_Dependency): Remove the assignment of obsolete
8059 field SPARK_Mode_Pragma.
8060 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
8061 mode management. Change the way Ghost and SPARK modes are saved
8062 and restored.
8063 * sem.adb (Analyze): Change the way the Ghost mode is saved
8064 and restored.
8065 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
8066 Ghost mode is saved and restored.
8067 (Process_Full_View): Change
8068 the way the Ghost mode is saved and restored.
8069 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
8070 mode is saved and restored.
8071 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
8072 mode is saved and restored.
8073 (Analyze_Subprogram_Body_Helper):
8074 Change the way the Ghost mode is saved and restored.
8075 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
8076 Ghost mode is saved and restored.
8077 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
8078 management. Save the SPARK mode-related data prior to any changes
8079 to the scope stack and contexts. The mode is then reinstalled
8080 before the subunit is analyzed in order to restore the original
8081 view of the subunit.
8082 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
8083 warning on region management. Change the way the Ghost and
8084 SPARK modes are saved and restored.
8085 (Inline_Instance_Body):
8086 Add a warning about SPARK mode management. Code clean up.
8087 (Analyze_Subprogram_Instantiation): Update the warning on region
8088 management. Change the way the Ghost and SPARK modes are saved
8089 and restored.
8090 (Instantiate_Package_Body): Update the warning
8091 on region management. Change the way the Ghost and SPARK modes
8092 are saved and restored.
8093 (Instantiate_Subprogram_Body): Update
8094 the warning on region management. Change the way the Ghost and
8095 SPARK modes are saved and restored.
8096 (Set_Instance_Env): Add a
8097 warning about SPARK mode management. Change the way SPARK mode
8098 is saved and restored.
8099 * sem_ch13.adb (Build_Predicate_Functions):
8100 Change the way the Ghost mode is saved and restored.
8101 (Build_Predicate_Function_Declaration): Change the way the Ghost
8102 mode is saved and restored.
8103 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
8104 mode management. Change the way SPARK mode is saved and restored.
8105 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
8106 Change the way the Ghost mode is saved and restored.
8107 (Analyze_Initial_Condition_In_Decl_Part): Change the way
8108 the Ghost mode is saved and restored.
8109 (Analyze_Pragma):
8110 Change the way the Ghost mode is saved and restored.
8111 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
8112 Ghost mode is saved and restored.
8113 * sem_util.adb (Install_SPARK_Mode): New routine.
8114 (Restore_SPARK_Mode): New routine.
8115 (Save_SPARK_Mode_And_Set): Removed.
8116 (Set_SPARK_Mode): New routine.
8117 * sem_util.ads (Install_SPARK_Mode): New routine.
8118 (Restore_SPARK_Mode): New routine.
8119 (Save_SPARK_Mode_And_Set): Removed.
8120 (Set_SPARK_Mode): New routine.
8121
8122 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8123
8124 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
8125 to determine whether a type is declared in a local package that
8126 has not yet been frozen.
8127 * freeze.adb (Freeze_Before): Use new predicate to determine
8128 whether a local package must be installed on the scope stack
8129 in order to evaluate in the proper scope actions generated by
8130 aspect specifications, such as Predicate
8131 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
8132 using new predicate.
8133
8134 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8135
8136 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
8137 comparisons between non- scalar expressions expressions because
8138 their values cannot be invalidated.
8139 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
8140 comment on usage.
8141
8142 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8143
8144 * par_sco.adb: Minor reformatting.
8145
8146 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8147
8148 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
8149 is a type from an unfrozen local package, install package to
8150 complete the analysis of delayed aspects of the type.
8151
8152 2017-04-25 Tristan Gingold <gingold@adacore.com>
8153
8154 * bingen.adb (System_Version_Control_Used): New variable.
8155 (Resolve_Binder_Options): Set the above variable.
8156 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
8157 (Gen_Elab_Order): Emit blank line before.
8158
8159 2017-04-25 Justin Squirek <squirek@adacore.com>
8160
8161 * sem_cat.adb (Validate_RT_RAT_Component): Added
8162 an extra check to ignore incomplete types.
8163
8164 2017-04-25 Thomas Quinot <quinot@adacore.com>
8165
8166 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
8167 bogus circuitry for the case where Name is Predicate.
8168
8169 2017-04-25 Thomas Quinot <quinot@adacore.com>
8170
8171 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
8172 Create SCOs for Predicate aspects in disabled
8173 state initially, to be enabled later on by...
8174 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
8175 SCO for predicate as enabled.
8176
8177 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8178
8179 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
8180 pragmas Warnings Off / On.
8181 * namet.adb (Finalize): Remove now obsolete pair of pragmas
8182 Warnings Off / On.
8183 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
8184 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
8185 consider comparisons between static expressions because their
8186 values cannot be invalidated.
8187 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
8188 Warnings Off / On.
8189 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
8190 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
8191
8192 2017-04-25 Bob Duff <duff@adacore.com>
8193
8194 * sem_elab.adb (In_Task_Activation): Trace internal calls in
8195 task bodies.
8196
8197 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8198
8199 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
8200 typo fixes.
8201
8202 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8203
8204 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
8205 On/Off to defend against a spurious warning in conditional
8206 compilation.
8207 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
8208 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
8209 defend against a spurious warning in conditional compilation.
8210 * output.adb Add a pair of pragma Warnings On/Off to defend
8211 against a spurious warning in conditional compilation.
8212 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
8213 (Fold_General_Op): New routine.
8214 (Fold_Static_Real_Op): New routine.
8215 (Test_Comparison): New routine.
8216 * sem_eval.ads (Test_Comparison): New routine.
8217 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
8218 (Warn_On_Constant_Valid_Condition): New routine.
8219 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
8220 to detect a specific case.
8221 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
8222 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
8223 to defend against a spurious warning in conditional compilation.
8224 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
8225 against a spurious warning in conditional compilation.
8226 * usage.adb Add a pair of pragma Warnings On/Off to defend
8227 against a spurious warning in conditional compilation.
8228
8229 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8230
8231 * sinfo.ads, sem_ch13.adb: Update comment.
8232
8233 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8234
8235 * sem_util.adb (Is_Post_State): A reference to a
8236 generic in out parameter is considered a change in the post-state
8237 of a subprogram.
8238
8239 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8240
8241 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
8242 declaration of a subprogram instance within its wrapper package,
8243 skip over null statements that may result from the rewriting of
8244 ignored pragmas.
8245
8246 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8247
8248 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
8249 If the type is an unchecked_union, replace the attribute with
8250 a Raise_Program_Error (rather than inserting such before the
8251 attribute reference) to handle properly the case where we are
8252 processing a component of a larger record, and we need to prevent
8253 further expansion for the unchecked union.
8254 (Expand_Attribute_Reference, case 'Write): If the type is
8255 an unchecked_union, check whether enclosing scope is a Write
8256 subprogram. Replace attribute with a Raise_Program_Error if the
8257 discriminants of the unchecked_union type have not default values
8258 because such a use is erroneous..
8259
8260 2017-04-25 Tristan Gingold <gingold@adacore.com>
8261
8262 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
8263 Add relative_deadline to task record on edf profile.
8264 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
8265 (Make_Task_Create_Call): Pass relative_deadline value.
8266 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
8267 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
8268 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
8269 * sem_prag.adb (Set_Ravenscar_Profile): Handle
8270 GNAT_Ravenscar_EDF (set scheduling policy).
8271 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
8272 pragma.
8273 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
8274 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
8275 New names.
8276 (Pragma_Deadline_Floor): New pragma.
8277 * targparm.adb (Get_Target_Parameters): Recognize
8278 GNAT_Ravenscar_EDF profile.
8279
8280 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8281
8282 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
8283
8284 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8285
8286 * sem_aux.adb (Nearest_Ancestor): Use original node of type
8287 declaration to locate nearest ancestor, because derived
8288 type declarations for record types are rewritten as record
8289 declarations.
8290 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
8291 properly derivations that are completions of private types.
8292 (Add_Predicates): If type is private, examine rep. items of full
8293 view, which may include inherited predicates.
8294 (Build_Predicate_Functions): Ditto.
8295
8296 2017-04-25 Javier Miranda <miranda@adacore.com>
8297
8298 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
8299 to generate new entities for subtype declarations located in
8300 Expression_With_Action nodes.
8301
8302 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8303
8304 * sem_elab.adb (Check_A_Call): Remove
8305 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
8306 need for Elaborate_All when SPARK elaboration checks are
8307 required. Update the checks for instances, variables, and calls
8308 to Default_Initial_Condition procedures.
8309
8310 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8311
8312 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
8313 into a boolean aspect, in analogy with the Ada aspect No_Return.
8314
8315 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8316
8317 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
8318
8319 2017-04-25 Bob Duff <duff@adacore.com>
8320
8321 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
8322 Is_True_Constant for an array variable that is passed to a
8323 foreign function as an 'in' parameter.
8324 * debug.adb: Document -gnatd.q.
8325
8326 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8327
8328 * sem_ch6.adb (Analyze_Expression_Function): If expression function
8329 is completion and return type is an access type do not freeze
8330 designated type: this will be done in the process of freezing
8331 the expression if needed.
8332 (Freeze_Expr_Types): Check whether type is complete before
8333 creating freeze node, to provide a better error message if
8334 reference is premature.
8335 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
8336 functions created by type derivations.
8337
8338 2017-04-25 Pascal Obry <obry@adacore.com>
8339
8340 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
8341
8342 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8343
8344 * sem_res.adb (Resolve_Type_Conversion):
8345 When resolving against any fixed type, set the type of the
8346 operand as universal real when the operand is a multiplication
8347 or a division where both operands are of any fixed type.
8348 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
8349 placement of an error message by pointing to the operand of a
8350 type conversion rather than the conversion itself.
8351
8352 2017-04-25 Thomas Quinot <quinot@adacore.com>
8353
8354 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
8355 Needs_Debug_Info when producing SCOs.
8356
8357 2017-04-25 Thomas Quinot <quinot@adacore.com>
8358
8359 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
8360 Always pass a null finalization master for a library level named access
8361 type to which a pragme No_Heap_Finalization applies.
8362
8363 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8364
8365 PR ada/78845
8366
8367 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
8368 set to A'First(2) and vice versa.
8369
8370 2017-04-25 Yannick Moy <moy@adacore.com>
8371
8372 * freeze.adb (Freeze_Record_Type): Remove obsolete
8373 rule on volatile tagged record restriction on SPARK code.
8374
8375 2017-04-25 Yannick Moy <moy@adacore.com>
8376
8377 * sem_prag.adb (minor) Fix SPARK RM reference.
8378
8379 2017-04-25 Yannick Moy <moy@adacore.com>
8380
8381 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
8382 comment to reflect which entity is chosen as unique entity.
8383 (Unique_Entity): Return full view instead of private spec for
8384 protected type or task type. Fix possible incorrect access when
8385 called on entry.
8386
8387 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8388
8389 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
8390 array types only instead of all packed array types.
8391
8392 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8393
8394 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
8395 dimension system, verify that dimensions of both match.
8396 (Check_Conformance): Add error message in case of dimension
8397 mismatch.
8398 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
8399 predicate.
8400
8401 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8402
8403 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
8404 confusing.
8405
8406 2017-04-25 Yannick Moy <moy@adacore.com>
8407
8408 * sem_util.adb: Minor refactoring.
8409 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
8410
8411 2017-04-25 Claire Dross <dross@adacore.com>
8412
8413 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
8414 ultimate alias when accessing overridden operation. Indeed, if the
8415 overridden operation is itself inherited, it won't have any explicit
8416 contract.
8417
8418 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8419
8420 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
8421 overlap if the two formals have different types, because formally
8422 the corresponding actuals cannot designate the same objects.
8423
8424 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8425
8426 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
8427 dimensions are present from context, use them. b) If operand is
8428 a static constant rewritten as a literal, obtain the dimensions
8429 from the original declaration, otherwise use dimensions of type
8430 established from context.
8431
8432 2017-04-25 Yannick Moy <moy@adacore.com>
8433
8434 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
8435 of array that is private.
8436
8437 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8438
8439 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
8440 reformatting.
8441
8442 2017-04-25 Yannick Moy <moy@adacore.com>
8443
8444 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
8445 on body.
8446
8447 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8448
8449 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
8450 the check that recognizes a call to a private overridding and
8451 replaces the called subprogram with its alias.
8452
8453 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8454
8455 * exp_util.adb: Minor reformatting.
8456
8457 2017-04-25 Justin Squirek <squirek@adacore.com>
8458
8459 * exp_ch3.adb (Freeze_Type): Add condition to always treat
8460 interface types as a partial view of a private type for the
8461 generation of invariant procedure bodies.
8462 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
8463 Add a condition to get the Corresponding_Record_Type for
8464 concurrent types, add condition to return in the absence of a
8465 class in the pragma, remove call to Replace_Type_References,
8466 and add call to Replace_References.
8467 (Add_Interface_Invariatns),
8468 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
8469 to including the working type T.
8470 (Add_Own_Invariants): Remove
8471 legacy condition for separate units, remove dispatching for ASIS
8472 and save a copy of the expression in the pragma expression.
8473 (Build_Invariant_Procedure_Body): Default initalize vars,
8474 remove return condition on interfaces, always use the
8475 private type for interfaces, and move the processing of types
8476 until after the processing of invariants for the full view.
8477 (Build_Invariant_Procedure_Declaration): Remove condition
8478 to return if an interface type is encountered and add
8479 condition to convert the formal parameter to its class-wide
8480 counterpart if Work_Typ is abstract.
8481 (Replace_Type): Add call to Remove_Controlling_Arguments.
8482 (Replace_Type_Ref): Remove class-wide dispatching for the current
8483 instance of the type.
8484 (Replace_Type_References): Remove parameter "Derived"
8485 (Remove_Controlling_Arguments): Created in order to removing
8486 the controlliong argument from calls to primitives in the case
8487 of the formal parameter being an class-wide abstract type.
8488 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
8489 to the change made to Freeze_Type in exp_ch3. Add a condition
8490 to treat interface types as a partial view.
8491 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
8492 to Build_Invariant_Procedure_Declaration to properly generate a
8493 "partial" invariant procedure when Typ is an interface.
8494
8495 2017-04-25 Bob Duff <duff@adacore.com>
8496
8497 * a-numeri.ads: Go back to using brackets encoding for the Greek
8498 letter pi.
8499
8500 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8501
8502 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
8503 (10-15): if derived type T with progenitors is abstract,
8504 and primitive P of this type inherits non-trivial classwide
8505 preconditions from both a parent operation and from an interface
8506 operation, then the inherited operation is abstract if the parent
8507 operation is not null.
8508 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
8509 with Covered_Interface_Op to yield the actual interface operation
8510 that is implemented by a given inherited operation.
8511
8512 2017-04-25 Javier Miranda <miranda@adacore.com>
8513
8514 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
8515 and right operands after performing the validity checks. Required
8516 because validity checks may remove side effects from the operands.
8517
8518 2017-04-25 Javier Miranda <miranda@adacore.com>
8519
8520 * exp_attr.adb (Attribute_Unrestricted_Access):
8521 Do not disable implicit type conversion. Required to generate
8522 code that displaces the pointer to reference the secondary
8523 dispatch table.
8524
8525 2017-04-25 Pascal Obry <obry@adacore.com>
8526
8527 * prj-attr.adb, snames.ads-tmpl: Add package Install's
8528 Required_Artifacts attribute.
8529
8530 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8531
8532 * sem_util.adb (Same_Value): String literals are compile-time
8533 values, and comparing them must use Expr_Value_S.
8534
8535 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8536
8537 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
8538 dereference is introduced for the object, and the object is
8539 overloaded, do not check whether it is aliased, because it may
8540 include an implicit dereference.
8541 * sem_type.adb (Disambiguate): If two interpretations are access
8542 attribute types with the same designated type keep either of
8543 them and do not report an ambiguity. A true ambiguity will be
8544 reported elsewhere.
8545
8546 2017-04-25 Bob Duff <duff@adacore.com>
8547
8548 * a-numeri.ads: Change the encoding of Greek letter Pi from
8549 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
8550 to indicate the encoding. We considered using a byte order mark
8551 (BOM), but that causes various trouble (misc software eats the
8552 BOM, if you have a patch with a BOM, then it's not at the start
8553 of the patch, so it's not a BOM, the BOM affects with-ing files,
8554 etc.).
8555 * scng.adb, s-wchcnv.adb: Minor.
8556
8557 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8558
8559 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
8560 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8561
8562 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
8563 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
8564 Improve error message on operations that inherit non-conforming
8565 classwide preconditions from ancestor and progenitor.
8566 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
8567 moved here from sem_ch3.
8568 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
8569 check given in RM 6.1.1 (17) concerning renamings of overriding
8570 operations that inherits class-wide preconditions from ancestor
8571 or progenitor.
8572
8573 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8574
8575 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
8576 (Build_Adjust_Statements): Code cleanup.
8577 (Build_Finalizer): Update the initialization of
8578 Exceptions_OK.
8579 (Build_Finalize_Statements): Code cleanup.
8580 (Build_Initialize_Statements): Code cleanup.
8581 (Make_Deep_Array_Body): Update the initialization of
8582 Exceptions_OK.
8583 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
8584 (Process_Object_Declaration): Generate a null exception handler only
8585 when exceptions are allowed.
8586 (Process_Transients_In_Scope): Update the initialization of
8587 Exceptions_OK.
8588 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
8589 routine.
8590 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
8591 restrictions when the handler is internally generated and the
8592 mode is warnings.
8593
8594 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8595
8596 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
8597 enforce legality rule on classwide preconditions inherited from
8598 both an ancestor and a progenitor (RM 6.1.1 (10-13).
8599 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
8600 subprogram need not be dispatching if it appears in a precondition
8601 for an abstract or null subprogram.
8602
8603 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8604
8605 * sem_ch10.adb: Minor typo fix.
8606
8607 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8608
8609 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
8610
8611 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8612
8613 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
8614 have a length which is a power of 2.
8615 (Is_Predefined_File_Name): Likewise. Adjust comment.
8616
8617 2017-04-25 Bob Duff <duff@adacore.com>
8618
8619 * exp_aggr.adb (Component_Count): Protect the
8620 arithmetic from attempting to convert a value >= 2**31 to Int,
8621 which would otherwise raise Constraint_Error.
8622
8623 2017-04-25 Bob Duff <duff@adacore.com>
8624
8625 * opt.ads (Locking_Policy): Fix incorrect documentation. The
8626 first character of the policy name is not unique.
8627
8628 2017-04-25 Bob Duff <duff@adacore.com>
8629
8630 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
8631 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
8632 about this flag not being used. It was already used, and it is
8633 now used more.
8634
8635 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8636
8637 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
8638 (Ignore_SPARK_Mode_Pragmas): New routine.
8639 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
8640 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
8641 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
8642 related entities.
8643 (Ignore_SPARK_Mode_Pragmas): New routine
8644 along with pragma Inline.
8645 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
8646 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
8647 Ignore_SPARK_Mode_Pragmas_In_Instance.
8648 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8649 Save and restore the value of global flag
8650 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
8651 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
8652 the corresponding spec or the body must ignore all SPARK_Mode
8653 pragmas found within.
8654 (Analyze_Subprogram_Declaration): Mark
8655 the spec when it needs to ignore all SPARK_Mode pragmas found
8656 within to allow the body to infer this property in case it is
8657 instantiated or inlined later.
8658 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
8659 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8660 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8661 when the corresponding spec also ignored all SPARK_Mode pragmas
8662 found within.
8663 (Analyze_Package_Declaration): Mark the spec when
8664 it needs to ignore all SPARK_Mode pragmas found within to allow
8665 the body to infer this property in case it is instantiated or
8666 inlined later.
8667 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
8668 Save and restore the value of flag
8669 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8670 formal spec when it needs to ignore all SPARK_Mode
8671 pragmas found within to allow the body to infer this
8672 property in case it is instantiated or inlined later.
8673 (Analyze_Package_Instantiation): Save and restore the value
8674 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
8675 the instance spec when it needs to ignore all SPARK_Mode
8676 pragmas found within to allow the body to infer this
8677 property in case it is instantiated or inlined later.
8678 (Analyze_Subprogram_Instantiation): Save and restore the value
8679 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8680 instance spec and anonymous package when they need to ignore
8681 all SPARK_Mode pragmas found within to allow the body to infer
8682 this property in case it is instantiated or inlined later.
8683 (Instantiate_Package_Body): Save and restore the value of global
8684 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
8685 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
8686 corresponding instance spec also ignored all SPARK_Mode pragmas
8687 found within.
8688 (Instantiate_Subprogram_Body): Save and restore the
8689 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8690 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8691 when the corresponding instance spec also ignored all SPARK_Mode
8692 pragmas found within.
8693 * sem_prag.adb (Analyze_Pragma): Update the reference to
8694 Ignore_Pragma_SPARK_Mode.
8695 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
8696 all SPARK_Mode pragmas defined within yields mode "off".
8697
8698 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8699
8700 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
8701
8702 2017-04-25 Bob Duff <duff@adacore.com>
8703
8704 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
8705 All_Checks" to avoid generating unnecessary checks.
8706 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
8707 All_Checks".
8708 * sem.ads: Fix comment.
8709 * expander.ads: Fix comment.
8710 * exp_atag.ads: Fix comment: "Index = 0" should be
8711 "Index >= 0".
8712
8713 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8714
8715 * s-taprop-linux.adb: Minor editorial fixes.
8716
8717 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8718
8719 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
8720 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
8721 variable and set it to True whenever the main hash table is
8722 populated. Short- circuit the Assoc function if it is false
8723 and add associated guards.
8724
8725 2017-04-25 Olivier Hainque <hainque@adacore.com>
8726
8727 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
8728 specs without elaboration code that have an elaboration counter
8729 nevertheless, e.g. when compiled with -fpreserve-control-flow.
8730 * sem_ch10.adb (Analyze_Compilation_Unit):
8731 Set_Elaboration_Entity_Required when requested to preserve
8732 control flow, to ensure the unit elaboration is materialized at
8733 bind time, resulting in the inclusion of the unit object file
8734 in the executable closure at link time.
8735
8736 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
8737
8738 * exp_dbug.adb: In Debug_Renaming_Declaration,
8739 when dealing with indexed component, accept to produce a renaming
8740 symbol when the index is an IN parameter or when it is a name
8741 defined in an outer scope.
8742
8743 2017-04-25 Yannick Moy <moy@adacore.com>
8744
8745 * errout.adb (Error_Msg): Adapt continuation
8746 message in instantiations and inlined bodies for info messages.
8747
8748 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8749
8750 * fname.adb (Has_Internal_Extension): Add pragma Inline.
8751 Use direct 4-character slice comparisons.
8752 (Has_Prefix): Add
8753 pragma Inline. (Has_Suffix): Delete.
8754 (Is_Internal_File_Name):
8755 Test Is_Predefined_File_Name first.
8756 (Is_Predefined_File_Name):
8757 Use direct slice comparisons as much as possible and limit all
8758 comparisons to at most 8 characters.
8759
8760 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8761
8762 * checks.adb (Insert_Valid_Check): Code cleanup.
8763 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
8764 (Expand_Actuals): Generate proper copy-back for a validation
8765 variable when it acts as the argument of a type conversion.
8766 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
8767 predicate to operate on type qualifications.
8768
8769 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8770
8771 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
8772 Minor reformatting.
8773
8774 2017-04-25 Bob Duff <duff@adacore.com>
8775
8776 * sem_prag.adb (No_Return): Give an error if the pragma applies
8777 to a body. Specialize the error for the specless body case,
8778 as is done for (e.g.) pragma Convention.
8779 * debug.adb: Add switch -gnatd.J to disable the above legality
8780 checks. This is mainly for use in our test suite, to avoid
8781 rewriting a lot of illegal (but working) code. It might also
8782 be useful to customers. Under this switch, if a pragma No_Return
8783 applies to a body, and the procedure raises an exception (as it
8784 should), the pragma has no effect. If the procedure does return,
8785 execution is erroneous.
8786
8787 2017-04-25 Bob Duff <duff@adacore.com>
8788
8789 * exp_ch6.adb (Expand_Actuals): This is the
8790 root of the problem. It took N as an 'in out' parameter, and in
8791 some cases, rewrote N, but then set N to Original_Node(N). So
8792 the node returned in N had no Parent. The caller continued
8793 processing of this orphaned node. In some cases that caused a
8794 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
8795 and trips over the Empty Parent). The solution is to make N an
8796 'in' parameter. Instead of rewriting it, return the list of
8797 post-call actions, so the caller can do the rewriting later,
8798 after N has been fully processed.
8799 (Expand_Call_Helper): Move most of Expand_Call here. It has
8800 too many premature 'return' statements, and we want to do the
8801 rewriting on return.
8802 (Insert_Post_Call_Actions): New procedure to insert the post-call
8803 actions in the appropriate place. In the problematic case,
8804 that involves rewriting N as an Expression_With_Actions.
8805 (Expand_Call): Call the new procedures Expand_Call_Helper and
8806 Insert_Post_Call_Actions.
8807
8808 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8809
8810 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
8811 properly type derived from generic formal types, to handle
8812 properly modified version of ACATS 4.1B B611017.
8813
8814 2017-04-25 Javier Miranda <miranda@adacore.com>
8815
8816 * exp_unst.adb (Subp_Index): Adding missing
8817 support for renamings and functions that return a constrained
8818 array type (i.e. functions for which the frontend built a
8819 procedure with an extra out parameter).
8820
8821 2017-04-25 Pascal Obry <obry@adacore.com>
8822
8823 * s-string.adb: Minor code clean-up.
8824
8825 2017-04-25 Bob Duff <duff@adacore.com>
8826
8827 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
8828 procedure.
8829 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
8830 function for Non_Blocking_Wait_Process.
8831
8832 2017-04-25 Bob Duff <duff@adacore.com>
8833
8834 * prep.adb (Preprocess): Remove incorrect
8835 Assert. Current character can be ASCII.CR.
8836
8837 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8838
8839 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
8840 convention Stdcall, which has a number of exceptions. Convention
8841 is legal on a component declaration whose type is an anonymous
8842 access to subprogram.
8843
8844 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8845
8846 * sem_ch4.adb: sem_ch4.adb Various reformattings.
8847 (Try_One_Prefix_Interpretation): Use the base type when dealing
8848 with a subtype created for purposes of constraining a private
8849 type with discriminants.
8850
8851 2017-04-25 Javier Miranda <miranda@adacore.com>
8852
8853 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
8854 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
8855 dispatching primitives (Restore_Warnings): Restore warning on
8856 late dispatching primitives (Save_Warnings): Save warning on late
8857 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
8858 to enable/disable this warning.
8859 (WA_Warnings): Set warning on late dispatching primitives.
8860 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
8861 that its parent type has a private extension.
8862 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
8863 New subprogram.
8864 * usage.adb: Document -gnatw.j and -gnatw.J.
8865
8866 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8867
8868 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
8869 reformatting.
8870
8871 2017-04-25 Bob Duff <duff@adacore.com>
8872
8873 * binde.adb (Validate): Do not pass dynamic strings
8874 to pragma Assert, because older compilers do not support that.
8875
8876 2017-04-25 Bob Duff <duff@adacore.com>
8877
8878 * s-fileio.adb (Close): When a temp file is
8879 closed, delete it and clean up its Temp_File_Record immediately,
8880 rather than waiting until later.
8881 (Temp_File_Record): Add File
8882 component, so Close can know which Temp_File_Record corresponds
8883 to the file being closed.
8884 (Delete): Don't delete temp files,
8885 because they are deleted by Close.
8886 (Open): Set the File component
8887 of Temp_File_Record. This requires moving the creation of the
8888 Temp_File_Record to the end, after the AFCB has been created.
8889
8890 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8891
8892 * checks.adb (Insert_Valid_Check): Do not generate
8893 a validity check when inside a generic.
8894
8895 2017-04-25 Yannick Moy <moy@adacore.com>
8896
8897 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
8898
8899 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8900
8901 * snames.ads-tmpl (Snames): More names for detecting predefined
8902 potentially blocking subprograms.
8903
8904 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8905
8906 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
8907 concerning inheritance of class-wide preconditions do not apply
8908 to postconditions.
8909
8910 2017-04-25 Bob Duff <duff@adacore.com>
8911
8912 * s-ficobl.ads: Minor comment fix.
8913
8914 2017-04-25 Yannick Moy <moy@adacore.com>
8915
8916 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
8917 conversions from float to integer in GNATprove mode.
8918 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
8919 to call Apply_Type_Conversion_Checks, so that range checks
8920 are properly positioned when needed on conversions, including
8921 when converting from float to integer. (Determine_Range): In
8922 GNATprove mode, take into account the possibility of conversion
8923 from float to integer.
8924 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
8925 check on conversions from fixed-point to integer, not anymore
8926 on conversions from floating-point to integer, when in GNATprove
8927 mode.
8928
8929 2017-04-25 Yannick Moy <moy@adacore.com>
8930
8931 * checks.adb (Determine_Range_R): Special case type conversions
8932 from integer to float in order to get bounds in that case too.
8933 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
8934 mode, for computations involved in interval checking.
8935
8936 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8937
8938 * checks.adb (Insert_Valid_Check): Partially reimplement validity
8939 checks.
8940 * einfo.adb Node36 is now used as Validated_Object.
8941 (Validated_Object): New routine.
8942 (Set_Validated_Object): New routine.
8943 (Write_Field36_Name): Add an entry for Validated_Object.
8944 * einfo.ads Add new attribute Validated_Object along with
8945 usage in entities.
8946 (Validated_Object): New routine along with pragma Inline.
8947 (Set_Validated_Object): New routine along with pragma Inline.
8948 * exp_attr.adb (Make_Range_Test): Add processing for validation
8949 variables to avoid extra reads and copies of the prefix.
8950 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
8951 variables in order to reflect any changes done in the variable
8952 back into the original object.
8953 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
8954 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
8955
8956 2017-04-25 Steve Baird <baird@adacore.com>
8957
8958 * exp_ch7.adb (Build_Array_Deep_Procs,
8959 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
8960 generate Finalize_Address routines for CodePeer.
8961
8962 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8963
8964 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
8965 Analyze_Pre_Post_Condition, to implement the legality checks
8966 mandated by AI12-0131: Pre'Class shall not be specified for an
8967 overriding primitive subprogram of a tagged type T unless the
8968 Pre'Class aspect is specified for the corresponding primitive
8969 subprogram of some ancestor of T.
8970
8971 2017-04-25 Bob Duff <duff@adacore.com>
8972
8973 * sem_ch8.adb (Use_One_Type): If a use_type_clause
8974 is redundant, set its Used_Operations to empty. This is only
8975 necessary for use clauses that appear in the parent of a generic
8976 child unit, because those use clauses get reanalyzed when we
8977 instantiate the generic, and we don't want the Used_Operations
8978 carried over from the original context (where it was probably
8979 not redundant).
8980
8981 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8982
8983 * exp_ch6.adb: Minor reformatting.
8984
8985 2017-04-25 Bob Duff <duff@adacore.com>
8986
8987 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
8988 Use Source_Index (Current_Sem_Unit) to find the correct casing.
8989 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
8990 (Current_Sem_Unit) to find the correct casing.
8991 * par.adb (Par): Null out Current_Source_File, to ensure that
8992 the above bugs won't rear their ugly heads again.
8993
8994 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8995
8996 * sem_ch8.adb (Find_Type): For an attribute reference
8997 'Class, if prefix type is synchronized and previous errors
8998 have suppressed the creation of the corresponding record type,
8999 create a spurious class-wide for the synchonized type itself,
9000 to catch other misuses of the attribute
9001
9002 2017-04-25 Steve Baird <baird@adacore.com>
9003
9004 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
9005 is True, then don't generate the accessibility check for the
9006 tag of a tagged result.
9007 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
9008 if CodePeer_Mode is True, then don't generate the
9009 tag checks for the result of call to an instance of
9010 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
9011 descendant of" check and the accessibility check).
9012
9013 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9014
9015 * sem_ch13.adb: Code cleanups.
9016 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
9017 * sem_ch8.ads: Minor comment fix.
9018
9019 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9020
9021 * exp_ch4.adb (Library_Level_Target): New function.
9022 (Expand_Concatenate): When optimization is enabled, also expand
9023 the operation out-of-line if the concatenation is present within
9024 the expression of the declaration of a library-level object and
9025 not only if it is the expression of the declaration.
9026
9027 2017-04-25 Bob Duff <duff@adacore.com>
9028
9029 * freeze.adb (Freeze_Object_Declaration): Do
9030 not Remove_Side_Effects if there is a pragma Linker_Section,
9031 because in that case we want static initialization in the
9032 appropriate section.
9033
9034 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9035
9036 * exp_dbug.adb: Minor rewording and reformatting.
9037
9038 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9039
9040 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
9041 handle the proposed changes to rules concerning potentially
9042 unevaluated expressions, to include selected components that
9043 do not depend on discriminants, and indexed components with
9044 static indices.
9045 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
9046 predicate in quantified expression, and fix bugs in the handling
9047 of case expressions and membership test.
9048 (Analyze_Attribute_Old_Result): use new predicate.
9049 (Analyze_Attribute, case Loop_Entry): ditto.
9050
9051 2017-04-25 Bob Duff <duff@adacore.com>
9052
9053 * s-secsta.adb (SS_Info): Add a comment
9054 explaining why we don't need to walk all the chunks in order to
9055 compute the total size.
9056
9057 2017-04-25 Bob Duff <duff@adacore.com>
9058
9059 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
9060 of the global name buffer to 4*Max_Line_Length.
9061
9062 2017-04-25 Javier Miranda <miranda@adacore.com>
9063
9064 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
9065 renaming entity for debug information, mark the entity as needing debug
9066 info if it comes from sources.
9067
9068 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9069
9070 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
9071 restriction converning the use of 'Address where the prefix is
9072 of a controlled type.
9073
9074 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
9075
9076 * exp_dbug.adb: In Debug_Renaming_Declaration,
9077 skip slices that are made redundant by an indexed component
9078 access.
9079 * atree.h: New definition for Original_Node.
9080
9081 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9082
9083 * sem_prag.adb, sem_prag.ads: Minor reformatting.
9084
9085 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9086
9087 * sem_ch3.adb (Check_Entry_Contract): Call
9088 Preanalyze_Spec_Expression so that resolution takes place as well.
9089 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
9090 internal calls that appear in preconditions of protected
9091 operations, in default values for same, and in contract guards
9092 for contract cases in SPARK.
9093
9094 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9095
9096 * a-numaux.ads: Fix description of a-numaux-darwin
9097 and a-numaux-x86.
9098 (Double): Define to Long_Float.
9099 * a-numaux-vxworks.ads (Double): Likewise.
9100 * a-numaux-darwin.ads
9101 (Double): Likewise.
9102 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
9103 * a-numaux-x86.ads: Fix package description.
9104 * a-numaux-x86.adb (Is_Nan): Minor tweak.
9105 (Reduce): Adjust and complete description. Call Is_Nan instead of
9106 testing manually. Use an integer temporary to hold rounded value.
9107 * a-numaux-darwin.adb (Reduce): Likewise.
9108 (Is_Nan): New function.
9109
9110 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9111
9112 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
9113 on analysis of prefix whose type is a current instance of a
9114 synchronized type, but where the prefix itself is an entity that
9115 is an object.
9116
9117 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9118
9119 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
9120 the identity of callable entities therein, because they have been
9121 properly resolved, and prefixed calls may have been rewritten
9122 as normal calls.
9123
9124 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
9125
9126 * exp_ch3.adb (Build_Init_Statements): Convert
9127 the expression of the pragma/aspect Secondary_Stack_Size to
9128 internal type System.Parameters.Size_Type before assigning
9129 it to the Secondary_Stack_Size component of the task type's
9130 corresponding record.
9131
9132 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9133
9134 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
9135 (etc) optimizations when the type is modular and the offsets
9136 are equal.
9137
9138 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9139
9140 * s-osinte-freebsd.ads: Minor comment tweaks
9141
9142 2017-04-25 Javier Miranda <miranda@adacore.com>
9143
9144 * urealp.adb (UR_Write): Reverse previous patch
9145 adding documentation on why we generate multiplications instead
9146 of divisions (needed to avoid expressions whose computation with
9147 large numbers may cause division by 0).
9148
9149 2017-04-25 Bob Duff <duff@adacore.com>
9150
9151 * erroutc.adb (Set_Specific_Warning_Off,
9152 Set_Warnings_Mode_Off): Use the correct source file for
9153 Stop. Was using Current_Source_File, which is only valid during
9154 parsing. Current_Source_File will have a leftover value from
9155 whatever file happened to be parsed last, because of a with_clause
9156 or something.
9157
9158 2017-04-25 Bob Duff <duff@adacore.com>
9159
9160 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
9161 to In_Predefined_Unit, but including GNAT units.
9162 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
9163 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
9164 because Should_Ignore_Pragma was not working reliably outside
9165 the parser, because Current_Source_File is not valid.
9166 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
9167 * par-prag.adb: Call Should_Ignore_Pragma_Par.
9168
9169 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9170
9171 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
9172 codepeer mode.
9173
9174 2017-04-25 Javier Miranda <miranda@adacore.com>
9175
9176 * urealp.adb (UR_Write): Fix output of constants with a base other
9177 that 10.
9178
9179 2017-04-25 Justin Squirek <squirek@adacore.com>
9180
9181 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
9182 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
9183 Add extra parameter for Process_Interface_Name.
9184 (Process_Interface_Name): Add parameter for pragma to analyze
9185 corresponding aspect.
9186 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
9187 from sem_ch13.adb
9188
9189 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9190
9191 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
9192 correction.
9193
9194 2017-04-25 Yannick Moy <moy@adacore.com>
9195
9196 * sem_res.adb (Resolve_Comparison_Op): Do not
9197 attempt evaluation of relational operations inside assertions.
9198
9199 2017-04-25 Justin Squirek <squirek@adacore.com>
9200
9201 * exp_util.adb (Add_Interface_Invariants):
9202 Restored, code moved back from Build_Invariant_Procedure_Body.
9203 (Add_Parent_Invariants): Restored, code moved back from
9204 Build_Invariant_Procedure_Body.
9205 (Build_Invariant_Procedure_Body):
9206 Remove refactored calls and integrated code from
9207 Add_Parent_Invariants and Add_Interface_Invariants.
9208
9209 2017-04-25 Johannes Kanig <kanig@adacore.com>
9210
9211 * errout.adb (Output_Messages): Adjust computation of total
9212 errors
9213 * erroutc.adb (Error_Msg): In statistics counts, deal
9214 correctly with informational messages that are not warnings.
9215 * errutil.adb (Finalize): adjust computation of total errors.
9216
9217 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9218
9219 * terminals.c (__gnat_terminate_pid): New.
9220 * g-exptty.ads (Terminate_Process): New. Update comments.
9221
9222 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9223
9224 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
9225
9226 2017-04-25 Justin Squirek <squirek@adacore.com>
9227
9228 * sem_ch3.adb (Analyze_Declarations): Minor
9229 correction to comments, move out large conditional and scope
9230 traversal into a predicate.
9231 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
9232 logic.
9233
9234 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9235
9236 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
9237 of prefix whose type is a current instance of a synchronized
9238 type. If the prefix is an object this is an external call (or
9239 requeue) that can only access public operations of the object. The
9240 previous predicate was too restrictive, and did not allow public
9241 protected operations, only task entries.
9242
9243 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9244
9245 * sem_ch5.adb, fname.adb: Minor reformatting.
9246
9247 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9248
9249 * einfo.adb (Is_Anonymous_Access_Type): New routine.
9250 * einfo.ads Update the placement of
9251 E_Anonymous_Access_Subprogram_Type along with all subtypes that
9252 mention the ekind.
9253 (Is_Anonymous_Access_Type): New routine.
9254 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
9255 master for an access type subject to pragma No_Heap_Finalization.
9256 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
9257 allocated or deallocated does not finalization actions if the
9258 associated access type is subject to pragma No_Heap_Finalization.
9259 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
9260 * par-prag.adb Pragma No_Heap_Finalization does not need special
9261 processing from the parser.
9262 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
9263 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
9264 * sem_prag.adb Add an entry in table Sig_Flags for pragma
9265 No_Heap_Finalization.
9266 (Analyze_Pragma): Add processing for
9267 pragma No_Heap_Finalization. Update various error messages to
9268 use Duplication_Error.
9269 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
9270 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
9271 and corresponding pragma id.
9272
9273 2017-04-25 Bob Duff <duff@adacore.com>
9274
9275 * freeze.adb (Freeze_Record_Type): Use the
9276 underlying type of the component type to determine whether it's
9277 elementary. For representation clause purposes, a private type
9278 should behave the same as its full type.
9279 * fname.ads, fname.adb (Is_Predefined_File_Name):
9280 Make sure things like "system.ali" are recognized as predefined.
9281
9282 2017-04-25 Javier Miranda <miranda@adacore.com>
9283
9284 * debug.adb: Update documentation of -gnatd.6.
9285
9286 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9287
9288 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
9289 element iterator when the name is an overloaded function call,
9290 one of whose interpretations yields an array.
9291
9292 2017-04-25 Bob Duff <duff@adacore.com>
9293
9294 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
9295 Is_Internal_Unit_Name): New functions for operating on unit
9296 names, as opposed to file names. There's some duplicated code
9297 with fname.adb, which is unfortunate, but it seems like we don't
9298 want to add dependencies here.
9299 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
9300 to Is_Predefined_Unit_Name; the former was wrong, because Uname
9301 is not a file name at all.
9302 * fname.ads, fname.adb: Document the fact that
9303 Is_Predefined_File_Name and Is_Internal_File_Name can be called
9304 for ALI files, and fix the code so it works properly for ALI
9305 files. E.g. these should return True for "system.ali".
9306
9307 2017-04-25 Justin Squirek <squirek@adacore.com>
9308
9309 * exp_util.adb (Add_Invariant): Removed,
9310 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
9311 and Add_Own_Invariant. (Add_Invariant_Check): Used
9312 for adding runtime checks from any kind of invariant.
9313 (Add_Inherited_Invariant): Generates invariant checks for
9314 class-wide invariants (Add_Interface_Invariants): Removed, code
9315 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
9316 Create a types own invariant procedure (Add_Parent_Invariants):
9317 Removed, code moved to Build_Invariant_Procedure_Body
9318 (Build_Invariant_Procedure_Body): Add refactored calls
9319 and integrated code from Add_Parent_Invariants and
9320 Add_Interface_Invariants.
9321 (Process_Type): Removed, the
9322 relavant code was inlined into both Add_Own_Invariant and
9323 Add_Inherited_Invariant.
9324
9325 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9326
9327 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
9328 scn.adb, osint.adb, fname.adb: Minor reformatting.
9329
9330 2017-04-25 Pascal Obry <obry@adacore.com>
9331
9332 * s-taprop-mingw.adb: Do not check for CloseHandle in
9333 Finalize_TCB.
9334
9335 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9336
9337 * sem_util.adb (Check_Part_Of_Reference):
9338 Continue to examine the context if the reference appears within
9339 an expression function.
9340
9341 2017-04-25 Justin Squirek <squirek@adacore.com>
9342
9343 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
9344 and Build_Invariant_Procedure_Declaration.
9345 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
9346 and Build_Invariant_Procedure_Declaration from exp_ch7
9347 and break-out Is_Untagged_Private_Derivation from
9348 Build_Invariant_Procedure_Body.
9349 (Replace_Type_References):
9350 Append an extra parameter to allow for dispatching replacements
9351 and add the corrasponding logic.
9352 (Type_Invariant): Remove
9353 Replace_Typ_Refs and replace its references with calls to
9354 Replace_Type_References.
9355 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
9356
9357 2017-04-25 Bob Duff <duff@adacore.com>
9358
9359 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
9360 that returns True when appropriate.
9361 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
9362 when compiling predefined files.
9363 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
9364 "gnat.adc" should not be considered a predefined file name.
9365 That required (or at least encouraged) a lot of cleanup of global
9366 variable usage. We shouldn't be communicating information via
9367 the global name buffer.
9368 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
9369 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
9370 required by the above-mentioned cleanup.
9371
9372 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9373
9374 * osint.adb (Find_File): Handle properly a request for a
9375 configuration file whose name is a directory.
9376
9377 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9378
9379 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
9380
9381 2017-04-25 Bob Duff <duff@adacore.com>
9382
9383 * types.ads: Minor: Fix '???' comment.
9384 * sem_ch8.adb: Minor comment fix.
9385
9386 2017-04-25 Bob Duff <duff@adacore.com>
9387
9388 * sem_prag.adb: Remove suspicious uses of Name_Buf.
9389 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
9390 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
9391 Add String_To_Name with no side effects.
9392
9393 2017-04-25 Justin Squirek <squirek@adacore.com>
9394
9395 * sem_ch3.adb (Analyze_Declarations): Add
9396 additional condition for edge case.
9397
9398 2017-04-25 Bob Duff <duff@adacore.com>
9399
9400 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
9401 reserved words inside pragmas. This is necessary to allow the
9402 pragma name Interface to be used in pragma Ignore_Pragma.
9403 * par.adb: Minor comment fix.
9404
9405 2017-04-25 Javier Miranda <miranda@adacore.com>
9406
9407 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
9408 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
9409 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
9410 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
9411 occurrences of RE_Type_Is_Abstract
9412
9413 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9414
9415 * exp_util.adb (Build_Chain): Account for ancestor
9416 subtypes while traversing the derivation chain.
9417
9418 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9419
9420 * sem_attr.adb: minor reformatting.
9421
9422 2017-04-25 Doug Rupp <rupp@adacore.com>
9423
9424 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
9425
9426 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9427
9428 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
9429 the first pass over an assignment statement with target names,
9430 to prevent the generation of subtypes (such as discriminated
9431 record components)that may carry the target name outside of the
9432 tree for the assignment. The subtypes will be generated when
9433 the assignment is reanalyzed in full.
9434 (Analyze_Target_Name): Handle properly class-wide types.
9435
9436 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9437
9438 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
9439 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9440 the purposes of freezing.
9441 * exp_util.adb Update the documentation and structure of the
9442 type map used in class-wide semantics of assertion expressions.
9443 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9444 and resolve the triaged expression because all substitutions
9445 refer to the proper entities. Update the replacement of
9446 references.
9447 (Build_DIC_Procedure_Body): Add formal parameter
9448 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9449 are now only processed when freezing occurs. Build a body only
9450 when one is needed.
9451 (Entity_Hash): Removed.
9452 (Map_Types): New routine.
9453 (Replace_Object_And_Primitive_References): Removed.
9454 (Replace_References): New routine.
9455 (Replace_Type_References): Moved to the library level of Exp_Util.
9456 (Type_Map_Hash): New routine.
9457 (Update_Primitives_Mapping): Update the mapping call.
9458 (Update_Primitives_Mapping_Of_Types): Removed.
9459 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9460 parameter For_Freeze and update the comment on usage.
9461 (Map_Types): New routine.
9462 (Replace_References): New routine.
9463 (Replace_Type_References): Moved to the library level of Exp_Util.
9464 (Update_Primitives_Mapping_Of_Types): Removed.
9465 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9466 properties of the private type to the full view in case the full
9467 view derives from a parent type and inherits a DIC pragma.
9468 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9469 DIC pragma is placed at the top of a declarative region.
9470
9471 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9472
9473 * a-tasatt.adb: Complete previous change and use an unsigned
9474 int to avoid overflow checks.
9475
9476 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9477
9478 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
9479 the error message when the attribute reference is an actual in
9480 a call to a subprogram inherited from a generic formal type with
9481 unknown discriminants, which makes the subprogram and its formal
9482 parameters intrinsic (see RM 6.3.1 (8) and (13)).
9483
9484 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9485
9486 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
9487 sem_prag.adb: Minor reformatting.
9488
9489 2017-04-25 Bob Duff <duff@adacore.com>
9490
9491 * sem_attr.adb (Type_Key): Add code in the
9492 recursive Compute_Type_Key to protect against fetching the source
9493 code for Standard, in case a component of the type is declared
9494 in Standard. There was already code to do this for the original
9495 type, but not for its components.
9496
9497 2017-04-25 Javier Miranda <miranda@adacore.com>
9498
9499 * exp_ch3.adb (Build_Initialization_Call): Handle
9500 subtypes of private types when searching for the underlying full
9501 view of a private type.
9502
9503 2017-04-25 Javier Miranda <miranda@adacore.com>
9504
9505 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
9506 real conditional expression can appear in a fixed-type context
9507 and must be resolved with that context to facilitate the code
9508 generation to the backend.
9509
9510 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9511
9512 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
9513 to indicate whether during inline processing, when some unit U1
9514 appears in the context of a unit U2 compiled for instantiation
9515 or inlining purposes, the body of U1 needs to be compiled as well.
9516 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
9517 context is a package declaration.
9518 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
9519 Analyze_Generic_Package_Declaration): ditto.
9520 * inline.adb (Analyze_Inlined_Bodies): Check
9521 Body_Needed_For_Inlining.
9522
9523 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9524
9525 * par.adb (Current_Assign_Node): Global variable use to record
9526 the presence of a target_name in the right hand side of the
9527 assignment being parsed.
9528 * par-ch4.adb (P_Name): If the name is a target_name, mark the
9529 enclosing assignment node accordingly.
9530 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
9531 appropriately.
9532 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
9533 analyzing RHS if the statement has target_names.
9534 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
9535 properly choices that are subtype marks.
9536 * exp_ch5.adb: Code cleanup.
9537
9538 2017-04-25 Bob Duff <duff@adacore.com>
9539
9540 * s-memory.adb: Add a comment regarding efficiency.
9541 * atree.adb: Fix the assertion, and combine 2 assertions into one,
9542 "the source has an extension if and only if the destination does."
9543 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
9544
9545 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9546
9547 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
9548 conversion.
9549
9550 2017-04-25 Doug Rupp <rupp@adacore.com>
9551
9552 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
9553 handling for ppc64-vx7.
9554 * sigtramp-vxworks-target.inc
9555 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
9556
9557 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9558
9559 * ada_get_targ.adb: New file.
9560
9561 2017-04-25 Bob Duff <duff@adacore.com>
9562
9563 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
9564 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
9565 (UI_GCD): Remove ??? comment involving possible efficiency
9566 improvements. This just isn't important after all these years.
9567 Also minor cleanup.
9568 * uintp.ads: Minor cleanup.
9569
9570 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9571
9572 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
9573 Revert previous changes.
9574 * scng.adb: Minor reformatting.
9575 * s-stratt.ads: Fix unbalanced parens in comment.
9576
9577 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9578
9579 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
9580 Minor reformatting.
9581
9582 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9583
9584 * scng.adb (Scan): Handle '@' appropriately.
9585 * sem_ch5.adb: Code cleanup.
9586
9587 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9588
9589 * freeze.adb (Check_Expression_Function): Do not check for the
9590 use of deferred constants if the freezing of the expression
9591 function is triggered by its generated body, rather than a
9592 premature use.
9593
9594 2017-04-25 Javier Miranda <miranda@adacore.com>
9595
9596 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
9597 subtypes of private types when performing the view conversion.
9598
9599 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9600
9601 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9602 the purposes of freezing.
9603 * exp_util.adb Update the documentation and structure of the
9604 type map used in class-wide semantics of assertion expressions.
9605 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9606 and resolve the triaged expression because all substitutions
9607 refer to the proper entities. Update the replacement of
9608 references.
9609 (Build_DIC_Procedure_Body): Add formal parameter
9610 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9611 are now only processed when freezing occurs. Build a body only
9612 when one is needed.
9613 (Entity_Hash): Removed.
9614 (Map_Types): New routine.
9615 (Replace_Object_And_Primitive_References): Removed.
9616 (Replace_References): New routine.
9617 (Replace_Type_References): Moved to the library level of Exp_Util.
9618 (Type_Map_Hash): New routine.
9619 (Update_Primitives_Mapping): Update the mapping call.
9620 (Update_Primitives_Mapping_Of_Types): Removed.
9621 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9622 parameter For_Freeze and update the comment on usage.
9623 (Map_Types): New routine.
9624 (Replace_References): New routine.
9625 (Replace_Type_References): Moved to the library level of Exp_Util.
9626 (Update_Primitives_Mapping_Of_Types): Removed.
9627 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9628 properties of the private type to the full view in case the full
9629 view derives from a parent type and inherits a DIC pragma.
9630 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9631 DIC pragma is placed at the top of a declarative region.
9632
9633 2017-04-25 Tristan Gingold <gingold@adacore.com>
9634
9635 * s-mmap.ads (Data): Add pragma Inline.
9636
9637 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9638
9639 * checks.adb (Insert_Valid_Check): Do not use
9640 a renaming to alias a volatile name because this will lead to
9641 multiple evaluations of the volatile name. Use a constant to
9642 capture the value instead.
9643
9644 2017-04-25 Doug Rupp <rupp@adacore.com>
9645
9646 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
9647
9648 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9649
9650 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
9651 Add out parameter to indicate to caller that a wrapper must
9652 be constructed for an inherited primitive whose inherited
9653 pre/postcondition has called to overridden primitives.
9654 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
9655 for inherited primitive that requires it.
9656 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
9657 legal primitive operations and belong to the list of bodies
9658 generated after the freeze point of a type.
9659 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
9660 of Build_Class_Wide_Expression.
9661 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
9662 to construct the specification of the wrapper subprogram created
9663 for an inherited operation.
9664
9665 2017-04-25 Bob Duff <duff@adacore.com>
9666
9667 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
9668 pthread_mutexattr_setprioceiling): Add new interfaces for these
9669 pthread operations.
9670 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
9671 protocols as appropriate for Locking_Policy 'C' and 'I'.
9672 * s-taprop-posix.adb: Minor reformatting to make it more similar
9673 to s-taprop-linux.adb.
9674
9675 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9676
9677 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
9678 Handle properly a multi- level derivation involving both renamed
9679 and constrained parent discriminants, when the type to be
9680 constrained has fewer discriminants that the ultimate ancestor.
9681
9682 2017-04-25 Bob Duff <duff@adacore.com>
9683
9684 * sem_util.adb (Is_Object_Reference): In the
9685 case of N_Explicit_Dereference, return False if it came from a
9686 conditional expression.
9687
9688 2017-04-25 Bob Duff <duff@adacore.com>
9689
9690 * par-ch4.adb (P_Case_Expression): If a semicolon
9691 is followed by "when", assume that ";" was meant to be ",".
9692
9693 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9694
9695 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
9696 fixes.
9697
9698 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9699
9700 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
9701 loading of an entity.
9702 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
9703 previously repeated in the analysis.
9704 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
9705 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
9706 use new procedure SPARK_Implicit_Load.
9707 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
9708 SPARK_Implicit_Load.
9709
9710 2017-04-25 Javier Miranda <miranda@adacore.com>
9711
9712 * sem_util.adb (New_Copy_Tree): By default
9713 copying of defining identifiers is prohibited because
9714 this would introduce an entirely new entity into the
9715 tree. This patch introduces an exception to this general
9716 rule: the declaration of constants and variables located in
9717 Expression_With_Action nodes.
9718 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
9719 (In_Map): New subprogram.
9720 (Visit_Entity): New subprogram.
9721 (Visit_Node): Handle EWA_Level,
9722 EWA_Inner_Scope_Level, and take care of defining entities defined
9723 in Expression_With_Action nodes.
9724
9725 2017-04-25 Thomas Quinot <quinot@adacore.com>
9726
9727 * exp_ch6.adb: minor comment edit.
9728 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
9729 procedure specifications that come from source.
9730 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
9731 Null_Statement attribute.
9732 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
9733 procedure, generate statement SCO for the generated NULL statement.
9734 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
9735 parser, if available.
9736
9737 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9738
9739 * system-linux-s390.ads: Use Long_Integer'Size to define
9740 Memory_Size.
9741
9742 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
9743
9744 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
9745
9746 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
9747
9748 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
9749 * g-socket.adb (To_Host_Entry): Fix typo in comment.
9750 * gnat_ugn.texi: Fix typo.
9751 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
9752 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
9753 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
9754 * sem_util.adb (Mark_Coextensions): Likewise.
9755 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
9756
9757 2017-03-28 Andreas Schwab <schwab@suse.de>
9758
9759 PR ada/80117
9760 * system-linux-aarch64-ilp32.ads: New file.
9761 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
9762 from LIBGNAT_TARGET_PAIRS.
9763 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
9764 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
9765 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
9766 or -mabi=ilp32, resp.
9767
9768 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
9769
9770 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
9771
9772 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
9773
9774 PR ada/79903
9775 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
9776
9777 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
9778
9779 PR ada/79945
9780 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
9781
9782 * system-linux-arm.ads (Default_Bit_Order): Likewise.
9783 * system-linux-mips.ads (Default_Bit_Order): Likewise.
9784 * system-linux-armeb.ads: Delete.
9785 * system-linux-mipsel.ads: Likewise.
9786 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
9787 (ARM/Linux): Likewise.
9788
9789 2017-02-24 Jakub Jelinek <jakub@redhat.com>
9790
9791 PR c/79677
9792 * gcc-interface/misc.c (gnat_handle_option): Pass true to
9793 handle_generated_option GENERATED_P.
9794
9795 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9796
9797 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
9798 around a justified modular type if it doesn't have the same scalar
9799 storage order as the enclosing record type.
9800
9801 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9802
9803 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
9804 of boolean rvalues to function calls.
9805
9806 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9807
9808 * gcc-interface/utils.c (fold_bit_position): New function.
9809 (rest_of_record_type_compilation): Call it instead of bit_position to
9810 compute the field position and remove the call to remove_conversions.
9811 (compute_related_constant): Factor out the multiplication in both
9812 operands, if any, and streamline the final test.
9813
9814 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9815
9816 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
9817
9818 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9819
9820 * gcc-interface/decl.c: Include demangle.h.
9821 (is_cplusplus_method): Return again true for a primitive operation
9822 only if it is dispatching. For a subprogram with an interface name,
9823 call the demangler to get the number of C++ parameters and compare it
9824 with the number of Ada parameters.
9825
9826 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9827
9828 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
9829 there is no end label, put the location of the At_End procedure on
9830 the call to the procedure.
9831
9832 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9833
9834 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
9835 value for array types with TYPE_INDEX_TYPE set on their domain type.
9836 * gcc-interface/utils.c (max_size): For operations and expressions, do
9837 not build a new node if the operands have not changed or are missing.
9838
9839 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9840
9841 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
9842 argument when recursing on TRUTH_NOT_EXPR.
9843
9844 2017-02-12 John Marino <gnugcc@marino.st>
9845
9846 * system-freebsd-x86.ads: Rename into...
9847 * system-freebsd.ads: ...this.
9848 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
9849 * gcc-interface/Makefile.in: Support aarch64-freebsd.
9850 (x86-64/FreeBSD): Adjust to above renaming.
9851 (i386/FreeBSD): Likewise.
9852
9853 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
9854
9855 * comperr.adb: Update FSF bug reporting URL.
9856
9857 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
9858 Jakub Jelinek <jakub@redhat.com>
9859
9860 PR ada/79309
9861 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
9862
9863 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
9864
9865 PR lto/79061
9866 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
9867 to build_translation_unit_decl.
9868
9869 2017-01-23 Javier Miranda <miranda@adacore.com>
9870
9871 * sem_util.adb (New_Copy_Tree): Code cleanup:
9872 removal of the internal map (ie. variable Actual_Map, its
9873 associated local variables, and all the code handling it).
9874 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
9875 force loading of the System package when processing a task type.
9876 (Analyze_Protected_Type_Declaration): in GNATprove mode force
9877 loading of the System package when processing a protected type.
9878 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
9879 force loading of the System package when processing compilation
9880 unit with a main-like subprogram.
9881 * frontend.adb (Frontend): remove forced loading of the System
9882 package.
9883
9884 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9885
9886 * sem_prag.adb (Default_Initial_Condition): If the desired type
9887 declaration is a derived type declaration with discriminants,
9888 it is rewritten as a private type declaration.
9889 * sem_ch13.adb (Replace_Type_References_Generic,
9890 Visible_Component): A discriminated private type with descriminnts
9891 has components that must be rewritten as selected components
9892 if they appear as identifiers in an aspect expression such as
9893 a Default_Initial_Condition.
9894 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
9895 nodes.
9896
9897 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9898
9899 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
9900 * gnat1drv.adb Generate an empty object file for an ignored
9901 Ghost compilation unit.
9902 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
9903
9904 2017-01-23 Yannick Moy <moy@adacore.com>
9905
9906 * sem_ch4.adb (Analyze_Indexed_Component_Form):
9907 Adapt to inlined prefix with string literal subtype.
9908 * inline.adb (Expand_Inlined_Call): Keep unchecked
9909 conversion inside inlined call when formal type is constrained.
9910
9911 2017-01-23 Javier Miranda <miranda@adacore.com>
9912
9913 * sem_util.adb (New_Copy_Tree): Code cleanup:
9914 removal of global variables. All the global variables, global
9915 functions and tables of this subprogram are now declared locally.
9916
9917 2017-01-23 Gary Dismukes <dismukes@adacore.com>
9918
9919 * exp_strm.ads: Minor reformatting and typo fixes.
9920
9921 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9922
9923 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
9924 exp_aggr.adb: Minor reformatting.
9925 * g-diopit.adb: minor grammar/punctuation fix in comment.
9926 * g-byorma.ads: minor fix of unbalanced parens in comment.
9927
9928 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9929
9930 * par.adb: Update the documentation of component Labl.
9931 * par-ch6.adb (P_Return_Statement): Set the expected label of
9932 an extended return statement to Error.
9933
9934 2017-01-23 Tristan Gingold <gingold@adacore.com>
9935
9936 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
9937
9938 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9939
9940 * expander.adb: Handle N_Delta_Aggregate.
9941
9942 2017-01-23 Javier Miranda <miranda@adacore.com>
9943
9944 * exp_ch6.adb (Expand_Call): Improve the code that
9945 checks if some formal of the called subprogram is a class-wide
9946 interface, to handle subtypes of class-wide interfaces.
9947
9948 2017-01-23 Javier Miranda <miranda@adacore.com>
9949
9950 * checks.adb (Apply_Parameter_Aliasing_Checks):
9951 Remove side effects of the actuals before generating the overlap
9952 check.
9953
9954 2017-01-23 Justin Squirek <squirek@adacore.com>
9955
9956 * exp_strm.ads, exp_strm.ads
9957 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
9958 as to avoid getting the underlying type by default.
9959 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
9960 underlying type in the Iiput and output attribute cases when
9961 building their respective functions.
9962
9963 2017-01-23 Gary Dismukes <dismukes@adacore.com>
9964
9965 * scng.adb: Minor reformatting of error message.
9966
9967 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9968
9969 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
9970 to freeze the return type of an expression funxtion that is a
9971 completion, if the type is a limited view and the non-limited
9972 view is available.
9973
9974 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9975
9976 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
9977 aggregate construct.
9978 (P_Record_Or_Array_Component_Association): An array aggregate
9979 can start with an Iterated_Component_Association.
9980 * scng.adb: Modify error message on improper use of @ in earlier
9981 versions of the language.
9982 * sinfo.ads: New node kind N_Delta_Aggregate.
9983 * sinfo.adb: An N_Delta_Aggregate has component associations and
9984 an expression.
9985 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
9986 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
9987 Create a new index for each one of the choices in the association,
9988 to prevent spurious homonyms in the scope.
9989 (Resolve_Delta_Aggregate): New.
9990 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
9991 * exp_util.adb (Insert_Actions): Take into account
9992 N_Delta_Aggregate.
9993 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
9994 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
9995 and local procedures Expand_Delta_Array_Aggregate and
9996 expand_Delta_Record_Aggregate.
9997 * sprint.adb: Handle N_Delta_Aggregate.
9998
9999 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10000
10001 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
10002 empty name when the exception declaration is subject to pragma
10003 Discard_Names.
10004 (Null_String): New routine.
10005
10006 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10007
10008 * par-ch9.adb (P_Protected_Definition): Parse
10009 any optional and potentially illegal pragmas which appear in
10010 a protected operation declaration list.
10011 (P_Task_Items): Parse
10012 any optional and potentially illegal pragmas which appear in a
10013 task item list.
10014
10015 2017-01-23 Pascal Obry <obry@adacore.com>
10016
10017 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
10018 is needed when a foreign thread call a Win32 API using a thread handle
10019 like GetThreadTimes() for example.
10020
10021 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10022
10023 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
10024 allow an 'Address clause to be specified on a prefix of a
10025 class-wide type.
10026
10027 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10028
10029 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
10030 attribute 'Valid is a renaming of the original expression when
10031 the expression denotes a name. For all other kinds of expression,
10032 use a constant to capture the value.
10033 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
10034 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
10035
10036 2017-01-23 Justin Squirek <squirek@adacore.com>
10037
10038 * sem_eval.adb (Eval_Integer_Literal): Add special
10039 case to avoid optimizing out check if the literal appears in
10040 an if-expression.
10041
10042 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10043
10044 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
10045 allow an 'Address clause to be specified on a prefix of a
10046 class-wide type.
10047
10048 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10049
10050 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
10051 attribute 'Valid is a renaming of the original expression when
10052 the expression denotes a name. For all other kinds of expression,
10053 use a constant to capture the value.
10054 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
10055 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
10056
10057 2017-01-23 Justin Squirek <squirek@adacore.com>
10058
10059 * sem_eval.adb (Eval_Integer_Literal): Add special
10060 case to avoid optimizing out check if the literal appears in
10061 an if-expression.
10062
10063 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10064
10065 * sem_ch4.adb (Try_Primitive_Operations,
10066 Is_Valid_First_Argument_Of): argument is valid if it is a derived
10067 type with unknown discriminants that matches its underlying
10068 record view.
10069 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
10070 expression if its type is derived from a limited type with
10071 unknown discriminants, because the expansion (which is a call)
10072 must be expanded in the enclosing context to add the proper build-
10073 in-place parameters to the call.
10074 * lib.ads, exp_ch9.adb: Minor fixes in comments.
10075
10076 2017-01-23 Yannick Moy <moy@adacore.com>
10077
10078 * frontend.adb (Frontend): Do not load runtime
10079 unit for GNATprove when parsing failed.
10080 * exp_ch9.adb: minor removal of extra whitespace
10081 * exp_ch6.adb: minor typo in comment
10082 * sem_util.adb: Code cleanup.
10083 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
10084 * a-ngcefu.adb: minor style fix in whitespace
10085
10086 2017-01-23 Thomas Quinot <quinot@adacore.com>
10087
10088 * scos.ads: Document usage of 'd' as default SCO kind for
10089 declarations.
10090 * par_sco.adb (Traverse_Declarations_Or_Statements.
10091 Traverse_Degenerate_Subprogram): New supporting routine for expression
10092 functions and null procedures.
10093 (Traverse_Declarations_Or_Statements.Traverse_One): Add
10094 N_Expression_Function to the subprogram case; add required
10095 support for null procedures and expression functions.
10096
10097 2017-01-23 Bob Duff <duff@adacore.com>
10098
10099 * namet.ads (Bounded_String): Decrease the size of type
10100 Bounded_String to avoid running out of stack space.
10101 * namet.ads (Append): Don't ignore buffer overflow; raise
10102 Program_Error instead.
10103
10104 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10105
10106 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
10107 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
10108 reformatting.
10109 * exp_ch9.adb: minor style fix in comment.
10110
10111 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10112
10113 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
10114 for a limited record extension with unknown discriminants whose
10115 full view has no discriminants.
10116
10117 2017-01-23 Yannick Moy <moy@adacore.com>
10118
10119 * exp_spark.adb: Alphabetize with clauses.
10120
10121 2017-01-23 Yannick Moy <moy@adacore.com>
10122
10123 * sem_util.adb (Has_Enabled_Property): Treat
10124 protected objects and variables differently from other variables.
10125
10126 2017-01-23 Thomas Quinot <quinot@adacore.com>
10127
10128 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
10129 Split original Ada 95 part off into new subprogram
10130 below. Call that subprogram (instead of proceeding with
10131 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
10132 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
10133 * debug.adb Document new switch -gnatd.p
10134 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
10135 record for reverse bit order if an error has already been posted
10136 on the record type. This avoids generating extraneous "info:"
10137 messages for illegal code.
10138
10139 2017-01-23 Justin Squirek <squirek@adacore.com>
10140
10141 * sem_ch3.adb (Analyze_Declarations): Correct comments
10142 * freeze.adb (Find_Constant): Add detection of deferred constants
10143 so they are not incorrectly flagged as premature.
10144
10145 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10146
10147 * scans.ads: New token At_Sign. Remove '@' from list of illegal
10148 characters for future version of the language. '@' is legal name.
10149 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
10150 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
10151 denotes a Target_Name.
10152 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
10153 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
10154 (Has_Target_Names): New flag on N_Assignment_Statement, to
10155 indicate that RHS has occurrences of N_Target_Name.
10156 * sem.adb: Call Analyze_Target_Name.
10157 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
10158 (urrent_LHS): Global variable that denotes LHS of assignment,
10159 used in the analysis of Target_Name nodes.
10160 * sem_res.adb (Resolve_Target_Name): New procedure.
10161 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
10162 N is an assignment statement whose RHS contains occurences of @
10163 that designate the value of the LHS of the assignment. If the
10164 LHS is side-effect free the target names can be replaced with
10165 a copy of the LHS; otherwise the semantics of the assignment
10166 is described in terms of a procedure with an in-out parameter,
10167 and expanded as such.
10168 (Expand_N_Assignment_Statement): Call
10169 Expand_Assign_With_Target_Names when needed.
10170 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
10171 * sprint.adb: Handle N_Target_Name.
10172
10173 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
10174
10175 * checks.adb: Minor fix in comment.
10176
10177 2017-01-23 Philippe Gil <gil@adacore.com>
10178
10179 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
10180 count in Sort = Memory_Usage or Allocations_Count
10181
10182 2017-01-23 Justin Squirek <squirek@adacore.com>
10183
10184 * sem_ch3.adb: Code cleanup.
10185
10186 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10187
10188 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
10189 variables to the local variable section. Update the profile
10190 of various nested routine that previously had visibility
10191 of those globals. One the matching phase has completed,
10192 remove certain classes of clauses which are considered noise.
10193 (Check_Dependency_Clause): Properly detect a match between two
10194 'Result attributes. Update the various post-match cases to use
10195 Is_Already_Matched as this routine now automatically recognizes
10196 a previously matched 'Result attribute.
10197 (Is_Already_Matched): New routine.
10198 (Remove_Extra_Clauses): New routine.
10199 (Report_Extra_Clauses): Remove the detection of ... => null
10200 clauses as this is now done in Remove_Extra_Clauses.
10201
10202 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10203
10204 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
10205 report on spurious overlaps between values involving a subtype
10206 with a static predicate, because the expansion of such a subtype
10207 into individual ranges in inhibited in ASIS mode.
10208
10209 2017-01-23 Justin Squirek <squirek@adacore.com>
10210
10211 * sem_ch3.adb (Analyze_Declarations): Add detection
10212 of an edge case and delay freezing if it is present.
10213
10214 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10215
10216 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
10217 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
10218
10219 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10220
10221 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
10222 access-to-subprogram types inherit the convention of the
10223 associated subprogram. (Set_Profile_Convention): New routine.
10224 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
10225 of the two entities directly, use Conventions_Match to account
10226 for anonymous access-to-subprogram and subprogram types.
10227 (Conventions_Match): New routine.
10228
10229 2017-01-23 Claire Dross <dross@adacore.com>
10230
10231 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
10232 which return Universal_Integer, force the overflow check flag for
10233 Length and Range_Length for types as big as Long_Long_Integer.
10234
10235 2017-01-23 Claire Dross <dross@adacore.com>
10236
10237 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
10238 attributes which return Universal_Integer, introduce a conversion
10239 to the expected type with the appropriate check flags set.
10240 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
10241 base type if the range is null. It may still be invalid if it
10242 is higher than the lower bound. This is checked later in the
10243 context in which the range appears.
10244
10245 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
10246
10247 * scos.ads: Introduce a constant to represent ignored
10248 dependencies in SCO_Unit_Table_Entry.
10249
10250 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10251
10252 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
10253 spaces from error messages.
10254
10255 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10256
10257 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
10258 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
10259 an object declaration for an array type with a modular index type
10260 with the size of Long_Long_Integer. Special processing is needed
10261 in this case to compute reliably the size of the object, and
10262 eventually to raise Storage_Error, when wrap-around arithmetic
10263 might compute a meangingless size for the object.
10264
10265 2017-01-23 Justin Squirek <squirek@adacore.com>
10266
10267 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
10268 sem_type.adb: Code cleanups.
10269
10270 2017-01-23 Bob Duff <duff@adacore.com>
10271
10272 * sem_res.adb (Resolve_Call): In the part of the code where
10273 it is deciding whether to turn the call into an indexed
10274 component, avoid doing so if the call is to an instance of
10275 Unchecked_Conversion. Otherwise, the compiler turns it into an
10276 indexed component, and resolution of that turns it back into a
10277 function call, and so on, resulting in infinite recursion.
10278 * sem_util.adb (Needs_One_Actual): If the first formal has a
10279 default, then return False.
10280
10281 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
10282
10283 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
10284 optimizations when the type is modular and the offsets are equal.
10285
10286 2017-01-20 Thomas Quinot <quinot@adacore.com>
10287
10288 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
10289 message.
10290
10291 2017-01-20 Nicolas Roche <roche@adacore.com>
10292
10293 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
10294
10295 2017-01-20 Bob Duff <duff@adacore.com>
10296
10297 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
10298 (etc) optimizations when the type is modular.
10299
10300 2017-01-20 Yannick Moy <moy@adacore.com>
10301
10302 * sem_ch6.adb (Move_Pragmas): move some pragmas,
10303 but copy the SPARK_Mode pragma instead of moving it.
10304 (Build_Subprogram_Declaration): Ensure that the generated spec
10305 and original body share the same SPARK_Pragma aspect/pragma.
10306 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
10307 procedure to copy SPARK_Mode aspect.
10308
10309 2017-01-20 Bob Duff <duff@adacore.com>
10310
10311 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
10312 even in ASIS mode.
10313 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
10314 Empty even in ASIS mode.
10315
10316 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10317
10318 * exp_ch9.adb: minor style fixes in comments.
10319 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
10320 relative statement introduces an implicit dependency on
10321 Ada.Real_Time.Clock_Time.
10322 * sem_util.adb: Minor reformatting.
10323
10324 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10325
10326 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
10327 must be treated as delayed aspect even if the expression is
10328 a literal, because the aspect affects the freezing and the
10329 elaboration of the object to which it applies.
10330
10331 2017-01-20 Tristan Gingold <gingold@adacore.com>
10332
10333 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
10334
10335 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10336
10337 * lib-xref.adb (Generate_Reference): Do not warn about the
10338 presence of a pragma Unreferenced if the entity appears as the
10339 actual in a procedure call that does not come from source.
10340
10341 2017-01-20 Pascal Obry <obry@adacore.com>
10342
10343 * expect.c, terminals.c: Fix some warnings about unused variables.
10344 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
10345 of the runtime.
10346
10347 2017-01-20 Bob Duff <duff@adacore.com>
10348
10349 * exp_attr.adb (Constrained): Apply an access check (check that
10350 the prefix is not null) when the prefix denotes an object of an
10351 access type; that is, when there is an implicit dereference.
10352
10353 2017-01-20 Gary Dismukes <dismukes@adacore.com>
10354
10355 * s-rident.ads (constant Profile_Info): Remove
10356 No_Calendar from GNAT_Extended_Ravenscar restrictions.
10357
10358 2017-01-20 Tristan Gingold <gingold@adacore.com>
10359
10360 * s-maccod.ads: Add pragma No_Elaboration_Code_All
10361
10362 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10363
10364 * ghost.adb (Mark_Ghost_Clause): New routine.
10365 (Prune_Node): Do not prune compilation unit nodes.
10366 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
10367 This does not touch the node itself, but does prune all its fields.
10368 * ghost.ads (Mark_Ghost_Clause): New routine.
10369 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
10370 package clause mentions Ghost and non-Ghost packages. Mark a
10371 use package clause as Ghost when it mentions a Ghost package.
10372 (Analyze_Use_Type): Emit an error when a use type clause mentions
10373 Ghost and non-Ghost types. Mark a use type clause as Ghost when
10374 it mentions a Ghost type.
10375 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
10376 Ghost when it withs a Ghost unit.
10377
10378 2017-01-20 Javier Miranda <miranda@adacore.com>
10379
10380 * sem_res.adb (Resolve_Call): If a function call
10381 returns a limited view of a type and at the point of the call the
10382 function is not declared in the extended main unit then replace
10383 it with the non-limited view, which must be available. If the
10384 called function is in the extended main unit then no action is
10385 needed since the back-end handles this case.
10386
10387 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
10388
10389 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
10390 (Contains_Subprograms_Refs): ...this. Adjust comment
10391 for constants. (Is_Subp_Or_Const_Ref): Rename into...
10392 (Is_Subprogram_Ref): ...this.
10393 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
10394 Has_Non_Subprograms_Referencer and adjust comment. Remove
10395 incorrect shortcut for package declarations and bodies.
10396
10397 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10398
10399 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
10400 base type differs from that of the completion and the private
10401 subtype is an itype (created for a constraint on an access
10402 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
10403 anomalies in gigi.
10404
10405 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10406
10407 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10408 When inheriting the SPARK_Mode of a prior expression function,
10409 look at the properly resolved entity rather than the initial
10410 candidate which may denote a homonym.
10411
10412 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10413
10414 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
10415 Precondition or Postcondition, and the context is pragma
10416 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
10417 and suggest the standard names Assertion_Policy /Pre /Post
10418 instead.
10419
10420 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10421
10422 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
10423
10424 2017-01-20 Javier Miranda <miranda@adacore.com>
10425
10426 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
10427 Entity attribute.
10428 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
10429 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
10430 malformed trees.
10431
10432 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10433
10434 * sem_ch13.adb (Analyze_Aspect_Specification, case
10435 Dynamic_Predicate): If the entity E is a subtype that inherits
10436 a static predicate for its parent P,, the inherited and the
10437 new predicate combine in the generated predicate function,
10438 and E only has a dynamic predicate.
10439
10440 2017-01-20 Tristan Gingold <gingold@adacore.com>
10441
10442 * s-boustr.ads, s-boustr.adb: New package.
10443 * Makefile.rtl: Add s-boustr.
10444
10445 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10446
10447 * inline.adb (Process_Formals): Qualify the
10448 expression of a return statement when it yields a universal type.
10449
10450 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10451
10452 * freeze.adb (Freeze_All): Freeze the default
10453 expressions of all eligible formal parameters that appear in
10454 entries, entry families, and protected subprograms.
10455
10456 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10457
10458 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
10459 for illegal inherited Implicit_Dereference aspects with renamed
10460 discriminants.
10461
10462 2017-01-20 Javier Miranda <miranda@adacore.com>
10463
10464 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
10465 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
10466 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
10467 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
10468 Set_Prev, Tree_Read): Adding assertion.
10469 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
10470 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
10471 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
10472 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
10473 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
10474 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
10475 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
10476 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
10477 Set_ListN_With_Parent): Adding assertion.
10478
10479 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10480
10481 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
10482 import that applies to several homograph subprograms. when one
10483 of them is declared by a subprogram body.
10484
10485 2017-01-20 Justin Squirek <squirek@adacore.com>
10486
10487 * exp_ch6.adb (Expand_Call): Remove optimization
10488 that nulls out calls to null procedures.
10489
10490 2017-01-20 Yannick Moy <moy@adacore.com>
10491
10492 * inline.adb (Expand_Inlined_Call): Keep more
10493 precise type of actual for inlining whenever possible. In
10494 particular, do not switch to the formal type in GNATprove mode in
10495 some case where the GNAT backend might require it for visibility.
10496
10497 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10498
10499 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
10500 aspect Implicit_Dereference can be inherited by a full view if
10501 the partial view has no discriminants, because there is no way
10502 to apply the aspect to the partial view.
10503 (Build_Derived_Record_Type): If derived type renames discriminants
10504 of the parent, the new discriminant inherits the aspect from
10505 the old one.
10506 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
10507 call through an access discriminant designating a subprogram.
10508 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
10509 properly a parameterless call through an access discriminant on
10510 the left-hand side of an assignment.
10511 * sem_res.adb (resolve): If an interpreation involves a
10512 discriminant with an implicit dereference and the expression is an
10513 entity, resolution takes place later in the appropriate routine.
10514 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
10515 access discriminants that designate a subprogram type.
10516
10517 2017-01-20 Pascal Obry <obry@adacore.com>
10518
10519 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
10520
10521 2017-01-20 Yannick Moy <moy@adacore.com>
10522
10523 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
10524 on implicitly with'ed units in GNATprove mode.
10525 * sinfo.ads (Implicit_With): Document use of flag for implicitly
10526 with'ed units in GNATprove mode.
10527
10528 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10529
10530 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
10531 unit Do not report an error on a non-static entity that appears
10532 in the context of a spec expression, such as an aspect expression.
10533
10534 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10535
10536 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
10537 (Is_Underlying_Full_View): New routine.
10538 (Set_Is_Underlying_Full_View): New routine.
10539 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
10540 * einfo.ads Add new attribute Is_Underlying_Full_View.
10541 (Is_Underlying_Full_View): New routine along with pragma Inline.
10542 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
10543 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
10544 class-wide types and underlying full views. The first subtype
10545 is used as the working type for all Itypes, not just array base types.
10546 (Build_DIC_Procedure_Declaration): Do not consider
10547 class-wide types and underlying full views. The first subtype
10548 is used as the working type for all Itypes, not just array
10549 base types.
10550 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
10551 view or an underlying full view without clobbering the attributes
10552 of a previous freeze node.
10553 (Inherit_Freeze_Node): New routine.
10554 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
10555 full view as such.
10556 (Build_Underlying_Full_View): Mark an underlying full view as such.
10557 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
10558 full view as such.
10559
10560 2017-01-20 Yannick Moy <moy@adacore.com>
10561
10562 * sinfo.ads: Document lack of Do_Division_Check flag
10563 on float exponentiation.
10564
10565 2017-01-19 Javier Miranda <miranda@adacore.com>
10566
10567 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
10568 identifier attribute of a block-statement node. Required to avoid
10569 assertion failure when building the new containers library.
10570
10571 2017-01-19 Bob Duff <duff@adacore.com>
10572
10573 * exp_ch3.adb: Update comment.
10574
10575 2017-01-19 Vincent Celier <celier@adacore.com>
10576
10577 * gprep.adb (Gnatprep): Parse the definition file without
10578 "replace in comments" even when switch -C is used.
10579
10580 2017-01-19 Justin Squirek <squirek@adacore.com>
10581
10582 * exp_ch9.adb (Is_Pure_Barrier): Create function
10583 Is_Count_Attribute to identify an expansion of the 'Count
10584 attribute.
10585
10586 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10587
10588 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
10589 statements within an element iterator loop are only analyzed
10590 agter the loop is rewritten. Within a generic the analysis must
10591 be performed in any case to complete name capture.
10592
10593 2017-01-19 Bob Duff <duff@adacore.com>
10594
10595 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
10596 before checking for unrecognized pragmas.
10597 Initialize Pname on its declarations; that's always good style.
10598
10599 2017-01-19 Claire Dross <dross@adacore.com>
10600
10601 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
10602 body into the tree for GNATprove by setting its Parent field. The
10603 components invariants of composite types are not checked by
10604 the composite type's invariant procedure in GNATprove mode.
10605 (Build_Invariant_Procedure_Declaration): Semi-insert the
10606 declaration into the tree for GNATprove by setting its Parent
10607 field.
10608 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
10609 the component invariants to the array type invariant procedure
10610 so that the procedure can be used to check the array type
10611 invariants if any.
10612 (Freeze_Record_Type): In GNATprove mode, do
10613 not add the component invariants to the record type invariant
10614 procedure so that the procedure can be used to check the record
10615 type invariants if any.
10616
10617 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10618
10619 * lib-xref-spark_specific.adb: Minor reformatting.
10620 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
10621
10622 2017-01-19 Javier Miranda <miranda@adacore.com>
10623
10624 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
10625 Build_Back_End_Aggregate.
10626 (Generate_Aggregate_For_Derived_Type): Code cleanup.
10627 (Prepend_Stored_Values): Code cleanup.
10628
10629 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10630
10631 * sem_ch6.adb (Analyze_Expression_Function): Check for an
10632 incomplete return type after attempting to freeze it, so that
10633 other freeze actiona are generated in the proper order.
10634
10635 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10636
10637 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
10638 type, ie. a type whose component is a character type, and the
10639 aggregate is positional, do not convert into a string literal
10640 if the index type is not an integer type, because the original
10641 type may be required in an enclosing operation.
10642
10643 2017-01-19 Bob Duff <duff@adacore.com>
10644
10645 * binde.adb, debug.adb: Enable new elaboration order algorithm
10646 by default. -dp switch reverts to the old algorithm.
10647
10648 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10649
10650 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
10651 (Analyze_Declarations): Create the DIC and Invariant
10652 procedure bodies s after all freezing has taken place.
10653 (Build_Assertion_Bodies): New routine.
10654 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
10655 and Exp_Util.
10656 (Analyze_Package_Specification): Remove the
10657 generation of the DIC and Invariant procedure bodies. This is
10658 now done by Analyze_Declarations.
10659 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
10660 procedures are never treated as primitives.
10661
10662 2017-01-19 Yannick Moy <moy@adacore.com>
10663
10664 * frontend.adb: Analyze inlined bodies and check elaboration
10665 rules in GNATprove mode too.
10666 * sem_elab.adb (Delay_Element): Add Boolean component to save
10667 indication that call is in SPARK code. (Check_Elab_Calls):
10668 Check elaboration rules in GNATprove mode, and correctly set
10669 the current value of SPARK_Mode.
10670 * lib-xref-spark_specific.adb
10671 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
10672
10673 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10674
10675 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
10676 checks on the expression for the high bound of concatenation
10677 when checks are disabled, to suppress warnings about potential
10678 constraint errors in restricted runtimes.
10679
10680 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10681
10682 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
10683 representation-to-position function as inlined.
10684 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
10685 the purity of an internally generated entity if it has been
10686 explicitly marked as pure for optimization purposes.
10687 * exp_aggr.adb: Minor reformatting.
10688
10689 2017-01-19 Javier Miranda <miranda@adacore.com>
10690
10691 * exp_ch6.adb (Expand_Call): Remove side effects on
10692 actuals that are allocators with qualified expression since the
10693 initialization of the object is performed by means of individual
10694 statements (and hence it must be done before the call).
10695
10696 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10697
10698 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
10699 (Build_Derived_Enumeration_Type): If the derived type inherits a
10700 dynamic predicate from its parent, the bounds of the type must
10701 freeze because an explicit constraint is constructed for the
10702 type and the corresponding range is elaborated now.
10703
10704 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10705
10706 * sem_attr.ads: minor fix of inconsistent casing in comment
10707 * lib-writ.ads: minor align comments in columns
10708 * sem_ch3.adb: Minor reformatting.
10709 * spark_xrefs.ads: minor fix typo in SPARK-related comment
10710 * table.ads: minor style fix in comment
10711 * lib-xref-spark_specific.adb
10712 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
10713 * sem_ch12.adb: minor whitespace fix
10714 * freeze.adb: Add comment.
10715 * sem_util.adb (Unique_Name): for instances of
10716 generic subprograms ignore the name of the wrapper package.
10717
10718 2017-01-19 Javier Miranda <miranda@adacore.com>
10719
10720 * exp_aggr.adb (Resolve_Record_Aggregate):
10721 Factorize code needed for aggregates of limited and unlimited
10722 types in a new routine.
10723 (Pass_Aggregate_To_Back_End): New subprogram.
10724
10725 2017-01-19 Yannick Moy <moy@adacore.com>
10726
10727 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
10728
10729 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10730
10731 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
10732 public, for use elsewhere.
10733 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
10734 an Inlined_body, recognize a call that uses object notation
10735 and has not been rewritten as a regular call because regular
10736 expansion has not taken place.
10737
10738 2017-01-19 Bob Duff <duff@adacore.com>
10739
10740 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
10741 in case of generic formal discrete types, because it causes crashes in
10742 the compiler when built with assertions on.
10743
10744 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10745
10746 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
10747 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
10748
10749 2017-01-19 Bob Duff <duff@adacore.com>
10750
10751 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
10752 Increment Warnings_Detected. It was decrementing, which is
10753 wrong since we just issued a warning message.
10754 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
10755 these variables to be of subtype Nat instead of Int, because
10756 they should never be negative.
10757
10758 2017-01-19 Javier Miranda <miranda@adacore.com>
10759
10760 * contracts.adb (Build_Postconditions_Procedure): Replace
10761 Generate_C_Code by Modify_Tree_For_C.
10762 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
10763 Replace Generate_C_Code by Modify_Tree_For_C.
10764 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
10765 Modify_Tree_For_C.
10766 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
10767 Generate_C_Code by Modify_Tree_For_C.
10768 * exp_ch4.adb (Expand_Allocator_Expression): Replace
10769 Generate_C_Code by Modify_Tree_For_C.
10770 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
10771 by Modify_Tree_For_C.
10772 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
10773 Generate_C_Code by Modify_Tree_For_C.
10774 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
10775 by Modify_Tree_For_C.
10776 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
10777
10778 2017-01-19 Javier Miranda <miranda@adacore.com>
10779
10780 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
10781 subprogram.
10782 (Is_Inlinable_Expression_Function): New subprogram.
10783 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
10784 to Sem_Util.
10785 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
10786
10787 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10788
10789 * sem_ch4.adb (Diagnose_Call): Improve error message when a
10790 selected component has a prefix that might be interpreted
10791 as a parameterless function call, but none of the candidate
10792 interpretations is parameterless, and there is a hidden homonym
10793 of the prefix that is a package.
10794 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
10795 interpreted as a parameterless function call and its analysis
10796 fails, do not call Analyze_Selected_Component.
10797
10798 2017-01-19 Steve Baird <baird@adacore.com>
10799
10800 * sem_util.ads: Add new Use_Full_View Boolean parameter to
10801 Get_Index_Bounds.
10802 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
10803 calls to a newly-defined Scalar_Range_Of_Right_View function.
10804
10805 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10806
10807 * gnat1drv.adb: minor fix of unbalanced parens in comment
10808 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
10809 to visible part of the package to allow re-use in GNATprove.
10810 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
10811 from repeated code of Traverse_Compilation_Unit.
10812 (Traverse_Declaration_Or_Statement): fixed detection of
10813 generic subprograms and packages; also, iteration over case
10814 statement alternatives rewritten to avoid testing if the first
10815 alternative is present (since it must be present due to Ada
10816 syntax restrictions).
10817
10818 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10819
10820 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
10821 returning by reference not just for subprogram body stubs,
10822 but for all subprogram cases.
10823 * sem_util.adb: Code reformatting.
10824 (Requires_Transient_Scope): Update the call to Results_Differ.
10825 (Results_Differ): Update the parameter profile and the associated
10826 comment on usage.
10827
10828 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10829
10830 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
10831 identifier nodes that do not come from source, to handle properly
10832 dimensionality check within an inlined body which inclddes both
10833 original operands and rewritten operands. This removes spurious
10834 dimensionality errors in the presence of front-end inlining,
10835 as well as in SPARK mode.
10836
10837 2017-01-16 Jakub Jelinek <jakub@redhat.com>
10838
10839 PR driver/49726
10840 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
10841
10842 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10843
10844 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
10845
10846 2017-01-13 Arnaud Charlet <charlet@adacore.com>
10847
10848 * doc/gnat_ugn/getting_started_with_gnat.rst,
10849 doc/gnat_ugn/inline_assembler.rst,
10850 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
10851 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
10852 doc/gnat_ugn/about_this_guide.rst,
10853 doc/gnat_ugn/platform_specific_information.rst,
10854 doc/gnat_ugn/example_of_binder_output.rst,
10855 doc/gnat_ugn/gnat_and_program_execution.rst,
10856 doc/gnat_ugn/gnat_utility_programs.rst,
10857 doc/gnat_ugn/the_gnat_compilation_model.rst,
10858 doc/gnat_rm/implementation_defined_attributes.rst,
10859 doc/gnat_rm/compatibility_and_porting_guide.rst,
10860 doc/gnat_rm/standard_library_routines.rst,
10861 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
10862 doc/gnat_rm/implementation_defined_pragmas.rst,
10863 doc/gnat_rm/the_gnat_library.rst,
10864 doc/gnat_rm/obsolescent_features.rst,
10865 doc/gnat_rm/about_this_guide.rst,
10866 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
10867 doc/gnat_rm/implementation_of_ada_2012_features.rst,
10868 doc/gnat_rm/interfacing_to_other_languages.rst,
10869 doc/gnat_rm/implementation_defined_aspects.rst,
10870 doc/gnat_rm.rst: Update documentation.
10871 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
10872
10873 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10874
10875 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
10876 * scil_ll.adb: Minor style fix in comment.
10877 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
10878 even if entity is already set, because the node may be renalyzed
10879 after inlining transformations.
10880
10881 2017-01-13 Javier Miranda <miranda@adacore.com>
10882
10883 * sem_res.adb (Resolve_Call): Do not establish a transient scope
10884 for a call to inlinable expression function (since the call will
10885 be replaced by its returned object).
10886 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
10887 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
10888 (Expand_Call): For inlinable expression function call replace the
10889 call by its returned object.
10890 (Is_Inlinable_Expression_Function): New subprogram.
10891
10892 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10893
10894 * checks.adb: Minor typo fix and reformatting.
10895
10896 2017-01-13 Javier Miranda <miranda@adacore.com>
10897
10898 * contracts.adb (Contract_Only_Subprograms): Remove formal.
10899 (Copy_Original_Specification): Removed.
10900 (Skip_Contract_Only_Subprogram): Move here checks previously
10901 located in the caller of this routine (to leave the code more clean).
10902 (Build_Contract_Only_Subprogram): Code cleanup.
10903 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
10904 (Get_Contract_Only_Missing_Body_Name): Removed.
10905
10906 2017-01-13 Javier Miranda <miranda@adacore.com>
10907
10908 * sem_ch6.adb (Cloned_Expression): New subprogram.
10909 (Freeze_Expr_Types): Complete previous patch since the expression
10910 of an expression-function may have iterators and loops with
10911 defining identifiers which, as part of the preanalysis of the
10912 expression, may be left decorated with itypes that will not be
10913 available in the tree passed to the backend.
10914
10915 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10916
10917 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
10918 conversion to Integer of an expression that is an attribute
10919 reference 'Pos on an enumeration type.
10920
10921 2017-01-13 Bob Duff <duff@adacore.com>
10922
10923 * atree.ads: Minor comment fix.
10924
10925 2017-01-13 Justin Squirek <squirek@adacore.com>
10926
10927 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
10928 calls in accessibility check on return statement.
10929
10930 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10931
10932 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10933 Ensure that the input body is a subprogram body before trying to
10934 determine whether it denoted an expression function. Note that
10935 subprogram body stubs cannot denote expression functions.
10936
10937 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10938
10939 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
10940 and typo fixes.
10941
10942 2017-01-13 Javier Miranda <miranda@adacore.com>
10943
10944 * einfo.ads (Component_Bit_Offset): Fix documentation.
10945 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
10946 on record holes for components with unknown compile-time offsets.
10947
10948 2017-01-13 Bob Duff <duff@adacore.com>
10949
10950 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
10951 * g-locfil.ads: Minor comment fix.
10952
10953 2017-01-13 Bob Duff <duff@adacore.com>
10954
10955 * binde.adb (Elab_New): New elaboration order algorithm
10956 that is expected to cause fewer ABE issues. This is a work in
10957 progress. The new algorithm is currently disabled, and can be
10958 enable by the -dp switch, or by modifying the Do_Old and Do_New
10959 etc. flags and rebuilding. Experimental code is included to
10960 compare the results of the old and new algorithms.
10961 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
10962 can have multiple of these tables, so the old and new algorithms
10963 can coexist.
10964 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
10965 parameter of type array. This avoids the global variable, and
10966 allows bounds checking (which is normally defeated by the tables
10967 packages). It also ensures that the Elab_Order is read-only
10968 to Bindgen.
10969 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
10970 subprograms that need it, as above.
10971 * debug.adb: Document new -dp switch. Modify doc of old -do
10972 switch.
10973 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
10974 and Bindgen. Move writing of closure (-R and -Ra switches)
10975 to Binde; that's more convenient.
10976
10977 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10978
10979 * sem_ch6.adb (Analyze_Expression_Function): If the expression
10980 function is a completion, all entities referenced in the
10981 expression are frozen. As a consequence, a reference to an
10982 uncompleted private type from an enclosing scope is illegal.
10983
10984 2017-01-13 Javier Miranda <miranda@adacore.com>
10985
10986 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
10987 (Analyze_Subprogram_Body_Helper): At the occurrence of an
10988 expression function declaration that is a completion, its
10989 expression causes freezing (AI12-0103).
10990
10991 2017-01-13 Vadim Godunko <godunko@adacore.com>
10992
10993 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
10994 Reference functions of Ada.Containers.Indefinite_Holders.
10995
10996 2017-01-13 Bob Duff <duff@adacore.com>
10997
10998 * s-os_lib.ads: Minor comment fixes.
10999
11000 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11001
11002 * exp_ch3.adb (Default_Initialize_Object): Do not default
11003 initialize an object when it is of a task type and restriction
11004 No_Tasking is in effect because the initialization is obsolete.
11005 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
11006 restriction No_Tasking is in effect.
11007 (Build_Master_Renaming): Do not rename a master when restriction
11008 No_Tasking is in effect.
11009
11010 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11011
11012 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
11013 the legality of An others clause applies as well to a choice in
11014 an Iterated_component_ association.
11015 (Resolve_Iterated_Component_Association): An others choice
11016 is legal.
11017 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
11018 Iterated_Component_Association is not static.
11019
11020 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11021
11022 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
11023 control is passed to the expresion handler before the new mode
11024 is set.
11025 * sem_ch12.adb (Analyze_Package_Instantiation,
11026 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
11027 in case control is passed to the expresion handler before the
11028 new mode is set.
11029
11030 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11031
11032 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
11033 exp_aggr.adb: Minor reformatting.
11034
11035 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11036
11037 * inline.adb: Minor reformatting and typo fix.
11038
11039 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11040
11041 * sem_util.ads, sem_util.adb (Choice_List): Move function here
11042 from sem_aggr.adb, for use elsewhere.
11043 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
11044 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
11045 Iterated_Component_Present.
11046 * exp_aggr.adb: Use Choice_List throughout, to handle
11047 Iterated_Component_Associations.
11048 (Gen_Loop): Generate proper loop for an
11049 Iterated_Component_Association: loop variable has the identifier
11050 of the original association. Generate a loop even for a single
11051 component choice, in order to make loop parameter visible in
11052 expression.
11053 (Flatten): An Iterated_Component_Association is not static.
11054
11055 2017-01-13 Yannick Moy <moy@adacore.com>
11056
11057 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
11058 float exponentiation for statically known small negative values
11059 is the reciprocal of the exponentiation for the opposite value
11060 of the exponent.
11061 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
11062 Ensure that the value of float exponentiation for negative values
11063 is the reciprocal of the exponentiation for the opposite value
11064 of the exponent.
11065 * inline.adb (Expand_Inlined_Call): Fix the count
11066 for the number of generated gotos.
11067
11068 2017-01-13 Yannick Moy <moy@adacore.com>
11069
11070 * inline.adb: Code cleanup.
11071 * sem_util.adb (Is_OK_Volatile_Context): Add
11072 expression in delay statement as OK for volatile context.
11073
11074 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11075
11076 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
11077 mode a choice that is a subtype with a static predicate is
11078 replaced by the values it covers. This transformation must not
11079 be performed in ASIS mode, to preserve the source for analysis.
11080
11081 2017-01-13 Justin Squirek <squirek@adacore.com>
11082
11083 * nlists.ads: Correct minor typo.
11084
11085 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11086
11087 * sem_ch13.adb: Minor reformatting and typo fix.
11088
11089 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11090
11091 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
11092 Iterated_Component_Association is a named association in an
11093 array aggregate.
11094 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
11095 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
11096 and resolve the discrete choices and the expression of the
11097 new construct.
11098 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
11099 Loop_Actions and Box_Present are attributes of
11100 N_Iterated_Component_Association nodes. Box_Present is always
11101 False in this case.
11102 * sprint.adb (Sprint_Node): An Iterated_Component_Association
11103 has a Discrete_Choices list, as specified in the RM. A
11104 Component_Association for aggregate uses instead a Choices list.
11105 We have to live with this small inconsistency because the new
11106 construct also has a defining identifier, and there is no way
11107 to merge the two node structures.
11108
11109 2017-01-13 Yannick Moy <moy@adacore.com>
11110
11111 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
11112 list of pragmas to remove. Remove pragmas from the list of
11113 statements in the body to inline.
11114 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
11115
11116 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11117
11118 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
11119 Analyze_Declarations, to analyze and resolve the expressions of
11120 aspect specifications in the current declarative list, so that
11121 the expressions have proper entity and type info. This is needed
11122 for ASIS when there is no subsequent expansion to generate this
11123 semantic information.
11124 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
11125 original expression, to suppress cascaded errors when expression
11126 has been constant-folded.
11127 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
11128 ASIS mode, because there is no subsequent expansion to decorate
11129 the tree.
11130
11131 2017-01-13 Yannick Moy <moy@adacore.com>
11132
11133 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
11134 New function to detect when a call may be inlined or not in
11135 GNATprove mode.
11136 (Expand_Inlined_Call): Ensure that a temporary
11137 is always created in the cases where a type conversion may be
11138 needed on an input parameter in GNATprove mode, so that GNATprove
11139 sees the check to perform.
11140 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
11141 when not applicable due to actual requiring type conversion
11142 with possible check but no temporary value can be copied for
11143 GNATprove to see the check.
11144
11145 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11146
11147 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
11148 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
11149 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
11150 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
11151 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
11152 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
11153 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
11154 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
11155 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
11156 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
11157 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
11158 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
11159 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
11160 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
11161 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
11162 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
11163 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
11164 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
11165 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
11166 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
11167 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
11168 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
11169 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
11170 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
11171 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
11172 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
11173 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
11174 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
11175 statements to reflect the new style for case alternatives. Various
11176 code clean up and reformatting.
11177
11178 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11179
11180 * exp_util.adb: Minor reformatting.
11181
11182 2017-01-13 Yannick Moy <moy@adacore.com>
11183
11184 * exp_spark.adb: Code cleanup.
11185 * sem_ch9.adb (Analyze_Delay_Until): Resolve
11186 expression so that calls are identified as such inside delay
11187 until.
11188
11189 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11190
11191 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
11192 * par-ch3.adb (P_Discrete_Choice_List): An
11193 Iterated_Component_Association is an array aggregate component.
11194 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
11195 (Is_Quantified_Expression): New function that performs a lookahead
11196 to distinguish quantified expressions from iterated component
11197 associations.
11198 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
11199 associations.
11200 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
11201 * sem.adb (Analyze): Handle Iterated_Component_Association.
11202 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
11203 component associations.
11204 * sinfo.ads, sinfo.adb: Entries for for
11205 N_Iterated_Component_Association and its fields.
11206 * sprint.adb (Sprint_Node_Actual): Handle
11207 N_Iterated_Component_Association.
11208
11209 2017-01-13 Justin Squirek <squirek@adacore.com>
11210
11211 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
11212 of the style check until after preanalysis of acutals.
11213
11214 2017-01-13 Yannick Moy <moy@adacore.com>
11215
11216 * sem_ch13.adb: Minor reformatting.
11217 * par-ch11.adb: minor style fix in whitespace
11218 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
11219 reduced to Add_Artificial_ALI_File; style fix in declaration of
11220 Text; grammar fix in comment.
11221 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
11222 * freeze.adb: Cleanup to pass pragma instead of
11223 expression to call.
11224 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
11225 replace System'To_Address by equivalent call.
11226
11227 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11228
11229 * bindusg.adb: Improve usage output for -f switch.
11230
11231 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11232
11233 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
11234 Minor reformatting.
11235
11236 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11237
11238 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
11239 treat comparisons on strings as legal in a Static_Predicate.
11240 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
11241 a function call that is the expansion of a string comparison.The
11242 function call is built when compiling the corresponding predicate
11243 function, but the expression has been found legal as a static
11244 predicate during earlier analysis.
11245 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
11246 properly a function call that is the expansion of a string
11247 comparison operation, in order to recover the Static_Predicate
11248 expression and apply it to a static argument when needed.
11249
11250 2017-01-13 Tristan Gingold <gingold@adacore.com>
11251
11252 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
11253 (Open_Read): Re-implement using Open_Read_No_Exception.
11254 (Open_Write): Raise exception in case of error.
11255 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
11256 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
11257 reaise exception.
11258 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
11259
11260 2017-01-13 Yannick Moy <moy@adacore.com>
11261
11262 * checks.adb: Code cleanup.
11263
11264 2017-01-13 Yannick Moy <moy@adacore.com>
11265
11266 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
11267 expression instead of unanalyzed aspect expression for checking
11268 the validity of inheriting an operation. Also copy the expression
11269 being passing it to Build_Class_Wide_Expression, as this call
11270 modifies its argument.
11271 * sem_util.ads Fix comment to reference correct function name
11272 New_Copy_Tree.
11273
11274 2017-01-13 Javier Miranda <miranda@adacore.com>
11275
11276 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
11277 when we propagate information about the indexes back to the original
11278 indexing mode and the prefix of the index is a function call, do not
11279 remove any parameter from such call.
11280
11281 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11282
11283 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
11284 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
11285 a build-in-place function whose result type is tagged.
11286
11287 2017-01-13 Yannick Moy <moy@adacore.com>
11288
11289 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11290 Do not generate a wrapper when the only candidate is a class-wide
11291 subprogram.
11292 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
11293 inside a generic context.
11294
11295 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11296
11297 * exp_util.adb (Add_Inherited_Tagged_DIC):
11298 Pass the object parameters of both the parent and the derived
11299 type DIC procedure to the reference replacement circuitry.
11300 (Find_DIC_Type): Modify the circuitry to present the partial
11301 view of a private type in case the private type defines its own
11302 DIC pragma.
11303 (Replace_Object_And_Primitive_References): Add two
11304 optional formal parameters. Update the comment on usage. Update
11305 the replacement of references to object parameters.
11306
11307 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11308
11309 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
11310
11311 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11312
11313 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
11314 an out parameter that is a type conversion, independently of th
11315 range check that may apply to the expression of the conversion,
11316 for use in GNATProve.
11317
11318 2017-01-13 Yannick Moy <moy@adacore.com>
11319
11320 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
11321 GNATprove_Mode here to Frontend.
11322 * frontend.adb (Frontend): Move the implicit with for System
11323 in GNATprove_Mode here as it ismore correct this way; the old
11324 place only worked by chance, since there were no overloaded names.
11325 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
11326 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
11327 four attributes identified in SRM 9(18), add an implicit with
11328 to Ada.Task_Identification.
11329 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11330 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
11331 mode.
11332 * checks.adb (Apply_Discriminant_Check,
11333 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
11334 In GNATprove mode, we do not apply the checks, but we still
11335 analyze the expression to possibly issue errors on SPARK
11336 code when a run-time error can be detected at compile time.
11337 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
11338 in GNATprove mode.
11339
11340 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11341
11342 * expander.adb (Expand): Add a warning about using return
11343 statements in Ghost management code.
11344 * exp_ch3.adb (Freeze_Type): Add a warning about using return
11345 statements in Ghost management code.
11346 * exp_ch7.adb (Build_Invariant_Procedure_Body,
11347 Build_Invariant_Procedure_Declaration): Add a warning about
11348 using return statements in Ghost management code.
11349 * exp_disp.adb (Make_DT): Add a warning about using return
11350 statements in Ghost management code.
11351 * exp_util.adb (Build_DIC_Procedure_Body,
11352 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
11353 warning about using return statements in Ghost management code.
11354 * freeze.adb (Freeze_Entity): Add a warning about using return
11355 statements in Ghost management code.
11356 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
11357 statements in Ghost management code.
11358 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
11359 a warning about using return statements in Ghost management code.
11360 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
11361 return statements in Ghost management code.
11362 * sem_ch6.adb (Analyze_Procedure_Call,
11363 Analyze_Subprogram_Body_Helper): Add a warning about using return
11364 statements in Ghost management code.
11365 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
11366 using return statements in Ghost management code.
11367 * sem_ch12.adb (Analyze_Package_Instantiation,
11368 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
11369 Instantiate_Subprogram_Body): Add a warning about using return
11370 statements in Ghost management code.
11371 * sem_ch13.adb (Build_Predicate_Functions,
11372 Build_Predicate_Function_Declarations): Add a warning about
11373 using return statements in Ghost management code.
11374 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
11375 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
11376 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
11377 using return statements in Ghost management code.
11378
11379 2017-01-13 Tristan Gingold <gingold@adacore.com>
11380
11381 * s-mmosin-mingw.adb: Fix pragma import.
11382
11383 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11384
11385 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
11386 codepeer mode.
11387
11388 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11389
11390 * atree.adb (Allocate_Initialize_Node): A newly created node is
11391 no longer marked as Ghost at this level.
11392 (Mark_New_Ghost_Node): New routine.
11393 (New_Copy): Mark the copy as Ghost.
11394 (New_Entity): Mark the entity as Ghost.
11395 (New_Node): Mark the node as Ghost.
11396 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
11397 apply to unanalyzed entities.
11398 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
11399 entities.
11400 (Set_Is_Checked_Ghost_Entity): This attribute now
11401 applies to all entities as well as unanalyzed entities.
11402 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
11403 all entities as well as unanalyzed entities.
11404 * expander.adb Add with and use clauses for Ghost.
11405 (Expand): Install and revert the Ghost region associated with the node
11406 being expanded.
11407 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
11408 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
11409 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
11410 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
11411 (Freeze_Type): Install and revert the Ghost region associated
11412 with the type being frozen.
11413 * exp_ch5.adb Remove with and use clauses for Ghost.
11414 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
11415 * exp_ch6.adb Remove with and use clauses for Ghost.
11416 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
11417 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
11418 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
11419 Ghost region of the working type.
11420 (Build_Invariant_Procedure_Declaration): Install and revert
11421 the Ghost region of the working type.
11422 (Expand_N_Package_Body): Remove all Ghost-related code.
11423 * exp_ch8.adb Remove with and use clauses for Ghost.
11424 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
11425 code.
11426 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
11427 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
11428 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
11429 code.
11430 * exp_ch13.adb Remove with and use clauses for Ghost.
11431 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
11432 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
11433 the tagged type. Move the generation of various entities within
11434 the Ghost region of the type.
11435 * exp_prag.adb Remove with and use clauses for Ghost.
11436 (Expand_Pragma_Check): Remove all Ghost-related code.
11437 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
11438 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
11439 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
11440 * exp_util.adb (Build_DIC_Procedure_Body): Install
11441 and revert the Ghost region of the working types.
11442 (Build_DIC_Procedure_Declaration): Install and revert the
11443 Ghost region of the working type.
11444 (Make_Invariant_Call): Install and revert the Ghost region of the
11445 associated type.
11446 (Make_Predicate_Call): Reimplemented. Install and revert the
11447 Ghost region of the associated type.
11448 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
11449 of the entity being frozen.
11450 (New_Freeze_Node): Removed.
11451 * ghost.adb Remove with and use clauses for Opt.
11452 (Check_Ghost_Completion): Update the parameter profile
11453 and all references to formal parameters.
11454 (Ghost_Entity): Update the comment on usage.
11455 (Install_Ghost_Mode): New routines.
11456 (Is_Ghost_Assignment): New routine.
11457 (Is_Ghost_Declaration): New routine.
11458 (Is_Ghost_Pragma): New routine.
11459 (Is_Ghost_Procedure_Call): New routine.
11460 (Is_Ghost_Renaming): Removed.
11461 (Is_OK_Declaration): Reimplemented.
11462 (Is_OK_Pragma): Reimplemented.
11463 (Is_OK_Statement): Reimplemented.
11464 (Is_Subject_To_Ghost): Update the comment on usage.
11465 (Mark_And_Set_Ghost_Assignment): New routine.
11466 (Mark_And_Set_Ghost_Body): New routine.
11467 (Mark_And_Set_Ghost_Completion): New routine.
11468 (Mark_And_Set_Ghost_Declaration): New routine.
11469 (Mark_And_Set_Ghost_Instantiation): New routine.
11470 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11471 (Mark_Full_View_As_Ghost): Removed.
11472 (Mark_Ghost_Declaration_Or_Body): New routine.
11473 (Mark_Ghost_Pragma): New routine.
11474 (Mark_Ghost_Renaming): New routine.
11475 (Mark_Pragma_As_Ghost): Removed.
11476 (Mark_Renaming_As_Ghost): Removed.
11477 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
11478 (Prune_Node): Freeze nodes no longer need special pruning, they
11479 are processed by the general ignored Ghost code mechanism.
11480 (Restore_Ghost_Mode): New routine.
11481 (Set_Ghost_Mode): Reimplemented.
11482 (Set_Ghost_Mode_From_Entity): Removed.
11483 * ghost.ads Add with and use clauses for Ghost.
11484 (Check_Ghost_Completion): Update the parameter profile
11485 along with the comment on usage.
11486 (Install_Ghost_Mode): New routine.
11487 (Is_Ghost_Assignment): New routine.
11488 (Is_Ghost_Declaration): New routine.
11489 (Is_Ghost_Pragma): New routine.
11490 (Is_Ghost_Procedure_Call): New routine.
11491 (Mark_And_Set_Ghost_Assignment): New routine.
11492 (Mark_And_Set_Ghost_Body): New routine.
11493 (Mark_And_Set_Ghost_Completion): New routine.
11494 (Mark_And_Set_Ghost_Declaration): New routine.
11495 (Mark_And_Set_Ghost_Instantiation): New routine.
11496 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11497 (Mark_Full_View_As_Ghost): Removed.
11498 (Mark_Ghost_Pragma): New routine.
11499 (Mark_Ghost_Renaming): New routine.
11500 (Mark_Pragma_As_Ghost): Removed.
11501 (Mark_Renaming_As_Ghost): Removed.
11502 (Restore_Ghost_Mode): New routine.
11503 (Set_Ghost_Mode): Redefined.
11504 (Set_Ghost_Mode_From_Entity): Removed.
11505 * sem.adb (Analyze): Install and revert the Ghost region of the
11506 node being analyzed.
11507 (Do_Analyze): Change the way a clean Ghost
11508 region is installed and reverted.
11509 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
11510 all Ghost-related code.
11511 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
11512 (Analyze_Number_Declaration): Remove all Ghost-related code.
11513 (Analyze_Object_Declaration): Install and revert the Ghost region of
11514 a deferred object declaration's completion.
11515 (Array_Type_Declaration): Remove all Ghost-related code.
11516 (Build_Derived_Type): Update the comment on
11517 the propagation of Ghost attributes from a parent to a derived type.
11518 (Derive_Subprogram): Remove all Ghost-related code.
11519 (Make_Class_Wide_Type): Remove all Ghost-related code.
11520 (Make_Implicit_Base): Remove all Ghost-related code.
11521 (Process_Full_View): Install and revert the Ghost region of
11522 the partial view. There is no longer need to check the Ghost
11523 completion here.
11524 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
11525 region of the left hand side.
11526 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
11527 all Ghost-related code.
11528 (Analyze_Expression_Function): Remove all Ghost-related code.
11529 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
11530 (Analyze_Procedure_Call): Install and revert the Ghost region of
11531 the procedure being called.
11532 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
11533 region of the spec or body.
11534 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
11535 (Build_Subprogram_Declaration): Remove all Ghost-related code.
11536 (Find_Corresponding_Spec): Remove all Ghost-related code.
11537 (Process_Formals): Remove all Ghost-related code.
11538 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
11539 the Ghost region of the spec.
11540 (Analyze_Package_Declaration): Remove all Ghost-related code.
11541 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
11542 Ghost when it aliases a Ghost entity.
11543 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
11544 a Ghost entity.
11545 (Analyze_Object_Renaming): Mark a renaming as Ghost when
11546 it aliases a Ghost entity.
11547 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
11548 a Ghost entity.
11549 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
11550 aliases a Ghost entity.
11551 * sem_ch11.adb Remove with and use clauses for Ghost.
11552 (Analyze_Exception_Declaration): Remove all Ghost-related code.
11553 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
11554 Ghost-related code.
11555 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
11556 code.
11557 (Analyze_Package_Instantiation): Install and revert the Ghost region
11558 of the package instantiation.
11559 (Analyze_Subprogram_Instantiation): Install
11560 and revert the Ghost region of the subprogram instantiation.
11561 (Instantiate_Package_Body): Code clean up. Install and revert the
11562 Ghost region of the package body.
11563 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
11564 Ghost region of the subprogram body.
11565 * sem_ch13.adb (Build_Predicate_Functions): Install
11566 and revert the Ghost region of the related type.
11567 (Build_Predicate_Function_Declaration): Code clean up. Install
11568 and rever the Ghost region of the related type.
11569 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
11570 Install and revert the Ghost region of the pragma.
11571 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
11572 Ghost region of the pragma.
11573 (Analyze_Pragma): Install and revert the Ghost region of various
11574 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
11575 or encloses a Ghost entity.
11576 (Analyze_Pre_Post_Condition): Install and revert the Ghost
11577 region of the pragma.
11578 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
11579 Ghost region of the pragma.
11580 * sem_res.adb (Resolve): Remove all Ghost-related code.
11581 * sem_util.adb (Is_Declaration): Reimplemented.
11582 (Is_Declaration_Other_Than_Renaming): New routine.
11583 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
11584 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
11585 (Is_Ghost_Pragma): Removed.
11586 (Is_Ignored_Ghost_Pragma): New routine.
11587 (Set_Is_Checked_Ghost_Pragma): New routine.
11588 (Set_Is_Ghost_Pragma): Removed.
11589 (Set_Is_Ignored_Ghost_Pragma): New routine.
11590 * sinfo.ads: Update the documentation on Ghost mode and
11591 Ghost regions. New attributes Is_Checked_Ghost_Pragma
11592 and Is_Ignored_Ghost_Pragma along with usages in nodes.
11593 Remove attribute Is_Ghost_Pragma along with usages in nodes.
11594 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11595 (Is_Ghost_Pragma): Removed along with pragma Inline.
11596 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11597 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11598 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
11599 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11600
11601 2017-01-12 Tristan Gingold <gingold@adacore.com>
11602
11603 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
11604 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
11605
11606 2017-01-12 Yannick Moy <moy@adacore.com>
11607
11608 * errout.adb, errout.ads (Initialize): Factor common treatment
11609 in Reset_Warnings.
11610 (Reset_Warnings): New procedure to reset counts related to warnings.
11611 (Record_Compilation_Errors): New variable to store the presence of an
11612 error, used in gnat2why to allow changing the Warning_Mode.
11613 (Compilation_Errors): Use new variable Record_Compilation_Errors to
11614 store the presence of an error.
11615
11616 2017-01-12 Javier Miranda <miranda@adacore.com>
11617
11618 * sem_ch13.adb (Analyze_Aspect_Specifications):
11619 For Interrupt_Handler and Attach_ Handler aspects, decorate the
11620 internally built reference to the protected procedure as coming
11621 from sources and force its analysis.
11622
11623 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11624
11625 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
11626 inherit predicates if any from the first_subtype of the parent,
11627 not from the anonymous parent type.
11628 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
11629 predicate is not a static subtype.
11630
11631 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11632
11633 * freeze.adb (Check_Suspicious_Convention): New procedure
11634 performing a warning check on discriminated record types with
11635 convention C or C++. Factored out of procedure Freeze_Record_Type,
11636 and changed to only apply to base types (to avoid spurious
11637 warnings on subtypes). Minor improvement of warning messages
11638 to refer to discriminated rather than variant record types.
11639 (Freeze_Record_Type): Remove code for performing a suspicious
11640 convention check.
11641 (Freeze_Entity): Only call Freeze_Record_Type
11642 on types that aren't declared within any enclosing generic units
11643 (rather than just excluding the type when the innermost scope
11644 is generic). Call Check_Suspicious_Convention whether or not
11645 the type is declared within a generic unit.
11646 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
11647 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
11648 from Sem_Ch8).
11649
11650 2017-01-12 Tristan Gingold <gingold@adacore.com>
11651
11652 * sysdep.c, adaint.c, rtinit.c, ming32.h:
11653 (__gnat_current_codepage): Renamed from CurrentCodePage
11654 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
11655
11656 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11657
11658 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
11659 quantified expressions, following AI12-050: the loop parameters
11660 of two quantified expressions are conformant if they have the
11661 same identifier.
11662
11663 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11664
11665 * gcc-interface/Makefile.in: Clean up VxWorks targets.
11666
11667 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11668
11669 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
11670 Hnadle properly the attribute reference when it appears as part
11671 of an expression in another loop aspect.
11672
11673 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11674
11675 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
11676 subsidiary of Build_Initialization_Call, to complete generation
11677 of predicate checks on discriminants whose (sub)types have
11678 predicates, and to add checks on variants that do not have an
11679 others clause.
11680 * sem_util.adb (Gather_Components): A missing Others alternative is
11681 not an error when the type of the discriminant is a static predicate
11682 (and coverage has been checked when analyzing the case statement). A
11683 runtime check is generated to verify that a given discriminant
11684 satisfies the predicate (RM 3.8.1. (21.1/2)).
11685
11686 2017-01-12 Yannick Moy <moy@adacore.com>
11687
11688 * gnat1drv.adb (Adjust_Global_Switches): Only
11689 perform checking of exception mechanism when generating code.
11690
11691 2017-01-12 Justin Squirek <squirek@adacore.com>
11692
11693 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
11694 Remove handling of access component with invariant.
11695 (Build_Invariant_Procedure_Declaration): Remove return on class
11696 wide type.
11697 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
11698 conditional exception for component or array so Has_Own_Invariants
11699 flag is not falsly set.
11700 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
11701 wide type to have no invariant flags.
11702
11703 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11704
11705 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
11706 sem_ch13.adb: Minor reformatting.
11707
11708 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11709
11710 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
11711 adjustment primitive when the ancestor type was not properly frozen.
11712 (Gen_Assign): Guard against a missing initialization
11713 primitive when the component type was not properly frozen.
11714 (Initialize_Array_Component): Guard against a missing adjustment
11715 primitive when the component type was not properly frozen.
11716 (Initialize_Record_Component): Guard against a missing adjustment
11717 primitive when the component type was not properly frozen.
11718 (Process_Transient_Component_Completion): The transient object may
11719 not be finalized when its associated type was not properly frozen.
11720 * exp_ch3.adb (Build_Assignment): Guard against a missing
11721 adjustment primitive when the component type was not properly frozen.
11722 (Build_Initialization_Call): Guard against a missing
11723 initialization primitive when the associated type was not properly
11724 frozen.
11725 (Expand_N_Object_Declaration): Guard against a missing
11726 adjustment primitive when the base type was not properly frozen.
11727 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
11728 body when there is no adjustment primitive available. Create an
11729 empty Deep_Finalize body when there is no finalization primitive
11730 available.
11731 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
11732 missing finalization primitive when the designated type was
11733 not properly frozen.
11734 (Expand_N_Allocator): Guard against a missing initialization primitive
11735 when the designated type was not properly frozen.
11736 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
11737 only when the corresponding adjustment primitive is available.
11738 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
11739 adjustment/finalization statements only when there is an available
11740 primitive to carry out the action.
11741 (Build_Initialize_Statements): Generate the initialization/finalization
11742 statements only when there is an available primitive to carry out the
11743 action.
11744 (Make_Adjust_Call): Do not generate a call when the underlying
11745 type is not present due to a possible missing full view.
11746 (Make_Final_Call): Do not generate a call when the underlying
11747 type is not present due to a possible missing full view.
11748 (Make_Finalize_Address_Stmts): Generate an empty body when the
11749 designated type lacks a finalization primitive.
11750 (Make_Init_Call): Do not generate a call when the underlying type is
11751 not present due to a possible missing full view.
11752 (Process_Component_For_Adjust): Add the adjustment call only when the
11753 corresponding adjustment primitive is available.
11754 (Process_Component_For_Finalize): Add the finalization call only when
11755 the corresponding finalization primitive is available.
11756 (Process_Object_Declaration): Use a null statement to emulate a
11757 missing call to the finalization primitive of the object type.
11758 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
11759 (Make_Final_Call): Update the comment on usage.
11760 (Make_Init_Call): Update the comment on usage.
11761 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
11762
11763 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11764
11765 * einfo.ads: Update documentation of Address_Taken.
11766 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
11767 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
11768 for subprograms when setting Address_Taken flag.
11769
11770 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11771
11772 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
11773 Configurable_Run_Time_Mode off when analysing with'ed predefined
11774 libraries.
11775
11776 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11777
11778 * sem_prag.adb: Minor reformatting.
11779 * sem_util.adb (Unique_Entity): fix result for
11780 bodies of entry families.
11781
11782 2017-01-12 Justin Squirek <squirek@adacore.com>
11783
11784 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
11785 Resolve_Suppressible in the pragma Assertion_Policy case.
11786 (Resolve_Suppressible): Created this function to factor out
11787 common code used to resolve Suppress to either Ignore or Check
11788 * snames.ads-tmpl: Add name for Suppressible.
11789
11790 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11791
11792 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
11793 reformatting.
11794 * debug.adb: Minor comment fixes.
11795
11796 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11797
11798 * sem_util.adb (Unique_Entity): For concurrent
11799 bodies that are defined with stubs and complete a declaration
11800 of a single concurrent object return the entity of an implicit
11801 concurrent type, not the entity of the anonymous concurrent
11802 object.
11803 * debug.adb: -gnatd.J is no longer used.
11804 * make.adb (Globalize): Removed, no longer used.
11805 * sem_ch9.adb: minor typo in comment for entry index
11806
11807 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11808
11809 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11810 * exp_ch3.adb (Build_Init_Statements): As part of initialising
11811 the value record of a task, set its _Secondary_Stack_Size field
11812 if present.
11813 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11814 a _Secondary_Stack_Size field in the value record of
11815 the task if a Secondary_Stack_Size rep item is present.
11816 (Make_Task_Create_Call): Include secondary stack size
11817 parameter. If No_Secondary_Stack restriction is in place, passes
11818 stack size of 0.
11819 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11820 Secondary_Stack_Size.
11821 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11822 function to define the overhead of the secondary stack.
11823 * s-tarest.adb (Create_Restricted_Task,
11824 Create_Restricted_Task_Sequential): Functions now include
11825 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11826 * s-tarest.adb (Create_Restricted_Task,
11827 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
11828 include Secondary_Stack_Size parameter.
11829 (Task_Wrapper): Secondary stack now allocated to the size specified by
11830 the Secondary_Stack_Size parameter in the task's ATCB.
11831 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
11832 Secondary_Stack_Size component.
11833 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
11834 Create_Restricted_Task_Sequential): Function now include
11835 Secondary_Stack_Size parameter.
11836 (Task_Wrapper): Secondary stack now allocated to the size
11837 specified by the Secondary_Stack_Size parameter in the task's
11838 ATCB.
11839 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
11840 to include Secondary_Stack_Size parameter.
11841 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
11842 Secondary_Stack_Size aspect, turning the aspect into its corresponding
11843 internal attribute.
11844 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
11845 * snames.adb-tmpl, snames.ads-tmpl: Added names
11846 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
11847 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
11848
11849 2017-01-12 Yannick Moy <moy@adacore.com>
11850
11851 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
11852 subtree.
11853
11854 2017-01-12 Justin Squirek <squirek@adacore.com>
11855
11856 * exp_attr.adb (Expand_N_Attribute_Reference):
11857 Fix Finalization_Size case by properly resolving the type after
11858 rewritting the node.
11859
11860 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11861
11862 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
11863 the tree.
11864 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
11865 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
11866 exp_sel.ads: Minor reformatting.
11867
11868 2017-01-12 Justin Squirek <squirek@adacore.com>
11869
11870 * exp_ch6.adb (Expand_Call): Add guard to prevent
11871 invariant checks from being created for internally generated
11872 subprograms.
11873
11874 2017-01-12 Bob Duff <duff@adacore.com>
11875
11876 * lib-writ.ads: Remove incorrect comment.
11877
11878 2017-01-12 Javier Miranda <miranda@adacore.com>
11879
11880 * debug.adb (-gnatd.K): Enable generation of contract-only
11881 procedures in CodePeer mode.
11882 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
11883 New subprogram.
11884 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
11885 set.
11886 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
11887 subprogram.
11888 (Get_Contract_Only_Missing_Body_Name): New subprogram.
11889 (Get_Contract_Only_Body): New subprogram.
11890 (Set_Contract_Only_Body): New subprogram.
11891 (Is_Contract_Only_Body): New subprogram.
11892 (Set_Is_Contract_Only_Body): New subprogram.
11893 (SCIL_Nodes): Replace table by hash-table.
11894
11895 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11896
11897 * exp_ch6.adb: Minor reformatting.
11898 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
11899
11900 2017-01-12 Bob Duff <duff@adacore.com>
11901
11902 * binde.adb (Forced): New reason for a dependence.
11903 (Force_Elab_Order): Implementation of the new switch.
11904 * binde.ads: Minor comment fixes.
11905 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
11906 long ago that is no longer supported; removed comment about that.
11907 * opt.ads (Force_Elab_Order_File): Name of file specified for
11908 -f switch.
11909 * switch-b.adb: Parse -f switch.
11910
11911 2017-01-12 Justin Squirek <squirek@adacore.com>
11912
11913 * exp_ch6.adb (Check_View_Conversion): Created this function
11914 to properly chain calls to check type invariants that may be
11915 present in a subprogram call after the subprogram.
11916 (Expand_Call): Add a conditional to identify when a view conversion
11917 needs to be checked.
11918 * nlists.adb, nlists.ads (Prepend_New): New routine.
11919 (Prepend_New_To): New routine.
11920
11921 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11922
11923 * sinfo.ads: Minor reformatting.
11924
11925 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11926
11927 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
11928 reformatting.
11929
11930 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11931
11932 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
11933 variable Definite. Create a local object and pass its 'Access to the
11934 BIP function when the result type is either definite or it does not
11935 require any finalization or secondary stack management.
11936
11937 2017-01-12 Bob Duff <duff@adacore.com>
11938
11939 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
11940 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
11941 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
11942 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
11943 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
11944 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
11945 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
11946 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
11947 Change name to Pragma_Name_Unmapped.
11948 (Pragma_Name_Mapped): Change name to Pragma_Name.
11949 This is because the "mapped" version should be the usual case.
11950
11951 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
11952
11953 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
11954 Is_Default_Init_Cond_Procedure, and
11955 Has_Inherited_Default_Init_Cond. Add uses of flags
11956 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
11957 (Default_Init_Cond_Procedure): Removed.
11958 (DIC_Procedure): New routine.
11959 (Has_Default_Init_Cond): Removed.
11960 (Has_DIC): New routine.
11961 (Has_Inheritable_Invariants): The attribute applies to the base type.
11962 (Has_Inherited_Default_Init_Cond): Removed.
11963 (Has_Inherited_DIC): New routine.
11964 (Has_Inherited_Invariants): The attribute applies to the base type.
11965 (Has_Own_DIC): New routine.
11966 (Has_Own_Invariants): The attribute applies to the base type.
11967 (Is_Default_Init_Cond_Procedure): Removed.
11968 (Is_DIC_Procedure): New routine.
11969 (Set_Default_Init_Cond_Procedure): Removed.
11970 (Set_DIC_Procedure): New routine.
11971 (Set_Has_Default_Init_Cond): Removed.
11972 (Set_Has_Inheritable_Invariants): The attribute applies
11973 to the base type.
11974 (Set_Has_Inherited_Default_Init_Cond): Removed.
11975 (Set_Has_Inherited_DIC): New routine.
11976 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
11977 (Set_Has_Own_DIC): New routine.
11978 (Set_Has_Own_Invariants): The attribute applies to the base type.
11979 (Set_Is_Default_Init_Cond_Procedure): Removed.
11980 (Set_Is_DIC_Procedure): New routine.
11981 (Write_Entity_Flags): Update the output of all flags related to
11982 default initial condition.
11983 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
11984 of the call to the DIC procedure.
11985 (Freeze_Type): Generate the body of the DIC procedure.
11986 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
11987 all occurrences of Create_Append with Append_New_To. Do
11988 not generate an invariant procedure for a class-wide type.
11989 The generated body acts as a freeze action of the working type.
11990 (Build_Invariant_Procedure_Declaration): Do not generate an
11991 invariant procedure for a class-wide type.
11992 (Create_Append): Removed.
11993 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
11994 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
11995 class-wide pre/postcondition description and data structures from
11996 Sem_Prag.
11997 (Build_Class_Wide_Expression): Moved from Sem_Prag.
11998 (Build_DIC_Call): New routine.
11999 (Build_DIC_Procedure_Body): New routine.
12000 (Build_DIC_Procedure_Declaration): New routine.
12001 (Entity_Hash): Moved from Sem_Prag.
12002 (Find_DIC_Type): New routine.
12003 (Update_Primitives_Mapping): Reimplemented.
12004 (Update_Primitives_Mapping_Of_Types): New routine.
12005 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
12006 (Build_DIC_Call): New routine.
12007 (Build_DIC_Procedure_Body): New routine.
12008 (Build_DIC_Procedure_Declaration): New routine.
12009 (Update_Primitives_Mapping): Moved from Sem_Prag.
12010 (Update_Primitives_Mapping_Of_Types): New routine.
12011 * nlists.adb (Append_New): New routine.
12012 (Append_New_To): New routine.
12013 * nlists.ads (Append_New): New routine.
12014 (Append_New_To): New routine.
12015 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
12016 of DIC procedures here. This is now done at the end of the
12017 visible declarations, private declarations, and at the freeze
12018 point of a type.
12019 (Analyze_Private_Extension_Declaration):
12020 A private extension inherits the DIC pragma of a parent type.
12021 (Analyze_Subtype_Declaration): No need to propagate invariant
12022 attributes to a subtype as those apply to the base type.
12023 (Build_Derived_Record_Type): No need to inherit invariants here
12024 as this is now done in Build_Derived_Type.
12025 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
12026 a parent type.
12027 (Process_Full_View): Update the propagation of DIC attributes.
12028 (Propagate_Default_Init_Cond_Attributes): Removed.
12029 * sem_ch7.adb Add with and use clauses for Exp_Util.
12030 (Analyze_Package_Specification): Create the body of the DIC
12031 procedure at the end of the visible and private declarations.
12032 (Preserve_Full_Attributes): Propagate DIC attributes.
12033 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
12034 DIC attributes.
12035 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
12036 * sem_elab.adb (Check_A_Call): Update the call to
12037 Is_Nontrivial_Default_Init_Cond_Procedure.
12038 * sem_prag.adb Remove the with and use clauses for
12039 GNAT.HTable. Move the handling of class- wide pre/postcondition
12040 description and data structures to Exp_Util.
12041 (Analyze_Pragma): Create the declaration of the DIC procedure. There
12042 is no need to propagate invariant-related attributes at this point
12043 as this is done in Build_Invariant_Procedure_Declaration.
12044 (Build_Class_Wide_Expression): Moved to Exp_Util.
12045 (Entity_Hash): Moved to Exp_Util.
12046 (Update_Primitives_Mapping): Moved to Exp_Util.
12047 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
12048 (Update_Primitives_Mapping): Moved to Exp_Util.
12049 * sem_util.adb: Remove with and use clauses for Ghost
12050 and Sem_Ch13.
12051 (Build_Default_Init_Cond_Call): Removed.
12052 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
12053 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
12054 (Get_Views): Reimplemented.
12055 (Has_Full_Default_Initialization): Reimplement the section on DIC.
12056 (Inherit_Default_Init_Cond_Procedure): Removed.
12057 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
12058 (Is_Nontrivial_DIC_Procedure): New routine.
12059 (Is_Verifiable_DIC_Pragma): New routine.
12060 (Propagate_DIC_Attributes): New routine.
12061 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
12062 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
12063 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
12064 (Inherit_Default_Init_Cond_Procedure): Removed.
12065 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
12066 (Is_Nontrivial_DIC_Procedure): New routine.
12067 (Is_Verifiable_DIC_Pragma): New routine.
12068 (Propagate_DIC_Attributes): New routine.
12069 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
12070 on DIC.
12071 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
12072 usage in nodes.
12073 (Expression_Copy): New routine along with pragma Inline.
12074 (Set_Expression_Copy): New routine along with pragma Inline.
12075
12076 2017-01-06 Bob Duff <duff@adacore.com>
12077
12078 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
12079 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
12080 we won't generate the call to s_stalib_adafinal when the main
12081 is not written in Ada.
12082
12083 2017-01-06 Bob Duff <duff@adacore.com>
12084
12085 * sem_prag.adb: Minor: remove pragma Warnings.
12086
12087 2017-01-06 Tristan Gingold <gingold@adacore.com>
12088
12089 * Makefile.rtl: Do not compile s-stchop by default.
12090
12091 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
12092
12093 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
12094 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
12095 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
12096 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
12097 Reverted previous change for now.
12098
12099 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12100
12101 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
12102 check to default discriminant value if checks are enabled.
12103 (Build_Assignment): If type of component has static predicate,
12104 apply check to its default value, if any.
12105
12106 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
12107
12108 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
12109 * exp_ch3.adb (Build_Init_Statements): As part of initialising
12110 the value record of a task, set its _Secondary_Stack_Size field
12111 if present.
12112 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
12113 a _Secondary_Stack_Size field in the value record of
12114 the task if a Secondary_Stack_Size rep item is present.
12115 (Make_Task_Create_Call): Include secondary stack size
12116 parameter. If No_Secondary_Stack restriction is in place, passes
12117 stack size of 0.
12118 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
12119 Secondary_Stack_Size.
12120 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
12121 function to define the overhead of the secondary stack.
12122 * s-tarest.adb (Create_Restricted_Task,
12123 Create_Restricted_Task_Sequential): Functions now include
12124 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
12125 * s-tarest.adb (Create_Restricted_Task,
12126 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
12127 now include Secondary_Stack_Size parameter.
12128 (Task_Wrapper):
12129 Secondary stack now allocated to the size specified by the
12130 Secondary_Stack_Size parameter in the task's ATCB.
12131 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
12132 Secondary_Stack_Size component.
12133 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
12134 Create_Restricted_Task_Sequential): Function now include
12135 Secondary_Stack_Size parameter.
12136 (Task_Wrapper): Secondary stack
12137 now allocated to the size specified by the Secondary_Stack_Size
12138 parameter in the task's ATCB.
12139 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
12140 for Secondary_Stack_Size aspect, turning the aspect into its
12141 corresponding internal attribute.
12142 (Analyze_Attribute_Definition):
12143 Process Secondary_Stack_Size attribute.
12144 * snames.adb-tmpl, snames.ads-tmpl: Added names
12145 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
12146 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
12147
12148 2017-01-06 Pascal Obry <obry@adacore.com>
12149
12150 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
12151 Sequential_IO and Direct_IO.
12152
12153 2017-01-06 Bob Duff <duff@adacore.com>
12154
12155 * snames.ads-tmpl (Renamed): New name for the pragma argument.
12156 * par-ch2.adb: Allow the new pragma (with analysis deferred
12157 to Sem_Prag).
12158 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
12159 Keep a mapping from new pragma names to old names.
12160 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
12161 implement it by calling Map_Pragma_Name.
12162 * checks.adb, contracts.adb, einfo.adb, errout.adb,
12163 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
12164 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
12165 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
12166 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
12167 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
12168 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
12169 as appropriate.
12170
12171 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12172
12173 * exp_ch9.adb: Minor reformatting.
12174
12175 2017-01-06 Tristan Gingold <gingold@adacore.com>
12176
12177 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
12178 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
12179 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
12180 (unused).
12181 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
12182 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
12183 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
12184 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
12185
12186 2017-01-06 Bob Duff <duff@adacore.com>
12187
12188 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
12189 dummy implementation of Map_Pragma_Name.
12190
12191 2017-01-06 Tristan Gingold <gingold@adacore.com>
12192
12193 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
12194 entry_body variable constant.
12195 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
12196 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
12197 to constant.
12198 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
12199 now access to constant.
12200
12201 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12202
12203 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
12204 reformatting and typo fixes.
12205
12206 2017-01-06 Bob Duff <duff@adacore.com>
12207
12208 * snames.ads-tmpl: New names for pragma renaming.
12209 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
12210 * par-prag.adb: Add new pragma name to case statement.
12211 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
12212 of the pragma.
12213 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
12214 Dummy implementation of Pragma_Name_Mapped.
12215
12216 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12217
12218 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
12219 better detect call within an entry_wrapper.
12220 * sem_res.adb (Resolve_Call): A protected call within an
12221 entity_wrapper is analyzed in the context of the protected
12222 object but corresponds to a pre-analysis and is not an access
12223 before elaboration.
12224 * sem_attr.adb: Minor reformatting.
12225
12226 2017-01-06 Justin Squirek <squirek@adacore.com>
12227
12228 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
12229 Finalization_Size to allow a prefix of any non-class-wide type.
12230 * sem_attr.ads Modify comment for Finalization_Size to include
12231 definite type use case.
12232
12233 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12234
12235 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
12236 on procedures that are wrappers created for entries that have
12237 preconditions.
12238 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
12239 body is an entry_wrapper, compile it in the context of the
12240 synchronized type, because a precondition may refer to funtions
12241 of the type.
12242 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
12243 body entity.
12244 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
12245 within an Entry_Wrapper this is an external call whose target
12246 is the synchronized object that is the actual in the call to
12247 the wrapper.
12248
12249 2017-01-06 Yannick Moy <moy@adacore.com>
12250
12251 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
12252 in tree, which means not analyzing the previous prefix if the node has
12253 been rewritten into its prefix.
12254
12255 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12256
12257 * s-tpobop.adb: Minor reformatting.
12258
12259 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12260
12261 * checks.adb (Ensure_Valid): Do not generate a validity check
12262 within a generated predicate function, validity checks will have
12263 been applied earlier when required.
12264
12265 2017-01-06 Tristan Gingold <gingold@adacore.com>
12266
12267 * s-tpoben.ads (Protection_Entries): Add comment and reorder
12268 components for performances.
12269 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
12270 semantic.
12271
12272 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12273
12274 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
12275 If expression is compile-time known and obeys a static predicate
12276 it must be labelled as static, to prevent spurious warnings and
12277 run-time errors, e.g. in case statements. This is relevant when
12278 the expression is the result of constant-folding a type conversion
12279 whose expression is a variable with a known static value.
12280
12281 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12282
12283 * exp_attr.adb, sem_attr.ads: Minor reformatting.
12284
12285 2017-01-06 Justin Squirek <squirek@adacore.com>
12286
12287 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
12288 expansion of Finalization_Size attribute.
12289 * sem_attr.adb (Analyze_Attribute): Add entry to check the
12290 semantics of Finalization_Size.
12291 (Eval_Attribute): Add null entry for Finalization_Size.
12292 * sem_attr.ads: Add Finalization_Size to the implementation
12293 dependent attribute list.
12294 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
12295
12296 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12297
12298 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
12299 iterator specification with a serious syntactic error, transform
12300 construct into an infinite loop in order to continue analysis
12301 and prevent a compiler abort.
12302
12303 2017-01-06 Tristan Gingold <gingold@adacore.com>
12304
12305 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
12306 max_queue_lengths_array if unused.
12307
12308 2017-01-06 Bob Duff <duff@adacore.com>
12309
12310 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
12311 array access, in case "\" is at the end of Text.
12312 * stylesw.adb (Set_Style_Check_Options): Don't include input
12313 characters in the error message template, because they could
12314 be control characters such as "\", which Errout will try to
12315 interpret.
12316
12317 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12318
12319 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
12320 For a private type examine the visible declarations that follow
12321 the partial view, not just the private declarations that follow
12322 the full view.
12323
12324 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12325
12326 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
12327 code cleanup.
12328
12329 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12330
12331 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
12332 alias of the inherited op is the parent iterator, no need to
12333 examine dispatch table positions which might not be established
12334 yet if type is not frozen.
12335 * sem_disp.adb (Check_Controlling_Formals): The formal of a
12336 predicate function may be a subtype of a tagged type.
12337 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
12338 of representation items for the completion of a type extension
12339 where a predicate applies to the partial view.
12340 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
12341 parameter that designates function whose actual receives a
12342 predicate check, to improve warning message when the check will
12343 lead to infinite recursion.
12344 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
12345 Apply_Predicate_Check.
12346
12347 2017-01-06 Tristan Gingold <gingold@adacore.com>
12348
12349 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
12350 Gnat_Extended_Ravenscar.
12351 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
12352
12353 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12354
12355 * sem_util.ads: Minor typo fix and reformatting.
12356
12357 2017-01-06 Yannick Moy <moy@adacore.com>
12358
12359 * ghost.adb Minor fixing of references to SPARK RM.
12360 (Check_Ghost_Context): Check whether reference is to a lvalue
12361 before issuing an error about violation of SPARK RM 6.9(13)
12362 when declaration has Ghost policy Check and reference has Ghost
12363 policy Ignore.
12364 * sem_util.adb Minor indentation.
12365 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
12366 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
12367 * sem_util.ads (Unique_Defining_Entity): Document the result
12368 for package body stubs.
12369
12370 2017-01-06 Tristan Gingold <gingold@adacore.com>
12371
12372 * raise-gcc.c (abort): Macro to call Abort_Propagation.
12373 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
12374 constant.
12375 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12376 Do not generate the Entry_Max_Queue_Lengths_Array if all default
12377 values.
12378 * exp_util.adb (Corresponding_Runtime_Package): Consider
12379 Max_Queue_Length pragma.
12380
12381 2017-01-06 Justin Squirek <squirek@adacore.com>
12382
12383 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12384 Remove declaration generation in the case of
12385 System_Tasking_Protected_Objects_Single_Entry being used,
12386 and add a warning message when this is detected to occur.
12387 (Make_Initialize_Protection): Remove reference pass in the case
12388 of System_Tasking_Protected_Objects_Single_Entry.
12389 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
12390 * s-tposen.adb (Initialize_Protection_Entry): Remove
12391 Entry_Queue_Max parameter.
12392 * s-tposen.ads: Remove the types use to store the entry queue
12393 maximum.
12394 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
12395
12396 2017-01-06 Yannick Moy <moy@adacore.com>
12397
12398 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
12399 behavior of function, to also accept out of range positions
12400 and raise Constraint_Error in such case, and to copy sloc from
12401 literal if No_Location passed as location.
12402 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
12403 of functions to raise Constraint_Error in case of value not in
12404 appropriate range.
12405
12406 2017-01-06 Tristan Gingold <gingold@adacore.com>
12407
12408 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
12409 Invalidate_Stack_Cache.
12410
12411 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
12412
12413 * s-os_lib.adb: Minor fix to the signature of Readlink.
12414
12415 2017-01-06 Javier Miranda <miranda@adacore.com>
12416
12417 * sem_ch6.adb (Conforming_Types): Handle another
12418 confusion between views in a nested instance with an actual
12419 private type whose full view is not in scope.
12420
12421 2017-01-06 Arnaud Charlet <charlet@adacore.com>
12422
12423 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
12424 mark a rewritten if statement as explicit (Comes_From_Source).
12425
12426 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12427
12428 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
12429
12430 2017-01-06 Tristan Gingold <gingold@adacore.com>
12431
12432 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
12433
12434 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12435
12436 * sem_case.adb: Minor reformatting.
12437
12438 2017-01-06 Thomas Quinot <quinot@adacore.com>
12439
12440 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
12441
12442 2017-01-06 Justin Squirek <squirek@adacore.com>
12443
12444 * aspects.adb: Register aspect in Canonical_Aspect.
12445 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
12446 into respective tables.
12447 * einfo.ads, einfo.adb: Add a new attribute for
12448 handling the parameters for Pragma_Max_Entry_Queue
12449 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
12450 for accessing and setting were added as well.
12451 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
12452 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
12453 declaration for pramga arguments and store them in the protected
12454 type node.
12455 (Make_Initialize_Protection): Pass a reference to
12456 the Entry_Max_Queue_Lengths_Array in the protected type node to
12457 the runtime.
12458 * rtsfind.adb: Minor grammar fix.
12459 * rtsfind.ads: Register new types taken from the
12460 runtime libraries RE_Protected_Entry_Queue_Max and
12461 RE_Protected_Entry_Queue_Max_Array
12462 * s-tposen.adb, s-tpoben.adb
12463 (Initialize_Protection_Entry/Initialize_Protection_Entries):
12464 Add extra parameter and add assignment to local object.
12465 * s-tposen.ads, s-tpoben.ads: Add new types to
12466 store entry queue maximums and a field to the entry object record.
12467 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
12468 for Aspect_Max_Queue_Length.
12469 (Check_Aspect_At_Freeze_Point):
12470 Add aspect to list of aspects that don't require delayed analysis.
12471 * sem_prag.adb (Analyze_Pragma): Add case statement for
12472 Pragma_Max_Queue_Length, check semantics, and register arugments
12473 in the respective entry nodes.
12474 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
12475 and Has_Max_Queue_Length
12476 * snames.ads-tmpl: Add constant for the new aspect-name
12477 Name_Max_Queue_Length and corrasponding pragma.
12478
12479 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12480
12481 * exp_util.adb (Is_Controlled_Function_Call):
12482 Reimplemented. Consider any node which has an entity as the
12483 function call may appear in various ways.
12484
12485 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12486
12487 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
12488 an unchecked type conversion when performing a view conversion
12489 to/from a private type. In all other cases use a regular type
12490 conversion to ensure that any relevant checks are properly
12491 installed.
12492
12493 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12494
12495 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
12496
12497 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12498
12499 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
12500 error on case expression that is an entity, when coverage is
12501 incomplete and entity has a static value obtained by local
12502 propagation.
12503 (Handle_Static_Predicate): New procedure, subsidiary of
12504 Check_Choices, to handle case alternatives that are either
12505 subtype names or subtype indications involving subtypes that
12506 have static predicates.
12507
12508 2017-01-06 Thomas Quinot <quinot@adacore.com>
12509
12510 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
12511 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
12512
12513 2017-01-06 Bob Duff <duff@adacore.com>
12514
12515 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
12516 Elaborate_All(P) to P itself. That could happen in obscure cases,
12517 and always introduced a cycle (P body must be elaborated before
12518 P body).
12519 * lib-writ.ads: Comment clarification.
12520 * ali-util.ads: Minor comment fix.
12521 * ali.adb: Minor reformatting.
12522
12523 2017-01-06 Tristan Gingold <gingold@adacore.com>
12524
12525 * a-exexpr-gcc.adb: Improve comment.
12526
12527 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12528
12529 * s-linux-mips.ads: Use correct signal and errno constants.
12530 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
12531
12532 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12533
12534 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
12535 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
12536 sections.
12537
12538 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
12539
12540 * gnatvsn.ads: Bump copyright year.
12541
12542 2017-01-01 Jakub Jelinek <jakub@redhat.com>
12543
12544 * gnat_ugn.texi: Bump @copying's copyright year.
12545 * gnat_rm.texi: Likewise.
12546 \f
12547 Copyright (C) 2017 Free Software Foundation, Inc.
12548
12549 Copying and distribution of this file, with or without modification,
12550 are permitted in any medium without royalty provided the copyright
12551 notice and this notice are preserved.