]> gcc.gnu.org Git - gcc.git/blob - gcc/ada/ChangeLog
3507a1fa3c270ca6cadb39dc996c8872a978d19f
[gcc.git] / gcc / ada / ChangeLog
1 2017-12-05 Olivier Hainque <hainque@adacore.com>
2
3 * s-dwalin.adb (Read_And_Execute_Isn): Adjust test checking for the end
4 of section. Add comments explaining the rationale of the computation.
5
6 2017-12-05 Bob Duff <duff@adacore.com>
7
8 * exp_ch11.adb: Minor refactoring.
9
10 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
11
12 * debug.adb: Add debug switches d_a, d_e, and d_p, along with
13 documentation.
14 (Set_Underscored_Debug_Flag): New routine.
15 * debug.ads: Add the flags for all underscore switches.
16 (Set_Underscored_Debug_Flag): New routine.
17 * einfo.adb: Flag303 is now Suppress_Elaboration_Warnings.
18 (Suppress_Elaboration_Warnings): New routine.
19 (Set_Suppress_Elaboration_Warnings): New routine.
20 (Write_Entity_Flags): Add output for Suppress_Elaboration_Warnings.
21 * einfo.ads: Add new flag Suppress_Elaboration_Warnings.
22 (Suppress_Elaboration_Warnings): New routine along with pragma Inline.
23 (Set_Suppress_Elaboration_Warnings): New routine along with pragma
24 Inline.
25 * exp_ch3.adb (Build_Init_Procedure): Restore the behavior of the
26 legacy elaboration model.
27 (Default_Initialize_Object): Restore the behavior of the legacy
28 elaboration model.
29 * exp_ch9.adb: Add with and use clause for Sem_Elab.
30 (Build_Task_Activation_Call): Restore the behavior of the legacy
31 elaboration model.
32 * frontend.adb (Frontend): Restore the behavior of the legacy
33 elaboration model.
34 * opt.ads: Add new flags Legacy_Elaboration_Checks and
35 Relaxed_Elaboration_Checks, along with documentation.
36 * sem_attr.adb (Analyze_Access_Attribute): Restore the behavior of the
37 legacy elaboration model.
38 * sem_ch5.adb (Analyze_Assignment): Restore the behavior of the legacy
39 elaboration model.
40 * sem_ch7.adb (Analyze_Package_Declaration): Restore the behavior of
41 the legacy elaboration model.
42 * sem_ch8.adb (Attribute_Renaming): Restore the behavior of the legacy
43 elaboration model.
44 * sem_ch12.adb (Analyze_Instance_And_Renamings): Restore the behavior
45 of the legacy elaboration model.
46 (Analyze_Package_Instantiation): Restore the behavior of the legacy
47 elaboration model.
48 (Analyze_Subprogram_Instantiation): Restore the behavior of the legacy
49 elaboration model.
50 * sem_elab.adb: Update the documentation of the Processing phase.
51 Update the documentation on elaboration-related compilation
52 switches. Update the documentation on adding a new target. Add
53 Processing_Attributes which represent the state of the Processing
54 phase. Resurrect the previous elaboration model as "legacy elaboration
55 model".
56 (Build_Call_Marker): This routine does not function when the legacy
57 elaboration model is in effect. Do not consider entry calls and requeue
58 statements when debug flag d_e is in effect. Do not consider calls to
59 subprograms which verify the runtime semantics of certain assertion
60 pragmas when debug flag d_p is in effect.
61 (Build_Variable_Reference_Marker): This routine does not function when
62 the legacy elaboration model is in effect.
63 (Check_Elaboration_Scenarios): This routine does not function when the
64 legacy elaboration model is in effect.
65 (Ensure_Prior_Elaboration): The various flags have now been replaced
66 with a state. Do not generate implicit Elaborate[_All] pragmas when
67 their creation has been suppressed.
68 (Ensure_Prior_Elaboration_Static): The with clause is marked based on
69 the requested pragma, not on the nature of the scenario.
70 (In_External_Context): Removed.
71 (Is_Assertion_Pragma_Target): New routine.
72 (Is_Potential_Scenario): Stop the traversal of a task body when
73 reaching an accept or select statement, and debug switch d_a is in
74 effect.
75 (Kill_Elaboration_Scenario): This routine does not function when the
76 legacy elaboration model is in effect.
77 (Process_Activation_Generic): The various flags have now been replaced
78 with a state.
79 (Process_Conditional_ABE): The various flags have now been replaced
80 with a state.
81 (Process_Conditional_ABE_Access): The various flags have now been
82 replaced with a state.
83 (Process_Conditional_ABE_Activation_Impl): The various flags have now
84 been replaced with a state. Do not process an activation call which
85 activates a task whose type is defined in an external instance, and
86 debug switch dL is in effect. Suppress the generation of implicit
87 Elaborate[_All] pragmas once a conditional ABE check has been
88 installed.
89 (Process_Conditional_ABE_Call): The various flags have now been
90 replaced with a state. Do not process a call which invokes a subprogram
91 defined in an external instance, and debug switch dL is in effect.
92 (Process_Conditional_ABE_Call_Ada): The various flags have now been
93 replaced with a state. Suppress the generation of implicit
94 Elaborate[_All] pragmas once a conditional ABE check has been
95 installed.
96 (Process_Conditional_ABE_Call_SPARK): The various flags have now been
97 replaced with a state.
98 (Process_Conditional_ABE_Instantiation): The various flags have now
99 been replaced with a state.
100 (Process_Conditional_ABE_Instantiation_Ada): The various flags have now
101 been replaced with a state. Suppress the generation of implicit
102 Elaborate[_All] pragmas once a conditional ABE check has been
103 installed.
104 (Process_Conditional_ABE_Instantiation_SPARK): The various flags have
105 now been replaced with a state.
106 (Process_Guaranteed_ABE_Activation_Impl): The various flags have now
107 been replaced with a state.
108 (Process_Single_Activation): The various flags have now been replaced
109 with a state.
110 (Record_Elaboration_Scenario): This routine does not function when the
111 legacy elaboration model is in effect.
112 (Traverse_Body): The various flags have now been replaced with a state.
113 * sem_elab.ads: Resurrect the pre-18.x elaboration model as "legacy
114 elaboration model".
115 * sem_prag.adb (Analyze_Pragma): Restore the behavior of the legacy
116 elaboration model.
117 * sem_res.adb (Resolve_Call): Restore the behavior of the legacy
118 elaboration model.
119 (Resolve_Entity_Name): Restore the behavior of the legacy elaboration
120 model.
121 * sem_util.adb (Mark_Elaboration_Attributes): This routine does not
122 function when the legacy elaboration model is in effect.
123 * sinfo.adb (Is_Known_Guaranteed_ABE): Update the assertion check.
124 (No_Elaboration_Check): New routine.
125 (Set_Is_Known_Guaranteed_ABE): Update the assertion check.
126 (Set_No_Elaboration_Check): New routine.
127 * sinfo.ads: Update the documentation of flag Is_Known_Guaranteed_ABE
128 along with occurrences in nodes. Add new flag No_Elaboration_Check
129 along with occurrences in nodes.
130 * switch-c.adb (Scan_Front_End_Switches): Add processing for debug
131 switches with underscores. Add processing for switches -gnatH and
132 -gnatJ.
133 * usage.adb (Usage): Add output for switches -gnatH and -gnatJ.
134 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
135 documentation to include the legacy and relaxed elaboration models.
136 * gnat_ugn.texi: Regenerate.
137
138 2017-12-05 Arnaud Charlet <charlet@adacore.com>
139
140 * doc/gnat_ugn/platform_specific_information.rst: Minor edit.
141 Improve doc on required packages for linux 32bits.
142
143 2017-12-05 Doug Rupp <rupp@adacore.com>
144
145 * tracebak.c (ppc64-vx7): USE_GCC_UNWINDER for 64bit.
146
147 2017-12-05 Javier Miranda <miranda@adacore.com>
148
149 * checks.adb (Generate_Range_Check): Force evaluation of the node in
150 more cases. This patch was written to improve the code generated by
151 the CCG compiler but it is enabled for all targets since double
152 evaluation is always a potential source of inefficiency.
153
154 2017-12-05 Gary Dismukes <dismukes@adacore.com>
155
156 * doc/gnat_ugn/gnat_utility_programs.rst: Remove reference to obsolete
157 -fdump-xref switch.
158
159 2017-12-05 Eric Botcazou <ebotcazou@adacore.com>
160
161 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use the SLOC of the
162 iteration scheme throughout, except for the new loop statement(s).
163
164 2017-12-05 Ed Schonberg <schonberg@adacore.com>
165
166 * exp_aggr.adb (Gen_Assign): Do not analyze the expressionn of the
167 assignment if it is part of an Iterated_Component_Association: the
168 analysis needs to take place once the loop structure is analyzed and
169 the loop parameter made visible, because references to it typically
170 appear in the corresponding expression. This is necessary if the
171 expression is an aggregate, because previous pre-analysis of the
172 expression does not handle nested aggregates properly.
173
174 2017-12-05 Bob Duff <duff@adacore.com>
175
176 * sem_res.adb (Resolve_Allocator): Avoid coextension processing for an
177 allocator that is the expansion of a build-in-place function call.
178
179 2017-12-05 Olivier Hainque <hainque@adacore.com>
180
181 libgnat/
182 * s-trasym__dwarf.adb (spec of Module_Name.Get): Instead of
183 possibly adjusting the lookup address by a load address, expect
184 a extra argument through which the load address can be conveyed
185 separately.
186 (Multi_Module_Symbolic_Traceback): Adjust accordingly. Pass the
187 retrieved load address to Init_Module.
188 * s-tsmona__linux.adb (Get): Honor the new interface.
189 * s-tsmona__mingw.adb (Get): Likewise.
190 * s-dwalin.ads: Adjust comments to be explicit about which
191 addresses are from module info and which are run-time addresses,
192 offsetted by the module load address.
193 * s-dwalin.adb (Set_Load_Address): Simply set C.Load_Slide.
194 Do not alter the module Low and High (relative) addresses.
195 (Is_Inside): Improve documentation regarding the kinds of addresses
196 at hand and correct the test.
197 (Symbolic_Traceback): Use separate variables with explicit names
198 for the address in traceback (run-time value) and the address to
199 lookup within the shared object (module-relative). Adjust the
200 computation of address passed to Symbolic_Address for symbolization.
201
202 2017-12-05 Arnaud Charlet <charlet@adacore.com>
203
204 * opt.ads (Expand_Nonbinary_Modular_Ops): New flag.
205 * exp_ch4.adb (Expand_Nonbinary_Modular_Op): Use
206 Expand_Nonbinary_Modular_Ops instead of Modify_Tree_For_C, so that
207 other back-ends can also benefit from the front-end expansion. Remove
208 test for Modify_Tree_For_C in all callers to better share code.
209 * gnat1drv.adb (Adjust_Global_Switches): Set
210 Expand_Nonbinary_Modular_Ops when generating C code.
211
212 2017-12-05 Ed Schonberg <schonberg@adacore.com>
213
214 * exp_ch5.adb (Expand_Formal_Container_Loop): Ensure that the loop
215 parameter becomes invisible after analyzing the loop, which has been
216 rewritten as a while-loop.
217
218 2017-12-05 Doug Rupp <rupp@adacore.com>
219
220 * vxaddr2line.adb: Revise and enhance for new ports, remove dead ports,
221 and update for 64bit ports.
222
223 2017-12-05 Bob Duff <duff@adacore.com>
224
225 * exp_ch6.adb (Build_In_Place_Formal): Search for the formal by suffix
226 instead of the full name.
227 * sem_ch6.adb (Create_Extra_Formals): Make sure there are extra formals
228 in the case of an instance of a generic.
229
230 2017-12-05 Arnaud Charlet <charlet@adacore.com>
231
232 (Adjust_Global_Switches): Create an alias GNAT_Annotate to map to
233 pragma Annotate.
234
235 2017-12-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
236
237 * gcc-interface/Makefile.in (RTEMS): Define EH_MECHANISM.
238
239 2017-12-04 Sebastian Huber <sebastian.huber@embedded-brains.de>
240
241 * gcc-interface/Makefile.in (RTEMS): Use s-osprim__rtems.adb.
242 * libgnat/s-osprim__rtems.adb: New file.
243 * libgnarl/s-osinte__rtems.adb (pthread_cond_t): Fix alignment.
244 (pthread_mutexattr_t): Likewise.
245 (pthread_rwlockattr_t): Likewise.
246 (pthread_rwlock_t): Likewise.
247 (time_t): Use 64-bit integer.
248
249 2017-12-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
250
251 * libgnarl/s-osinte__rtems.ads (pthread_cond_t): Use correct size and
252 alignment.
253 (pthread_mutex_t): Likewise.
254 (pthread_rwlock_t): Likewise.
255
256 2017-11-28 Jakub Jelinek <jakub@redhat.com>
257
258 * gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR
259 using build2 instead of build3.
260
261 2017-11-23 Eric Botcazou <ebotcazou@adacore.com>
262
263 PR ada/83091
264 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not build a variant
265 type for the implementation type of a packed array.
266
267 2017-11-23 Mike Stump <mikestump@comcast.net>
268 Eric Botcazou <ebotcazou@adacore.com>
269
270 * gcc-interface/trans.c (gnat_gimplify_stmt) <LOOP_STMT>: Pass 3rd
271 operand to ANNOTATE_EXPR and also pass unrolling hints.
272
273 2017-11-20 Eric Botcazou <ebotcazou@adacore.com>
274
275 PR ada/83016
276 * gnatlink.adb (Process_Args): Accept multiple switches for --LINK.
277 (Usage): Adjust.
278 * gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES).
279 (common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in
280 the invocations of $(GNATLINK).
281 (../../gnatdll$(exeext)): Likewise.
282 (../../vxaddr2line$(exeext)): Likewise.
283 (gnatmake-re): Likewise.
284 (gnatlink-re): Likewise.
285
286 2017-11-16 Doug Rupp <rupp@adacore.com>
287
288 * gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
289
290 2017-11-16 Steve Baird <baird@adacore.com>
291
292 * debug.adb: Update another comment to indicate gnat2scil's use of the
293 -gnatd.7 switch.
294
295 2017-11-16 Bob Duff <duff@adacore.com>
296
297 * exp_ch6.adb (Expand_Call_Helper): Avoid creating a transient scope in
298 the case of nested build-in-place calls.
299
300 2017-11-16 Joel Brobecker <brobecker@adacore.com>
301
302 * doc/gnat_ugn/gnat_utility_programs.rst: Document the switches
303 available in gnatsymbolize.
304
305 2017-11-16 Steve Baird <baird@adacore.com>
306
307 * debug.adb: Update comment to indicate gnat2scil's use of the -gnatd.7
308 switch.
309
310 2017-11-16 Gary Dismukes <dismukes@adacore.com>
311
312 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, sem_ch6.adb,
313 sem_elab.adb: Minor editorial corrections.
314 * gnat_ugn.texi: Regenerate.
315
316 2017-11-16 Joel Brobecker <brobecker@adacore.com>
317
318 * doc/gnat_ugn/gnat_utility_programs.rst (GNAT UGN): Add
319 gnatsymbolize documentation.
320 * gnat_ugn.texi: Regenerate.
321
322 2017-11-16 Steve Baird <baird@adacore.com>
323
324 * sem_ch3.adb (Build_Derived_Record_Type): Replace all uses of
325 "Scope (Parent_Type)" with "Scope (Parent_Base)".
326
327 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
328
329 * opt.ads: Elaboration warnings are now on by default. Add a comment
330 explaining why this is needed.
331 * sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration
332 warnings.
333 * sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of
334 elaboration warnings.
335 (Analyze_Subprogram_Instantiation): Preserve the status of elaboration
336 warnings.
337 * sem_elab.adb: Update the structure of Call_Attributes and
338 Instantiation_Attributes.
339 (Build_Call_Marker): Propagate the status of elaboration warnings from
340 the call to the marker.
341 (Extract_Call_Attributes): Extract the status of elaboration warnings.
342 (Extract_Instantiation_Attributes): Extract the status of elaboration
343 warnings.
344 (Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are
345 now dependent on the status of elaboration warnings.
346 (Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now
347 dependent on the status of elaboration warnings.
348 (Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics
349 are now dependent on the status of elaboration warnings.
350 (Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced
351 for formal Call_Attrs. Elaboration diagnostics are now dependent on the
352 status of elaboration warnings.
353 (Process_Guaranteed_ABE_Call): Elaboration diagnostics are now
354 dependent on the status of elaboration warnings.
355 (Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now
356 dependent on the status of elaboration warnings.
357 * sem_prag.adb (Analyze_Pragma): Remove the unjustified warning
358 concerning pragma Elaborate.
359 * sem_res.adb (Resolve_Call): Preserve the status of elaboration
360 warnings.
361 (Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node
362 from the procedure call to the entry call.
363 * sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter
364 Warnings.
365 (Mark_Elaboration_Attributes_Node): Preserve the status of elaboration
366 warnings
367 * sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter
368 Warnings. Update the comment on usage.
369 * sinfo.adb (Is_Dispatching_Call): Update to use Flag6.
370 (Is_Elaboration_Warnings_OK_Node): New routine.
371 (Set_Is_Dispatching_Call): Update to use Flag6.
372 (Set_Is_Elaboration_Warnings_OK_Node): New routine.
373 * sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new
374 attribute Is_Elaboration_Warnings_OK_Node along with occurrences
375 in nodes.
376 (Is_Elaboration_Warnings_OK_Node): New routine along with pragma
377 Inline.
378 (Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma
379 Inline.
380 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various
381 sections to indicate how to suppress elaboration warnings. Document
382 switches -gnatwl and -gnatwL.
383 * gnat_ugn.texi: Regenerate.
384
385 2017-11-16 Sylvain Dailler <dailler@adacore.com>
386
387 * sem_util.adb (Get_Enum_Lit_From_Pos): Add a condition for Pos
388 lower than 0.
389
390 2017-11-16 Bob Duff <duff@adacore.com>
391
392 * sem_ch13.adb (Check_Expr_Constants): Avoid error message in case of
393 System'To_Address.
394
395 2017-11-16 Yannick Moy <moy@adacore.com>
396
397 * sem_elab.adb (Include): Fix mode of parameter Curr to out.
398
399 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
400
401 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Allow calls where
402 Context_Id denotes a record type.
403
404 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
405
406 * sem_ch8.adb (Check_SPARK_Primitive_Operation): Enable the check in
407 instantiations.
408
409 2017-11-16 Doug Rupp <rupp@adacore.com>
410
411 Initial gnat port to aarch64-wrs-vxworks7
412 * libgnarl/s-vxwork__aarch64.ads,
413 libgnat/system-vxworks7-aarch64-rtp-smp.ads,
414 libgnat/system-vxworks7-aarch64.ads: New files
415 * sigtramp-vxworks-target.inc (aarch64): New section.
416 * tracebak.c (USE_ARM_UNWINDING): Disable for ARMARCH8A.
417
418 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
419
420 * sem_elab.adb (Include): Including a node which is also a compilation
421 unit terminates the search because there are no more lists to examine.
422
423 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
424
425 * sem_ch8.adb (Analyze_Subprogram_Renaming): Ensure that a renaming
426 declaration does not define a primitive operation of a tagged type for
427 SPARK.
428 (Check_SPARK_Primitive_Operation): New routine.
429
430 2017-11-16 Arnaud Charlet <charlet@adacore.com>
431
432 * libgnat/a-elchha.adb (Last_Chance_Handler): Display Argv (0) in
433 message when using -E binder switch.
434
435 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
436
437 * errout.ads: Fix minor typo in comment.
438
439 2017-11-16 Ed Schonberg <schonberg@adacore.com>
440
441 * sem_ch3.adb (Process_Subtype): If the subtype indication does not
442 syntactically denote a type, return Any_Type to prevent subsequent
443 compiler crashes or infinite loops.
444
445 2017-11-16 Steve Baird <baird@adacore.com>
446
447 * lib-writ.adb: Fix bug which causes Program_Error to be raised in some
448 cases when writing out a .ali file when a Rename_Pragma pragma is in
449 effect.
450 * lib-writ.adb (Write_Unit_Information): Replace call to
451 Pragma_Name_Unmapped with call to Pragma_Name.
452
453 2017-11-16 Gary Dismukes <dismukes@adacore.com>
454
455 * sem_elab.adb: Minor typo fixes.
456
457 2017-11-16 Justin Squirek <squirek@adacore.com>
458
459 * sem_res.adb (Resolve_Allocator): Correct warning messages and make
460 them more explicit.
461
462 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
463
464 * atree.ads (Nkind_In): Add 10 and 11 parameter versions.
465 * checks.adb (Install_Primitive_Elaboration_Check): Mark the setting of
466 the elaboration flag as elaboration code.
467 * einfo.adb (Contract): Update the comments.
468 (Ignore_SPARK_Mode_Pragmas): Update the comments.
469 (SPARK_Aux_Pragma): Update the comments.
470 (SPARK_Aux_Pragma_Inherited): Update the comments.
471 (SPARK_Pragma): Update the comments. The attribute now applies
472 to all types and abstract states.
473 (SPARK_Pragma_Inherited): Update the comments. The attribute now
474 applies to all types and abstract states.
475 (Set_Contract): Update the comments.
476 (Set_Ignore_SPARK_Mode_Pragmas): Update the comments.
477 (Set_SPARK_Aux_Pragma): Update the comments.
478 (Set_SPARK_Aux_Pragma_Inherited): Update the comments.
479 (Set_SPARK_Pragma): Update the comments. The attribute now applies to
480 all types and abstract states.
481 (Set_SPARK_Pragma_Inherited): Update the comments. The attribute now
482 applies to all types and abstract states.
483 (Write_Field40_Name): Add output for SPARK_Pragma when it appears on a
484 type and abstract states.
485 * einfo.ads: Update the documentation of attributes SPARK_Pragma and
486 SPARK_Pragma_Inherited. Both of them now apply to all types and
487 abstract states.
488 * exp_util.adb (Set_Elaboration_Flag): Mark the setting of the
489 elaboration flag as elaboration code.
490 * sem_ch3.adb: Add with and use clauses for Sem_Elab.
491 (Analyze_Full_Type_Declaration): Set the SPARK_Mode of the type. Record
492 a derived type for later processing by the ABE mechanism.
493 (Analyze_Incomplete_Type_Decl): Set the SPARK_Mode of the type.
494 (Analyze_Private_Extension_Declaration): Set the SPARK_Mode of the
495 type.
496 * sem_ch7.adb (Analyze_Private_Type_Declaration): Set the SPARK_Mode of
497 the type.
498 * sem_elab.adb: Define the term "early call region". Update the
499 terminology for "scenario" and "target". Update the architecture of
500 the ABE mechanism. Update the steps which must be taken when adding a
501 new scenario. Update the section on debugging ABE issues. Add new
502 hash tables Early_Call_Regions and Recorded_SPARK_Scenarios. Add new
503 table SPARK_Scenarios. Hash table Elaboration_Context is now
504 Elaboration_Statuses. The majority of Process_xxx routines have been
505 updated to better reflect their role.
506 (Add_Unit): Reimplemented.
507 (Check_Elaboration_Constituent): New routine.
508 (Check_Elaboration_Scenarios): Verify previously recorded scenarios for
509 conditional ABE issues. Verify previously recorded SPARK scenarios.
510 (Check_SPARK_Derived_Type): New routine.
511 (Check_SPARK_Instantiation): New routine.
512 (Check_SPARK_Scenario): New routine.
513 (Check_SPARK_Refined_State_Pragma): New routine.
514 (Early_Call_Region): New routine.
515 (Elaboration_Status): New routine.
516 (Ensure_Prior_Elaboration): Add new formal parameter Prag_Nam. The
517 implicit Elabotate[_All] pragma is now specified via Prag_Nam.
518 (Find_Early_Call_Region): New routine.
519 (Info_Scenario): Add output for refinement constituents.
520 (Is_Recorded_SPARK_Scenario): New routine.
521 (Is_Suitable_SPARK_Derived_Type): New routine.
522 (Is_Suitable_SPARK_Instantiation): New routine.
523 (Is_Suitable_SPARK_Refined_State_Pragma): New routine.
524 (Is_Visited_Body): New routine.
525 (Kill_Elaboration_Scenario): Reimplemented.
526 (Output_Active_Scenarios): Add output for pragma Refined_State.
527 (Output_SPARK_Refined_State_Pragma): New routine.
528 (Process_Conditional_ABE_Call): Remove the use of -gnatd.v. The effect
529 is now achieved by different means.
530 (Process_Conditional_ABE_Call_SPARK): Verify that a call which precedes
531 the subprogram body appears within the early call region of the body.
532 Either ensure the prior elaboration of external subprograms or verify
533 that the context meets the suitable elaboration requirement.
534 (Process_Conditional_ABE_Instantiation_SPARK): New routine.
535 (Record_Elaboration_Scenario): Reimplement the portion which enforces
536 the level restrictions of the static model. Add support for SPARK
537 scenarios.
538 (Record_SPARK_Elaboration_Scenario): New routine.
539 (Reset_Visited_Bodies): New routine.
540 (Set_Early_Call_Region): New routine.
541 (Set_Elaboration_Status): New routine.
542 (Set_Is_Recorded_SPARK_Scenario): New routine.
543 (Update_Elaboration_Scenario): Reimplemented.
544 * sem_elab.ads: Add new subtype Library_Or_Instantiation_Level.
545 * sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Save the pragma
546 for examination by the ABE Processing phase.
547 (Create_Abstract_State): Save the SPARK_Mode from the context.
548 * sem_util.adb (Is_Non_Preelaborable_Construct): New routine.
549 * sem_util.ads (Is_Non_Preelaborable_Construct): New routine.
550 * sinfo.adb (Is_Elaboration_Code): New routine.
551 (Set_Is_Elaboration_Code): New routine.
552 (Nkind_In): Add 10 and 11 parameter versions.
553 * sinfo.ads: Add new attribute Is_Elaboration_Code along with
554 occurrences in nodes.
555 (Is_Elaboration_Code): New routine along with pragma Inline.
556 (Set_Is_Elaboration_Code): New routine along with pragma Inline.
557 (Nkind_In): Add 10 and 11 parameter versions.
558
559 2017-11-16 Justin Squirek <squirek@adacore.com>
560
561 * sem.adb (Analyze): Remove requirement that the original node of N be
562 an operator in the case that analysis on the node yields the relevant
563 operator - so prefer it instead.
564
565 2017-11-16 Bob Duff <duff@adacore.com>
566
567 * sem_ch6.adb (Create_Extra_Formals): The type of the BIP_Object_Access
568 formal must not have a designated type that is the full view coming
569 from a limited-with'ed package.
570 * sem_util.adb,sem_util.ads (Incomplete_View_From_Limited_With): New
571 function called from sem_ch6.
572 * sem_ch5.adb (Analyze_Assignment): Treat user-defined concatenation
573 specially for b-i-p cases.
574
575 2017-11-10 Martin Sebor <msebor@redhat.com>
576
577 PR c/81117
578 * adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
579 * argv.c (__gnat_fill_arg, __gnat_fill_env): Likewise.
580
581 2017-11-10 Eric Botcazou <ebotcazou@adacore.com>
582
583 * gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
584 not fall through to the next case.
585 <ARRAY_TYPE>: Deal specially with a dereference from another array
586 type with the same element type.
587
588 2017-11-09 Gary Dismukes <dismukes@adacore.com>
589
590 * exp_util.adb, freeze.adb: Minor reformatting.
591
592 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
593
594 * gcc-interface/Makefile.in: Add rules to build aarch64-qnx runtimes.
595
596 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
597
598 * gcc-interface/trans.c (gnat_to_gnu): Add processing for
599 N_Variable_Reference_Marker nodes.
600
601 2017-11-09 Ed Schonberg <schonberg@adacore.com>
602
603 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
604 the pragma Compile_Time_Error when it appears in a generic package
605 declaration and uses an expanded name to denote the current unit.
606
607 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
608
609 * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
610 * tracebak.c: Add support for tracebacks in QNX.
611
612 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
613
614 * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
615
616 2017-11-09 Yannick Moy <moy@adacore.com>
617
618 * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
619 justification.
620
621 2017-11-09 Joel Brobecker <brobecker@adacore.com>
622
623 * doc/gnat_ugn/platform_specific_information.rst: Document packages
624 needed on GNU/Linux by GNAT.
625 * gnat_ugn.texi: Regenerate.
626
627 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
628
629 * contracts.adb (Analyze_Contracts): Remove the three parameter
630 version. This routine now only analyzes contracts and does not perform
631 any freezing actions.
632 (Analyze_Previous_Contracts): Removed.
633 (Freeze_Previous_Contracts): New routine.
634 * contracts.ads (Analyze_Previous_Contracts): Removed.
635 (Freeze_Previous_Contracts): New routine.
636 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
637 enclosing package spec regardless of whether the list denotes the
638 visible or private declarations. Fix the removal of partial state
639 refinements when the context is a package spec.
640 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
641 contracts.
642 * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
643 * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
644 (Analyze_Protected_Body): Freeze previous contracts.
645 (Analyze_Task_Body): Freeze previous contracts.
646 * sem_prag.adb: Comment reformatting.
647
648 2017-11-09 Bob Duff <duff@adacore.com>
649
650 * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
651 Export this so users can use it without importing
652 System.Tasking.Utilities.
653 * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
654 that fails when Make_Independent is called on a user task.
655 * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
656 capitalization style ((style) bad casing of "Master_of_Task").
657
658 2017-11-09 Ed Schonberg <schonberg@adacore.com>
659
660 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
661 uninitialized variable uncovered by Codepeer.
662
663 2017-11-09 Arnaud Charlet <charlet@adacore.com>
664
665 * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
666
667 2017-11-09 Javier Miranda <miranda@adacore.com>
668
669 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
670 (Static_Dispatch_Tables): Minor rewording.
671 * gnat_rm.texi: Regenerate.
672
673 2017-11-09 Justin Squirek <squirek@adacore.com>
674
675 * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
676 use_clauses within instances.
677 (Use_One_Package): Add condition to check for "hidden" open scopes to
678 avoid skipping over packages that have not been properly installed even
679 though they are visible.
680
681 2017-11-09 Ed Schonberg <schonberg@adacore.com>
682
683 * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
684 private operation of a protected type, when the type has no visible
685 operations.
686
687 2017-11-09 Javier Miranda <miranda@adacore.com>
688
689 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
690 * exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
691 if available.
692
693 2017-11-09 Bob Duff <duff@adacore.com>
694
695 * exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
696 sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
697 sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
698 variables.
699
700 2017-11-09 Yannick Moy <moy@adacore.com>
701
702 * exp_disp.adb (Make_DT): Default initialize Ifaces_List and
703 Ifaces_Comp_List.
704
705 2017-11-09 Pascal Obry <obry@adacore.com>
706
707 * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
708 only for foreign threads. We initialize the thread handle only if not
709 yet initialized. This happens in Enter_Task for foreign threads only.
710 But for native threads (Ada tasking) we do want to keep the real
711 handle (from Create_Task) to be able to free the corresponding
712 resources in Finalize_TCB (CloseHandle).
713
714 2017-11-09 Yannick Moy <moy@adacore.com>
715
716 * sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
717 P_Base_Type.
718 (Error_Attr_P): Fix name in pragma No_Return.
719 (Unexpected_Argument): Add pragma No_Return.
720 (Placement_Error): Add pragma No_Return.
721
722 2017-11-09 Javier Miranda <miranda@adacore.com>
723
724 * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
725 dispatch table is statically built.
726 (Make_DT): Declare constant the Interface_Table object associated with
727 an statically built dispatch table. For this purpose the Offset_To_Top
728 value of each interface is computed using the dummy object.
729 * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
730 the Offset_To_Top field of secondary dispatch tables when the dispatch
731 table is statically built.
732 (Initialize_Tag): Do not generate calls to Register_Interface_Offset
733 when the dispatch table is statically built.
734 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
735 Document the new GNAT restriction Static_Dispatch_Tables.
736 * gnat_rm.texi: Regenerate.
737
738 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
739
740 * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
741 to avoid a dormant bug.
742
743 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
744
745 * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
746 as such capability is not available on the OS.
747 * link.c: Make sure linker options for QNX are correct.
748 * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
749 * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
750 in particular a workaround with locks priority ceiling where a higher
751 priority task is allowed to lock a lower ceiling priority lock. This
752 also fixes the scheduling of FIFO tasks when the priority of a task is
753 lowered.
754 * libgnat/system-qnx-aarch64.ads: Fix priority ranges.
755
756 2017-11-09 Yannick Moy <moy@adacore.com>
757
758 * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
759 message.
760 * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
761 condition.
762 * namet.adb (Copy_One_Character): Add assumption for static analysis,
763 as knowledge that Hex(2) is in the range 0..255 is too complex for
764 CodePeer.
765 (Finalize): Add assumption for static analysis, as the fact that there
766 are symbols in the table depends on a global invariant at this point in
767 the program.
768 * set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
769 * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
770 true.
771
772 2017-11-09 Javier Miranda <miranda@adacore.com>
773
774 * libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
775 * exp_disp.adb (Building_Static_DT): Check restriction.
776 (Building_Static_Secondary_DT): Check restriction.
777 (Make_DT): Initialize the HT_Link to No_Tag.
778 * opt.ads (Static_Dispatch_Tables): Rename flag...
779 (Building_Static_Dispatch_Tables): ... into this. This will avoid
780 conflict with the restriction name.
781 * gnat1drv.adb: Update.
782 * exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
783 * exp_ch3.adb (Expand_N_Object_Declaration): Update.
784
785 2017-11-09 Pascal Obry <obry@adacore.com>
786
787 * libgnarl/s-taprop__mingw.adb: Minor code clean-up. Better using a
788 named number.
789
790 2017-11-09 Yannick Moy <moy@adacore.com>
791
792 * binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
793 * checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
794 use. Default initialize Hi, Lo.
795 (Selected_Range_Checks): Retype Num_Checks more precisely.
796 (Determine_Range, Determine_Range_R): Default initialize Hi_Right,
797 Lo_Right.
798 * contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
799 Unmodified.
800 (Process_Postconditions): Mark parameter Stmts as Unmodified.
801 * exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
802 * exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
803 (Expand_Concatenate): Default initialize High_Bound.
804 (Optimize_Length_Comparison): Default initialize Ent, Index.
805 * exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
806 L_Lo.
807 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
808 Return_Stmt.
809 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
810 remove pragma Warnings(Off).
811 * exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
812 * exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
813 * freeze.adb (Check_Component_Storage_Order): Default initialize
814 Comp_Byte_Aligned rather than silencing messages with pragma
815 Warnings(Off), which does not work for CodePeer initialization
816 messages, and given that here the possible read of an unitialized value
817 depends on a proper use of parameters by the caller.
818 * inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
819 * sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
820 * sem_ch3.adb (Build_Derived_Array_Type): Default initialize
821 Implicit_Base.
822 * sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
823 pragma Warnings(Off).
824 (Analyze_Case_Expression): Rescope checking block within branch where
825 Others_Present is set by the call to Check_Choices.
826 * sem_ch5.adb (Analyze_Assignment): Default initialize
827 Save_Full_Analysis.
828 * sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
829 and restructure code to defend against previous errors, so that, in
830 that case, control does not flow to the elsif condition which read an
831 uninitialized Obj_Decl.
832 * sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
833 (Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
834 which seem to be left uninitialized and possibly read in some cases.
835 * sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
836 precisely. This requires to exchange the test for exiting in case of
837 too many positions and the increment to Position, inside the loop.
838 * sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
839 which cannot be read uninitialized, but the reasons for that are quite
840 subtle.
841 * sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
842 * sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
843 Spec_Id.
844 * sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
845 and test for presence of non-null Opnd_Type before testing its scope,
846 in a test which would read its value uninitialized, and is very rarely
847 exercized (it depends on the presence of an extension of System).
848 * sem_spark.ads: Update comment to fix name of main analysis procedure.
849 * sem_warn.adb (Warn_On_Known_Condition): Default initialize
850 Test_Result.
851 * set_targ.adb (FailN): Mark procedure with No_Return.
852 * stylesw.adb (Save_Style_Check_Options): Delete useless code to
853 initialize all array Options to white space, as there is already code
854 doing the same for the remaining positions in Options at the end of the
855 procedure.
856
857 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
858
859 * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
860 generic instantiations either.
861
862 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
863
864 * sem_prag.adb (Analyze_Part_Of): Reword error message.
865 (Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
866 SPARK_Mode appears with an illegal mode, treat this as a non-existent
867 mode.
868
869 2017-11-09 Ed Schonberg <schonberg@adacore.com>
870
871 * sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
872 a limited view of a type T declared in unit U1, when the function is
873 declared in another unit U2 and the call appears in a procedure within
874 another unit.
875
876 2017-11-09 Justin Squirek <squirek@adacore.com>
877
878 * sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
879 when processing generic instances.
880
881 2017-11-09 Bob Duff <duff@adacore.com>
882
883 * namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
884 Error_Name and No_Name. Use this (versus Name_Id) to indicate which
885 objects can have those special values. Valid_Name_Id could usefully be
886 used all over the compiler front end, but that's too much trouble for
887 now. If we did that, we might want to rename:
888 Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
889 For parameters of type Valid_Name_Id, remove some redundant tests,
890 including the ones found by CodePeer. Use Is_Valid_Name instead of
891 membership test when appropriate.
892 (Error_Name_Or_No_Name): Delete this; it's no longer needed.
893 * sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
894 "in Error_Name_Or_No_Name".
895 (Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
896 Error_Name_Or_No_Name".
897
898 2017-11-09 Arnaud Charlet <charlet@adacore.com>
899
900 * gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
901 mode here unless -gnateC is specified.
902 * switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
903 -gnatC here.
904
905 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
906
907 * lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
908 part of the ALI writing; they are now processed directly from memory
909 when requested by the backend.
910 * lib-xref.ads (Collect_SPARK_Xrefs): Remove.
911 (Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
912 * lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
913 (Add_SPARK_File): Remove.
914 (Add_SPARK_Xref): Refactored from removed code; filters xref entries
915 that are trivially uninteresting to the SPARK backend.
916 * spark_xrefs.ads: Remove code that is no longer needed.
917 * spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
918
919 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
920
921 * sem_elab.adb: Update the documentation on adding a new elaboration
922 schenario. Add new hash table Recorded_Top_Level_Scenarios.
923 (Is_Check_Emitting_Scenario): Removed.
924 (Is_Recorded_Top_Level_Scenario): New routine.
925 (Kill_Elaboration_Scenario): Reimplemented.
926 (Record_Elaboration_Scenario): Mark the scenario as recorded.
927 (Set_Is_Recorded_Top_Level_Scenario): New routine.
928 (Update_Elaboration_Scenario): Reimplemented.
929 * sinfo.adb (Is_Recorded_Scenario): Removed.
930 (Set_Is_Recorded_Scenario): Removed.
931 * sinfo.ads: Remove attribute Is_Recorded_Scenario along with
932 occurrences in nodes.
933 (Is_Recorded_Scenario): Removed along with pragma Inline.
934 (Set_Is_Recorded_Scenario): Removed along with pragma Inline.
935
936 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
937
938 * sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
939 error message.
940
941 2017-11-09 Justin Squirek <squirek@adacore.com>
942
943 * sem_res.adb (Resolve_Allocator): Add warning messages corresponding
944 to the allocation of an anonymous access-to-controlled object.
945
946 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
947
948 * sigtramp-qnx.c: Fix obvious typo.
949
950 2017-11-09 Doug Rupp <rupp@adacore.com>
951
952 * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
953
954 2017-11-09 Ed Schonberg <schonberg@adacore.com>
955
956 * sem_res.adb (Resolve): If expression is an entity whose type has
957 implicit dereference, generate reference to it, because no reference is
958 generated for an overloaded entity during analysis, given that its
959 identity may not be known.
960
961 2017-11-09 Javier Miranda <miranda@adacore.com>
962
963 * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
964 offset-to-top field by addition.
965 (Make_Secondary_DT): Initialize the offset-to-top field with a negative
966 offset.
967 * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
968 return a negative offset-to-top value.
969 (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
970 Set_Static_Offset_To_Top passing a negative offet-to-top value;
971 initialize also the offset-to-top field with a negative offset.
972 * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
973 an addition since the offset-to-top field is now a negative value.
974 (Displace): Displace the pointer to the object means of a substraction
975 since it is now a negative value.
976 (Set_Dynamic_Offset_to_top): Displace the pointer to the object by
977 means of a substraction since it is now a negative value.
978
979 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
980
981 * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
982 before Errout.Output_Messages also in the case of compilation errors.
983
984 2017-11-09 Javier Miranda <miranda@adacore.com>
985
986 * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
987 the Class Level): Fix error interfacing with C strings.
988 * gnat_ugn.texi: Regenerate.
989
990 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
991
992 * system-qnx-aarch64.ads: Fix the priority constants.
993 * s-osinte__qnx.ads: Fix constants for handling the locking protocols
994 and scheduling.
995 * s-osinte__qnx.adb: New file , prevents the use of priority 0 that
996 corresponds to an idle priority on QNX.
997
998 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
999
1000 * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
1001 comments.
1002
1003 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1004
1005 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
1006 in expression funtions that are expanded into variables.
1007
1008 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1009
1010 * sem_util.adb: Minor whitespace cleanup.
1011
1012 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1013
1014 * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
1015 s-taprop version rather than a custom one.
1016 * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
1017
1018 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1019
1020 * lib-xref.ads, lib-xref-spark_specific.adb
1021 (Traverse_Compilation_Unit): Move declaration to package body.
1022
1023 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1024
1025 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
1026 the type of the renaming from its defining entity, rather then the
1027 subtype mark as there may not be a subtype mark.
1028
1029 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1030
1031 * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
1032 libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
1033 libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
1034 libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
1035 terminals.c: Initial port of GNAT for aarch64-qnx
1036
1037 2017-11-08 Elisa Barboni <barboni@adacore.com>
1038
1039 * exp_util.adb (Find_DIC_Type): Move...
1040 * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
1041
1042 2017-11-08 Justin Squirek <squirek@adacore.com>
1043
1044 * sem_res.adb (Resolve_Allocator): Add info messages corresponding to
1045 the owner and corresponding coextension.
1046
1047 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1048
1049 * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
1050 following separate procedures.
1051 (Resolve_Delta_Array_Aggregate): Previous code form
1052 Resolve_Delta_Aggregate.
1053 (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
1054 ARG decisions on the legality rules for delta aggregates for records:
1055 in the case of a variant record, components from different variants
1056 cannot be specified in the delta aggregate, and this must be checked
1057 statically.
1058
1059 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1060
1061 * spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
1062 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1063 removed component.
1064
1065 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1066
1067 * sem_ch4.adb: Minor typo fix.
1068
1069 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1070
1071 * spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
1072 Spec_Scope_Num components.
1073 * spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
1074 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1075 removed components.
1076 (Collect_SPARK_Xrefs): Skip setting proper values of removed
1077 components.
1078
1079 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1080
1081 * exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
1082 name is a discriminant in check for unconditional accessibility
1083 violation within instances.
1084
1085 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1086
1087 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
1088 for constants (with variable input).
1089 (Is_Constant_Object_Without_Variable_Input): Remove.
1090
1091 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1092
1093 * exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
1094
1095 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1096
1097 * spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
1098 cross-references.
1099 (dspark): Remove hardcoded table bound.
1100
1101 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1102
1103 * sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
1104 the type of the base of the construct to determine the type (or
1105 candidate interpretations) of the delta aggregate. This allows the
1106 construct to appear in a context that expects a private extension.
1107 * sem_res.adb (Resolve): Handle properly a delta aggregate with an
1108 overloaded base.
1109
1110 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1111
1112 * spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
1113 with Entity_Id of the reference.
1114 * spark_xrefs.adb (dspark): Adapt pretty-printing routine.
1115 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
1116 reference, not the file and scope indices.
1117
1118 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1119
1120 * errout.ads (Current_Node): New.
1121 * errout.adb (Error_Msg): Use Current_Node.
1122 * par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
1123 when relevant.
1124 * style.adb: Call Error_Msg_N when possible.
1125
1126 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1127
1128 * spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
1129 Entity.
1130 * lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
1131 the Scope_Id record component.
1132
1133 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1134
1135 * spark_xrefs.ads (SPARK_File_Record): Remove string components.
1136 * spark_xrefs.adb (dspark): Remove pretty-printing of removed
1137 SPARK_File_Record components.
1138 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
1139 representation of files/units.
1140
1141 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1142
1143 * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
1144 Remove Inside_Stubs parameter.
1145
1146 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1147
1148 * spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
1149 represented by Entity_Id.
1150 (SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
1151 represented by Entity_Id; this information is not repeated as
1152 Scope_Entity.
1153 (Heap): Moved from lib-xref-spark_specific.adb, to reside next to
1154 Name_Of_Heap_Variable.
1155 * spark_xrefs.adb (dspark): Adapt debug routine to above changes in
1156 data types.
1157 * lib-xref-spark_specific.adb: Adapt routines for populating SPARK
1158 scope and xrefs tables to above changes in data types.
1159
1160 2017-11-08 Justin Squirek <squirek@adacore.com>
1161
1162 * sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
1163 primitives of generic actuals.
1164 (Mark_Use_Type): Add recursive call to properly mark class-wide type's
1165 base type clauses as per ARM 8.4 (8.2/3).
1166
1167 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1168
1169 * sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
1170 categorization dependency of the body, as is done for non-generic
1171 units.
1172 (New_Overloaded_Entity, Visible_Part_Type): Remove linear search
1173 through declarations (Simple optimization, no behavior change).
1174
1175 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1176
1177 * spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
1178 (SPARK_Scope_Record): Remove inessential components.
1179 * spark_xrefs.adb (dspark): Remove pretty-printing of removed record
1180 components.
1181 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
1182 removed record components.
1183 (Add_SPARK_Xrefs): Remove setting of removed record components.
1184
1185 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1186
1187 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
1188 empty entities.
1189
1190 2017-11-08 Javier Miranda <miranda@adacore.com>
1191
1192 * sem_disp.adb (Is_Inherited_Public_Operation): Extend the
1193 functionality of this routine to handle multiple levels of derivations.
1194
1195 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1196
1197 * einfo.adb: Elist36 is now used as Nested_Scenarios.
1198 (Nested_Scenarios): New routine.
1199 (Set_Nested_Scenarios): New routine.
1200 (Write_Field36_Name): New routine.
1201 * einfo.ads: Add new attribute Nested_Scenarios along with occurrences
1202 in entities.
1203 (Nested_Scenarios): New routine along with pragma Inline.
1204 (Set_Nested_Scenarios): New routine along with pragma Inline.
1205 * sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
1206 (Process_Nested_Scenarios): New routine.
1207 (Traverse_Body): When a subprogram body is traversed for the first
1208 time, find, save, and process all suitable scenarios found within.
1209 Subsequent traversals of the same subprogram body utilize the saved
1210 scenarios.
1211
1212 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1213
1214 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
1215 protected operations.
1216 (Add_SPARK_Xrefs): Simplify detection of empty entities.
1217 * get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
1218 put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
1219 reading and testing SPARK cross-references stored in the ALI files.
1220 * lib-xref.ads (Output_SPARK_Xrefs): Remove.
1221 * lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
1222 ALI file.
1223 * spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
1224 with description of the SPARK xrefs ALI format.
1225 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
1226 and put_spark_refs.o.
1227
1228 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1229
1230 * exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
1231 when the associated access type is subject to pragma
1232 No_Heap_Finalization.
1233 * exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
1234 designated type in case it comes from a limited withed unit.
1235
1236 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1237
1238 * exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
1239 SPARK-related flags. Add ??? comment.
1240 * exp_util.adb (Insert_Actions): Add an entry for node
1241 N_Variable_Reference_Marker.
1242 * sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
1243 * sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
1244 and record a variable reference marker for the current name.
1245 (Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
1246 a variable reference marker for the current name.
1247 * sem_elab.adb (Build_Variable_Reference_Marker): New routine.
1248 (Extract_Variable_Reference_Attributes): Reimplemented.
1249 (Info_Scenario): Add output for variable references and remove output
1250 for variable reads.
1251 (Info_Variable_Read): Removed.
1252 (Info_Variable_Reference): New routine.
1253 (Is_Suitable_Scenario): Variable references are now suitable scenarios
1254 while variable reads are not.
1255 (Output_Active_Scenarios): Add output for variable references and
1256 remove output for variable reads.
1257 (Output_Variable_Read): Removed.
1258 (Output_Variable_Reference): New routine.
1259 (Process_Variable_Read): Removed.
1260 (Process_Variable_Reference): New routine.
1261 (Process_Variable_Reference_Read): New routine.
1262 * sem_elab.ads (Build_Variable_Reference_Marker): New routine.
1263 * sem_res.adb (Resolve_Actuals): Build and record a variable reference
1264 marker for the current actual.
1265 * sem_spark.adb (Check_Node): Add an entry for node
1266 N_Variable_Reference_Marker.
1267 * sem_util.adb (Within_Subprogram_Call): Moved to the library level.
1268 * sem_util.ads (Within_Subprogram_Call): Moved to the library level.
1269 * sinfo.adb (Is_Read): New routine.
1270 (Is_Write): New routine.
1271 (Target): Updated to handle variable reference markers.
1272 (Set_Is_Read): New routine.
1273 (Set_Is_Write): New routine.
1274 (Set_Target): Updated to handle variable reference markers.
1275 * sinfo.ads: Add new attributes Is_Read and Is_Write along with
1276 occurrences in nodes. Update attribute Target. Add new node
1277 kind N_Variable_Reference_Marker.
1278 (Is_Read): New routine along with pragma Inline.
1279 (Is_Write): New routine along with pragma Inline.
1280 (Set_Is_Read): New routine along with pragma Inline.
1281 (Set_Is_Write): New routine along with pragma Inline.
1282 * sprint.adb (Sprint_Node_Actual): Add an entry for node
1283 N_Variable_Reference_Marker.
1284
1285 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1286
1287 * sem_util.adb (Subprogram_Name): Append suffix for overloaded
1288 subprograms.
1289
1290 2017-11-08 Yannick Moy <moy@adacore.com>
1291
1292 * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
1293 about unused use-type or use-package clauses inside inlined bodies.
1294
1295 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1296
1297 * sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
1298 In_Partial_Fin along with a comment on its usage. Do not guarantee the
1299 prior elaboration of a unit when the need came from a partial
1300 finalization context.
1301 (In_Initialization_Context): Relocated to Process_Call.
1302 (Is_Partial_Finalization_Proc): New routine.
1303 (Process_Access): Add new parameter In_Partial_Fin along with a comment
1304 on its usage.
1305 (Process_Activation_Call): Add new parameter In_Partial_Fin along with
1306 a comment on its usage.
1307 (Process_Activation_Conditional_ABE_Impl): Add new parameter
1308 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1309 diagnostics when the activation occurs in a partial finalization
1310 context.
1311 (Process_Activation_Guaranteed_ABE_Impl): Add new parameter
1312 In_Partial_Fin along with a comment on its usage.
1313 (Process_Call): Add new parameter In_Partial_Fin along with a comment
1314 on its usage. A call is within a partial finalization context when it
1315 targets a finalizer or primitive [Deep_]Finalize, and the call appears
1316 in initialization actions. Pass this information down to the recursive
1317 steps of the Processing phase.
1318 (Process_Call_Ada): Add new parameter In_Partial_Fin along with a
1319 comment on its usage. Remove the guard which suppresses the generation
1320 of implicit Elaborate[_All] pragmas. This is now done in
1321 Ensure_Prior_Elaboration.
1322 (Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
1323 with a comment on its usage. Do not emit any ABE diagnostics when the
1324 call occurs in a partial finalization context.
1325 (Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
1326 comment on its usage.
1327 (Process_Instantiation): Add new parameter In_Partial_Fin along with a
1328 comment on its usage.
1329 (Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
1330 with a comment on its usage.
1331 (Process_Instantiation_Conditional_ABE): Add new parameter
1332 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1333 diagnostics when the instantiation occurs in a partial finalization
1334 context.
1335 (Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
1336 with a comment on its usage.
1337 (Process_Scenario): Add new parameter In_Partial_Fin along with a
1338 comment on its usage.
1339 (Process_Single_Activation): Add new parameter In_Partial_Fin along
1340 with a comment on its usage.
1341 (Traverse_Body): Add new parameter In_Partial_Fin along with a comment
1342 on its usage.
1343
1344 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1345
1346 * sem_ch13.adb: Add optional parameter to Error_Msg.
1347
1348 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1349
1350 * fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
1351 for the Interfaces.* hierarchy as longer unit names are now allowed.
1352
1353 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1354
1355 * sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
1356 subprogram as well. Support more cases of entities.
1357 (Append_Entity_Name): Add some defensive code.
1358
1359 2017-11-06 Eric Botcazou <ebotcazou@adacore.com>
1360
1361 * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
1362
1363 2017-10-31 Eric Botcazou <ebotcazou@adacore.com>
1364
1365 PR ada/82785
1366 * gcc-interface/Makefile.in (m68k/Linux): Fix typo.
1367
1368 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1369
1370 * gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
1371
1372 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1373
1374 * gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
1375 (convert): Do not use an unchecked conversion for converting from a
1376 type to another type padding it.
1377
1378 2017-10-20 Doug Rupp <rupp@adacore.com>
1379
1380 * libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
1381 needed for using monotonic clock.
1382 * libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
1383 changes.
1384 * libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
1385 out monotonic clock related functions body.
1386 (Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
1387 Compute_Deadline): Move to...
1388 * libgnarl/s-tpopmo.adb: ... here. New separate package body.
1389
1390 2017-10-20 Ed Schonberg <schonberg@adacore.com>
1391
1392 * sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
1393 case where the controlling formal is an anonymous access to interface
1394 type.
1395 * exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
1396 access type, handle properly the the constructed dereference that
1397 designates the object used in the rewritten synchronized call.
1398 (Parameter_Block_Pack): If the type of the actual is by-copy, its
1399 generated declaration in the parameter block does not need an
1400 initialization even if the type is a null-excluding access type,
1401 because it will be initialized with the value of the actual later on.
1402 (Parameter_Block_Pack): Do not add controlling actual to parameter
1403 block when its type is by-copy.
1404
1405 2017-10-20 Justin Squirek <squirek@adacore.com>
1406
1407 * sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
1408 scope stack traversal into the context clause.
1409
1410 2017-10-20 Bob Duff <duff@adacore.com>
1411
1412 * sinfo.ads: Fix a comment typo.
1413
1414 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1415
1416 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
1417 warning against usage in conjunction with -gnatn.
1418 (-fdump-xref): Delete entry.
1419 * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
1420 -fdump-xref switch.
1421 * gnat_ugn.texi: Regenerate.
1422
1423 2017-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1424
1425 * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
1426 Minor reformatting.
1427
1428 2017-10-20 Yannick Moy <moy@adacore.com>
1429
1430 * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
1431 compare a dimensioned expression with a literal.
1432 (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
1433 special value zero.
1434 * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
1435 dimensionality system in GNAT.
1436 * gnat_ugn.texi: Regenerate.
1437
1438 2017-10-20 Yannick Moy <moy@adacore.com>
1439
1440 * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
1441 inadequate silencing of errors.
1442 * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
1443 checking the subprogram body generated from an expression function,
1444 when this is done as part of the preanalysis done on expression
1445 functions, as the subprogram body may not yet be attached in the AST.
1446 The error if any will be issued later during the analysis of the body.
1447 (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
1448
1449 2017-10-20 Arnaud Charlet <charlet@adacore.com>
1450
1451 * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
1452 warning on ineffective use clause.
1453
1454 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1455
1456 * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
1457 * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
1458 to issue the warning on the absence of local raise.
1459 (Possible_Local_Raise): Do not issue the warning for Call_Markers.
1460 (Warn_If_No_Local_Raise): New procedure to issue the warning on the
1461 absence of local raise.
1462 * sem_elab.adb: Add with and use clauses for Exp_Ch11.
1463 (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
1464 where a scenario could give rise to raising Program_Error.
1465 * sem_elab.adb: Typo fixes.
1466 * fe.h (Warn_If_No_Local_Raise): Declare.
1467 * gcc-interface/gigi.h (get_exception_label): Change return type.
1468 * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
1469 simple vector of Entity_Id.
1470 (gnu_storage_error_label_stack): Likewise.
1471 (gnu_program_error_label_stack): Likewise.
1472 (gigi): Adjust to above changes.
1473 (Raise_Error_to_gnu): Likewise.
1474 (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
1475 (N_Push_Constraint_Error_Label): Push the label onto the stack.
1476 (N_Push_Storage_Error_Label): Likewise.
1477 (N_Push_Program_Error_Label): Likewise.
1478 (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
1479 a warning on the absence of local raise.
1480 (N_Pop_Storage_Error_Label): Likewise.
1481 (N_Pop_Program_Error_Label): Likewise.
1482 (push_exception_label_stack): Delete.
1483 (get_exception_label): Change return type to Entity_Id and adjust.
1484 * gcc-interface/utils2.c (build_goto_raise): Change type of first
1485 parameter to Entity_Id and adjust. Set TREE_USED on the label.
1486 (build_call_raise): Adjust calls to get_exception_label and also
1487 build_goto_raise.
1488 (build_call_raise_column): Likewise.
1489 (build_call_raise_range): Likewise.
1490 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
1491 Document actual default behavior.
1492
1493 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1494
1495 * einfo.ads: Minor consistent punctuation in comment. All numbered
1496 items in the comment of Is_Internal are now terminated with a period.
1497
1498 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1499
1500 * exp_util.adb (Build_Temporary): Mark created temporary entity as
1501 internal.
1502
1503 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1504
1505 * sem_type.adb (In_Generic_Actual): Simplified.
1506
1507 2017-10-20 Justin Squirek <squirek@adacore.com>
1508
1509 * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
1510 verify a renaming exists for a generic formal before comparing it to
1511 the actual as defaulted formals will not have a renamed_object.
1512
1513 2017-10-20 Javier Miranda <miranda@adacore.com>
1514
1515 * exp_ch6.adb (Replace_Returns): Fix wrong management of
1516 N_Block_Statement nodes.
1517
1518 2017-10-20 Bob Duff <duff@adacore.com>
1519
1520 * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
1521 component of an array aggregate if it is initialized by a
1522 build-in-place function call.
1523 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
1524 bip for nonlimited types.
1525 * debug.adb: Document -gnatd.9.
1526
1527 2017-10-20 Bob Duff <duff@adacore.com>
1528
1529 * sem_ch12.adb: Remove redundant setting of Parent.
1530
1531 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1532
1533 * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
1534 of the operands is a string literal.
1535
1536 2017-10-20 Bob Duff <duff@adacore.com>
1537
1538 * einfo.ads: Comment fix.
1539
1540 2017-10-20 Clement Fumex <fumex@adacore.com>
1541
1542 * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
1543
1544 2017-10-20 Ed Schonberg <schonberg@adacore.com>
1545
1546 * sem_dim.adb (Extract_Power): Accept dimension values that are not
1547 non-negative integers when the dimensioned base type is an Integer
1548 type.
1549
1550 2017-10-20 Bob Duff <duff@adacore.com>
1551
1552 * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
1553 that an allocator came from a b-i-p return statement.
1554 * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
1555 object of a nonlimited build-in-place function call.
1556 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
1557 Alloc_For_BIP_Return flag on generated allocators.
1558 * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
1559 If the N_Assignment_Statement has been transformed into something else,
1560 then Should_Transform_BIP_Assignment won't work.
1561 * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
1562 "Remove Adjust if we're building the return object of an extended
1563 return statement in place." Back out that part of the change, because
1564 the Alloc_For_BIP_Return flag is now used for that.
1565
1566 2017-10-19 Bob Duff <duff@adacore.com>
1567
1568 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
1569 should be "T". Handle case of a subtype of a class-wide type.
1570
1571 2017-10-19 Bob Duff <duff@adacore.com>
1572
1573 * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
1574 which node kinds can legitimately be ignored, and raise Program_Error
1575 for others.
1576
1577 2017-10-19 Hristian Kirtchev <kirtchev@adacore.com>
1578
1579 * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
1580 instantiation that acts as a compilation unit.
1581 (Find_Code_Unit): Reimplemented.
1582 (Find_Top_Unit): Reimplemented.
1583 (Find_Unit_Entity): New routine.
1584 (Process_Instantiation_SPARK): Correct the elaboration requirement a
1585 package instantiation imposes on a unit.
1586
1587 2017-10-19 Bob Duff <duff@adacore.com>
1588
1589 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
1590 for a narrow set of controlled types.
1591
1592 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1593
1594 * sinput.ads (Line_Start): Add pragma Inline.
1595 * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
1596
1597 2017-10-19 Bob Duff <duff@adacore.com>
1598
1599 * exp_attr.adb (Expand_N_Attribute_Reference): Disable
1600 Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
1601 build-in-place function call so that the temp is declared in the right
1602 place.
1603
1604 2017-10-18 Eric Botcazou <ebotcazou@adacore.com>
1605
1606 * gcc-interface/misc.c (gnat_tree_size): Move around.
1607
1608 * gcc-interface/utils.c (max_size): Deal with SSA names.
1609
1610 2017-10-17 Jakub Jelinek <jakub@redhat.com>
1611
1612 * gcc-interface/misc.c (gnat_tree_size): New function.
1613 (LANG_HOOKS_TREE_SIZE): Redefine.
1614
1615 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1616
1617 * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
1618 Remote_Call_Interface is not a suitable preelaboratd context when the
1619 call appears in the package body.
1620
1621 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
1622
1623 * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
1624 * layout.adb (Set_Elem_Alignment): Likewise. Use M name as maximum
1625 alignment for consistency. If Align is non-zero, use the minimum of
1626 Align and M for the alignment.
1627 * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
1628 setting the alignment directly.
1629
1630 2017-10-14 Ed Schonberg <schonberg@adacore.com>
1631
1632 * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
1633 optional string in an Assert pragma until the expansion of the pragma
1634 has rewritten it as a conditional statement, so that the string
1635 argument is only evaluaed if the assertion fails. This is mandated by
1636 RM 11.4.2.
1637
1638 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1639
1640 * debug.adb: Switch -gnatd.v and associated flag are now used to
1641 enforce the SPARK rules for elaboration in SPARK code.
1642 * sem_elab.adb: Describe switch -gnatd.v.
1643 (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
1644 (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
1645 in effect.
1646 (Process_Variable_Assignment): Clarify why variable assignments are
1647 processed reglardless of whether -gnatd.v is in effect.
1648 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
1649 sections on elaboration code and compilation switches.
1650 * gnat_ugn.texi: Regenerate.
1651
1652 2017-10-14 Gary Dismukes <dismukes@adacore.com>
1653
1654 * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
1655 sem_warn.adb: Minor reformattings.
1656
1657 2017-10-14 Ed Schonberg <schonberg@adacore.com>
1658
1659 * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
1660 for reverse iteration over formal containers.
1661 * gnat_rm.texi: Regenerate.
1662
1663 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1664
1665 * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
1666 Ensure_Prior_Elaboration_Dynamic for consistency reasons.
1667 (Ensure_Static_Prior_Elaboration): Renamed to
1668 Ensure_Prior_Elaboration_Static for consistency reasons.
1669 (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
1670 reflect its new purpose.
1671 (Is_Initialized): New routine.
1672 (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
1673 in order to reflect its new purpose.
1674 (Is_Variable_Read): New routine.
1675 (Output_Variable_Reference): Renamed to Output_Variable_Read in order
1676 to reflect its new purpose.
1677 (Process_Variable_Assignment): This routine now acts as a top level
1678 dispatcher for variable assignments.
1679 (Process_Variable_Assignment_Ada): New routine.
1680 (Process_Variable_Assignment_SPARK): New routine.
1681 (Process_Variable_Reference): Renamed to Process_Variable_Read in order
1682 to reflects its new purpose. A reference to a variable is now suitable
1683 for ABE processing only when it is a read. The logic in the routine now
1684 reflects the latest SPARK elaboration rules.
1685
1686 2017-10-14 Justin Squirek <squirek@adacore.com>
1687
1688 * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
1689 triggers marking on formal subprograms.
1690
1691 2017-10-14 Javier Miranda <miranda@adacore.com>
1692
1693 * checks.adb (Ensure_Valid): Do not skip adding the validity check on
1694 renamings of objects that come from the sources.
1695
1696 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
1697
1698 * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
1699 parameter and set the alignment of the type to Align.
1700 (Copy_Float_Type): Adjust call to Build_Float_Type.
1701 (Register_Float_Type): Add pragma Unreferenced for Precision. Adjust
1702 call to Build_Float_Type and do not set RM_Size and Alignment.
1703
1704 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
1705
1706 * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
1707 GNATRTL_NONTASKING_OBJ.
1708
1709 2017-10-14 Bob Duff <duff@adacore.com>
1710
1711 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
1712 enabling b-i-p for nonlimited controlled types (but disabled).
1713
1714 2017-10-14 Justin Squirek <squirek@adacore.com>
1715
1716 * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
1717 Has_Warnings_Off with Warnings_Off.
1718
1719 2017-10-14 Piotr Trojanek <trojanek@adacore.com>
1720
1721 * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
1722
1723 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1724
1725 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
1726 enclosing package at the end of the visible declarations.
1727 * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
1728 an initialization item which is undefined due to some illegality.
1729
1730 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
1731
1732 * ali.adb: Add new ALI line 'T' to read the number of tasks contain
1733 within each unit that require a default-sized primary and secondary
1734 stack to be generated by the binder.
1735 (Scan_ALI): Scan new 'T' lines.
1736 * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
1737 * bindgen.adb (Gen_Output_File): Count the number of default-sized
1738 stacks within the closure that are to be created by the binder.
1739 (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
1740 stacks and record these in System.Secodnary_Stack.
1741 (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
1742 closure of the program being bound.
1743 * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
1744 * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
1745 (Expand_N_Object_Declaration): Count the number of default-sized stacks
1746 used by task objects contained within the object whose declaration is
1747 being expanded. Only performed when either the restrictions
1748 No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
1749 effect.
1750 * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
1751 (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
1752 the expansion of a task type if the size of the stack is known at
1753 run-time and the restrictions No_Implicit_Heap_Allocations or
1754 No_Implicit_Task_Allocations are in effect.
1755 (Make_Task_Create_Call): If using a restricted profile provide
1756 secondary stack parameter: either the statically created stack or null.
1757 * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
1758 Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
1759 Unit_Record initialization expressions.
1760 * lib-writ.adb (Add_Preprocessing_Dependency,
1761 Ensure_System_Dependency): Include Primary_Stack_Count and
1762 Sec_Stack_Count in Unit_Record initialization expression.
1763 (Write_ALI): Write T lines.
1764 (Write_Unit_Information): Do not output 'T' lines if there are no
1765 stacks for the binder to generate.
1766 * lib-writ.ads: Updated library information documentation to include
1767 new T line entry.
1768 * lib.adb (Increment_Primary_Stack_Count): New routine.
1769 (Increment_Sec_Stack_Count): New routine.
1770 (Primary_Stack_Count): New routine.
1771 (Sec_Stack_Count): New routine.
1772 * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
1773 Unit_Record and updated documentation.
1774 (Increment_Primary_Stack_Count): New routine along with pragma Inline.
1775 (Increment_Sec_Stack_Count): New routine along with pragma Inline.
1776 (Primary_Stack_Count): New routine along with pragma Inline.
1777 (Sec_Stack_Count): New routine along with pragma Inline.
1778 * opt.ads: New constant No_Stack_Size. Flag Default_Stack_Size
1779 redefined. New flag Default_Sec_Stack_Size and
1780 Quantity_Of_Default_Size_Sec_Stacks.
1781 * rtfinal.c Fixed erroneous comment.
1782 * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
1783 System.Secondary_Stack to System.Parameters. Add RE_SS_Stack.
1784 * sem_util.adb (Number_Of_Elements_In_Array): New routine.
1785 * sem_util.ads (Number_Of_Elements_In_Array): New routine.
1786 * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
1787 * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
1788 (Set_Sec_Stack_Addr): Removed routine.
1789 (Get_Sec_Stack): New routine.
1790 (Set_Sec_Stack): New routine.
1791 (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
1792 reflect new procedure and global names.
1793 * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
1794 libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
1795 libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
1796 parameter profile to allow the secondary stack size to be specified.
1797 * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
1798 profile to include Sec_Stack_Address. Update Tasking.Initialize_ATCB
1799 call to remove Secondary_Stack_Size reference. Add secondary stack
1800 address and size to SSL.Create_TSD call.
1801 (Task_Wrapper): Remove secondary stack creation.
1802 * libgnarl/s-tarest.ads (Create_Restricted_Task,
1803 Create_Restricted_Task_Sequential): Update parameter profile to include
1804 Sec_Stack_Address and clarify the Size parameter.
1805 * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
1806 from profile and body.
1807 (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
1808 * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
1809 Common_ATCB.
1810 (Initialize_ATCB): Update the parameter profile to remove
1811 Secondary_Stack_Size.
1812 * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
1813 call to Initialize_ATCB. Add secondary stack address and size to
1814 SSL.Create_TSD call, and catch any storage exception from the call.
1815 (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
1816 new subprogram and component names.
1817 (Task_Wrapper): Remove secondary stack creation.
1818 (Vulnerable_Complete_Master): Update to reflect TSD changes.
1819 * libgnarl/s-tassta.ads: Reformat comments.
1820 (Create_Task): Update parameter profile.
1821 * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
1822 profile to include secondary stack size. Remove secondary size
1823 parameter from Initialize_ATCB call and add it to Create_TSD call.
1824 * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
1825 libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
1826 * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
1827 libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
1828 Percentage. Remove constants Dynamic, Sec_Stack_Percentage and
1829 Sec_Stack_Dynamic. Add constant Runtime_Default_Sec_Stack_Size and
1830 Sec_Stack_Dynamic.
1831 (Default_Sec_Stack_Size): New routine.
1832 * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
1833 now Preelaborate.
1834 * libgnat/s-soflin.adb: Removed unused with-clauses. With
1835 System.Soft_Links.Initialize to initialize non-tasking TSD.
1836 (Create_TSD): Update parameter profile. Initialize the TSD and
1837 unconditionally call SS_Init.
1838 (Destroy_TSD): Update SST.SS_Free call.
1839 (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
1840 Set_Sec_Stack_Addr_Soft): Remove routines.
1841 (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
1842 Set_Sec_Stack_Soft): Add routines.
1843 (NT_TSD): Move to private part of package specification.
1844 * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
1845 with suppressed access checks. Renamed *_Sec_Stack_Addr_* routines and
1846 objects to *_Sec_Stack_*. TSD: removed warning suppression and
1847 component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
1848 (Create_TSD): Update parameter profile.
1849 (NT_TSD): Move to private section from body.
1850 * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
1851 * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
1852 * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
1853 Remove routine.
1854 (Get_Sec_Stack, Set_Sec_Stack): Add routine.
1855 (Thread_Body_Enter): Update parameter profile and body to adapt to new
1856 System.Secondary_Stack.
1857 (Init_RTS): Update body for new System.Soft_Links names.
1858 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
1859 s-soliin.o.
1860
1861 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1862
1863 * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
1864 operating on trees as wide_ints.
1865
1866 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1867
1868 * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
1869 as a scoping construct when it is byproduct of exception handling.
1870
1871 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1872
1873 * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
1874 semantic field Target of node N_Call_Marker.
1875
1876 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1877
1878 * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
1879 attempts to copy a limited value, when the allocator is the expression
1880 in an expression function.
1881
1882 2017-10-09 Joel Brobecker <brobecker@adacore.com>
1883
1884 * doc/share/conf.py: Tell the style checker that this is a Python
1885 fragment, and therefore that pyflakes should not be run to validate
1886 this file.
1887
1888 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
1889
1890 * einfo.ads (Is_Boolean_Type): Add pragma Inline.
1891 (Is_Entity_Name): Likewise.
1892 (Is_String_Type): Likewise.
1893 * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
1894 and remove useless comparisons on the base types.
1895 (Covers): Use simple tests for Standard_Void_Type. Move up cheap tests
1896 on T2. Always test Is_Private_Type before Full_View_Covers.
1897
1898 2017-10-09 Bob Duff <duff@adacore.com>
1899
1900 * exp_ch4.adb: Minor refactoring.
1901
1902 2017-10-09 Javier Miranda <miranda@adacore.com>
1903
1904 * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
1905 not components.
1906
1907 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1908
1909 * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
1910 are verified only in the static model.
1911
1912 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1913
1914 * sem_ch5.adb (Analyze_Iterator_Specification,
1915 Check_Reverse_Iteration): Check that the domain of iteration supports
1916 reverse iteration when it is a formal container. This requires the
1917 presence of a Previous primitive in the Iterable aspect.
1918 * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
1919 primitives Last and Previous to support reverse iteration over formal
1920 containers.
1921 (Validate_Iterable_Aspect): Add check for reverse iteration operations.
1922 * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
1923 for reverse iteration using primitives Last and Previous in generated
1924 loop.
1925
1926 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1927
1928 * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
1929 of the Defining_Program_Unit_Name, which is an identifier, in order to
1930 construct the string for the fully qualified name.
1931
1932 2017-10-09 Justin Squirek <squirek@adacore.com>
1933
1934 * sem_ch3.adb: Rename Uses_Unseen_Priv into
1935 Contains_Lib_Incomplete_Type.
1936
1937 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1938
1939 * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
1940 sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
1941 exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
1942 prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
1943 sem_ch10.adb, par-ch8.adb: Minor reformatting.
1944
1945 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1946
1947 * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
1948 in the static model.
1949 (Is_Suitable_Variable_Assignment): This scenario is now only relevant
1950 in the static model.
1951 (Is_Suitable_Variable_Reference): This scenario is now only relevant in
1952 the static model.
1953
1954 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1955
1956 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
1957 expressions when the enclosing scope is a subprogram body and the next
1958 declaration is a body that freezes entities previously declared in the
1959 scope.
1960
1961 2017-10-09 Justin Squirek <squirek@adacore.com>
1962
1963 * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
1964 ghost packages and living packages in use clauses.
1965 (Use_One_Type, Note_Redundant_Use): Correct warning messages
1966
1967 2017-10-09 Justin Squirek <squirek@adacore.com>
1968
1969 * osint.ads: Document new parameter FD for Read_Source_File.
1970
1971 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1972
1973 * exp_util.adb (Make_Predicate_Call): If the type of the expression to
1974 which the predicate check applies is tagged, convert the expression to
1975 that type. This is in most cases a no-op, but is relevant if the
1976 expression is clas-swide, because the predicate function being invoked
1977 is not a primitive of the type and cannot take a class-wide actual.
1978
1979 2017-10-09 Gary Dismukes <dismukes@adacore.com>
1980
1981 * exp_disp.adb: Minor reformatting.
1982
1983 2017-10-09 Arnaud Charlet <charlet@adacore.com>
1984
1985 * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
1986
1987 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1988
1989 * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
1990 GNATprove.
1991 (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
1992
1993 2017-10-09 Bob Duff <duff@adacore.com>
1994
1995 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
1996 immediately if the call has already been processed (by a previous call
1997 to Make_Build_In_Place_Call_In_Anonymous_Context).
1998 * sem_elab.adb: Minor typo fixes.
1999
2000 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2001
2002 * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
2003 predicate, do not replace an identifier that matches the type if the
2004 identifier is a selector in a selected component, because this
2005 indicates a reference to some homograph of the type itself, and not to
2006 the current occurence in the predicate.
2007
2008 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
2009
2010 * repinfo.adb (List_Record_Layout): Tweak formatting.
2011 (Write_Val): Remove superfluous spaces in back-end layout mode.
2012
2013 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2014
2015 * sem_res.adb (Property_Error): Remove.
2016 (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
2017 current wording of the rule.
2018
2019 2017-10-09 Justin Squirek <squirek@adacore.com>
2020
2021 * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
2022 before analyzing a given scope due to an expression function.
2023 (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
2024
2025 2017-10-09 Bob Duff <duff@adacore.com>
2026
2027 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
2028 Defining_Identifier (Obj_Decl) in two places, because it might have
2029 changed.
2030 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
2031 involving 'Input on (not visibly) derived types.
2032
2033 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2034
2035 * atree.adb: Add new soft link Rewriting_Proc.
2036 (Rewrite): Invoke the subprogram attached to the rewriting soft link.
2037 (Set_Rewriting_Proc): New routine.
2038 * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
2039 (Set_Rewriting_Proc): New routine.
2040 * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
2041 for *E*laboration flag to maintain consistency with other elaboration
2042 flag generating subprograms.
2043 * debug.adb: Document the new usage of flag -gnatdL.
2044 * einfo.adb: Node19 is now used as Receiving_Entry. Node39 is now used
2045 as Protected_Subprogram. Flag148 is now used as
2046 Is_Elaboration_Checks_OK_Id. Flag302 is now used as
2047 Is_Initial_Condition_Procedure.
2048 (Is_Elaboration_Checks_OK_Id): New routine.
2049 (Is_Initial_Condition_Procedure): New routine.
2050 (Protected_Subprogram): New routine.
2051 (Receiving_Entry): New routine.
2052 (SPARK_Pragma): Update assertion.
2053 (SPARK_Pragma_Inherited): Update assertion.
2054 (Suppress_Elaboration_Warnings): Removed.
2055 (Set_Is_Elaboration_Checks_OK_Id): New routine.
2056 (Set_Is_Initial_Condition_Procedure): New routine.
2057 (Set_Protected_Subprogram): New routine.
2058 (Set_Receiving_Entry): New routine.
2059 (Set_SPARK_Pragma): Update assertion.
2060 (Set_SPARK_Pragma_Inherited): Update assertion.
2061 (Write_Entity_Flags): Update the output for Flag148 and Flag302.
2062 (Write_Field19_Name): Add output for Receiving_Entry.
2063 (Write_Field39_Name): Add output for Protected_Subprogram.
2064 (Write_Field40_Name): Update the output for SPARK_Pragma.
2065 * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
2066 Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
2067 Remove attribute Suppress_Elaboration_Warnings. Update the stricture
2068 of various entities.
2069 (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
2070 (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
2071 (Protected_Subprogram): New routine along with pragma Inline.
2072 (Receiving_Entry): New routine along with pragma Inline.
2073 (Suppress_Elaboration_Warnings): Removed.
2074 (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
2075 Inline.
2076 (Set_Is_Initial_Condition_Procedure): New routine along with pragma
2077 Inline.
2078 (Set_Protected_Subprogram): New routine along with pragma Inline.
2079 (Set_Receiving_Entry): New routine along with pragma Inline.
2080 (Set_Suppress_Elaboration_Warnings): Removed.
2081 * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
2082 consistency with other finalizer generating subprograms.
2083 (Default_Initialize_Object): Mark the block which wraps the call to
2084 finalize as being part of initialization.
2085 * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
2086 Initial_Condition.
2087 (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
2088 (Next_Suitable_Statement): Update the comment on usage. Skip over call
2089 markers generated by the ABE mechanism.
2090 * exp_ch9.adb (Activation_Call_Loc): New routine.
2091 (Add_Accept): Link the accept procedure to the original entry.
2092 (Build_Protected_Sub_Specification): Link the protected or unprotected
2093 version to the original subprogram.
2094 (Build_Task_Activation_Call): Code cleanup. Use a source location which
2095 is very close to the "begin" or "end" keywords when generating the
2096 activation call.
2097 * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
2098 * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
2099 process loops.
2100 (Expand_SPARK_N_Loop_Statement): New routine.
2101 (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
2102 call to the Default_Initial_Condition procedure.
2103 (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
2104 * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
2105 effect.
2106 (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
2107 (Insert_Actions): Add processing for N_Call_Marker.
2108 (Kill_Dead_Code): Explicitly kill an elaboration scenario.
2109 * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
2110 * frontend.adb: Initialize Sem_Elab. Process all saved top level
2111 elaboration scenarios for ABE issues.
2112 * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
2113 nodes.
2114 * lib.adb (Earlier_In_Extended_Unit): New variant.
2115 * sem.adb (Analyze): Ignore N_Call_Marker nodes.
2116 (Preanalysis_Active): New routine.
2117 * sem.ads (Preanalysis_Active): New routine.
2118 * sem_attr.adb (Analyze_Access_Attribute): Save certain
2119 elaboration-related attributes. Save the scenario for ABE processing.
2120 * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
2121 effect. Save certain elaboration-related attributes.
2122 * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
2123 attributes. Save the scenario for ABE processing.
2124 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
2125 mode in effect. Save certain elaboration-related attributes.
2126 (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
2127 locating the first real statement.
2128 (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
2129 certain elaboration-related attributes.
2130 * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
2131 elaboration warnings.
2132 * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
2133 generated for purposes of wrapping an attribute used as a generic
2134 actual.
2135 (Find_Direct_Name): Save certain elaboration-related attributes. Save
2136 the scenario for ABE processing.
2137 (Find_Expanded_Name): Save certain elaboration-related attributes. Save
2138 the scenario for ABE processing.
2139 * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
2140 elaboration-related attributes.
2141 (Analyze_Requeue): Save certain elaboration-related attributes. Save
2142 the scenario for ABE processing.
2143 (Analyze_Single_Task_Declaration): Save certain elaboration-related
2144 attributes.
2145 (Analyze_Task_Type_Declaration): Save certain elaboration-related
2146 attributes.
2147 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
2148 elaboration-related attributes.
2149 (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
2150 effect. Save certain elaboration-related attributes.
2151 (Analyze_Package_Instantiation): Save certain elaboration-related
2152 attributes. Save the scenario for ABE processing. Create completing
2153 bodies in case the instantiation results in a guaranteed ABE.
2154 (Analyze_Subprogram_Instantiation): Save certain elaboration-related
2155 attributes Save the scenario for ABE processing. Create a completing
2156 body in case the instantiation results in a guaranteed ABE.
2157 (Provide_Completing_Bodies): New routine.
2158 * sem_elab.ads: Brand new implementation.
2159 * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
2160 Elaborate_Body): Do not suppress elaboration warnings.
2161 * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
2162 operator.
2163 (Resolve_Call): Save certain elaboration-related attributes. Save the
2164 scenario for ABE processing.
2165 (Resolve_Entity_Name): Do not perform any ABE processing here.
2166 (Resolve_Entry_Call): Inherit certain attributes from the original call.
2167 * sem_util.adb (Begin_Keyword_Location): New routine.
2168 (Defining_Entity): Update the parameter profile. Add processing for
2169 concurrent subunits that are rewritten as null statements.
2170 (End_Keyword_Location): New routine.
2171 (Find_Enclosing_Scope): New routine.
2172 (In_Instance_Visible_Part): Code cleanup.
2173 (In_Subtree): Update the parameter profile. Add new version.
2174 (Is_Preelaborable_Aggregate): New routine.
2175 (Is_Preelaborable_Construct): New routine.
2176 (Mark_Elaboration_Attributes): New routine.
2177 (Scope_Within): Update the parameter profile.
2178 (Scope_Within_Or_Same): Update the parameter profile.
2179 * sem_util.ads (Begin_Keyword_Location): New routine.
2180 (Defining_Entity): Update the parameter profile and the comment on
2181 usage.
2182 (End_Keyword_Location): New routine.
2183 (Find_Enclosing_Scope): New routine.
2184 (In_Instance_Visible_Part): Update the parameter profile.
2185 (In_Subtree): Update the parameter profile. Add new version.
2186 (Is_Preelaborable_Aggregate): New routine.
2187 (Is_Preelaborable_Construct): New routine.
2188 (Mark_Elaboration_Attributes): New routine.
2189 (Scope_Within): Update the parameter profile and the comment on usage.
2190 (Scope_Within_Or_Same): Update the parameter profile and the comment on
2191 usage.
2192 * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
2193 to determine whether a loop has meaningful condition actions.
2194 (Has_Condition_Actions): New routine.
2195 * sinfo.adb (ABE_Is_Certain): Removed.
2196 (Is_Declaration_Level_Node): New routine.
2197 (Is_Dispatching_Call): New routine.
2198 (Is_Elaboration_Checks_OK_Node): New routine.
2199 (Is_Initialization_Block): New routine.
2200 (Is_Known_Guaranteed_ABE): New routine.
2201 (Is_Recorded_Scenario): New routine.
2202 (Is_Source_Call): New routine.
2203 (Is_SPARK_Mode_On_Node): New routine.
2204 (No_Elaboration_Check): Removed.
2205 (Target): New routine.
2206 (Was_Attribute_Reference): New routine.
2207 (Set_ABE_Is_Certain): Removed.
2208 (Set_Is_Declaration_Level_Node): New routine.
2209 (Set_Is_Dispatching_Call): New routine.
2210 (Set_Is_Elaboration_Checks_OK_Node): New routine.
2211 (Set_Is_Initialization_Block): New routine.
2212 (Set_Is_Known_Guaranteed_ABE): New routine.
2213 (Set_Is_Recorded_Scenario): New routine.
2214 (Set_Is_Source_Call): New routine.
2215 (Set_Is_SPARK_Mode_On_Node): New routine.
2216 (Set_No_Elaboration_Check): Removed.
2217 (Set_Target): New routine.
2218 (Set_Was_Attribute_Reference): New routine.
2219 * sinfo.ads: Remove attribute ABE_Is_Certain. Attribute
2220 Do_Discriminant_Check now utilizes Flag3. Attribute
2221 No_Side_Effect_Removal now utilizes Flag17. Add new node
2222 N_Call_Marker. Update the structure of various nodes.
2223 (ABE_Is_Certain): Removed along with pragma Inline.
2224 (Is_Declaration_Level_Node): New routine along with pragma Inline.
2225 (Is_Dispatching_Call): New routine along with pragma Inline.
2226 (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
2227 (Is_Initialization_Block): New routine along with pragma Inline.
2228 (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2229 (Is_Recorded_Scenario): New routine along with pragma Inline.
2230 (Is_Source_Call): New routine along with pragma Inline.
2231 (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2232 (No_Elaboration_Check): Removed along with pragma Inline.
2233 (Target): New routine along with pragma Inline.
2234 (Was_Attribute_Reference): New routine along with pragma Inline.
2235 (Set_ABE_Is_Certain): Removed along with pragma Inline.
2236 (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
2237 (Set_Is_Dispatching_Call): New routine along with pragma Inline.
2238 (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
2239 Inline.
2240 (Set_Is_Initialization_Block): New routine along with pragma Inline.
2241 (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2242 (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
2243 (Set_Is_Source_Call): New routine along with pragma Inline.
2244 (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2245 (Set_No_Elaboration_Check): Removed along with pragma Inline.
2246 (Set_Target): New routine along with pragma Inline.
2247 (Set_Was_Attribute_Reference): New routine along with pragma Inline.
2248 * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
2249
2250 2017-10-09 Bob Duff <duff@adacore.com>
2251
2252 * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
2253
2254 2017-10-09 Bob Duff <duff@adacore.com>
2255
2256 * freeze.ads: Minor comment fixed.
2257
2258 2017-10-09 Bob Duff <duff@adacore.com>
2259
2260 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
2261 care of unchecked conversions in addition to regular conversions. This
2262 takes care of a case where a type is derived from a private untagged
2263 type that is completed by a tagged controlled type.
2264
2265 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2266
2267 * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
2268 rewriting a class-wide condition, handle properly the case where the
2269 controlling argument of the operation to which the condition applies is
2270 an access to a tagged type, and the condition includes a dispatching
2271 call with an implicit dereference.
2272
2273 2017-10-09 Bob Duff <duff@adacore.com>
2274
2275 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
2276 the code at the end of this procedure that was setting the type of a
2277 class-wide object to the specific type returned by a function call.
2278 Treat this case as indefinite instead.
2279
2280 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2281
2282 * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
2283 Suppress spurious ambiguity error when two traversals of the homonym
2284 chain (first directly, and then through an examination of relevant
2285 interfaces) retrieve the same operation, when other irrelevant homonyms
2286 of the operatioh are also present.
2287
2288 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2289
2290 * sem_util.adb (Object_Access_Level): If the object is the return
2291 statement of an expression function, return the level of the function.
2292 This is relevant when the object involves an implicit conversion
2293 between access types and the expression function is a completion, which
2294 forces the analysis of the expression before rewriting it as a body, so
2295 that freeze nodes can appear in the proper scope.
2296
2297 2017-10-09 Bob Duff <duff@adacore.com>
2298
2299 * atree.adb: Make nnd apply to everything "interesting", including
2300 Rewrite. Remove rrd.
2301
2302 2017-10-09 Javier Miranda <miranda@adacore.com>
2303
2304 * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
2305 processing the declaration of the dummy object internally created by
2306 Make_DT to compute the offset to the top of components referencing
2307 secondary dispatch tables.
2308 (Initialize_Tag): Do not initialize the offset-to-top field if it has
2309 been initialized initialized.
2310 * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
2311 * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
2312 (Make_DT): Create a dummy constant object if we can statically build
2313 secondary dispatch tables.
2314 (Make_Secondary_DT): For statically allocated secondary dispatch tables
2315 use the dummy object to compute the offset-to-top field value by means
2316 of the attribute 'Position.
2317
2318 2017-10-09 Bob Duff <duff@adacore.com>
2319
2320 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
2321 code so if BIPAlloc is not passed in, it will likely raise
2322 Program_Error instead of cause miscellaneous chaos.
2323 (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
2324 as for the other Is_B-I-P... functions.
2325 * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
2326 aggregate whose ancestor part is a build-in-place call returning a
2327 nonlimited type, transform the assignment to the ancestor part to use a
2328 temp.
2329 * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
2330 creating an Itype for a library unit entity.
2331 (Check_Initialization): Avoid spurious error message on
2332 internally-generated call.
2333 * sem_ch5.adb (Analyze_Assignment): Handle the case where the
2334 right-hand side is a build-in-place call. This didn't happen when b-i-p
2335 was only for limited types.
2336 * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
2337 implies >= Ada 2005.
2338 * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
2339 repeatedly.
2340 * sem_util.adb (Next_Actual): Handle case of build-in-place call.
2341
2342 2017-10-09 Arnaud Charlet <charlet@adacore.com>
2343
2344 * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
2345
2346 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2347
2348 * libgnarl/s-taprob.adb: Minor whitespace fix.
2349
2350 2017-10-09 Bob Duff <duff@adacore.com>
2351
2352 * namet.ads: Minor comment fix.
2353
2354 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2355
2356 * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
2357 just like other program units listed in Ada RM 10.1(1).
2358
2359 2017-10-09 Justin Squirek <squirek@adacore.com>
2360
2361 * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
2362
2363 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2364
2365 * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
2366 actual for a formal package is an instantiation of a child unit, create
2367 a freeze node for the instance of the parent if it appears in the same
2368 scope and is not frozen yet.
2369
2370 2017-10-09 Pierre-Marie de Rodat <derodat@adacore.com>
2371
2372 * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
2373 in-source documentation for tagged types's Offset_To_Top.
2374
2375 2017-10-09 Bob Duff <duff@adacore.com>
2376
2377 * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
2378 confusing. Same for N_Loc. Remove assumption that b-i-p implies
2379 limited. This is for the case of a function call that occurs as the
2380 default for a record component.
2381 (Expand_N_Object_Declaration): Deal with the case where expansion has
2382 created an object declaration initialized with something like
2383 F(...)'Reference.
2384 * exp_ch3.adb: Minor reformatting.
2385
2386 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2387
2388 * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
2389 the attribute is an object, but it may appear within a conversion. The
2390 object itself must be retrieved when generating the range test that
2391 implements the validity check on a scalar type.
2392
2393 2017-10-05 Eric Botcazou <ebotcazou@adacore.com>
2394
2395 PR ada/82393
2396 * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
2397 * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
2398
2399 2017-10-02 Eric Botcazou <ebotcazou@adacore.com>
2400 Pierre-Marie de Rodat <derodat@adacore.com>
2401
2402 PR ada/82384
2403 * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
2404 (time_t): Change from derived type to subtype.
2405 (timeval): Use suseconds_t for tv_usec.
2406 * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
2407
2408 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2409
2410 * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
2411 handling the form (plus/mult (convert @0) @1).
2412
2413 2017-09-29 Bob Duff <duff@adacore.com>
2414
2415 * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
2416 what we had before.
2417 (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
2418 change. Set the Etype in the class-wide case. This fixes a regression
2419 in the libadalang test suite.
2420
2421 2017-09-29 Joel Brobecker <brobecker@adacore.com>
2422
2423 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2424 doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
2425 in comment markup.
2426 * gnat_ugn.texi: Regenerate.
2427
2428 2017-09-29 Justin Squirek <squirek@adacore.com>
2429
2430 * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
2431 fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
2432 gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
2433 sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
2434 for checking source file status and error message and/or call to
2435 Read_Source_File.
2436 * libgnat/s-os_lib.ads: Add new potential value constant for
2437 uninitialized file descriptors.
2438 * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
2439 return result of IO to encompass a read access failure in addition to a
2440 file-not-found error.
2441
2442 2017-09-29 Bob Duff <duff@adacore.com>
2443
2444 * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
2445 functions returning nonlimited types. Allow for qualified expressions
2446 and type conversions.
2447 (Expand_N_Extended_Return_Statement): Correct the computation of
2448 Func_Bod to allow for child units.
2449 (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
2450 limited (initialization of In_Place_Expansion), and implies >= Ada
2451 2005.
2452 (Is_Build_In_Place_Result_Type): New function to accompany
2453 Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
2454 sometimes we just have the type on our hands, not the function. For
2455 now, does the same thing as the old version, so build-in-place is
2456 disabled for nonlimited types, except that you can use -gnatd.9 to
2457 enable it.
2458 * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
2459 accompany Is_Build_In_Place_Function and
2460 Is_Build_In_Place_Function_Call, because sometimes we just have the
2461 type on our hands, not the function.
2462 (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
2463 cases.
2464 (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
2465 questionable code at the end that was setting the Etype.
2466 * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
2467 determine whether "return (...agg...);" is returning from a
2468 build-in-place function.
2469 (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
2470 Remove assumption that b-i-p implies limited (initialization of
2471 In_Place_Expansion).
2472 (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
2473 an unchecked conversion. Add assertions.
2474 (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
2475 secondary stack here, just because the type needs finalization. That
2476 code is obsolete.
2477 (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
2478 For "return (...agg...);" don't assume b-i-p implies limited.
2479 Needs_Finalization does not imply secondary stack.
2480 (Expand_Array_Aggregate): Named notation. Reverse the sense of
2481 Component_OK_For_Backend -- more readability with fewer double
2482 negatives.
2483 * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
2484 b-i-p implies >= Ada 2005.
2485 * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
2486 b-i-p implies >= Ada 2005. Remove Adjust if we're building the return
2487 object of an extended return statement in place.
2488 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
2489 Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
2490 b-i-p implies >= Ada 2005.
2491 * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
2492 b-i-p implies >= Ada 2005.
2493 * exp_ch7.adb: Comment fix.
2494 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
2495 assumptions that b-i-p implies >= Ada 2005.
2496 * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
2497 b-i-p implies >= Ada 2005.
2498 * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
2499 (Expr), in case Pool_Id is not set.
2500 (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
2501 qualified or converted.
2502 (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
2503 (Param)) = N_Identifier; that's all it could be.
2504 * sinfo.ads: Comment fixes.
2505 * snames.ads-tmpl: Comment fixes.
2506 * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
2507
2508 2017-09-29 Justin Squirek <squirek@adacore.com>
2509
2510 * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
2511 all cases related to marking entity identifiers.
2512
2513 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2514
2515 * adaint.c (win32_wait): Properly handle error and take into account
2516 the WIN32 limitation on the number of simultaneous wait objects.
2517
2518 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2519
2520 * cal.c: Minor proofreading.
2521
2522 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2523
2524 * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
2525 * gnat_ugn.texi: Regenerate.
2526
2527 2017-09-29 Bob Duff <duff@adacore.com>
2528
2529 * lib-xref.ads: Comment fix.
2530
2531 2017-09-29 Bob Duff <duff@adacore.com>
2532
2533 * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
2534 Discriminants can't need finalization.
2535
2536 2017-09-29 Ed Schonberg <schonberg@adacore.com>
2537
2538 * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
2539 for types in expression if the function is within a generic unit.
2540 * sem_res.adb (Resolve): In a generic context do not freeze an
2541 expression, unless it is an entity. This exception is solely for the
2542 purpose of detecting illegal uses of deferred constants in generic
2543 units.
2544 * sem_res.adb: Minor reformatting.
2545
2546 2017-09-29 Justin Squirek <squirek@adacore.com>
2547
2548 * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
2549 redundant warnings.
2550
2551 2017-09-29 Yannick Moy <moy@adacore.com>
2552
2553 * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
2554
2555 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2556
2557 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
2558 * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
2559 Document the effect of pragma Optimize_Alignment (Space) on non-packed
2560 record types.
2561 * gnat_rm.texi: Regenerate.
2562
2563 2017-09-25 Justin Squirek <squirek@adacore.com>
2564
2565 * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
2566 exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
2567 gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
2568 gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
2569 libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
2570 libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
2571 libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
2572 libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
2573 libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
2574 libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
2575 put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
2576 sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
2577 Removal of ineffective use-clauses.
2578 * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
2579 constant folded barriers.
2580 * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
2581 Subtype_Marks and Names list in use-clause nodes to their new singular
2582 counterparts (e.g. Subtype_Mark, Name).
2583 * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
2584 Prev_Ids and More_Ids in use-clause nodes.
2585 (P_Use_Clause): Modify to take a list as a parameter.
2586 (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
2587 subtype_marks within an aggregate use-clauses into individual clauses.
2588 * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
2589 P_Use_Clause to match its new behavior.
2590 * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
2591 * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
2592 errors.
2593 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
2594 Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
2595 the declarative region.
2596 * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
2597 after analysis (Analyze_Package_Specification): Update use clause chain
2598 when there is no body.
2599 * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
2600 parameter to determine weither the installation of scopes should also
2601 propagate on the use-clause "chain".
2602 (Mark_Use_Clauses): Created to traverse use-clause chains and determine
2603 what constitutes a valid "use" of a clause.
2604 (Update_Use_Clause_Chain): Created to aggregate common machinary used
2605 to clean up use-clause chains (and warn on ineffectiveness) at the end
2606 of declaritive regions.
2607 * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
2608 package name from a use-package clause.
2609 (Analyze_Package_Name_List): Created to perform analysis on a list of
2610 package names (similar to Analyze_Package_Name).
2611 (Find_Most_Prev): Created to traverse to the beginning of a given
2612 use-clause chain.
2613 (Most_Decendant_Use_Clause): Create to identify which clause from a
2614 given set is highest in scope (not always the most prev).
2615 (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
2616 handle the new chaining algorithm, also many changes related to
2617 redundant clauses. A new parameter has also been added to force
2618 installation to handle certain cases.
2619 * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
2620 Analyze_Task_Body): Mark use clauses on relevant entities.
2621 * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
2622 Install_Parents): Add parameter to determine weither the installation
2623 of scopes should also propagate on the use-clause "chain".
2624 * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
2625 Install_Context to avoid redundant chaining of use-clauses.
2626 * sem_ch13.adb: Minor reformatting.
2627 * sem_res.adb (Resolve): Mark use clauses on operators.
2628 (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
2629 entities.
2630 * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
2631 Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
2632 represent any given clause's usage/reference/necessity.
2633 (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
2634 nodes to allow loose chaining of redundant clauses.
2635 (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
2636 Set_More_Ids, Set_Name): Modify set procedure calls to reflect
2637 reorganization in node fields.
2638 * types.ads (Source_File_Index): Adjust index bounds.
2639 (No_Access_To_Source_File): New constant.
2640
2641 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2642
2643 * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
2644 the expression to be used in the generated attribute specification
2645 (rather than relocating it) to avoid resolving a potentially malformed
2646 tree when the expression is resolved through an ASIS-specific call to
2647 Resolve_Aspect_Expressions. This manifests itself as a crash on a
2648 function with parameter associations.
2649
2650 2017-09-25 Yannick Moy <moy@adacore.com>
2651
2652 * exp_spark.adb (Expand_SPARK_Indexed_Component,
2653 Expand_SPARK_Selected_Component): New procedures to insert explicit
2654 dereference if required.
2655 (Expand_SPARK): Call the new procedures.
2656
2657 2017-09-25 Patrick Bernardi <bernardi@adacore.com>
2658
2659 * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
2660 libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
2661 libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
2662 libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
2663 libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
2664
2665 2017-09-25 Vasiliy Fofanov <fofanov@adacore.com>
2666
2667 * adaint.c (win32_wait): Properly handle error and take into account
2668 the WIN32 limitation on the number of simultaneous wait objects.
2669
2670 2017-09-25 Yannick Moy <moy@adacore.com>
2671
2672 * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
2673 invariant procedure in GNATprove mode.
2674 * sem_ch5.adb (Analyze_Assignment): Likewise.
2675
2676 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
2677
2678 * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
2679 "back-end" in comments.
2680
2681 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2682
2683 * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
2684 call that appears in a classwide precondition and that mentions an
2685 access formal of the subprogram, must use the accessibility level of
2686 the actual in the call. This is one case in which a reference to a
2687 formal parameter appears outside of the body of the subprogram.
2688
2689 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2690
2691 * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
2692 for GNATprove.
2693 (Resolve_Entry): Clean up predicate
2694
2695 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2696
2697 * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
2698 than Program_Error because U_E is more in line with respect to the
2699 intended behavior.
2700
2701 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2702
2703 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
2704 Storage_Size does not freeze, and thus can include references to
2705 deferred constants.
2706
2707 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2708
2709 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
2710 reference when it appears within a pragma of no significance to SPARK.
2711 (In_Insignificant_Pragma): New routine.
2712 * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
2713
2714 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2715
2716 * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
2717 actual is a renaming, indicate that it is the renamed package that must
2718 be frozen before the instantiation.
2719
2720 2017-09-25 Yannick Moy <moy@adacore.com>
2721
2722 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
2723 of dimensionality system in GNAT UG.
2724 * gnat_ugn.texi: Regenerate.
2725
2726 2017-09-25 Yannick Moy <moy@adacore.com>
2727
2728 * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
2729 GNATprove_Mode when switch -gnatdF used.
2730
2731 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
2732
2733 * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
2734 the backend.
2735
2736 2017-09-25 Javier Miranda <miranda@adacore.com>
2737
2738 * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
2739 expansion of user-defined enumeration types when the generation of
2740 names for enumeration literals is suppressed.
2741
2742 2017-09-25 Gary Dismukes <dismukes@adacore.com>
2743
2744 * libgnarl/s-taprop__linux.adb: Minor reformatting.
2745
2746 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2747
2748 * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
2749 that appear as selector names of parameter associations, as these are
2750 never resolved by visibility.
2751
2752 2017-09-25 Justin Squirek <squirek@adacore.com>
2753
2754 * sem_res.adb (Resolve_Entry): Generate reference for index entities.
2755
2756 2017-09-25 Doug Rupp <rupp@adacore.com>
2757
2758 * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
2759
2760 2017-09-25 Javier Miranda <miranda@adacore.com>
2761
2762 * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
2763 (Expand_User_Defined_Enumeration_Image): New subprogram.
2764 (Expand_Image_Attribute): Enable speed-optimized expansion of
2765 user-defined enumeration types when we are compiling with optimizations
2766 enabled.
2767
2768 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
2769
2770 * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
2771 routine is already provided by Einfo.
2772 * einfo.adb (Has_Null_Abstract_State): Replace with the body from
2773 Sem_Util, which had better comments and avoided double calls to
2774 Abstract_State.
2775
2776 2017-09-25 Bob Duff <duff@adacore.com>
2777
2778 * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
2779
2780 2017-09-25 Doug Rupp <rupp@adacore.com>
2781
2782 * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
2783 (Compute_Base_Monotonic_Clock): New function.
2784 (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
2785 (Timed_Delay): Likewise.
2786 (Monotonic_Clock): Likewise.
2787 * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
2788
2789 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2790
2791 * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
2792 previous change.
2793
2794 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2795
2796 * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
2797 Minor reformatting.
2798
2799 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
2800
2801 * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
2802
2803 2017-09-18 Bob Duff <duff@adacore.com>
2804
2805 * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
2806 reference types in the access-to-access case.
2807
2808 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
2809
2810 * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
2811 of the "aliased" keyword on the prefix from here to...
2812 (Resolve_Attribute) <Attribute_Access>: ...here. Remove useless call
2813 to Check_No_Implicit_Aliasing.
2814 * sinfo.ads (Non_Aliased_Prefix): Delete.
2815 (Set_Non_Aliased_Prefix): Likewise.
2816 * sinfo.adb (Non_Aliased_Prefix): Delete.
2817 (Set_Non_Aliased_Prefix): Likewise.
2818
2819 2017-09-18 Bob Duff <duff@adacore.com>
2820
2821 * exp_ch5.adb (Build_Formal_Container_Iteration,
2822 Expand_Formal_Container_Element_Loop): Convert the container to the
2823 root type before passing it to the iteration operations, so it will be
2824 of the right type.
2825
2826 2017-09-18 Bob Duff <duff@adacore.com>
2827
2828 * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
2829
2830 2017-09-18 Bob Duff <duff@adacore.com>
2831
2832 * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
2833 and it's a bit-packed array, pass False to the Consider_IS parameter of
2834 Needs_Simple_Initialization.
2835
2836 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
2837
2838 * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
2839 the preexisting body.
2840 * sem_prag.adb (Check_Inline_Always_Placement): New routine.
2841 (Process_Inline): Verify the placement of pragma Inline_Always. The
2842 pragma must now appear on the initial declaration of the related
2843 subprogram.
2844
2845 2017-09-18 Ed Schonberg <schonberg@adacore.com>
2846
2847 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, At the end of the
2848 declarative list in a subprogram body, analyze aspext specifications to
2849 provide basic semantic information, because otherwise the aspect
2850 specifications might only be snalyzed during expansion, when related
2851 subprograms are generated.
2852
2853 2017-09-18 Bob Duff <duff@adacore.com>
2854
2855 * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
2856 validity checks have rewritten the tree.
2857
2858 2017-09-18 Bob Duff <duff@adacore.com>
2859
2860 * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
2861
2862 2017-09-18 Ed Schonberg <schonberg@adacore.com>
2863
2864 * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
2865 qualified exxpression for an aggregate in a generic unit, verify that
2866 the scope of the type is itself visible and not hidden, so that the
2867 qualified expression is correctly resolved in any instance.
2868
2869 2017-09-18 Bob Duff <duff@adacore.com>
2870
2871 * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
2872 mark refers to the current instance. Set the type to Any_Type in that
2873 case, to avoid later crashes.
2874
2875 2017-09-18 Ed Schonberg <schonberg@adacore.com>
2876
2877 * exp_ch3.adb (Replace_Discriminant_References): New procedure,
2878 subsidiary of Build_Assignment, used to handle the initialization code
2879 for a mutable record component whose default value is an aggregate that
2880 sets the values of the discriminants of the components.
2881
2882 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
2883
2884 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
2885 the entity as being volatile for an overlay that toggles the scalar
2886 storage order.
2887
2888 2017-09-18 Fedor Rybin <frybin@adacore.com>
2889
2890 * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
2891 options -U main and --harness-only are not compatible.
2892
2893 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
2894
2895 * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
2896
2897 2017-09-18 Piotr Trojanek <trojanek@adacore.com>
2898
2899 * einfo.ads (Is_Imported): Update comment, as this
2900 routine also applies to constants.
2901
2902 2017-09-18 Yannick Moy <moy@adacore.com>
2903
2904 * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
2905 holding state.
2906
2907 2017-09-18 Justin Squirek <squirek@adacore.com>
2908
2909 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
2910 constant indication for Pragma_Linker_Section.
2911
2912 2017-09-18 Bob Duff <duff@adacore.com>
2913
2914 Alternate fix for PR ada/71358
2915 * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
2916 Instead, make a local copy of Config, and if it's null, allocate an
2917 empty Command_Line_Configuration_Record, so we won't crash on null
2918 pointer dereference.
2919
2920 2017-09-16 Eric Botcazou <ebotcazou@adacore.com>
2921
2922 * libgnarl/a-intnam__rtems.ads: Update copyright date.
2923 * libgnarl/s-interr__hwint.adb: Likewise.
2924 * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
2925 * libgnarl/s-osinte__rtems.adb: Likewise.
2926 * libgnarl/s-osinte__rtems.ads: Likewise.
2927
2928 2017-09-13 Nicolas Roche <roche@adacore.com>
2929
2930 * Make-lang.in: In the fallback mechanim, parse the associated .ali
2931 file and try to guess the locations of dependencies.
2932
2933 2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
2934
2935 * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
2936 the suppression status of Alignment_Check on the current scope.
2937 (Alignment_Checks_Suppressed): New function to use the saved instead of
2938 the current suppression status of Alignment_Check.
2939 (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
2940 (Analyze_Attribute_Definition_Clause): Instead of manually appending to
2941 the table, call Register_Address_Clause_Check.
2942 (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
2943 recorded address clause instead of its entity.
2944
2945 2017-09-13 Jerome Guitton <guitton@adacore.com>
2946
2947 * libgnarl/s-tpopsp__vxworks-tls.adb,
2948 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
2949 (Self): Register thread if task id is null.
2950
2951 2017-09-13 Arnaud Charlet <charlet@adacore.com>
2952
2953 * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
2954
2955 2017-09-13 Arnaud Charlet <charlet@adacore.com>
2956
2957 * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
2958 from an entity to only scope index, as a mapping from an entity to the
2959 same entity was useless.
2960 (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
2961 to E.
2962 (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
2963 to E.
2964 (Is_Constant_Object_Without_Variable_Input): remove local "Result"
2965 variable, just use return statements.
2966
2967 2017-09-13 Arnaud Charlet <charlet@adacore.com>
2968
2969 * libgnarl/s-vxwext__kernel-smp.adb,
2970 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
2971 New file.
2972
2973 2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
2974
2975 * einfo.adb: Flag42 is now Is_Controlled_Active.
2976 (Is_Controlled): This attribute is now synthesized.
2977 (Is_Controlled_Active): This attribute is now an explicit flag rather
2978 than a synthesized attribute. (Set_Is_Controlled): Removed.
2979 (Set_Is_Controlled_Active): New routine.
2980 (Write_Entity_Flags): Update the output for Flag42.
2981 * einfo.ads: Update the documentation of the following attributes:
2982 Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
2983 and Is_Controlled_Active have swapped their functionality.
2984 (Is_Controlled): Renamed to Is_Controlled_Active.
2985 (Is_Controlled_Active): Renamed to Is_Controlled.
2986 (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
2987 * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
2988 Is_Controlled.
2989 * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
2990 (Needs_Finalization): Code clean up. Remove the tests for
2991 Disable_Controlled because a) they were incorrect as they would reject
2992 a type which is sublect to the aspect, but may contain controlled
2993 components, and b) they are no longer necessary.
2994 * exp_util.ads (Needs_Finalization): Update comment on documentation.
2995 * freeze.adb (Freeze_Array_Type): Restore the original use of
2996 Is_Controlled.
2997 (Freeze_Record_Type): Restore the original use of Is_Controlled.
2998 * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
2999 Is_Controlled.
3000 (Array_Type_Declaration): Restore the original use of Is_Controlled.
3001 (Build_Derived_Private_Type): Restore the original use of
3002 Is_Controlled.
3003 (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
3004 type derived from Ada.Finalization.[Limited_]Controlled.
3005 (Build_Derived_Type): Restore the original use of Is_Controlled.
3006 (Record_Type_Definition): Restore the original use of Is_Controlled.
3007 * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
3008 Is_Controlled.
3009 * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
3010 (Analyze_Aspect_Specifications): Use routine
3011 Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
3012
3013 2017-09-13 Vincent Celier <celier@adacore.com>
3014
3015 * clean.adb (Gnatclean): Fix error when looking for target
3016 of <target>-gnatclean
3017
3018 2017-09-13 Javier Miranda <miranda@adacore.com>
3019 Ed Schonberg <schonberg@adacore.com>
3020
3021 * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
3022 expanded name that designates the current instance of a child unit in
3023 its own body and appears as the prefix of a reference to an entity
3024 local to the child unit.
3025
3026 2017-09-12 Bob Duff <duff@adacore.com>
3027
3028 * sem_warn.adb: Minor comment.
3029
3030 2017-09-12 Bob Duff <duff@adacore.com>
3031
3032 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
3033 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
3034 be Default_Initialized_Item, and apply pragma Unmodified to it,
3035 to suppress the warning.
3036
3037 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3038
3039 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
3040 for access types.
3041
3042 2017-09-12 Yannick Moy <moy@adacore.com>
3043
3044 * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
3045 together with Global when ignoring one in CodePeer mode.
3046
3047 2017-09-12 Javier Miranda <miranda@adacore.com>
3048
3049 * sem_ch3.adb (Analyze_Declarations): In nested
3050 package declarations that have a private part enable missing check
3051 of the RM rule 13.1.1(11/3): usage names in aspect definitions are
3052 resolved at the end of the immediately enclosing declaration list.
3053
3054 2017-09-12 Bob Duff <duff@adacore.com>
3055
3056 * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
3057 Empty.
3058
3059 2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
3060
3061 * debug.adb: Reserving flag -gnatdF for safe pointer checking.
3062 * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
3063 dF flag.
3064 * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
3065 in preparation for the evolution of the SPARK language that
3066 includes a pointer analysis for checking non-aliasing of access
3067 types. The Check_Safe_Pointers function is the entry point, and
3068 will traverse the AST and raise compile-time errors everytime
3069 it detects non-begign aliasing. Detailed comments are present
3070 in the sem_spark.ads file.
3071 * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
3072 functions to iterate over the list of globals of a subprogram.
3073 * libgnat/system.ads: Add restriction No_Finalization.
3074 * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
3075 dependency on g-dynhta.adb.
3076
3077 2017-09-12 Bob Duff <duff@adacore.com>
3078
3079 * sem_ch6.adb (Analyze_Expression_Function): Call
3080 Check_Dynamically_Tagged_Expression.
3081 * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
3082 "and then Is_Tagged_Type (Typ)" because there is an earlier
3083 "Assert (Is_Tagged_Type (Typ))".
3084
3085 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3086
3087 * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
3088
3089 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3090
3091 * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
3092 * doc/gnat_ugn/platform_specific_information.rst: Remove doc
3093 for no longer supported platforms.
3094 * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
3095 description of the semantics for dimensionality analysis.
3096 * gnat_ugn.texi: Regenerated.
3097
3098 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3099
3100 * freeze.adb (Has_Incomplete_Compoent): Delete.
3101 (Freeze_Profile):
3102 Do not inhibit the freezing of the profile of an expression
3103 function here.
3104 (Freeze_Subprogram): Do not re-create extra formals.
3105 * sem_ch6.adb (Analyze_Expression_Function): Always
3106 pre-analyze the expression if the function is not a completion.
3107 (Analyze_Subprogram_Body_Helper): For the body generated
3108 from an expression function that is not a completion, do
3109 not freeze the profile and temporary mask the types declared
3110 outside the expression that are not yet frozen.
3111 * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
3112 during the pre-analysis of an expression function.
3113
3114 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3115
3116 * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
3117 (gigi): Likewise.
3118
3119 2017-09-11 Yannick Moy <moy@adacore.com>
3120
3121 * lib-xref-spark_specific.adb: Minor rewrite.
3122
3123 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3124
3125 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
3126 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
3127 renaming into account.
3128
3129 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3130
3131 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
3132 * gcc-interface/Makefile.in: Take this renaming into account.
3133
3134 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3135
3136 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
3137 longer used.
3138
3139 2017-09-11 Yannick Moy <moy@adacore.com>
3140
3141 * sem_util.adb (Check_Result_And_Post_State):
3142 Do not issue a warning about missing reference to an outcome if
3143 the subprogram is ghost and has no outputs.
3144 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
3145 reformatting.
3146
3147 2017-09-11 Yannick Moy <moy@adacore.com>
3148
3149 * gnat1drv.adb (Adjust_Global_Switches): Set
3150 Check_Validity_Of_Parameters to False in GNATprove mode.
3151 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3152 set option.
3153
3154 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
3155
3156 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
3157 generate debug info for inner record types if -fgnat-encodings=minimal.
3158 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
3159 type as the debug type.
3160
3161 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3162
3163 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
3164 packed record types if pragma Optimize_Alignment (Space) is enabled.
3165
3166 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3167
3168 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
3169 limits for expression functions.
3170 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
3171
3172 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3173
3174 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
3175 layout of the record from the parent type only if both are or are not
3176 unchecked unions.
3177 (is_stored_discriminant): Return false for an unchecked union.
3178
3179 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3180
3181 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
3182 return NULL_EXPR.
3183
3184 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3185
3186 * gcc-interface/decl.c (promote_object_alignment): New function taken
3187 from...
3188 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
3189 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
3190 create a padding type on success before doing the atomic check.
3191
3192 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3193
3194 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
3195 promotion to static memory earlier in the processing.
3196
3197 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3198
3199 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
3200 and TYPE_BY_REFERENCE_P flags on types after various promotions.
3201 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
3202 Consider all kinds of entities.
3203
3204 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3205
3206 * gcc-interface/utils.c (convert): When converting to a padding type,
3207 reuse an existing CONSTRUCTOR if it has got the right size.
3208
3209 2017-09-08 Nicolas Roche <roche@adacore.com>
3210
3211 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
3212 source in libgnat/
3213 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
3214 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
3215 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
3216 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
3217 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
3218 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
3219 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
3220 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
3221 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
3222 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
3223 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
3224 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
3225 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
3226 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
3227 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
3228 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
3229 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
3230 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
3231 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
3232 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
3233 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
3234 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
3235 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
3236 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
3237 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
3238 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
3239 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
3240 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
3241 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
3242 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
3243 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
3244 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
3245 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
3246 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
3247 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
3248 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
3249 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
3250 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
3251 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
3252 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
3253 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
3254 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
3255 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
3256 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
3257 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
3258 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
3259 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
3260 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
3261 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
3262 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
3263 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
3264 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
3265 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
3266 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
3267 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
3268 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
3269 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
3270 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
3271 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
3272 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
3273 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
3274 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
3275 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
3276 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
3277 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
3278 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
3279 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
3280 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
3281 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
3282 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
3283 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
3284 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
3285 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
3286 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
3287 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
3288 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
3289 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
3290 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
3291 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
3292 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
3293 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
3294 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
3295 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
3296 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
3297 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
3298 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
3299 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
3300 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
3301 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
3302 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
3303 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
3304 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
3305 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
3306 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
3307 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
3308 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
3309 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
3310 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
3311 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
3312 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
3313 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
3314 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
3315 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
3316 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
3317 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
3318 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
3319 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
3320 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
3321 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
3322 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
3323 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
3324 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
3325 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
3326 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
3327 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
3328 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
3329 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
3330 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
3331 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
3332 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
3333 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
3334 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
3335 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
3336 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
3337 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
3338 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
3339 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
3340 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
3341 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
3342 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
3343 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
3344 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
3345 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
3346 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
3347 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
3348 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
3349 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
3350 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
3351 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
3352 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
3353 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
3354 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
3355 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
3356 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
3357 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
3358 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
3359 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
3360 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
3361 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
3362 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
3363 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
3364 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
3365 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
3366 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
3367 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
3368 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
3369 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
3370 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
3371 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
3372 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
3373 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
3374 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
3375 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
3376 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
3377 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
3378 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
3379 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
3380 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
3381 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
3382 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
3383 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
3384 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
3385 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
3386 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
3387 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
3388 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
3389 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
3390 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
3391 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
3392 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
3393 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
3394 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
3395 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
3396 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
3397 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
3398 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
3399 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
3400 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
3401 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
3402 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
3403 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
3404 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
3405 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
3406 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
3407 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
3408 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
3409 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
3410 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
3411 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
3412 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
3413 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
3414 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
3415 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
3416 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
3417 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
3418 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
3419 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
3420 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
3421 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
3422 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
3423 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
3424 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
3425 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
3426 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
3427 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
3428 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
3429 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
3430 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
3431 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
3432 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
3433 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
3434 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
3435 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
3436 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
3437 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
3438 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
3439 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
3440 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
3441 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
3442 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
3443 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
3444 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
3445 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
3446 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
3447 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
3448 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
3449 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
3450 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
3451 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
3452 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
3453 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
3454 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
3455 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
3456 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
3457 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
3458 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
3459 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
3460 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
3461 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
3462 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
3463 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
3464 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
3465 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
3466 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
3467 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
3468 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
3469 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
3470 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
3471 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
3472 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
3473 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
3474 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
3475 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
3476 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
3477 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
3478 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
3479 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
3480 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
3481 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
3482 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
3483 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
3484 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
3485 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
3486 to libgnat subdirectory.
3487
3488 2017-09-08 Yannick Moy <moy@adacore.com>
3489
3490 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
3491 return the entity associated with the call.
3492 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
3493 Replace the internal Get_Function_Id with the new
3494 Sem_Aux.Get_Called_Entity.
3495 (Iterate_Call_Parameters): New
3496 procedure to iterate on formals and actuals at the same time.
3497 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
3498 Set SPARK_Mode from spec when set, for analysis
3499 of instance. Restore after analysis of instance.
3500 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
3501 set, for analysis of body instance. Restored automatically at
3502 the end of the subprogram.
3503 * gnat1drv.adb (Adjust_Global_Switches): Set
3504 Check_Validity_Of_Parameters to False in GNATprove mode.
3505 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3506 set option.
3507
3508 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3509
3510 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
3511 (New_Copy_Tree): ...there. Reset the hash tables only if they
3512 were used in the previous invocation.
3513 * s-htable.adb: Fix typo.
3514
3515 2017-09-08 Bob Duff <duff@adacore.com>
3516
3517 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
3518
3519 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3520
3521 * sem_aggr.adb: minor style fix.
3522
3523 2017-09-08 Bob Duff <duff@adacore.com>
3524
3525 * sprint.adb (Write_Corresponding_Source): Ignore if there is
3526 no current source file.
3527 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
3528 Print something helpful in case N is invalid.
3529 * sprint.ads: Minor comment fix.
3530
3531 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3532
3533 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
3534 access types.
3535
3536 2017-09-08 Bob Duff <duff@adacore.com>
3537
3538 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
3539 Ada_2020, along the same lines as the other Ada version pragmas.
3540
3541 2017-09-08 Gary Dismukes <dismukes@adacore.com>
3542
3543 * sem_ch12.adb: Minor typo fixes and reformatting.
3544
3545 2017-09-08 Yannick Moy <moy@adacore.com>
3546
3547 * sem_aggr.adb (Resolve_Record_Aggregate):
3548 Rewrite bounds of aggregate subexpressions which may depend on
3549 discriminants of the enclosing aggregate.
3550
3551 2017-09-08 Yannick Moy <moy@adacore.com>
3552
3553 * sem_ch5.adb: Prevent assertion failure on illegal code.
3554
3555 2017-09-08 Yannick Moy <moy@adacore.com>
3556
3557 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
3558 calling Renamed_Entity on an entity which cannot be a renaming.
3559
3560 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3561
3562 * exp_aggr.adb: Add with & use clause for Urealp.
3563 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
3564 elementary types instead of just discrete types.
3565 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
3566 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
3567 Be prepared for the FP zero value in the memset case. Add small
3568 guard.
3569
3570 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3571
3572 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
3573 of loop.
3574
3575 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3576
3577 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
3578 of New_Copy because the latter leaves the syntactic structure of
3579 the tree inconsistent (a child is accessible through two parents)
3580 and prevents proper replication of itypes by subsequent calls
3581 to New_Copy_Tree.
3582 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
3583 New_Copy because the latter leaves the syntactic structure of the
3584 tree inconsistent (a child is accessible through two parents)
3585 and prevents proper replication of itypes by subsequent calls
3586 to New_Copy_Tree.
3587 * sem_util.adb (In_Subtree): New routine.
3588 (New_Copy_Tree): Reimplemented.
3589 * sem_util.ads (In_Subtree): New routine.
3590 (New_Copy_Tree): Reimplemented.
3591
3592 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3593
3594 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
3595 for aspect Default_Value is a static scalar value, but it does
3596 not freeze the type. Yhis allows for subsequent representation
3597 clauses for the type.
3598
3599 2017-09-08 Javier Miranda <miranda@adacore.com>
3600
3601 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
3602 not add entries into the undefined reference table when we are
3603 compiling with errors ignored.
3604
3605 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3606
3607 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
3608 check if the instance is within an enclosing instance body. The
3609 formal package was legal in the enclosing generic, and is
3610 legal in the enclosing instantiation. This optimisation may be
3611 applicable elsewhere, and it also removes spurious errors that
3612 may arise with on-the-fly processing of instantiations that
3613 contain Inline_Always subprograms.
3614
3615 2017-09-08 Vincent Celier <celier@adacore.com>
3616
3617 * gnatcmd.adb: Disregard empty argument of GNAT driver.
3618
3619 2017-09-08 Justin Squirek <squirek@adacore.com>
3620
3621 * checks.adb (Insert_Valid_Check): Manually decorate
3622 the generated temporary for range valdity checks.
3623
3624 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3625
3626 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
3627
3628 2017-09-08 Justin Squirek <squirek@adacore.com>
3629
3630 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
3631 case to handle underscore flags.
3632 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
3633 new procedure to handle underscores.
3634
3635 2017-09-08 Javier Miranda <miranda@adacore.com>
3636
3637 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
3638 divisions with fixed point results to avoid generating twice
3639 the runtime check on divide by zero.
3640 * checks.adb (Apply_Divide_Checks): Ensure that operands are
3641 not evaluated twice (once for their runtime checks and once for
3642 their regular computation).
3643
3644 2017-09-08 Yannick Moy <moy@adacore.com>
3645
3646 * sem_prag.adb (Analyze_Part_Of): Add missing
3647 return statements after issuing errors. Add detection of
3648 out-of-order item and single concurrent type.
3649
3650 2017-09-08 Nicolas Roche <roche@adacore.com>
3651
3652 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
3653 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
3654 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
3655 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
3656 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
3657 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
3658 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
3659 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
3660 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
3661 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
3662 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
3663 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
3664 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
3665 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
3666 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
3667 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
3668 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
3669 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
3670 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
3671 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
3672 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
3673 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
3674 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
3675 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
3676 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
3677 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
3678 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
3679 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
3680 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
3681 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
3682 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
3683 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
3684 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
3685 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
3686 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
3687 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
3688 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
3689 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
3690 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
3691 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
3692 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
3693 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
3694 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
3695 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
3696 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
3697 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
3698 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
3699 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
3700 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
3701 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
3702 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
3703 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
3704 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
3705 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
3706
3707 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3708
3709 * doc/share/conf.py, doc/share/latex_elements.py,
3710 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
3711 highlighting.
3712
3713 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3714
3715 * gnat_rm.texi, gnat_ugn.texi,
3716 doc/gnat_ugn/the_gnat_compilation_model.rst,
3717 doc/gnat_ugn/getting_started_with_gnat.rst,
3718 doc/gnat_ugn/inline_assembler.rst,
3719 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3720 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
3721 doc/gnat_ugn/about_this_guide.rst,
3722 doc/gnat_ugn/platform_specific_information.rst,
3723 doc/gnat_ugn/example_of_binder_output.rst,
3724 doc/gnat_ugn/gnat_and_program_execution.rst,
3725 doc/gnat_ugn/gnat_utility_programs.rst,
3726 doc/gnat_rm/implementation_of_specific_ada_features.rst,
3727 doc/gnat_rm/interfacing_to_other_languages.rst,
3728 doc/gnat_rm/implementation_defined_aspects.rst,
3729 doc/gnat_rm/intrinsic_subprograms.rst,
3730 doc/gnat_rm/implementation_defined_characteristics.rst,
3731 doc/gnat_rm/implementation_advice.rst,
3732 doc/gnat_rm/implementation_defined_attributes.rst,
3733 doc/gnat_rm/compatibility_and_porting_guide.rst,
3734 doc/gnat_rm/standard_library_routines.rst,
3735 doc/gnat_rm/the_gnat_library.rst,
3736 doc/gnat_rm/implementation_defined_pragmas.rst,
3737 doc/gnat_rm/representation_clauses_and_pragmas.rst,
3738 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3739 doc/gnat_rm/obsolescent_features.rst,
3740 doc/gnat_rm/about_this_guide.rst,
3741 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
3742 doc/gnat_rm/implementation_of_ada_2012_features.rst,
3743 doc/gnat_ugn.rst,
3744 doc/gnat_rm.rst: Update documentation.
3745
3746 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3747
3748 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
3749 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
3750 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
3751
3752 2017-09-08 Bob Duff <duff@adacore.com>
3753
3754 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
3755 New routine to read the Tag robustly.
3756 * exp_attr.adb (Input): Change the expansion of 'Input,
3757 in the class-wide case, to call String_Input_Tag instead of
3758 String_Input_Blk_IO.
3759
3760 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3761
3762 * s-rident.ads (Restriction_Id): reorder enum
3763 literals, so that Pure_Barriers is no longer in range of the
3764 Cunit_Boolean_Restrictions subtype.
3765
3766 2017-09-08 Nicolas Roche <roche@adacore.com>
3767
3768 * a-taster.ads, a-taster.adb: Move to libgnarl
3769 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
3770 Add support for files in libgnarl.
3771
3772 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3773
3774 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
3775 accessibility check to an interface conversion, whose purpose
3776 is to perform a pointer adjustment in a dispatching call.
3777 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
3778 when the actual is a construct that involves a dereference of an
3779 expression that includes a formal of the enclosing subprogram,
3780 In such cases, the accessibility level of the actual is that of
3781 the corresponding formal, which is passed in as an additional
3782 actual in the outer call.
3783
3784 2017-09-08 Bob Duff <duff@adacore.com>
3785
3786 * exp_intr.adb (Add_Source_Info): Do not decode
3787 file names; they were not encoded in the first place.
3788
3789 2017-09-08 Bob Duff <duff@adacore.com>
3790
3791 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
3792 exceptions instead of crashes. Check for absurdly long strings
3793 and empty strings. Empty strings cause trouble because they can
3794 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
3795 be empty, which causes an array index out of bounds.
3796 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
3797 instead of crashes.
3798
3799 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3800
3801 * sem_util.adb (Is_CCT_Instance): allow use in
3802 the context of protected types.
3803
3804 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3805
3806 * a-tigeli.adb: minor remove extra whitespace.
3807
3808 2017-09-08 Gary Dismukes <dismukes@adacore.com>
3809
3810 * par-ch4.adb: Reformatting of an error message.
3811
3812 2017-09-08 Javier Miranda <miranda@adacore.com>
3813
3814 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
3815 identifiers to ensure their correct decoration of names on
3816 aspect expressions.
3817
3818 2017-09-08 Yannick Moy <moy@adacore.com>
3819
3820 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
3821 not skip a loop coming from source which is rewritten into a loop.
3822
3823 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3824
3825 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
3826 wrapper has convention Ada, to prevent spurious warnings on
3827 unconstrained array parameters.
3828
3829 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3830
3831 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
3832 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
3833
3834 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3835
3836 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
3837
3838 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3839
3840 * exp_intr.adb (Append_Entity_Name): Move to ...
3841 * sem_util.ads, sem_util.adb: ... here to share it.
3842 (Subprogram_Name): New subprogram, to compute the name of the enclosing
3843 subprogram/entity.
3844 * errutil.adb (Error_Msg): Fill new field Node.
3845 * erroutc.ads (Subprogram_Name_Ptr): New.
3846 (Error_Msg_Object): New field Node.
3847 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
3848 * errout.adb (Error_Msg): New variant with node id parameter.
3849 Fill new parameter Node when emitting messages. Revert previous
3850 changes for Include_Subprogram_In_Messages.
3851 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
3852 generating warning message.
3853
3854 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3855
3856 * par-ch4.adb (P_Iterated_Component_Association): Place construct
3857 under -gnat2020 flag, given that it is a future feature of
3858 the language.
3859 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
3860 defining identifier as referenced to prevent spurious warnings:
3861 corresponding loop is expanded into one or more loops whose
3862 variable has the same name, and the expression uses those names
3863 and not the original one.
3864
3865 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3866
3867 * sem_elab.adb (Check_A_Call): Do not consider
3868 references to internal variables for SPARK semantics.
3869
3870 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3871
3872 * inline.adb (In_Package_Spec): refine type of
3873 the parameter from Node_Id to Entity_Id.
3874
3875 2017-09-08 Justin Squirek <squirek@adacore.com>
3876
3877 * exp_ch5.adb (Expand_Formal_Container_Loop):
3878 Reset the scope of the loop parameter after it is reanalyzed.
3879
3880 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3881
3882 * sem_util.ads (Set_Rep_Info): New inline procedure.
3883 * sem_util.adb (Set_Rep_Info): Implement it.
3884 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
3885 always copy the representation aspects onto the subtype.
3886
3887 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
3888
3889 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
3890 Correction of the return type from access type to option type.
3891 (Simple_HTable): Moving the Instance_Data to ads file.
3892
3893 2017-09-08 Yannick Moy <moy@adacore.com>
3894
3895 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
3896
3897 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3898
3899 * opt.ads (Include_Subprogram_In_Messages): New variable.
3900 * errout.ads (Current_Subprogram_Ptr): New variable.
3901 * errout.adb (Error_Msg): Prepend current subprogram info
3902 in messages if Include_Subprogram_In_Messages is set.
3903 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
3904 Current_Subprogram.
3905 * gnat1drv.adb (Adjust_Global_Switches): Set
3906 Include_Subprogram_In_Messages when -gnatdJ is set.
3907 * debug.adb: Document and reserve -gnatdJ.
3908
3909 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
3910
3911 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
3912 functions to iterate over simple hastables.
3913 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
3914
3915 2017-09-08 Javier Miranda <miranda@adacore.com>
3916
3917 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
3918 missing checks on the presence of Entity() before checking the
3919 entity attributes.
3920
3921 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3922
3923 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
3924 statements, use local variable and remove unnecessary processing.
3925
3926 2017-09-08 Javier Miranda <miranda@adacore.com>
3927
3928 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
3929 subprogram.
3930 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
3931 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
3932 subprogram.
3933 (Unqual_BIP_Iface_Function_Call): New subprogram.
3934 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
3935 subprogram containing code that was previously inside
3936 Make_Build_In_Place_Call_In_Object_Declaration since it is also
3937 required for one of the new subprograms.
3938 (Expand_Actuals):
3939 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
3940 (Expand_N_Extended_Return_Statement): Extend the
3941 cases covered by an assertion on expected BIP object
3942 declarations.
3943 (Make_Build_In_Place_Call_In_Assignment):
3944 Removing unused code; found working on this ticket.
3945 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
3946 that replaces the internal name of the renaming declaration
3947 into the new subprogram Replace_Renaming_Declaration_Id.
3948 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
3949 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
3950 New subprogram.
3951 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
3952 subprogram.
3953 (Unqual_BIP_Iface_Function_Call): New subprogram.
3954 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
3955 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
3956 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
3957 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3958 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
3959 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
3960 (Expand_N_Indexed_Component): Invoke the new subprogram
3961 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3962 (Expand_N_Selected_Component): Invoke the new subprogram
3963 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3964 (Expand_N_Slice): Invoke the new subprogram
3965 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3966 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
3967 Invoke the new subprogram
3968 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3969
3970 2017-09-08 Javier Miranda <miranda@adacore.com>
3971
3972 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
3973 access to interface types. Remove also the accessibility check.
3974
3975 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3976
3977 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
3978 all the types that are referenced by the expression.
3979 (Analyze_Expression_Function): Call Freeze_Expr_Types for
3980 a completion instead of manually freezing the type of the
3981 expression.
3982 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
3983
3984 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3985
3986 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
3987 New procedure, auxiliary to Expand_Pragma_Check, to handle
3988 references to the discriminants of a protected type within a
3989 precondition of a protected operation. This is needed because
3990 the original precondition has been analyzed in the context of
3991 the protected declaration, but in the body of the operation
3992 references to the discriminants have been replaved by references
3993 to the discriminants of the target object, and these references
3994 are only created when expanding the protected body.
3995
3996 2017-09-08 Yannick Moy <moy@adacore.com>
3997
3998 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
3999 Loop_Variant.
4000
4001 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4002
4003 * exp_attr.adb (Build_Record_VS_Func): If the record is an
4004 unchecked union, do not emit checks for its (non-existent)
4005 discriminants, or for variant parts that depend on them.
4006
4007 2017-09-08 Justin Squirek <squirek@adacore.com>
4008
4009 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
4010 Find_Comparison_Type.Try_One_Interp): Add check for generic
4011 instances.
4012
4013 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4014
4015 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
4016 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
4017 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
4018 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
4019 remaining references to AAMP_On_Target.
4020
4021 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4022
4023 * style.adb: Fix typo.
4024
4025 2017-09-08 Javier Miranda <miranda@adacore.com>
4026
4027 * einfo.adb (Underlying_Type): Add missing support for class-wide
4028 types that come from the limited view.
4029 * exp_attr.adb (Attribute_Address): Check class-wide type
4030 interfaces using the underlying type to handle limited-withed
4031 types.
4032 (Attribute_Tag): Check class-wide type interfaces using
4033 the underlying type to handle limited-withed types.
4034
4035 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4036
4037 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
4038 over a subtype of a type with a static predicate, taking into
4039 account the predicate function of the parent type and the bounds
4040 given in the loop specification.
4041 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
4042 a loop specification that is a subtype indication whose type mark
4043 is a type with a static predicate, inherit predicate function,
4044 used to build case statement for rewritten loop.
4045
4046 2017-09-08 Justin Squirek <squirek@adacore.com>
4047
4048 * lib-load.adb: Modify printing of error message to exclude file
4049 line number.
4050
4051 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4052
4053 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
4054 don't inline subprograms declared in both visible and private
4055 parts of a package.
4056 (In_Package_Spec): previously In_Package_Visible_Spec; now
4057 detects subprograms declared both in visible and private parts
4058 of a package spec.
4059
4060 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4061
4062 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
4063 the type is an anonymous array in an object declaration, whose
4064 component type has an invariant, use the object declaration
4065 as the insertion point for the invariant procedure, given that
4066 there is no explicit type declaration for an anonymous array type.
4067
4068 2017-09-08 Bob Duff <duff@adacore.com>
4069
4070 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
4071
4072 2017-09-08 Bob Duff <duff@adacore.com>
4073
4074 * a-strfix.adb (Trim): Compute Low and High only if needed.
4075
4076 2017-09-08 Justin Squirek <squirek@adacore.com>
4077
4078 * lib-load.adb (Load_Main_Source): Add error output in the case a
4079 source file is missing.
4080
4081 2017-09-08 Bob Duff <duff@adacore.com>
4082
4083 PR ada/80888
4084 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
4085 Default_WCEM by default (i.e. if the encoding is not specified
4086 by the Form string).
4087
4088 2017-09-08 Bob Duff <duff@adacore.com>
4089
4090 * s-trasym.ads (Hexa_Traceback): If
4091 Suppress_Hex is True, print "..." instead of a hexadecimal
4092 address.
4093 * s-trasym.adb: Ignore No_Hex in this version.
4094 Misc cleanup.
4095
4096 2017-09-08 Bob Duff <duff@adacore.com>
4097
4098 * debug.adb: Minor reformatting.
4099
4100 2017-09-08 Bob Duff <duff@adacore.com>
4101
4102 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
4103 code so it doesn't trigger an "uninit var" warning.
4104
4105 2017-09-08 Nicolas Roche <roche@adacore.com>
4106
4107 * s-hibaen.ads: Remove obsolete file.
4108
4109 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4110
4111 * a-locale.ads: Add comment explaining the state of this package.
4112
4113 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4114
4115 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
4116 of packages.
4117 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
4118 allow calls in the context of package spec (for pragma
4119 Initializes) and bodies (for pragma Refined_State).
4120
4121 2017-09-08 Bob Duff <duff@adacore.com>
4122
4123 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
4124 new Exp.
4125
4126 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4127
4128 * debug.adb (dA): Adjust comment.
4129 * gnat1drv.adb (Gnat1drv): Likewise.
4130 * opt.ads (List_Representation_Info_Extended): New variable.
4131 * repinfo.adb (List_Record_Info): Split implementation into...
4132 (Compute_Max_Length): ...this. Recurse on records if requested.
4133 (List_Record_Layout): Likewise.
4134 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
4135 statement, accept '0' and set List_Representation_Info_Extended
4136 on 'e'.
4137 * usage.adb (Usage): Document new -gnatRe variant.
4138
4139 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4140
4141 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
4142 Do not save the given entity in the global variable Default_Pool
4143 if the pragma appears within a generic unit.
4144
4145 2017-09-08 Bob Duff <duff@adacore.com>
4146
4147 * errout.adb (Delete_Warning): Do not
4148 decrement Warnings_Treated_As_Errors. This is called before
4149 Warnings_Treated_As_Errors has been incremented to account for
4150 this warning. Decrementing it here can lead to negative values
4151 of Warnings_Treated_As_Errors, raising Constraint_Error in
4152 checks-on builds, and causing the compiler to return an error
4153 code in checks-off builds.
4154
4155 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4156
4157 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
4158 entities of named concurrent types as Ref_Id and not of anonymous
4159 concurrent objects (because callers already know when a conversion
4160 is necessary and can easily do it); also, do not expect protected
4161 types or protected objects as Context_Id (because no flow-related
4162 SPARK pragmas are attached there); reflect these changes in a
4163 more precise comment.
4164
4165 2017-09-08 Olivier Hainque <hainque@adacore.com>
4166
4167 * g-altive.ads: Add documentation.
4168
4169 2017-09-08 Bob Duff <duff@adacore.com>
4170
4171 * sem_util.ads, debug.adb: Minor comment fix.
4172 * erroutc.ads: Comment fix.
4173
4174 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4175
4176 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
4177 for compatibility of component types of formal and actual in an
4178 instantiation of a child unit, when the component type of the
4179 formal is itself a formal of an enclosing generic.
4180
4181 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4182
4183 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
4184 sem_prag.adb to make it available for GNATprove; for concurrent
4185 types replace custom scope climbing with Scope_Same_Or_Within; for
4186 single concurrent objects add scope climbing (with Scope_Within),
4187 which was not there (that's the primary semantic change of this
4188 commit); also, when comparing a single concurrent object with
4189 its corresponding concurrent type rely on equality of types,
4190 not of objects (because that's simpler to code).
4191 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
4192 (Analyze_Global_Item): adjust special-casing of references to the
4193 current instance of a concurrent unit in the Global contracts
4194 of task types and single tasks objects; similar for references
4195 in the protected operations and entries of protected types and
4196 single protected objects (in all these cases the current instance
4197 behaves as an implicit parameter and must not be mentioned in
4198 the Global contract).
4199
4200 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4201
4202 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
4203 function calls returning a record within a subprogram call,
4204 for C generation.
4205
4206 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4207
4208 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
4209 name that designates the current instance of a child unit in its
4210 own body and appears as the prefix of a reference to an entity
4211 local to the child unit.
4212 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
4213 Minor reformatting.
4214
4215 2017-09-08 Yannick Moy <moy@adacore.com>
4216
4217 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
4218 may be intentional.
4219
4220 2017-09-08 Tristan Gingold <gingold@adacore.com>
4221
4222 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
4223 warnings on internal units in configurable run time mode.
4224
4225 2017-09-08 Bob Duff <duff@adacore.com>
4226
4227 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
4228 representation items from interfaces that the derived type
4229 implements, not just from the parent type.
4230 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
4231 this to return an empty list when there are no interfaces.
4232 * einfo.ads, sem_ch13.adb: Minor comment fixes.
4233 * sem_attr.adb: Minor comment fix.
4234
4235 2017-09-08 Doug Rupp <rupp@adacore.com>
4236
4237 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
4238 x86-vx7.
4239
4240 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4241
4242 * exp_ch4.adb (Expand_N_Allocator): Generate a
4243 call to Allocate_Any_Controlled when the allocation does not
4244 require any initialization.
4245
4246 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4247
4248 * sem_util.adb (Copy_Node_With_Replacement):
4249 Update the Renamed_Object field of a replicated object renaming
4250 declaration.
4251
4252 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
4253
4254 * exp_ch9.adb (Is_Pure_Barrier): Allow type
4255 conversions and components of objects. Simplified the detection
4256 of the Count attribute by identifying the corresponding run-time
4257 calls.
4258
4259 2017-09-08 Yannick Moy <moy@adacore.com>
4260
4261 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
4262 sem_type.adb, sinfo.ads: Minor reformatting.
4263
4264 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4265
4266 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
4267 of Freeze_Profile, used to inhibit the freezing of the profile
4268 of an expression function declared within a nested package, when
4269 some type in the profile depends on a private type declared in
4270 an enclosing package.
4271
4272 2017-09-08 Bob Duff <duff@adacore.com>
4273
4274 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
4275 the subunit case. It's still OK to set it in the "missing subunits"
4276 case, because that won't cause the obsolete .ali files that cause
4277 confusion.
4278
4279 2017-09-08 Bob Duff <duff@adacore.com>
4280
4281 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
4282 unclear why this didn't cause a warning.
4283 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
4284 pragmas. It's unclear why this didn't cause an error.
4285
4286 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4287
4288 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
4289 Reimplemented.
4290 (Expand_SPARK_Potential_Renaming): Code clean up.
4291 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
4292 the item does not have a proper entity.
4293 (Analyze_Input_Item): Add a guard in case the item does not have a
4294 proper entity.
4295 (Collect_States_And_Objects): Include object renamings in the
4296 items being collected.
4297 (Resolve_State): Update the documentation of this routine.
4298 * sem_util.adb (Entity_Of): Add circuitry to handle
4299 renamings of function results.
4300 (Remove_Entity): New routine.
4301 (Remove_Overloaded_Entity): Take advantage of factorization.
4302 * sem_util.ads (Entity_Of): Update the documentation
4303 of this routine.
4304 (Remove_Entity): New routine.
4305 (Remove_Overloaded_Entity): Update the documentation of this
4306 routine.
4307
4308 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4309
4310 * repinfo.adb (List_Record_Info): During first loop,
4311 do not override the normalized position and first bit
4312 if they have already been set. Move fallback code
4313 for the packed case to the case where it belongs.
4314 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
4315 Also adjust the normalized position of components.
4316 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
4317
4318 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4319
4320 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
4321 the placement of a primitive operation O that renames an operation
4322 R declared in an inner package, and which is thus not a primitive
4323 of the dispatching type of O. In this case O is a new primitive
4324 and does not inherit its dispatch table position from R (which
4325 has none).
4326
4327 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4328
4329 * sem_dim.adb (Analyze_Dimension_If_Expression,
4330 Analyze_Dimension_Case_Expression): new subprograms to verify
4331 the dimensional correctness of Ada2012 conditional expressions,
4332 and set properly the dimensions of the construct.
4333 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
4334 call Analyze_Dimension.
4335
4336 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4337
4338 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
4339 loop on an interface declared as a private extension of another
4340 synchronized interface.
4341
4342 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4343
4344 * sem_ch12.adb (Check_Generic_Parent): New procedure within
4345 Analyze_Associations, to handle actual packages that depend on
4346 previous instances. If a package IAP that is an instantiation is
4347 used as an actual in a subsequent instantiation SI in the same
4348 scope, and IAP has a body, IAP must be frozen before SI. If
4349 the generic parent of IAP is itself declared in a previous
4350 instantiation in the same scope, that instantiation must also
4351 be frozen before SI.
4352 (Install_Body): Prevent double insertion of freeze node for
4353 instance.
4354
4355 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4356
4357 * sem_prag.adb (Resolve_State): Update the
4358 comment on documentation. Generate a reference to the state once
4359 resolution takes place.
4360
4361 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4362
4363 * sem_ch13.adb (Analyze_Aspect_Specifications, case
4364 Linker_Section): If the aspect applies to an object declaration
4365 with explicit initialization, do not delay the freezing of the
4366 object, to prevent access-before-elaboration in the generated
4367 initialization code.
4368
4369 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4370
4371 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
4372 (Integer_Value (Item)) when the size of the fixed decimal type
4373 is larger than Integer.
4374
4375 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4376
4377 PR ada/82127
4378 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
4379 in order of increasing position in more cases.
4380
4381 2017-09-07 Yannick Moy <moy@adacore.com>
4382
4383 * a-exetim-mingw.ads: Add contract Global=>null
4384 on all operations that are modeled as having no read or write
4385 of global variables in SPARK.
4386
4387 2017-09-07 Raphael Amiard <amiard@adacore.com>
4388
4389 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
4390 to Hmaps.Generic_Ops.
4391 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
4392 cursors.
4393 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
4394 cursors.
4395 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
4396 position in cursors.
4397
4398 2017-09-07 Javier Miranda <miranda@adacore.com>
4399
4400 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
4401 allow disabling the generation of implicit pragma Elaborate_All
4402 on task bodies.
4403
4404 2017-09-07 Javier Miranda <miranda@adacore.com>
4405
4406 * exp_disp.adb (Make_Tags): Avoid suffix counter
4407 in the external name of the elaboration flag. Required to fix
4408 the regressions introduced by the initial version of this patch.
4409
4410 2017-09-07 Bob Duff <duff@adacore.com>
4411
4412 * sem_ch6.adb (Analyze_Function_Return): Do not
4413 insert an explicit conversion to force the displacement of the
4414 "this" pointer to reference the secondary dispatch table in the
4415 case where the return statement is returning a raise expression,
4416 as in "return raise ...".
4417
4418 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4419
4420 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
4421 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
4422 procedure from sem_disp.adb.
4423 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
4424 with Unit.
4425 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
4426 return the instantiation node for subprograms. Update references
4427 to Get_Unit_Instantiation_Node.
4428 * sem_ch7.adb (Install_Parent_Private_Declarations): update
4429 reference to Get_Unit_Instantiation_Node.
4430 * exp_dist.adb (Build_Package_Stubs): update reference to
4431 Get_Unit_Instantiation_Node.
4432 * sem_ch9.adb: minor typo in comment.
4433 * lib-xref-spark_specific.adb
4434 (Traverse_Declaration_Or_Statement): traverse into task type
4435 definition.
4436
4437 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4438
4439 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
4440 to handle properly various cases of type conversions where the
4441 target type and/or the expression carry dimension information.
4442 (Dimension_System_Root); If a subtype carries dimension
4443 information, obtain the source parent type that carries the
4444 Dimension aspect.
4445
4446 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
4447
4448 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
4449
4450 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4451
4452 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
4453 If the prefix is a reference to an object, rewrite it as an
4454 explicit dereference, as required by 3.7.2 (2) and as is done
4455 with most other attributes whose prefix is an access value.
4456
4457 2017-09-07 Bob Duff <duff@adacore.com>
4458
4459 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
4460 Refined_Depends aspect.
4461 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
4462 Refined_Depends pragma.
4463 * scans.ads: Fix documentation of Inside_Depends flag.
4464 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
4465
4466 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
4467
4468 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
4469 Account for the case where the are no lists to insert, but the
4470 secondary stack still requires management.
4471 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
4472 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
4473 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
4474 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
4475 Minor reformatting.
4476
4477 2017-09-07 Vincent Celier <celier@adacore.com>
4478
4479 * clean.adb: Do not get the target parameters before calling
4480 gprclean.
4481
4482 2017-09-07 Nicolas Roche <roche@adacore.com>
4483
4484 * s-osinte-solaris-posix.ads: Removed.
4485
4486 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4487
4488 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
4489 single concurrent objects.
4490
4491 2017-09-07 Javier Miranda <miranda@adacore.com>
4492
4493 * s-regexp.ads: Fix documentation of the globbing grammar.
4494
4495 2017-09-07 Gary Dismukes <dismukes@adacore.com>
4496
4497 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
4498
4499 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4500
4501 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
4502 in CodePeer mode, to support more legacy code automatically.
4503
4504 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4505
4506 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
4507 and thus not a controlling argument, preserve its type after
4508 rewriting because it may appear in an nested call with a classwide
4509 parameter.
4510
4511 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4512
4513 * comperr.adb (Delete_SCIL_Files): Handle case of
4514 N_Package_Instantiation.
4515
4516 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4517
4518 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
4519 clause for a unit U appears in a context that includes a regular
4520 with_clause on U, rewrite the redundant private clause into a null
4521 statement, rather than removing it altogether from the context,
4522 so that ASIS tools can reconstruct the original source.
4523
4524 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4525
4526 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
4527 for aspect Small can be of any real type (not only a universal
4528 real literal) as long as it is a static constant.
4529
4530 2017-09-07 Thomas Quinot <quinot@adacore.com>
4531
4532 * par_sco.adb: Minor reformatting.
4533
4534 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4535
4536 * s-parame-ae653.ads: Removed.
4537
4538 2017-09-07 Nicolas Roche <roche@adacore.com>
4539
4540 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
4541 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
4542 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
4543 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
4544 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
4545 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
4546
4547 2017-09-07 Yannick Moy <moy@adacore.com>
4548
4549 * a-ngelfu.ads Add preconditions to all functions
4550 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
4551
4552 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4553
4554 * lib-xref.adb (Generate_Reference): ignore
4555 references to entities which are Part_Of single concurrent
4556 objects.
4557
4558 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4559
4560 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
4561 comment.
4562
4563 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4564
4565 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
4566 Null_Task_Id is passed.
4567
4568 2017-09-07 Javier Miranda <miranda@adacore.com>
4569
4570 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
4571 attribute. Defined for record types and subtypes.
4572 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
4573 (Init_Tags_List) to facilitate generating separate code in the
4574 IP routine to initialize the object components and for completing
4575 the elaboration of dispatch tables.
4576 * exp_ch3.adb (Build_Init_Procedure): Improve the code
4577 generated in the IP routines by means of keeping separate
4578 the initialization of the object components from the
4579 initialization of its dispatch tables. (Init_Secondary_Tags):
4580 Adding new formal (Init_Tags_List) and adjusting calls to
4581 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
4582 adjusting also calls to Ada.Tags.Register_Interface_Offset
4583 because the type of one of its formals has been changed.
4584 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
4585 modified. Instead of receiving a pointer to an object this
4586 routine receives now a primary tag.
4587 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
4588 additional formal: the tag of the primary dispatch table.
4589 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
4590 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
4591 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
4592 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
4593 formal in calls to Init_Secondary_Tags.
4594
4595 2017-09-07 Javier Miranda <miranda@adacore.com>
4596
4597 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
4598 subprogram.
4599 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
4600 applied to generic subprograms.
4601
4602 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4603
4604 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
4605 (because it refers to the anonymous concurrent object, not its type);
4606 fix condition for emitting error message about task/protected type,
4607
4608 2017-09-07 Bob Duff <duff@adacore.com>
4609
4610 * binde.adb (Debug_Flag_Old): If both -do and -dp
4611 are specified, behave as if just -do was specified, rather than
4612 using a mixture.
4613
4614 2017-09-07 Nicolas Roche <roche@adacore.com>
4615
4616 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
4617 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
4618
4619 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4620
4621 * sem_prag.adb (Find_Role): The Global_Seen flag
4622 is now consulted not only for abstract states and variables,
4623 but for all kinds of items.
4624 (Collect_Subprogram_Inputs_Outputs): Do not process formal
4625 generic parameters, because unlike ordinary formal parameters,
4626 generic formals only act as input/ outputs if they are explicitly
4627 mentioned in a Global contract.
4628
4629 2017-09-07 Yannick Moy <moy@adacore.com>
4630
4631 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
4632 predicate procedure. Check predicate pragma/aspect with Ghost entity.
4633 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
4634 reformatting.
4635
4636 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4637
4638 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
4639 (code cleanup);
4640 * sem_ch3.adb (Build_Derived_Record_Type):i Call
4641 Copy_Dimensions_Of_Components after creating the copy of the
4642 record declaration.
4643 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
4644 derived recor type, copy the dikensions if any of each component
4645 of the parent record to the corresponding component declarations
4646 of the derived record. These expressions are used among other
4647 things as default values in aggregates with box associations.
4648 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
4649 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
4650 Minor reformatting.
4651
4652 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4653
4654 * sem_util.adb: Remove extra space after THEN.
4655
4656 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4657
4658 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
4659 also mark the renamed subprogram as referenced.
4660
4661 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4662
4663 * par-ch6.adb (P_Subprogram): Improve error message on null
4664 procedure with misplaced aspect specification, which the parser
4665 first attempts to interpret as a malformed expression function.
4666
4667 2017-09-07 Gary Dismukes <dismukes@adacore.com>
4668
4669 * sem_attr.adb (Analyze_Attribute_Old_Result):
4670 Allow attributes Result and Old in the case of an expression
4671 function.
4672
4673 2017-09-07 Justin Squirek <squirek@adacore.com>
4674
4675 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
4676 Volatile to subcomponents.
4677
4678 2017-09-07 Bob Duff <duff@adacore.com>
4679
4680 * exp_ch7.adb (Find_Last_Init): Check for the
4681 case where a build-in-place function call has been replaced by a
4682 'Reference attribute reference.
4683
4684 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4685
4686 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
4687 nodes.
4688
4689 2017-09-07 Bob Duff <duff@adacore.com>
4690
4691 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
4692 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
4693 secondary stack for all functions that return limited tagged
4694 types -- just do it for dispatching calls. Misc cleanup.
4695 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
4696 remove qualifications and type conversions. Fix various bugs
4697 where only a single level of qualification or conversion was
4698 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
4699 instead of "X".
4700 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
4701 cleanup.
4702
4703 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4704
4705 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
4706 do not create actual subtypes that may generate further predicate
4707 functions.
4708 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
4709 of body is a predicate function as well.
4710 (Resolve_Aspect_Expressions, Resolve_Name): For a component
4711 association, only the expression needs resolution, not the name.
4712 (Resolve_Aspect_Expressions, case Predicates): Construct and
4713 analyze the predicate function declaration in the scope of the
4714 type, before making the type and its discriminants visible.
4715
4716 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4717
4718 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
4719 only if the record type itself comes from source.
4720
4721 2017-09-06 Gary Dismukes <dismukes@adacore.com>
4722
4723 * sem_ch5.adb: Minor reformatting and a typo fix
4724
4725 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4726
4727 * sinput-l.ads: minor remove extra period at the end of comment
4728
4729 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4730
4731 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
4732 E_Discriminant.
4733 (Find_Role): remove support for E_Discriminant.
4734
4735 2017-09-06 Javier Miranda <miranda@adacore.com>
4736
4737 * exp_ch6.adb (Expand_Simple_Function_Return):
4738 Add missing implicit type conversion to force displacement of the
4739 "this" pointer.
4740
4741 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4742
4743 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
4744
4745 2017-09-06 Yannick Moy <moy@adacore.com>
4746
4747 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
4748 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
4749
4750 2017-09-06 Bob Duff <duff@adacore.com>
4751
4752 * sem_ch8.adb: Change Assert to be consistent with
4753 other similar ones.
4754
4755 2017-09-06 Bob Duff <duff@adacore.com>
4756
4757 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
4758 requested. Previously, the -do switch meant "run Elab_New and
4759 Elab_Old and use the order chosen by Elab_Old, possibly with
4760 debugging printouts comparing the two orders." Now it means
4761 "do not run Elab_New." This is of use if there are bugs that
4762 cause Elab_New to crash.
4763 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
4764 type conversions.
4765 * ali.ads (Elab_Position): Change type to Nat, to avoid various
4766 type conversions.
4767
4768 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4769
4770 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
4771 reference to SPARK RM.
4772
4773 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4774
4775 * layout.adb: Use SSU short hand consistently throughout the file.
4776
4777 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4778
4779 * freeze.adb (Freeze_Record_Type)
4780 <Sized_Component_Total_Round_RM_Size>: New local variable to
4781 accumulate the rounded RM_Size of components. Update it for
4782 every component whose RM_Size is statically known. Add missing
4783 guard to check that bit packing is really required before issuing
4784 the error about packing. Swap condition for clarity's sake.
4785 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
4786
4787 2017-09-06 Fedor Rybin <frybin@adacore.com>
4788
4789 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
4790 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
4791 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
4792 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
4793 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
4794 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
4795 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
4796 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
4797 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
4798 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
4799 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
4800 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
4801 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
4802 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
4803 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
4804 project manager sources.
4805
4806 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4807
4808 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
4809 entity of a mutable type and the right-hand side is a conditional
4810 expression, resolve the alternatives of the conditional using
4811 the base type of the target entity, because the alternatives
4812 may have distinct subtypes. This is particularly relevant if
4813 the alternatives are aggregates.
4814
4815 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4816
4817 * checks.adb (Apply_Predicate_Check): If the expression is an
4818 aggregate that is the RHS of an assignment, apply the check to
4819 the LHS after the assignment, rather than to the aggregate. This
4820 is more efficient than creating a temporary for the aggregate,
4821 and prevents back-end crashes when the aggregate includes a
4822 dynamic "others' association.
4823
4824 2017-09-06 Yannick Moy <moy@adacore.com>
4825
4826 * sem_ch12.adb (Analyze_Instance_And_Renamings):
4827 Set variable to ignore SPARK_Mode in instance before the analysis
4828 of the generated package declaration.
4829
4830 2017-09-06 Yannick Moy <moy@adacore.com>
4831
4832 * sem_res.adb (Resolve_Call): Do not issue a
4833 message for calls inside expression function, unless body was
4834 seen and is candidate for inlining.
4835
4836 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4837
4838 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
4839 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
4840 body. do not freeze the formals of the generic unit.
4841
4842 2017-09-06 Gary Dismukes <dismukes@adacore.com>
4843
4844 * errout.adb (Error_Msg): Separate the
4845 treatment for warning vs. style messages in inlinings and
4846 instantiations. Prevents blowups on calls to Warn_Insertion for
4847 style messages, which should not be called in that case because
4848 Warning_Msg_Char is not set.
4849
4850 2017-09-06 Justin Squirek <squirek@adacore.com>
4851
4852 * sem_prag.adb (Check_VFA_Conflicts): Created
4853 to group all Volatile_Full_Access checks relating to other
4854 representation pragmas (Mark_Component_Or_Object): Created
4855 to centeralize the flagging of attributes for the record type
4856 component case, a pragma applied individually to a component, and
4857 the object case.
4858 (Process_Atomic_Independent_Shared_Volatile):
4859 Add propagation of certain pragmas to record components and move
4860 evaluation of VFA checks
4861
4862 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4863
4864 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
4865 Do not warn on conditions that are not obeyed for Inline_Always
4866 subprograms, when assertions are not enabled.
4867
4868 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4869
4870 * sem_util.adb (Unique_Entity): For abstract states return their
4871 non-limited view.
4872
4873 2017-09-06 Bob Duff <duff@adacore.com>
4874
4875 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
4876 that is a proper body corresponding to a stub, we defer the
4877 adjustment of the sloc until after the correct adjustment has
4878 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
4879 the adjustment, because it will be outside the range in (the old,
4880 incorrect) S_Adjustment.
4881 * inline.adb: Use named notation for readability and uniformity.
4882 * sinput-l.adb: Minor improvements to debugging output printed
4883 for Debug_Flag_L.
4884 * sinput-l.ads (Create_Instantiation_Source): Minor comment
4885 correction.
4886
4887 2017-09-06 Vincent Celier <celier@adacore.com>
4888
4889 * make.adb: Do not invoke gprbuild for -bargs -P.
4890
4891 2017-09-06 Sylvain Dailler <dailler@adacore.com>
4892
4893 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
4894 case when Op is of kind N_Qualified_Expression. In this case,
4895 the function is called recursively on the subexpression like in
4896 other cases.
4897 * make.adb: Minor reformatting
4898
4899 2017-09-06 Justin Squirek <squirek@adacore.com>
4900
4901 * einfo.adb (Set_Linker_Section_Pragma): Modify
4902 Set_Linker_Section_Pragma to be consistant with the "getter"
4903 Linker_Section_Pragma.
4904 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
4905 checking for container loops so that the index cursor is not
4906 directly changable by the user with the use of E_Loop_Parameter.
4907 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
4908 * sem_warn.adb (Check_References): Revert previous change.
4909
4910 2017-09-06 Bob Duff <duff@adacore.com>
4911
4912 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
4913 calls and the like.
4914
4915 2017-09-06 Yannick Moy <moy@adacore.com>
4916
4917 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
4918 declarations to only consider valid uses of Global/Depends those on
4919 single concurrent objects.
4920
4921 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4922
4923 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
4924 error as soon as one of the specified components overlaps the
4925 parent field.
4926
4927 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4928
4929 * sem_prag.ads: minor fix typo in comment.
4930
4931 2017-09-06 Justin Squirek <squirek@adacore.com>
4932
4933 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
4934 from source before checking source references.
4935 * sem_warn.adb (Check_References): Add check for internal block
4936 before recursing.
4937
4938 2017-09-06 Vincent Celier <celier@adacore.com>
4939
4940 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
4941 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
4942 gnatname.adb: Remove the Project Manager from the GNAT tools.
4943 * gcc-interface/Makefile.in: ditto.
4944
4945 2017-09-06 Bob Duff <duff@adacore.com>
4946
4947 * sem_util.ads: Minor comment fix.
4948
4949 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4950
4951 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
4952 Generate a freeze node for the actual of a formal package, if
4953 the actual is declared in the same unit and has a corresponding
4954 body, to prevent the current instance from being frozen before
4955 the actual is.
4956
4957 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4958
4959 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
4960
4961 2017-09-06 Yannick Moy <moy@adacore.com>
4962
4963 * sem_warn.adb: Minor refactoring.
4964
4965 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4966
4967 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
4968 to retrieve the inherited classwide precondition/postcondition
4969 of a subprogram.
4970 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
4971 freezing a subprogram, to complete the generation of the
4972 corresponding checking code.
4973
4974 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4975
4976 * exp_util.adb (Is_Controlled_Indexing): New routine.
4977 (Is_Displace_Call): Use routine Strip to remove indirections.
4978 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
4979 missing case of controlled generalized indexing.
4980 (Is_Source_Object): Use routine Strip to remove indirections.
4981 (Strip): New routine.
4982
4983 2017-09-06 Bob Duff <duff@adacore.com>
4984
4985 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
4986 we include the proper header. Otherwise, we just declare the necessary
4987 things from the capabilities library. This is so we can build on
4988 machines without that library, while still enabling that library.
4989 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
4990 simply return 0 if the library is not present, or not included
4991 in the link.
4992
4993 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
4994
4995 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
4996 for renamings that involve function calls in prefix form.
4997
4998 2017-09-06 Bob Duff <duff@adacore.com>
4999
5000 * sem_ch3.adb (Analyze_Subtype_Declaration):
5001 Set Has_Delayed_Freeze on a subtype of an incomplete type.
5002
5003 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
5004
5005 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
5006 has no parameter specification and no entry index, use the entry name
5007 as the end of the generated SCO statement.
5008
5009 2017-09-06 Steve Baird <baird@adacore.com>
5010
5011 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
5012 uses of 'Image and related attributes as having side effects in
5013 order to avoid replicating such uses.
5014 * pprint.ads (Expression_Image) Add new generic formal flag
5015 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
5016 (eventually) override the default.
5017 * pprint.adb (Expression_Image) If the new flag is set, then
5018 suppress the ".all" suffix when displaying a dereference whose
5019 prefix is a use of a value-capturing compiler temp of the sort
5020 generated by Expr_Util.Remove_Side_Effects .
5021 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
5022 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
5023 Minor reformatting.
5024 * inline.adb: Minor wording change.
5025
5026 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5027
5028 * sem_ch7.adb: Update comment.
5029
5030 2017-09-06 Yannick Moy <moy@adacore.com>
5031
5032 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
5033 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
5034 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
5035 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
5036 so that applies to any entity.
5037
5038 2017-09-06 Yannick Moy <moy@adacore.com>
5039
5040 * sem_ch3.adb (Derived_Type_Declaration): Use
5041 Incomplete_Or_Partial_View rather than local Find_Partial_View.
5042
5043 2017-09-06 Javier Miranda <miranda@adacore.com>
5044
5045 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
5046 following ISO-8861.
5047
5048 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5049
5050 * sem_dim.adb (Analyze_Dimension): In an instance, a type
5051 conversion takes its dimensions from the expression, not from
5052 the context type.
5053 (Dimensions_Of_Operand): Ditto.
5054
5055 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5056
5057 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
5058 null procedures when GNAT coverage is used, so that their (empty)
5059 bodies are properly covered.
5060
5061 2017-09-06 Bob Duff <duff@adacore.com>
5062
5063 * sem_ch13.adb (Resolve_Aspect_Expressions): If
5064 the entity is a type with discriminants, make the discriminants
5065 directly visible in aspect clauses.
5066
5067 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5068
5069 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
5070 Universal_Real and the context is a floating-point type, resolve
5071 both operands to the target type.
5072
5073 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5074
5075 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
5076 sem_ch3.adb, sem_util.adb: Minor reformatting.
5077
5078 2017-09-06 Yannick Moy <moy@adacore.com>
5079
5080 * freeze.adb (Check_Inherited_Conditions): Rewriting
5081 of inherited preconditions and postconditions should only occur
5082 in GNATprove mode, that is, when GNATprove_Mode is True, not to
5083 be confused with SPARK_Mode being On.
5084
5085 2017-09-06 Yannick Moy <moy@adacore.com>
5086
5087 * sem_warn.adb (Check_References): Take into
5088 account possibility of attribute reference as original node.
5089
5090 2017-09-06 Yannick Moy <moy@adacore.com>
5091
5092 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
5093 use of attribute.
5094
5095 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5096
5097 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
5098 on the procedure created to encapsulate the body.
5099 * sem_ch7.adb: Add with clause for GNAT.HTable.
5100 (Entity_Table_Size): New constant.
5101 (Entity_Hash): New function.
5102 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
5103 (Is_Subprogram_Ref): Rename into...
5104 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
5105 the table instead of bailing out on them. Scan the value of constants
5106 if it is not known at compile time.
5107 (Contains_Subprograms_Refs): Rename into...
5108 (Scan_Subprogram_Refs): ...this.
5109 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
5110 Is_Public flag on subprograms if they are not actually referenced.
5111 (Hide_Public_Entities): Beef up comment on the algorithm.
5112 Reset the table of subprograms on entry.
5113
5114 2017-09-06 Yannick Moy <moy@adacore.com>
5115
5116 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
5117
5118 2017-09-06 Javier Miranda <miranda@adacore.com>
5119
5120 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
5121 cannot handle a type conversion of an array as an aggregate
5122 component.
5123
5124 2017-09-06 Bob Duff <duff@adacore.com>
5125
5126 * g-comlin.adb (Try_Help): Remove ".exe" so we
5127 get the same results on windows and unix.
5128
5129 2017-09-06 Justin Squirek <squirek@adacore.com>
5130
5131 * exp_imgv.adb (Expand_Image_Attribute),
5132 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
5133 Added case to handle new-style 'Image expansion
5134 (Rewrite_Object_Image): Moved from exp_attr.adb
5135 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5136 attribute cases so that the relevant subprograms in exp_imgv.adb
5137 handle all expansion.
5138 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
5139 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
5140 cases to call common function Analyze_Image_Attribute.
5141 (Analyze_Image_Attribute): Created as a common path for all
5142 image attributes (Check_Object_Reference_Image): Removed
5143 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5144 Removed and refactored into Is_Object_Image (Is_Object_Image):
5145 Created as a replacement for Is_Image_Applied_To_Object
5146
5147 2017-09-06 Yannick Moy <moy@adacore.com>
5148
5149 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
5150 message for missing input.
5151
5152 2017-09-06 Yannick Moy <moy@adacore.com>
5153
5154 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
5155 of protected subprograms and entries.
5156 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
5157 New function to detect when a subprogram of entry is defined
5158 inside a protected object.
5159
5160 2017-09-06 Bob Duff <duff@adacore.com>
5161
5162 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
5163 whether the current process has the CAP_SYS_NICE capability.
5164 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
5165 ceiling priorities if the current process has the CAP_SYS_NICE
5166 capability.
5167
5168 2017-09-06 Bob Duff <duff@adacore.com>
5169
5170 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
5171 check back to the body, because SPARK is not yet ready for
5172 "or else raise Constraint_Error".
5173
5174 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5175
5176 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
5177 procedure by a single null statement, after evaluating the
5178 actuals that require it.
5179
5180 2017-09-06 Javier Miranda <miranda@adacore.com>
5181
5182 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
5183 Generating C code improve the code that checks the use of nested
5184 aggregates to initialize object declarations.
5185
5186 2017-09-06 Yannick Moy <moy@adacore.com>
5187
5188 * sem_ch3.adb (Derived_Type_Declaration): Detect
5189 violations of new rule SPARK RM 3.4(1). Also refactor existing
5190 check to use the new function Find_Partial_View.
5191
5192 2017-09-06 Vincent Celier <celier@adacore.com>
5193
5194 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
5195 from the Prj hierarchy has been removed from the GNAT driver.
5196
5197 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5198
5199 * sem_type.adb (Interface_Present_In_Ancestor): Within an
5200 expression function, or within a spec expression (default value,
5201 etc) a reference to an incomplete type is legal: legality of
5202 the operation will be checked when some related entity (type,
5203 object or subprogram) is frozen.
5204
5205 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5206
5207 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
5208 adjustments and a typo fix.
5209
5210 2017-09-06 Yannick Moy <moy@adacore.com>
5211
5212 * sem_res.adb (Resolve_Call): Do not issue info
5213 message about inlining of calls to functions in assertions,
5214 for functions whose body has not been seen yet.
5215
5216 2017-09-06 Bob Duff <duff@adacore.com>
5217
5218 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
5219 we can use modern Ada in this package.
5220 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
5221 Move Ada.Command_Line.Response_File to System.Response_File,
5222 and make Ada.Command_Line.Response_File into a rename of
5223 System.Response_File. This is to avoid having gnatbind depend
5224 Ada.Command_Line, which would damage the bootstrap process now
5225 that Ada.Command_Line contains modern Ada (the raise expression).
5226 * gnatbind.adb: Avoid dependence on
5227 Ada.Command_Line. Depend on System.Response_File instead
5228 of Ada.Command_Line.Response_File. Change one call to
5229 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
5230 to Ada.Command_Line.Argument_Count to use Arg_Count.
5231 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
5232
5233 2017-09-06 Bob Duff <duff@adacore.com>
5234
5235 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
5236 switch, because we've already read gnat.adc by default.
5237
5238 2017-09-06 Bob Duff <duff@adacore.com>
5239
5240 * exp_ch5.adb (Get_Default_Iterator): Replace
5241 "Assert(False)" with "return Iter", because if an iterable
5242 type is derived from a noniterable one, then we won't find an
5243 overriding or inherited default iterator.
5244
5245 2017-09-06 Yannick Moy <moy@adacore.com>
5246
5247 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
5248 literal index used to access a string is null or negative.
5249
5250 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5251
5252 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
5253 allowed on loop parameters.
5254 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
5255 on loop parameters.
5256 (Write_Field15_Name): Update the output for
5257 Status_Flag_Or_Transient_Decl.
5258 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
5259 to loop parameters. Update the documentation of the attribute
5260 and the E_Loop_Parameter entity.
5261 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
5262 which assumes that cursors can never be controlled.
5263 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
5264 guard which assumes that cursors can never be controlled.
5265
5266 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5267
5268 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
5269 sem_warn.adb: Minor reformatting.
5270
5271 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5272
5273 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
5274 fix and preserve older GNAT warning on overlapping actuals that
5275 are not elementary types.
5276
5277 2017-09-06 Justin Squirek <squirek@adacore.com>
5278
5279 * sem_attr.adb: Comment correction.
5280
5281 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5282
5283 * sem_util.adb: Minor reformatting.
5284
5285 2017-09-06 Yannick Moy <moy@adacore.com>
5286
5287 * a-comlin.ads (Argument): Add precondition for analysis.
5288
5289 2017-09-06 Yannick Moy <moy@adacore.com>
5290
5291 * sem_res.adb (Resolve): Update message for function call as statement.
5292
5293 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5294
5295 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
5296 generated bodies for renamings that are completions, when renamed
5297 procedure is No_Return.
5298 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5299 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
5300 with No_Return, the renamed entity must be No_Return as well.
5301
5302 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5303
5304 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
5305 Minor reformatting.
5306
5307 2017-09-06 Justin Squirek <squirek@adacore.com>
5308
5309 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5310 attribute cases (Rewrite_Object_Reference_Image): Created to
5311 aid the rewriting of new-style 'Image attributes.
5312 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
5313 (Check_Object_Reference_Image): Created to handle verification of
5314 'Image with object-references as prefixes.
5315 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5316 Create predicate to identify cases where an 'Image attribute's
5317 prefix applies to an object reference.
5318
5319 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5320
5321 * freeze.adb (Freeze_Entity): Do not generate a freeze
5322 node for a generic unit, even if it includes delayed aspect
5323 specifications. Freeze nodes for generic entities must never
5324 appear in the tree that reaches the back-end of the compiler.
5325
5326 2017-09-06 Yannick Moy <moy@adacore.com>
5327
5328 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
5329
5330 2017-09-06 Yannick Moy <moy@adacore.com>
5331
5332 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
5333 to subprograms in other units as possibly inlined.
5334
5335 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5336
5337 * freeze.adb (Freeze_Entity): For a derived type that has no
5338 explicit delayed aspects but may inherit delayed aspects from its
5339 parent type, analyze aspect at freeze point for proper capture
5340 of an inherited aspect.
5341
5342 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5343
5344 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
5345 renamings; also, avoid repeated calls to Renamed_Object when getting
5346 through object renamings.
5347
5348 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5349
5350 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
5351 array type declaration in a private part, when an index is a
5352 subtype indication of a discrete type with a private partial view.
5353
5354 2017-09-06 Javier Miranda <miranda@adacore.com>
5355
5356 * exp_ch4.adb (Expand_Modular_Op): Force generating
5357 temporary to improve the generated code.
5358
5359 2017-09-06 Tristan Gingold <gingold@adacore.com>
5360
5361 * s-fatgen.adb: Minor typo fix in comment.
5362
5363 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5364
5365 * exp_ch5.adb (Make_Field_Assign): If the type
5366 of the right-hand side has stored constraint, use its values
5367 (except for those that are renamings of parent discriminants)
5368 to produce additional assignments for the discriminants of the
5369 left-hand side, which are invisible in the righ-hand side and
5370 not retrievable as selected components.
5371
5372 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5373
5374 * sem_util.adb (Needs_One_Formal): The first formal of such a
5375 function must be a controlling formal, so that Obj.F (X, Y)
5376 can have the interpretation F(Obj)(X, Y).
5377 * sem_util.ads: Clarify documentation.
5378
5379 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5380
5381 * table.ads, table.adb: Restore original implementation.
5382 * namet.h (Names_Ptr): Adjust back.
5383 (Name_Chars_Ptr): Likewise.
5384 * uintp.h (Uints_Ptr): Likewise.
5385 (Udigits_Ptr): Likewise.
5386 * g-table.ads: Remove pragma Compiler_Unit_Warning.
5387 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
5388 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
5389 * spark_xrefs.ads: Likewise.
5390 * scos.h: Undo latest changes.
5391
5392 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5393
5394 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
5395 No_Return flag to instance if pragma applies to generic unit. This
5396 must be done explicitly because the pragma does not appear
5397 directly in the generic declaration (unlike the corresponding
5398 aspect specification).
5399
5400 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5401
5402 * sem_ch7.adb (Has_Referencer): Move up and expand comment
5403 explaining the test used to detect inlining. Use same test
5404 in second occurrence.
5405 (Analyze_Package_Body_Helper): Minor formatting fixes.
5406
5407 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5408
5409 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
5410 derived type with a mixture of renamed and constrained parent
5411 discriminants, the constraint for the target must obtain the
5412 discriminant values from both the operand and from the stored
5413 constraint for it, given that the constrained discriminants are
5414 not visible in the object.
5415 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
5416 side may be derived from that of the left-hand side (as in the
5417 case of an assignment with a change of representation) so the
5418 discriminant to be used in the retrieval of the value of the
5419 component must be the entity in the type of the right-hand side.
5420
5421 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5422
5423 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
5424 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5425 * exp_util.adb (Is_Source_Object): Account for
5426 the cases where the source object may appear as a dereference
5427 or within a type conversion.
5428 * exp_ch6.adb: Fix missing space in error message.
5429
5430 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5431
5432 * sem_prag.adb: Update description of Eliminate.
5433
5434 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5435
5436 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
5437 properly an attribute reference 'Loop_Entry that appears in the
5438 list of indices of an indexed expression, to prevent an infinite
5439 loop in the compiler.
5440
5441 2017-09-06 Bob Duff <duff@adacore.com>
5442
5443 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
5444
5445 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5446
5447 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
5448 in a set membership is an overloaded enumeration literal, and
5449 the type of the alternative is resolved from a previous one,
5450 replace the entity of the alternative as well as the type,
5451 to prevent inconsistencies between the entity and the type.
5452
5453 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5454
5455 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
5456 (No_Component_Reordering_Specified): New switch.
5457 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
5458 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
5459 * bcheck.adb (Check_Consistent_No_Component_Reordering):
5460 New check.
5461 (Check_Configuration_Consistency): Invoke it.
5462 * debug.adb (d.r): Toggle the effect of the switch.
5463 (d.v): Change to no-op.
5464 * einfo.ads (Has_Complex_Representation):
5465 Restrict to record types.
5466 (No_Reordering): New alias for Flag239.
5467 (OK_To_Reorder_Components): Delete.
5468 (No_Reordering): Declare.
5469 (Set_No_Reordering): Likewise.
5470 (OK_To_Reorder_Components): Delete.
5471 (Set_OK_To_Reorder_Components): Likewise.
5472 * einfo.adb (Has_Complex_Representation): Expect record types.
5473 (No_Reordering): New function.
5474 (OK_To_Reorder_Components): Delete.
5475 (Set_Has_Complex_Representation): Expect base record types.
5476 (Set_No_Reordering): New procedure.
5477 (Set_OK_To_Reorder_Components): Delete.
5478 (Write_Entity_Flags): Adjust to above change.
5479 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
5480 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
5481 OK_To_Reorder_Components on record types with convention Ada.
5482 * lib-writ.adb (Write_ALI): Deal with NC marker.
5483 * opt.ads (No_Component_Reordering): New flag.
5484 (No_Component_Reordering_Config): Likewise.
5485 (Config_Switches_Type): Add No_Component_Reordering component.
5486 * opt.adb (Register_Opt_Config_Switches): Copy
5487 No_Component_Reordering onto No_Component_Reordering_Config.
5488 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
5489 (Save_Opt_Config_Switches): Save No_Component_Reordering.
5490 (Set_Opt_Config_Switches): Set No_Component_Reordering.
5491 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
5492 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
5493 No_Reordering flag from the default.
5494 (Build_Derived_Private_Type): Likewise.
5495 (Build_Derived_Record_Type): Likewise. Then inherit it
5496 for untagged types and clean up handling of similar flags.
5497 (Record_Type_Declaration): Likewise.
5498 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
5499 remove redundant test on Is_Tagged_Type.
5500 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
5501 (Sig_Flags): Likewise.
5502 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
5503 (Pragma_Id): Add Pragma_No_Component_Reordering value.
5504 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
5505 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
5506 Copy the layout of the parent type only if the No_Reordering
5507 settings match.
5508 (components_to_record): Reorder record types with
5509 convention Ada by default unless No_Reordering is set or -gnatd.r
5510 is specified and do not warn if No_Reordering is set in GNAT mode.
5511
5512 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5513
5514 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
5515 new predicate to reject declarations that can be completions,
5516 when there is a visible prior homograph that is a null procedure.
5517 * sem_ch6.adb (Analyze_Null_Procedure): use it.
5518 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
5519
5520 2017-09-06 Thomas Quinot <quinot@adacore.com>
5521
5522 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
5523 run of 253 characters or more.
5524
5525 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5526
5527 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
5528 properly incomplete subtypes that may be created by explicit or
5529 implicit declarations.
5530 (Is_Base_Type): Take E_Incomplete_Subtype into account.
5531 (Subtype_Kind): Ditto.
5532 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
5533 Ekind of a subtype of a discriminated incomplete type.
5534 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
5535 incomplete types, to preserve error reporting.
5536 (Process_Incomplete_Dependents): Do not create a subtype
5537 declaration for an incomplete subtype that is created internally.
5538 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
5539 incomplete subtypes that do not require a completion, either
5540 because they are limited views, of they are generic actuals.
5541
5542 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5543
5544 * checks.adb (Insert_Valid_Check): Remove the
5545 suspicious manipulation of the Do_Range_Check flag as ths is
5546 no linger needed. Suppress validity check when analysing the
5547 validation variable.
5548
5549 2017-09-06 Philippe Gil <gil@adacore.com>
5550
5551 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
5552 GNATCOLL.Memory
5553
5554 2017-09-06 Bob Duff <duff@adacore.com>
5555
5556 * sem_elim.adb: Minor comment fix.
5557
5558 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5559
5560 * sem_util.adb (Is_Object_Reference): A function call is an
5561 object reference, and thus attribute references for attributes
5562 that are functions (such as Pred and Succ) as well as predefined
5563 operators are legal in contexts that require an object, such as
5564 the prefix of attribute Img and the Ada2020 version of 'Image.
5565
5566 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5567
5568 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
5569 exp_ch3.adb, xoscons.adb: Minor reformatting.
5570
5571 2017-09-06 Raphael Amiard <amiard@adacore.com>
5572
5573 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
5574 Position parameter. If supplied, use it to provide efficient iteration.
5575 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
5576 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
5577 iteration.
5578
5579 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5580
5581 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
5582 designated type is class-wide and the expression is an unchecked
5583 conversion, preserve the conversion when checking the tag of the
5584 designated object, to prevent spurious semantic errors when the
5585 expression in the conversion has an untagged type (for example
5586 an address attribute).
5587
5588 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5589
5590 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
5591 operation is subject to a pragma Eliminate.
5592
5593 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5594
5595 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
5596
5597 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5598
5599 * fe.h (Eliminate_Error_Msg): Remove.
5600
5601 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
5602
5603 * gcc-interface/utils.c (make_packable_type): Update call to
5604 mode_for_size_tree.
5605
5606 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
5607
5608 * gcc-interface/utils2.c (build_load_modify_store):
5609 Use int_mode_for_size.
5610
5611 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5612
5613 PR ada/62235
5614 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5615 for Itypes that are E_Record_Subtype with a cloned subtype.
5616 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
5617
5618 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5619
5620 * gcc-interface/trans.c (convert_with_check): Use a custom base type
5621 if the base type of the expression has a different machine mode.
5622 Rename a couple of parameters and local variable.
5623
5624 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5625
5626 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
5627 conversions around prefixes that are not references.
5628
5629 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5630
5631 * gcc-interface/utils.c (unchecked_convert): When the result type is a
5632 non-biased integral type with size 0, set the result to 0 directly.
5633
5634 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5635
5636 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
5637 (renaming_from_instantiation_p): ...this.
5638 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
5639 instead of explicit tests on kind of entities. Adjust for renaming.
5640 (gnat_to_gnu_profile_type): Likewise.
5641 (gnat_to_gnu_subprog_type): Likewise.
5642 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
5643 (Case_Statement_to_gnu): Likewise.
5644 (gnat_to_gnu): Likewise.
5645 (process_freeze_entity): Likewise.
5646 (process_type): Likewise.
5647 (add_stmt_with_node): Adjust for renaming.
5648 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
5649 (renaming_from_generic_instantiation_p): Rename to...
5650 (renaming_from_instantiation_p): ...this. Use inline predicate.
5651 (pad_type_hasher::keep_cache_entry): Fold.
5652
5653 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5654
5655 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
5656 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
5657 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
5658 (N_Slice): Likewise.
5659 (N_Selected_Component): Likewise. Do not try again to translate it.
5660 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
5661
5662 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5663
5664 * repinfo.ads: Document new treatment of dynamic values.
5665 (TCode): Bump upper bound to 29.
5666 (Dynamic_Val): New constant set to 29.
5667 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
5668 (Rep_Value) <Dynamic_Val>: Likewise.
5669 * repinfo.h (Dynamic_Val): New macro.
5670 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
5671 DECL_P nodes too.
5672 <INTEGER_CST>: Set TCODE instead of recursing.
5673 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
5674 <VAR_DECL>: New case.
5675 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
5676 <BIT_AND_EXPR>: Adjust.
5677 <CALL_EXPR>: Do not fall through.
5678
5679 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5680
5681 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
5682 there is no target, do not create a temporary for the return value for
5683 an allocator either.
5684
5685 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5686
5687 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
5688 unconstrained array type.
5689
5690 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5691 Alan Hayward <alan.hayward@arm.com>
5692 David Sherwood <david.sherwood@arm.com>
5693
5694 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
5695 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
5696
5697 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5698 Alan Hayward <alan.hayward@arm.com>
5699 David Sherwood <david.sherwood@arm.com>
5700
5701 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
5702 is_a <scalar_int_mode>.
5703 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
5704 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
5705
5706 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5707 Alan Hayward <alan.hayward@arm.com>
5708 David Sherwood <david.sherwood@arm.com>
5709
5710 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
5711 instead of mode_for_size.
5712 (gnat_to_gnu_subprog_type): Likewise.
5713 * gcc-interface/utils.c (make_type_from_size): Likewise.
5714
5715 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5716 Alan Hayward <alan.hayward@arm.com>
5717 David Sherwood <david.sherwood@arm.com>
5718
5719 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
5720 (fp_size_to_prec): Likewise.
5721
5722 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5723 Alan Hayward <alan.hayward@arm.com>
5724 David Sherwood <david.sherwood@arm.com>
5725
5726 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
5727 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
5728
5729 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5730 Alan Hayward <alan.hayward@arm.com>
5731 David Sherwood <david.sherwood@arm.com>
5732
5733 * gcc-interface/decl.c (validate_size): Update use of
5734 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
5735
5736 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5737 Alan Hayward <alan.hayward@arm.com>
5738 David Sherwood <david.sherwood@arm.com>
5739
5740 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
5741 (fp_size_to_prec): Likewise.
5742
5743 2017-08-29 Martin Liska <mliska@suse.cz>
5744
5745 PR other/39851
5746 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
5747
5748 2017-08-08 Martin Liska <mliska@suse.cz>
5749
5750 * gcc-interface/trans.c: Include header files.
5751
5752 2017-07-29 Jakub Jelinek <jakub@redhat.com>
5753
5754 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
5755 as new argument to the imported_module_or_decl debug hook.
5756
5757 2017-07-25 Javier Miranda <miranda@adacore.com>
5758
5759 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
5760 evaluated twice.
5761
5762 2017-07-19 Jakub Jelinek <jakub@redhat.com>
5763
5764 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
5765 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
5766 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
5767
5768 2017-07-18 Mike Frysinger <vapier@chromium.org>
5769
5770 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
5771 (../../gnatlink$(exeext)): Likewise.
5772
5773 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
5774
5775 PR ada/81446
5776 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
5777 (Backend_Overflow_Checks): Set to True.
5778
5779 2017-06-23 Jakub Jelinek <jakub@redhat.com>
5780
5781 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
5782
5783 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
5784
5785 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
5786 notice. New macro.
5787 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
5788 as a definition.
5789 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
5790 definition.
5791 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
5792 imported subprograms for the current compilation unit as
5793 definitions. Disable debug info for references to variables.
5794 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
5795 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
5796 not built-in functions to their binding scope.
5797 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
5798 the function as a definition. Update all callers.
5799 (gnat_write_global_declarations): Emit debug info for imported
5800 functions. Filter out external variables for which debug info
5801 is disabled.
5802
5803 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
5804
5805 PR ada/81105
5806 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
5807 (i[3456]86-pc-gnu): Likewise.
5808 (x86_64 kfreebsd): Likewise.
5809
5810 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
5811
5812 PR bootstrap/80897
5813 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
5814
5815 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
5816
5817 PR ada/81070
5818 * s-interr-hwint.adb: Reinstate.
5819 * gcc-interface/Makefile.in (RTEMS): Use it again.
5820
5821 2017-06-08 Olivier Hainque <hainque@adacore.com>
5822
5823 * vx_crtbegin_auto.c: Update year in copyright notice.
5824 * vx_crtbegin.c: Likewise.
5825 * vx_crtbegin.inc: Likewise.
5826 * vx_crtend.c: Likewise.
5827
5828 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
5829
5830 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
5831 * s-tpopsp-rtems.adb: Delete.
5832
5833 2017-06-02 Olivier Hainque <hainque@adacore.com>
5834
5835 * vx_crtbegin_auto.c: New file.
5836 * vx_crtbegin.c: New file.
5837 * vx_crtbegin.inc: New file.
5838 * vx_crtend.c: New file.
5839
5840 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
5841
5842 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
5843 const qualifiers that cause -Wignored-qualifiers warnings.
5844
5845 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
5846
5847 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5848 for Itypes that are E_Access_Subtype.
5849 <E_Access_Subtype>: Use the DECL of the base type directly.
5850
5851 2017-05-22 Ed Schonberg <schonberg@adacore.com>
5852 Eric Botcazou <ebotcazou@adacore.com>
5853
5854 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
5855 limited view may appear in the profile of a function, and a call to
5856 that function in another unit in which the full view is available must
5857 use this full view to spurious type errors at the point of call.
5858 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
5859 of parent body with a with clause for the main unit.
5860 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
5861 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
5862 types declared in external units like types from limited with clauses.
5863 Adjust final processing of defer_limited_with_list accordingly.
5864 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
5865 again to translate the prefix after the field if it is incomplete.
5866
5867 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
5868
5869 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
5870 alignment for simple volatile fields and remove associated errors.
5871
5872 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5873
5874 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
5875 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
5876
5877 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
5878
5879 * gcc-interface/utils.c (can_materialize_object_renaming_p):
5880 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
5881 process Original_Node instead of expanded names.
5882
5883 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5884
5885 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
5886 addressability check in the constrained case.
5887
5888 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5889
5890 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
5891 types not coming from a limited context.
5892
5893 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5894
5895 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
5896 the inlined list that are not public.
5897 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
5898 there is a pragma Inline_Always on the subprogram.
5899
5900 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5901
5902 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
5903 <N_Allocator>: Use properly typed constants.
5904 (extract_values): Move around.
5905 (pos_to_constructor): Minor tweaks.
5906 (Sloc_to_locus): Fix formatting.
5907 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
5908 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
5909 (Gigi_Equivalent_Type): Adjust head comment.
5910 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
5911
5912 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5913
5914 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
5915 is a representation clause on an extension, propagate the alignment of
5916 the parent type only if the platform requires strict alignment.
5917
5918 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
5919
5920 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
5921 instead of Word_Size.
5922
5923 Revert
5924 2017-03-28 Andreas Schwab <schwab@suse.de>
5925
5926 PR ada/80117
5927 * system-linux-aarch64-ilp32.ads: New file.
5928 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
5929 from LIBGNAT_TARGET_PAIRS.
5930 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
5931 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
5932 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
5933 or -mabi=ilp32, resp.
5934
5935 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
5936
5937 PR ada/80626
5938 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
5939 instead of Word_Size.
5940
5941 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
5942
5943 * raise-gcc.c (exception_class_eq): Make ec parameter const.
5944
5945 2017-05-02 Richard Biener <rguenther@suse.de>
5946
5947 * gcc-interface/misc.c (gnat_post_options): Do not set
5948 -fstrict-overflow.
5949
5950 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5951
5952 * gcc-interface/trans.c (assoc_to_constructor): Make sure
5953 Corresponding_Discriminant is only called on discriminants.
5954 Skip the saving of the result only for them.
5955 (gnat_to_gnu) <N_Selected_Component>: Likewise.
5956 <N_Unchecked_Type_Conversion>: Translate the result type first.
5957 (gigi): Set TREE_NOTHROW on Begin_Handler.
5958 (stmt_list_cannot_raise_p): New predicate.
5959 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
5960 a cleanup if the statements of the handler cannot raise.
5961 (process_freeze_entity): Use Is_Record_Type.
5962 (process_type): Likewise.
5963
5964 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5965
5966 * einfo.ads (Corresponding_Record_Component): New alias
5967 for Node21 used for E_Component and E_Discriminant.
5968 * einfo.adb (Corresponding_Record_Component): New function.
5969 (Set_Corresponding_Record_Component): New procedure.
5970 (Write_Field21_Name): Handle Corresponding_Record_Component.
5971 * sem_ch3.adb (Inherit_Component): Set
5972 Corresponding_Record_Component for every component in
5973 the untagged case. Clear it afterwards for non-girder
5974 discriminants.
5975 * gcc-interface/decl.c (gnat_to_gnu_entity)
5976 <E_Record_Type>: For a derived untagged type with discriminants
5977 and constraints, apply the constraints to the layout of the
5978 parent type to deduce the layout.
5979 (field_is_aliased): Delete.
5980 (components_to_record): Test DECL_ALIASED_P directly.
5981 (annotate_rep): Check that fields are present except for
5982 an extension.
5983 (create_field_decl_from): Add DEBUG_INFO_P
5984 parameter and pass it in recursive and other calls. Add guard
5985 for the manual CSE on the size.
5986 (is_stored_discriminant): New predicate.
5987 (copy_and_substitute_in_layout): Consider only
5988 stored discriminants and check that original fields are present
5989 in the old type. Deal with derived types. Adjust call to
5990 create_variant_part_from.
5991
5992 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5993
5994 * exp_ch6.adb (Expand_Call_Helper): When locating the
5995 accessibility entity created for an access parameter, handle
5996 properly a reference to a formal of an enclosing subprogram. if
5997 the reference appears in an inherited class-wide condition, it
5998 is the rewriting of the reference in the ancestor expression,
5999 but the accessibility entity must be that of the current formal.
6000
6001 2017-05-02 Javier Miranda <miranda@adacore.com>
6002
6003 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
6004 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
6005 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
6006 Call Expand_Non_Binary_Modular_Op.
6007
6008 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6009
6010 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
6011 has discriminants, do not override the Stored_Constraint list of
6012 the full view of the derived type with that of the derived type.
6013
6014 2017-05-02 Bob Duff <duff@adacore.com>
6015
6016 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
6017
6018 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6019
6020 * s-os_lib.ads: Minor typo fix.
6021
6022 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6023
6024 * gnatls.adb: Merge and refactor code from Prj.Env and remove
6025 this deprecated dependency.
6026
6027 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6028
6029 * exp_util.ads: minor comment addition.
6030
6031 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6032
6033 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
6034 pastos in part #3 of the head comment.
6035
6036 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6037
6038 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
6039 procedure body for a local (sub)type declaration within a
6040 predicate function. Invariant checks do not apply to these, and
6041 the expansion of the procedure will happen in the wrong scope,
6042 leading to misplaced freeze nodes.
6043
6044 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6045
6046 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
6047 to analyze generated actions. If the main unit is a body,
6048 the required scope is that of the corresponding unit declaration.
6049
6050 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6051
6052 * einfo.adb (Declaration_Node): flip branches of
6053 an IF statement to avoid repeated negations in its condition;
6054 no change in semantics, only to improve readability.
6055
6056 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6057
6058 * sem_case.adb: Remove extra spaces in parameter declarations.
6059
6060 2017-05-02 Justin Squirek <squirek@adacore.com>
6061
6062 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
6063 in usage line for new -gnatwE switch.
6064
6065 2017-05-02 Claire Dross <dross@adacore.com>
6066
6067 * a-cofuve.ads (Remove): Remove unnecessary
6068 conditions in precondition.
6069
6070 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6071
6072 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
6073 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
6074
6075 2017-05-02 Justin Squirek <squirek@adacore.com>
6076
6077 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6078 alternative expression.
6079 * sem_res.adb (Resolve_Case_Expression): Ditto.
6080
6081 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6082
6083 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
6084 Refine predicate for the case where the primitive operation
6085 is a renaming of equality. An overriding operation that is
6086 a user-defined renaming of predefined equality inherits its
6087 slot from the overridden operation. Otherwise it is treated
6088 as a predefined op and occupies the same predefined slot as
6089 equality. A call to it is transformed into a call to its alias,
6090 which is the predefined equality. A dispatching call thus uses
6091 the proper slot if operation is further inherited and called
6092 with class-wide arguments.
6093
6094 2017-05-02 Justin Squirek <squirek@adacore.com>
6095
6096 * errout.adb (Set_Msg_Text): Add a case to switch the message
6097 type when the character '[' is detected signifying a warning
6098 about a run-time exception.
6099 * opt.ads Add a new Warning_Mode value for new switch
6100 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
6101 to handle new warning mode
6102 * usage.adb (Usage): Add usage entry for -gnatwE
6103 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
6104
6105 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6106
6107 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
6108 declaration that operates on some fixed point type.
6109
6110 2017-05-02 Justin Squirek <squirek@adacore.com>
6111
6112 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
6113
6114 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6115
6116 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
6117
6118 2017-05-02 Justin Squirek <squirek@adacore.com>
6119
6120 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6121 expression (Analyze_If_Expression): Add check for valid condition
6122 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
6123 on case-expression
6124 * sem_res.adb (Resolve_If_Expression): Add check for valid
6125 condition and then-expression.
6126
6127 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6128
6129 * exp_ch3.adb (Build_Initialization_Call): Generate a null
6130 statement if the initialization call is a null procedure, as
6131 can happen with a controlled type with no explicit Initialize
6132 procedure, or an array of such.
6133 * exp_ch7.adb (Process_Object_Declaration): For a type with
6134 controlled components that has a trivial Initialize procedure,
6135 insert declaration for finalization counter after object
6136 declaration itself.
6137 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
6138 finalization block and attendant declarations if component has
6139 a trivial Initialize procedure.
6140 (Make_Init_Call): Do not generate a call if controlled type has
6141 a trivial Initialize procedure.
6142
6143 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6144
6145 * g-forstr.ads (Data): Move Format component last.
6146 * g-forstr.adb ("+"): Adjust for above change.
6147 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
6148 * g-sechas.ads (Context): Move Key last.
6149 * g-socket.ads (Service_Entry_Type): Move Aliases last.
6150 * s-fileio.adb (Temp_File_Record): Move Name last.
6151 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
6152 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
6153
6154 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
6155
6156 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
6157 switch introduced recently. finally not needed.
6158
6159 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6160
6161 * sem_ch6.adb (Analyze_Null_Procedure): Set the
6162 Corresponding_Body link for a null procedure declaration.
6163
6164 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6165
6166 * atree.h (Flag290): Add missing terminating parenthesis.
6167 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
6168 (Set_Is_Class_Wide_Clone): Likewise.
6169 * einfo.ads (Is_Class_Wide_Clone): Likewise.
6170
6171 2017-05-02 Gary Dismukes <dismukes@adacore.com>
6172
6173 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
6174 parameter Array_Comp to indicate the case of an array object
6175 with null-excluding components.
6176 * checks.adb (Null_Exclusion_Static_Checks):
6177 Call Compile_Time_Constraint_Error instead of
6178 Apply_Compile_Time_Constraint_Error in the component case. Also
6179 call that when Array_Comp is True, with an appropriate warning for
6180 the array component case. Only create an explicit initialization
6181 by null in the case of an object of a null-excluding access type
6182 (and no longer do that in the component case).
6183 * sem_ch3.adb (Check_Component): Add a Boolean parameter
6184 Array_Comp defaulted to False. Pass Empty for the Comp
6185 actual when calling Null_Exclusion_Static_Checks in the case
6186 where Comp_Decl matches Object_Decl, because we don't have a
6187 component in that case. In the case of an object or component
6188 of an array type, pass True for Array_Comp on the recursive call
6189 to Check_Component.
6190
6191 2017-05-02 Bob Duff <duff@adacore.com>
6192
6193 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
6194 compute the linux priority from the Ada priority. Call this everywhere
6195 required. In particular, the previous version was not doing this
6196 computation when setting the ceiling priority in various places. It
6197 was just converting to C.int, which results in a ceiling that is off
6198 by 1.
6199
6200 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6201
6202 * sem_ch3.adb: Comment predicate inheritance.
6203
6204 2017-05-02 Tristan Gingold <gingold@adacore.com>
6205
6206 * s-trasym.ads: Add comment.
6207
6208 2017-05-02 Bob Duff <duff@adacore.com>
6209
6210 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
6211 * sem_ch4.adb: Minor reformatting.
6212 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
6213 * s-taspri-posix-noaltstack.ads: Minor refactoring.
6214 * sinput.ads: Minor typo fix.
6215
6216 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6217
6218 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
6219 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
6220 here from exp_ch9, to recognize objects whose creation requires
6221 dynamic allocation, so that the proper warning can be emitted
6222 when restriction No_Implicit_Heap_Allocation is in effect.
6223 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
6224 to emit proper warning when an object that requires dynamic
6225 allocation is declared.
6226
6227 2017-05-02 Tristan Gingold <gingold@adacore.com>
6228
6229 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
6230
6231 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6232
6233 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
6234 visibility rules for equality operators that apply within an
6235 instantiation apply within an inlined body.
6236 * sem_type.adb (Add_One_Interp): ditto.
6237
6238 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6239
6240 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
6241 procedures.
6242
6243 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6244
6245 * snames.ads-tmpl
6246 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
6247 Name_No_Tagged_Streams): Move to regular pragmas. Add
6248 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
6249 and Secondary_Stack_Size.
6250 (Pragma_Id): Move Pragma_Assume,
6251 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
6252 Pragma_No_Tagged_Streams to second part.
6253
6254 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6255
6256 * exp_attr.adb: Minor reformatting.
6257
6258 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6259
6260 * sem_ch4.adb (Analyze_Selected_Component): Improve error
6261 detection for illegal references to private components or
6262 operations of a protected type in the body of the type.
6263
6264 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6265
6266 * opt.ads: Add missing GNAT markers in comments.
6267 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
6268 settings of Optimize_Alignment at the end.
6269
6270 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6271
6272 * checks.adb (Apply_Constraint_Check): Do not apply
6273 a discriminant check when the associated type is a constrained
6274 subtype created for an unconstrained nominal type.
6275 * exp_attr.adb: Minor reformatting.
6276
6277 2017-05-02 Bob Duff <duff@adacore.com>
6278
6279 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
6280 the N_Raise_Expression case.
6281 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
6282 and add assertions.
6283
6284 2017-05-02 Yannick Moy <moy@adacore.com>
6285
6286 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
6287 optimize length comparison in GNATprove mode.
6288 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
6289 operator /= into negation of operator = when needed.
6290 (Expand_SPARK): Call new
6291 function to expand operator /=.
6292
6293 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6294
6295 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
6296 Simplify the expression for a fixed-fixed division to remove
6297 divisions by constants whenever possible, as an optimization
6298 for restricted targets.
6299
6300 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6301
6302 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
6303
6304 2017-05-02 Bob Duff <duff@adacore.com>
6305
6306 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
6307 to find primitive ops, instead of using an Identifier that will
6308 later be looked up. This is necessary because these ops are not
6309 necessarily visible at all places where we need to call them.
6310 * exp_util.ads: Minor comment fix.
6311
6312 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6313
6314 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
6315 references are fully conformant if they are both expansions
6316 of the discriminant of a protected type, within one of the
6317 protected operations. One occurrence may be expanded into a
6318 constant declaration while the other is an input parameter to
6319 the corresponding generated subprogram.
6320
6321 2017-05-02 Justin Squirek <squirek@adacore.com>
6322
6323 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
6324 recursivly searching composite-types for null-excluding access
6325 types and verifying them.
6326 (Analyze_Object_Declaration): Add a
6327 call to Check_Null_Excluding_Components for static verification
6328 of non-initialized objects.
6329 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
6330 a parameter for a composite-type's component and an extra case
6331 for printing component information.
6332
6333 2017-05-02 Yannick Moy <moy@adacore.com>
6334
6335 * sem_ch10.adb (Analyze_Subunit): Take
6336 configuration pragma into account when restoring appropriate
6337 pragma for analysis of subunit.
6338
6339 2017-05-02 Justin Squirek <squirek@adacore.com>
6340
6341 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
6342 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
6343 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
6344 clauses from the runtime.
6345
6346 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6347
6348 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
6349 array components specially.
6350
6351 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6352
6353 * sem_ch8.adb (Premature_Usage): If the premature usage of
6354 an entity is as the expression in its own object decaration,
6355 rewrite the reference as Any_Id to prevent cascaded errors or
6356 compiler loops when such an entity is used in an address clause.
6357
6358 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6359
6360 * gcc-interface/decl.c (components_to_record): Add missing guard.
6361
6362 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6363
6364 * gcc-interface/decl.c (components_to_record): Add more comments.
6365 Put back pending fields onto the regular list if the misalignment
6366 happens to cancel itself.
6367
6368 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6369
6370 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
6371 controlling actual in a prefixed call, preserve the original node
6372 information if the prefix itself has been rewritten, for ASIS use.
6373
6374 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6375
6376 * exp_ch6.adb (Insert_Post_Call_Actions):
6377 Code clean up. Insert the post-call actions after an enclosing
6378 procedure call when N denotes a function call and appears as an
6379 actual parameter in the procedure call.
6380
6381 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6382
6383 * freeze.adb (Check_Component_Storage_Order): If there is a clause
6384 for the component, also reject the attribute if the component
6385 doesn't end on a byte boundary and its scalar storage order is
6386 different from that of the enclosing record type.
6387
6388 2017-04-28 Javier Miranda <miranda@adacore.com>
6389
6390 * atree.ads (Info_Messages): Removed.
6391 (Warning_Info_Messages): New counter.
6392 (Report_Info_Messages): New counter.
6393 * err_vars.ads Update documentation.
6394 * errout.adb (Delete_Warning_And_Continuations): Update
6395 Info_Message occurrences.
6396 (Error_Msg_Internal): Update Info_Message occurrences.
6397 (Delete_Warning): Update Info_Message occurrences.
6398 (Write_Error_Summary): Update Info_Message occurrences.
6399 (Output_Messages): Update Info_Message occurrences.
6400 (To_Be_Removed): Update Info_Message occurrences.
6401 (Reset_Warnings): Update Info_Message occurrences.
6402 * errutil.adb (Error_Msg): Update Info_Message occurrences.
6403 (Finalize): Update Info_Message occurrences.
6404 (Initialize): Update Info_Message occurrences.
6405 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
6406 (Compilation_Errors): Update Info_Message_Occurences.
6407
6408 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6409
6410 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
6411 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
6412 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
6413 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
6414 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
6415 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
6416 Y_Size.
6417 * sem_eval.adb (Why_Not_Static): Initialize Typ.
6418 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
6419
6420 2017-04-28 Bob Duff <duff@adacore.com>
6421
6422 * sem_util.ads, sem_util.adb (Might_Raise): New function
6423 that replaces Is_Exception_Safe, but has the opposite
6424 sense. Is_Exception_Safe was missing various cases -- calls inside
6425 a pragma Debug, calls inside an 'if' or assignment statement,
6426 etc. Might_Raise now walks the entire subtree looking for things
6427 that can raise.
6428 * exp_ch9.adb (Is_Exception_Safe): Remove.
6429 (Build_Protected_Subprogram_Body): Replace call to
6430 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
6431 constants where possible).
6432 * exp_ch7.adb: Rename Is_Protected_Body -->
6433 Is_Protected_Subp_Body. A protected_body is something different
6434 in the grammar.
6435
6436 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6437
6438 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
6439 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
6440 (P_Discrete_Choice_List): Initialize Expr_Node variable.
6441 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
6442 (P_Protected): Likewise.
6443 * sem_case.adb (Check_Duplicates):
6444 Add pragma Warnings on variable.
6445 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
6446 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
6447 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
6448 (Analyze_Exit_Statement): Initialize Scope_Id variable.
6449 (Analyze_Iterator_Specification): Initialize Bas variable.
6450 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
6451 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
6452 (Analyze_Accept_Statement): Initialize Task_Nam.
6453
6454 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6455
6456 * checks.adb (Install_Primitive_Elaboration_Check):
6457 Do not generate an elaboration check if all checks have been
6458 suppressed.
6459
6460 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6461
6462 * sem_ch13.adb (Analyze_Aspect_Specifications, case
6463 Interrupt_Handler and Attach_Handler): Generate reference
6464 to protected operation to prevent spurious warnings about
6465 unreferenced entities. Previous scheme failed with style checks
6466 enabled.
6467
6468 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6469
6470 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
6471 that follows an expression function must not be relocated to
6472 the generated body, because it applies to the code that follows.
6473
6474 2017-04-28 Gary Dismukes <dismukes@adacore.com>
6475
6476 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
6477 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
6478 code that might violate the more stringent checking for 'Access
6479 introduced in Ada 2005.
6480
6481 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6482
6483 * a-cforse.adb: minor style fix in comment.
6484
6485 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6486
6487 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
6488 initialize Block_Decls variable.
6489 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
6490 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
6491 * exp_disp.adb (Expand_Interface_Actuals): Initialize
6492 Formal_DDT and Actual_DDT variables.
6493 (Expand_Interface_Thunk): Initialize Iface_Formal.
6494 (Make_DT): Initialize Size_Comp.
6495 (Make_Select_Specific_Data_Table): Initialize Decls.
6496 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
6497 Also initialize more RPC_Receiver_* variables.
6498 (Build_To_Any_Function): Initialize Cstr_Formal.
6499 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
6500
6501 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6502
6503 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
6504 node between access types, freeze the designated type as well,
6505 so that dispatch table pointers are created in the proper scope,
6506 and not in the constructed body of the expression function.
6507
6508 2017-04-28 Bob Duff <duff@adacore.com>
6509
6510 * alloc.ads (Nodes_Initial): Go back to previous value. The large
6511 value makes large compilations faster, but small compilations slower.
6512
6513 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6514
6515 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
6516
6517 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6518
6519 * erroutc.adb (Compilation_Errors): Do not consider info messages
6520 as suitable warnings when warnings must be treated as errors.
6521 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
6522 internally-generated packages when outputting completion
6523 information.
6524 * errout.adb (Output_Messages): Do not consider info messages as
6525 suitable warnings when warnings must be treated as errors.
6526 * errutil.adb (Finalize): Do not consider info messages as
6527 suitable warnings when warnings must be treated as errors.
6528
6529 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6530
6531 * warnsw.ads: Minor fix for incorrect wording in comment.
6532
6533 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6534
6535 * sem_res.adb (In_Instance_Code): New predicate in
6536 Valid_Conversion, to determine whether a type conversion appears
6537 as (or within) an actual for a formal object. Type conversions
6538 in instances are not rechecked in Valid_Conversion because
6539 visibility changes between generic location andi instance may
6540 lead to spurious errors, but conversions within an actual must be
6541 fully checked, and they are not fully resolved when pre-analyzing
6542 the actuals.
6543
6544 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6545
6546 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
6547 New_Copy_Tree instead of Relocate_Node as any subsequent copies
6548 of the relocated node will have mangled Parent pointers.
6549 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
6550 tables used in conjunction with entity and itype replication.
6551 (Visit_Entity): Rewrite the restriction on which entities
6552 require duplication. The restriction now includes all types.
6553
6554 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6555
6556 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
6557 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
6558 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
6559 cleanups.
6560
6561 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6562
6563 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
6564 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
6565
6566 2017-04-28 Gary Dismukes <dismukes@adacore.com>
6567
6568 * exp_util.adb: Minor reformatting.
6569
6570 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6571
6572 * sem_ch4.adb: Fix copy/pasto.
6573
6574 2017-04-27 Tristan Gingold <gingold@adacore.com>
6575
6576 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
6577 raise-gcc.c. Fix include search path for raise-gcc.c
6578
6579 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
6580
6581 * fe.h (Warn_On_Questionable_Layout): Declare.
6582 * warnsw.ads (Warn_On_Record_Holes): Move down.
6583 (Warn_On_Questionable_Layout): New boolean variable.
6584 (Warning_Record): Add Warn_On_Questionable_Layout field.
6585 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
6586 (Restore_Warnings): Likewise.
6587 (Save_Warnings): Likewise.
6588 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
6589 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
6590 components_to_record.
6591 (gnu_field_to_gnat): New function.
6592 (warn_on_field_placement): Likewise.
6593 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
6594 parameters. Rename local variables and adjust recursive call.
6595 Rework final scan of the field list and implement warnings on the
6596 problematic placement of specific sorts of fields.
6597
6598 2017-04-27 Bob Duff <duff@adacore.com>
6599
6600 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
6601 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
6602 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
6603 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
6604 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
6605 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
6606 For efficiency, cache results of Is_Internal_File_Name and
6607 Is_Predefined_File_Name in the Units table. This avoids a lot
6608 of repeated text processing.
6609
6610 2017-04-27 Emmanuel Briot <briot@adacore.com>
6611
6612 * g-comlin.adb (Sort_Sections): remove useless test.
6613
6614 2017-04-27 Claire Dross <dross@adacore.com>
6615
6616 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
6617 allow the use of regular equality over elements in contracts.
6618 (Formal_Model): Ghost package containing model functions that are
6619 used in subprogram contracts.
6620 (Current_To_Last): Removed, model functions should be used instead.
6621 (First_To_Previous): Removed, model functions should be used instead.
6622 (Strict_Equal): Removed, model functions should be used instead.
6623 (No_Overlap): Removed, model functions should be used instead.
6624 (Equivalent_Keys): Functions over cursors are removed. They were
6625 awkward with explicit container parameters.
6626 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
6627 allow the use of regular equality over elements in contracts.
6628 (Formal_Model): Ghost package containing model functions that
6629 are used in subprogram contracts.
6630 (Current_To_Last): Removed, model functions should be used instead.
6631 (First_To_Previous): Removed, model functions should be used instead.
6632 (Strict_Equal): Removed, model functions should be used instead.
6633 (No_Overlap): Removed, model functions should be used instead.
6634
6635 2017-04-27 Yannick Moy <moy@adacore.com>
6636
6637 * gnat1drv.adb: Code cleanup.
6638
6639 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6640
6641 * exp_util.adb (Replace_Entity): The prefix of a 'Result
6642 attribute reference in a post- condition is the subprogram to
6643 which the condition applies. If the condition is inherited
6644 by a type extension, the prefix becomes a reference to the
6645 inherited operation, but there is no need to create a wrapper
6646 for this operation, because 'Result is expanded independently
6647 when elaborating the postconditions.
6648
6649 2017-04-27 Bob Duff <duff@adacore.com>
6650
6651 * sinput.adb: Minor code cleanup.
6652 * namet.adb (Append): Create faster versions of
6653 Append(String) and Append(Name_Id) by using slice assignment
6654 instead of loops.
6655 * sem_util.adb (In_Instance): Speed this up by removing
6656 unnecessary tests; Is_Generic_Instance is defined for all
6657 entities.
6658 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
6659 Remove unused function.
6660 * alloc.ads (Nodes_Initial): Use a much larger value, because
6661 the compiler was spending a lot of time copying the nodes table
6662 when it grows. This number was chosen in 1996, so is rather out
6663 of date with current memory sizes. Anyway, it's virtual memory.
6664 Get rid of Orig_Nodes_...; use Node_... instead.
6665 * atree.adb (Lock): Do not release the Nodes tables; it's a
6666 waste of time.
6667 Orig_Nodes_ ==> Nodes_
6668 * nlists.adb: Orig_Nodes_ ==> Nodes_
6669 * g-table.adb: Remove unused "with" clause.
6670 * g-table.ads, table.ads: Remove Big_Table_Type, which should
6671 not be used by clients.
6672 * g-dyntab.adb (Last_Allocated): New function
6673 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
6674
6675 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6676
6677 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
6678 check.
6679 (Subtypes_Statically_Match): Remove duplicate check.
6680 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
6681
6682 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6683
6684 * exp_aggr.adb (Replace_Type): Remove the special processing
6685 for selected components.
6686 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
6687 processing for attributes Fixed_Value and Integer_Value.
6688 * exp_util.adb (Side_Effect_Free): Merge the processing for
6689 qualified expressions, type conversions, and unchecked type
6690 conversions.
6691 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
6692 and Optional.
6693 * par-ch3.adb (P_Declarative_Items): Merge the processing for
6694 tokens function, not, overriding, and procedure.
6695 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
6696 for qualified expressions, type conversions, and unchecked
6697 type conversions.
6698 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
6699 processing for Ada 83 and instances.
6700 (Object_Access_Level): Merge the processing for indexed components
6701 and selected components.
6702 * uname.adb (Add_Node_Name): Merge the processing for stubs.
6703
6704 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6705
6706 * checks.adb (Install_Primitive_Elaboration_Check):
6707 Do not generate the check when restriction No_Elaboration_Code
6708 is in effect.
6709
6710 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6711
6712 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
6713 of Expand_Dispatching_Call. If the denoted subprogram has a
6714 class-wide precondition, this is the only precondition that
6715 applies to the call, rather that the class-wide preconditions
6716 that may apply to the body that is executed. (This is specified
6717 in AI12-0195).
6718
6719 2017-04-27 Yannick Moy <moy@adacore.com>
6720
6721 * gnat1drv.adb (Adjust_Global_Switches): Issue
6722 a warning in GNATprove mode if the runtime library does not
6723 support IEEE-754 floats.
6724
6725 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6726
6727 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
6728 is itself inherited it does not carry any contract information,
6729 so examine its parent operation which is its Alias.
6730
6731 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6732
6733 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
6734 prefix can be an object reference in which case Obj'Image (X)
6735 can only be interpreted as an indexing of the parameterless
6736 version of the attribute.
6737 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
6738 an indexing or a slice operation if the attribute does not require
6739 parameters. In Ada2012 'Image also belongs in this category,
6740 and A'Image (lo .. hi) is legal and must be parsed as a slice.
6741
6742 2017-04-27 Yannick Moy <moy@adacore.com>
6743
6744 * exp_ch4.adb: Minor reformatting.
6745 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
6746 disable the CodePeer and C generation modes. Similar to the
6747 opposite actions done in CodePeer mode.
6748
6749 2017-04-27 Yannick Moy <moy@adacore.com>
6750
6751 * sem_res.adb: Remove duplicate code.
6752 * sem_attr.adb: Delete duplicate code.
6753
6754 2017-04-27 Bob Duff <duff@adacore.com>
6755
6756 * g-dyntab.adb: Reduce the amount of copying in
6757 Release. No need to copy items past Last.
6758
6759 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6760
6761 * checks.adb Add with and use clauses for Sem_Disp.
6762 (Install_Primitive_Elaboration_Check): New routine.
6763 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
6764 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
6765 processing of 'Elaborated.
6766 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
6767 elaboration check.
6768
6769 2017-04-27 Bob Duff <duff@adacore.com>
6770
6771 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
6772 If the table grows and then shrinks back to empty, we won't necessarily
6773 point back to the empty array. Code cleanups.
6774 * sinput.ads: Add 'Base to Size clause to match the declared
6775 component subtypes.
6776
6777 2017-04-27 Claire Dross <dross@adacore.com>
6778
6779 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
6780 allow the use of regular equality over elements in contracts.
6781 (Formal_Model): Ghost package containing model functions that
6782 are used in subprogram contracts.
6783 (Current_To_Last): Removed, model functions should be used instead.
6784 (First_To_Previous): Removed, model functions should be used instead.
6785 (Strict_Equal): Removed, model functions should be used instead.
6786 (No_Overlap): Removed, model functions should be used instead.
6787 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
6788 Boolean generic parameter to disable contracts for equivalence
6789 between keys.
6790 (Witness): Create a witness of a key that is used for handling of
6791 equivalence between keys.
6792 (Has_Witness): Check whether a witness is contained in a map.
6793 (W_Get): Get the element associated to a witness.
6794 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
6795 directly.
6796 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
6797 Boolean generic parameter to disable contracts for equivalence
6798 between keys.
6799 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
6800 of equivalence on functional maps.
6801 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
6802 of equivalence on functional maps.
6803
6804 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6805
6806 * exp_ch9.adb (Expand_Entry_Barrier): Code
6807 cleanup. Do not perform the optimization which removes the
6808 declarations of the discriminant and component renamings when
6809 validity checks on operands and attributes are in effect.
6810
6811 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6812
6813 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
6814 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
6815 a-cfhama.ads, a-cofove.ads: Minor reformatting.
6816
6817 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6818
6819 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
6820 pointer dereference.
6821 * g-spipat.adb (Dump): Code clean up. Protect against a possible
6822 null pointer dereference.
6823
6824 2017-04-27 Bob Duff <duff@adacore.com>
6825
6826 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
6827 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
6828 Free renames Init, since they do the same thing.
6829 * g-table.ads: Default for Table_Low_Bound.
6830 * table.ads: Default for Table_Low_Bound, Table_Initial, and
6831 Table_Increment.
6832
6833 2017-04-27 Bob Duff <duff@adacore.com>
6834
6835 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
6836 can reallocate.
6837 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
6838 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
6839 Reorder code so that above assertions do not fail.
6840 * table.ads: Remove obsolete comment on Locked.
6841
6842 2017-04-27 Claire Dross <dross@adacore.com>
6843
6844 * a-cfdlli.ads: Code cleanup.
6845
6846 2017-04-27 Yannick Moy <moy@adacore.com>
6847
6848 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
6849 when needed for proof. (Expand_SPARK): Call the new procedure.
6850 * exp_util.ads Fix typo.
6851
6852 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6853
6854 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
6855 fixes.
6856
6857 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6858
6859 * sem_elab.adb Add new type Visited_Element
6860 and update the contents of table Elab_Visited. Various code clean up.
6861 (Check_Elab_Call): Determine whether a prior call to
6862 the same subprogram was already examined within the same context.
6863 (Check_Internal_Call_Continue): Register the subprogram being
6864 called as examined within a particular context. Do not suppress
6865 elaboration warnings.
6866
6867 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6868
6869 * xoscons.adb, osint.ads: Minor reformatting.
6870
6871 2017-04-27 Bob Duff <duff@adacore.com>
6872
6873 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
6874 Table_Count_Type --> Table_Last_Type, because the name
6875 was confusing (a "count" usually starts at zero). Add
6876 functionality supported or needed by other tables packages
6877 (Move, Release_Threshold).
6878 * g-table.ads, g-table.adb: This is now just a thin wrapper
6879 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
6880 or needed by other tables packages (Save, Restore).
6881 * table.ads, table.adb: This is now just a thin wrapper around
6882 * g-table.ads/g-table.adb.
6883 * namet.h, scos.h, uintp.h: These files are reaching into the
6884 private data of some instances of g-table, whose names changed,
6885 so the above change requires some adjustment here. It now uses
6886 public interfaces.
6887
6888 2017-04-27 Bob Duff <duff@adacore.com>
6889
6890 * namet.adb, namet.ads: Minor: remove unused procedures.
6891
6892 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
6893
6894 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
6895 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
6896 Add pragma Warnings on Rtype variable in nested block. *
6897 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
6898 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
6899 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
6900 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
6901 (Process_Component_List_For_Finalize): Initialize Counter_Id.
6902 (Build_Finalize_Statements): Initialize Bod_Stmts.
6903 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
6904
6905 2017-04-27 Claire Dross <dross@adacore.com>
6906
6907 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
6908 allow the use of regular equality over elements in contracts.
6909 (Formal_Model): Ghost package containing model functions that are
6910 used in subprogram contracts.
6911 (Current_To_Last): Removed, model
6912 functions should be used instead.
6913 (First_To_Previous): Removed, model functions should be used instead.
6914 (Strict_Equal): Removed, model functions should be used instead.
6915 (No_Overlap): Removed, model functions should be used instead.
6916 (Equivalent_Keys): Functions over cursors are removed. They were
6917 awkward with explicit container parameters.
6918 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
6919 (proof only) procedure to help GNATprove when equivalence over
6920 keys is not equality.
6921
6922 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6923
6924 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
6925 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
6926 Minor reformatting and code cleanups.
6927
6928 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6929
6930 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
6931 subsidiary of Check_Inherited_Conditions, to build pragmas for an
6932 operation whose ancestor has classwide pre/postconditions. This
6933 is used both to check the legality of the inheritance in Ada
6934 and in SPARK, and to determine whether a wrapper is needed for
6935 an inherited operation.
6936 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
6937 Improve placement of error message for inherited classwide
6938 conditions that become illegal on type derivation.
6939
6940 2017-04-27 Yannick Moy <moy@adacore.com>
6941
6942 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
6943 SPARK_Mode from context on generic package.
6944 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
6945 useless test.
6946
6947 2017-04-27 Claire Dross <dross@adacore.com>
6948
6949 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
6950 overflows in computations.
6951 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
6952 overflows in computations.
6953 (Insert): Rewrite precondition to avoid overflows in computations.
6954 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
6955 overflows in computations.
6956 (Insert): Rewrite precondition to avoid overflows in computations.
6957
6958 2017-04-27 Steve Baird <baird@adacore.com>
6959
6960 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
6961 flag when it is declared in order to avoid confusing CodePeer about
6962 the possibility of an uninitialized variable read.
6963
6964 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6965
6966 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
6967 no dimensionality error if the subtype of the expression is
6968 identical to the nominal subtype in the declaration, even though
6969 the expression itself may have been constant-folded and lack a
6970 dimension vector.
6971 * sem_dim.ads: Add comments on setting of dimension vectors and
6972 its interaction with node rewritings and side-effect removal.
6973
6974 2017-04-27 Bob Duff <duff@adacore.com>
6975
6976 * debug.adb: Minor comment correction.
6977 * sem_dim.ads: Minor reformatting and typo fixes.
6978
6979 2017-04-27 Bob Duff <duff@adacore.com>
6980
6981 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
6982 Last of the tables via function calls, rather than relying on layout
6983 of data structures.
6984
6985 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6986
6987 * exp_util.adb: No wrapper in GNATprove mode.
6988
6989 2017-04-27 Yannick Moy <moy@adacore.com>
6990
6991 * sem_res.adb (Resolve_Comparison_Op): Always
6992 evaluate comparisons between values of universal types.
6993
6994 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6995
6996 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
6997 an elaboration counter nor a check when in GNATprove mode.
6998 * sem_util.adb (Build_Elaboration_Entity): Do not create an
6999 elaboration counter when in GNATprove mode.
7000
7001 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7002
7003 * freeze.adb: copy-paste typo.
7004
7005 2017-04-27 Yannick Moy <moy@adacore.com>
7006
7007 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
7008 Use correct test to detect call in GNATprove mode instead of
7009 compilation.
7010
7011 2017-04-27 Claire Dross <dross@adacore.com>
7012
7013 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
7014 New property function expressing that the element of a
7015 sequence are contained in the union of two sequences.
7016 (Formal_Model.M_Elements_Included): New property function
7017 expressing that the element of a sequence are another sequence.
7018 (Generic_Sorting): Use new property functions to state that
7019 elements are preserved by Sort and Merge.
7020 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
7021 allow the use of regular equality over elements in contracts.
7022 (Formal_Model): Ghost package containing model functions
7023 that are used in subprogram contracts. (Capacity):
7024 On unbounded containers, return the maximal capacity.
7025 (Current_To_Last): Removed, model functions should be used instead.
7026 (First_To_Previous): Removed, model functions should be used instead.
7027 (Append): Default parameter value replaced
7028 by new wrapper to allow more precise contracts.
7029 (Insert): Subprogram restored, it seems it was useful to users even if
7030 it is inefficient.
7031 (Delete): Subprogram restored, it seems it was useful to users even if
7032 it is inefficient.
7033 (Prepend): Subprogram restored, it seems it was useful to users even
7034 if it is inefficient.
7035 (Delete_First): Subprogram restored, it seems it
7036 was useful to users even if it is inefficient. (Delete_Last):
7037 Default parameter value replaced by new wrapper to allow more
7038 precise contracts.
7039 (Generic_Sorting.Merge): Subprogram restored.
7040 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
7041 allow the use of regular equality over elements in contracts.
7042 (Formal_Model): Ghost package containing model functions
7043 that are used in subprogram contracts. (Capacity):
7044 On unbounded containers, return the maximal capacity.
7045 (Current_To_Last): Removed, model functions should be used
7046 instead.
7047 (First_To_Previous): Removed, model functions should be used instead.
7048 (Append): Default parameter value replaced
7049 by new wrapper to allow more precise contracts.
7050 (Insert): Subprogram restored, it seems it was useful to users even if
7051 it is inefficient.
7052 (Delete): Subprogram restored, it seems it was useful to users even if
7053 it is inefficient.
7054 (Prepend): Subprogram restored, it seems it was useful to users even
7055 if it is inefficient.
7056 (Delete_First): Subprogram restored, it seems it
7057 was useful to users even if it is inefficient. (Delete_Last):
7058 Default parameter value replaced by new wrapper to allow more
7059 precise contracts.
7060 (Generic_Sorting.Merge): Subprogram restored.
7061 (Vector): Do not reuse formal vectors, as it is no longer possible
7062 to supply them with an equality function over elements.
7063
7064 2017-04-27 Bob Duff <duff@adacore.com>
7065
7066 * g-dyntab.adb (Release): When allocating the new
7067 table, use the correct slice of the old table to initialize it.
7068
7069 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7070
7071 * einfo.ads: Minor fixes in comments.
7072
7073 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7074
7075 * sem_prag.adb: disable clones in SPARK_Mode.
7076
7077 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7078
7079 * sem_util.ads, contracts.adb: Minor reformatting.
7080
7081 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7082
7083 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
7084 Build body of subprogram that has a class-wide condition that
7085 contains calls to other primitives.
7086 (Build_Class_Wide_Clone_Call); Build a call to the common
7087 class-wide clone of a subprogram with classwide conditions. The
7088 body of the subprogram becomes a wrapper for a call to the
7089 clone. The inherited operation becomes a similar wrapper to which
7090 modified conditions apply, and the call to the clone includes
7091 the proper conversion in a call the parent operation.
7092 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
7093 subprogram that has a classwide condition that contains calls to
7094 other primitives, build an internal subprogram that is invoked
7095 through a type-specific wrapper for all inherited subprograms
7096 that may have a modified condition.
7097 * sem_prag.adb (Check_References): If subprogram has a classwide
7098 condition, create entity for corresponding clone, to be invoked
7099 through wrapper subprograns.
7100 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
7101 message about placement if pragma isi internally generated.
7102 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
7103 a classwide clone, build body of clone as copy of original body,
7104 and rewrite original body as a wrapper as a wrapper for a call to
7105 the clone, so that it incorporates the original pre/postconditions
7106 of the subprogram.
7107 * freeze.adb (Check_Inherited_Conditions): For an inherited
7108 subprogram that inherits a classwide condition, build spec and
7109 body of corresponding wrapper so that call to inherited operation
7110 gets the modified conditions.
7111 * contracts.adb (Analyze_Contracts): If analysis of classwide
7112 condition has created a clone for a primitive operation, analyze
7113 declaration of clone.
7114
7115 2017-04-27 Steve Baird <baird@adacore.com>
7116
7117 * exp_util.adb (Build_Allocate_Deallocate_Proc):
7118 Add "Suppress => All_Checks" to avoid generating unnecessary
7119 checks.
7120
7121 2017-04-27 Yannick Moy <moy@adacore.com>
7122
7123 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
7124 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
7125 inlining body in GNATprove mode when switch -gnatdm used.
7126 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
7127 in GNATprove mode when switch -gnatdm used.
7128
7129 2017-04-27 Arnaud Charlet <charlet@adacore.com>
7130
7131 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
7132 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
7133 clauses, so that we keep an indication of the address clause
7134 before removing it from the tree.
7135
7136 2017-04-27 Yannick Moy <moy@adacore.com>
7137
7138 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
7139 of expression being qualified, when not an object name, or else
7140 evaluate the underlying name.
7141
7142 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
7143
7144 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
7145
7146 2017-04-27 Justin Squirek <squirek@adacore.com>
7147
7148 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
7149 Process_Component_List_For_Finalization as a local variable.
7150 (Process_Component_For_Finalize): Add an extra parameter to avoid
7151 global references.
7152 (Process_Component_List_For_Finalization): Correct calls to
7153 Process_Component_For_Finalize to take Num_Comps as a parameter.
7154
7155 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7156
7157 * sem_ch8.adb (Find_Direct_Name): Account for the case where
7158 a use-visible entity is defined within a nested scope of an
7159 instance when giving priority to entities which were visible in
7160 the original generic.
7161 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
7162
7163 2017-04-27 Tristan Gingold <gingold@adacore.com>
7164
7165 * raise-gcc.c: Don't use unwind.h while compiling
7166 for the frontend, but mimic host behavior.
7167
7168 2017-04-27 Javier Miranda <miranda@adacore.com>
7169
7170 * sem_ch3.adb (Build_Discriminated_Subtype):
7171 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
7172
7173 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7174
7175 * sem_prag.adb (Analyze_Global_Item):
7176 Do not consider discriminants because they are not "entire
7177 objects". Remove the discriminant-related checks because they are
7178 obsolete.
7179 (Analyze_Input_Output): Do not consider discriminants
7180 because they are not "entire objects".
7181
7182 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7183
7184 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
7185 perform check if the current scope does not come from source,
7186 as is the case for a rewritten task body, because check has
7187 been performed already, and may not be doable because of changed
7188 visibility.
7189
7190 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7191
7192 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
7193 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
7194 Minor reformatting.
7195
7196 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7197
7198 * sem_ch4.adb (Analyze_Call): If the return type of a function
7199 is incomplete in an context in which the full view is available,
7200 replace the type of the call by the full view, to prevent spurious
7201 type errors.
7202 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
7203 abstract subprogram so that compiler does not reject a parameter
7204 of a primitive operation of a tagged type being frozen, when
7205 the untagged type of that parameter cannot be frozen.
7206
7207 2017-04-27 Bob Duff <duff@adacore.com>
7208
7209 * sem_attr.adb (Compute_Type_Key): Don't walk
7210 representation items for irrelevant types, which could be in a
7211 different source file.
7212
7213 2017-04-27 Steve Baird <baird@adacore.com>
7214
7215 * exp_attr.adb (Expand_N_Attribute_Reference):
7216 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
7217 for CodePeer.
7218
7219 2017-04-27 Yannick Moy <moy@adacore.com>
7220
7221 * exp_unst.ads: Fix typos in comments.
7222
7223 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7224
7225 * sem_eval.adb (Choice_Matches): Handle properly a real literal
7226 whose type has a defined static predicate.
7227
7228 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7229
7230 * exp_ch4.adb (Insert_Dereference_Action):
7231 Do not adjust the address of a controlled object when the
7232 associated access type is subject to pragma No_Heap_Finalization.
7233 Code reformatting.
7234
7235 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
7236
7237 * gcc-interface/utils.c (gnat_type_for_size): Set
7238 TYPE_ARTIFICIAL on created types.
7239
7240 2017-04-27 Claire Dross <dross@adacore.com>
7241
7242 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7243 modifications in functional containers.
7244 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7245 to improve readablity. Subprograms are separated between basic
7246 operations, constructors and properties. Universally quantified
7247 formulas in contracts are factorized in independant functions
7248 with a name and a comment. Names of parameters are improved.
7249
7250 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7251
7252 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7253
7254 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7255
7256 * sem_res.adb (Resolve_Type_Conversion): Do not
7257 install a predicate check here since this is already done during
7258 the expansion phase. Verify whether the operand satisfies the
7259 static predicate (if any) of the target type.
7260 * sem_ch3.adb (Analyze_Object_Declaration): Do
7261 not install a predicate check if the object is initialized by
7262 means of a type conversion because the conversion is subjected
7263 to the same check.
7264
7265 2017-04-27 Tristan Gingold <gingold@adacore.com>
7266
7267 * raise.c (__gnat_builtin_longjmp): Remove.
7268 (__gnat_bracktrace):
7269 Add a dummy definition for the compiler (__gnat_eh_personality,
7270 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
7271 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
7272 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
7273 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
7274 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
7275 and a-except-2005.adb.
7276 * raise-gcc.c: Allow build in compiler, compiled as a C++
7277 file.
7278 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
7279 (db): Constify msg_format.
7280 (get_call_site_action_for): Don't use void arithmetic.
7281 * system.ads (Frontend_Exceptions): Set to False.
7282 (ZCX_By_Default): Set to True.
7283 (GCC_ZC_Support): Set to True.
7284 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
7285 a-except.ad[sb].
7286 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
7287 in gnat1 and gnatbind.
7288 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
7289 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
7290 * s-excmac.ads, s-excmac.adb: Copy of variants.
7291 * a-except.o: Adjust preequisites.
7292 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
7293
7294 2017-04-27 Claire Dross <dross@adacore.com>
7295
7296 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7297 modifications in functional containers.
7298 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7299 to improve readablity. Subprograms are separated between basic
7300 operations, constructors and properties. Universally quantified
7301 formulas in contracts are factorized in independant functions
7302 with a name and a comment. Names of parameters are improved.
7303
7304 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7305
7306 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7307
7308 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7309
7310 * sem_res.adb (Resolve_Type_Conversion): Do not
7311 install a predicate check here since this is already done during
7312 the expansion phase. Verify whether the operand satisfies the
7313 static predicate (if any) of the target type.
7314 * sem_ch3.adb (Analyze_Object_Declaration): Do
7315 not install a predicate check if the object is initialized by
7316 means of a type conversion because the conversion is subjected
7317 to the same check.
7318
7319 2017-04-27 Tristan Gingold <gingold@adacore.com>
7320
7321 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
7322 replaced by their variants).
7323
7324 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7325
7326 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
7327 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
7328 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
7329
7330 2017-04-27 Tristan Gingold <gingold@adacore.com>
7331
7332 * s-excmac-gcc.ads, s-excmac-gcc.adb,
7333 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
7334 Ada95.
7335
7336 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7337
7338 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
7339 the loop which detects potential enclosing transient scopes. The
7340 loop now terminates much earlier as transient scopes are bounded
7341 by packages and subprograms.
7342
7343 2017-04-27 Claire Dross <dross@adacore.com>
7344
7345 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
7346 allow the use of regular equality over elements in contracts.
7347 (Cursor): Type is now public so that it can be used in
7348 model functions.
7349 (Formal_Model): Ghost package containing
7350 model functions that are used in subprogram contracts.
7351 (Current_To_Last): Removed, model functions should be used
7352 instead.
7353 (First_To_Previous): Removed, model functions should
7354 be used instead.
7355 (Strict_Equal): Removed, model functions
7356 should be used instead.
7357 (Append): Default parameter value
7358 replaced by new wrapper to allow more precise contracts.
7359 (Insert): Default parameter value replaced by new wrapper to
7360 allow more precise contracts.
7361 (Delete): Default parameter
7362 value replaced by new wrapper to allow more precise contracts.
7363 (Prepend): Default parameter value replaced by new wrapper to
7364 allow more precise contracts.
7365 (Delete_First): Default parameter
7366 value replaced by new wrapper to allow more precise contracts.
7367 (Delete_Last): Default parameter value replaced by new wrapper
7368 to allow more precise contracts.
7369
7370 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7371
7372 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
7373 for object declarations.
7374 (Expand_SPARK_N_Object_Declaration): New routine.
7375 * sem_elab.adb (Check_A_Call): Include calls to the
7376 Default_Initial_Condition procedure of a type under the SPARK
7377 elaboration checks umbrella.
7378
7379 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7380
7381 * sem.adb (Analyze): Diagnose an illegal iterated component
7382 association.
7383 * sem_util.ads, sem_util.adb
7384 (Diagnose_Iterated_Component_Association): New routine.
7385
7386 2017-04-27 Bob Duff <duff@adacore.com>
7387
7388 * adaint.c (__gnat_get_current_dir): Return 0 in length if
7389 getcwd fails.
7390 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
7391 exception if getcwd failed.
7392
7393 2017-04-27 Yannick Moy <moy@adacore.com>
7394
7395 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
7396 entities with special prefix.
7397
7398 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7399
7400 * debug.adb Change the documentation of switch -gnatd.s.
7401 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
7402 to manage the secondary stack when an enclosing scope already
7403 performs this functionality (aka relaxed management). Switch
7404 -gnatd.s may be used to force strict management in which case
7405 the block will manage the secondary stack unconditionally. Add
7406 a guard to stop the traversal when encountering a package or a
7407 subprogram scope.
7408
7409 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7410
7411 * sem_res.adb (Resolve_Call): Refine further the handling of
7412 limited views of return types in function calls. If the function
7413 that returns a limited view appears in the current unit,
7414 we do not replace its type by the non-limited view because
7415 this transformation is performed int the back-end. However,
7416 the type of the call itself must be the non-limited view, to
7417 prevent spurious resolution errors.
7418
7419 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7420
7421 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
7422 Removed, proposed implementation using generics for class-wide
7423 preconditions proved impractical.
7424 (Class_Wide_Clone): New attribute of subprogram. Designates
7425 subprogram created for primitive operations with class-wide
7426 pre/postconditions that contain calls to other primitives. The
7427 clone holds the body of the original primitive, but the
7428 pre/postonditions do not apply to it. The original body is
7429 rewritten as a wrapper for a call to the clone.
7430 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
7431 the flag is set, no code for the corresponding pre/postconditions
7432 is inserted into its body.
7433
7434 2017-04-27 Bob Duff <duff@adacore.com>
7435
7436 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
7437 Scalar_Storage_Order if -gnatI is given.
7438 * sem_prag.adb (Analyze_Pragma): Ignore
7439 Default_Scalar_Storage_Order if -gnatI is given.
7440
7441 2017-04-27 Claire Dross <dross@adacore.com>
7442
7443 * a-cofuba.ads (Add): Take as an additional input parameter
7444 the position where the element should be inserted.
7445 (Remove): New function that removes an element from the container.
7446 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
7447 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
7448 (Remove): New function that removes an element from a set.
7449 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
7450 (Remove): New function that removes an element from a sequence.
7451 (Insert): New function that adds anywhere in a sequence.
7452
7453 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7454
7455 * checks.adb (Generate_Range_Check): Revert previous change.
7456
7457 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7458
7459 * sem_util.adb: Minor reformatting/rewording.
7460
7461 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7462
7463 * lib-xref.adb (Generate_Reference): The use
7464 of attribute 'Result is not considered a violation of pragma
7465 Unreferenced.
7466
7467 2017-04-27 Justin Squirek <squirek@adacore.com>
7468
7469 * cstand.adb (Create_Standard): Correctly set
7470 Directly_Designated_Type for Any_Access.
7471 * sem_type.adb (Covers): Minor grammar fixes.
7472
7473 2017-04-27 Bob Duff <duff@adacore.com>
7474
7475 * sem_attr.adb: Minor cleanup.
7476
7477 2017-04-27 Claire Dross <dross@adacore.com>
7478
7479 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
7480 private child of Ada.Containers used to implement all functional
7481 containers.
7482 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
7483 child of Ada.Containers. It provides functional indefinite unbounded
7484 maps which can be used as high level models for specification
7485 of data structures.
7486 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
7487 child of Ada.Containers. It provides functional indefinite unbounded
7488 sets which can be used as high level models for specification
7489 of data structures.
7490 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
7491 child of Ada.Containers. It provides functional indefinite unbounded
7492 vectors which can be used as high level models for specification
7493 of data structures.
7494 * Makefile.rtl: Add new packages.
7495 * impunit.adb: Add new packages.
7496
7497 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7498
7499 * sem_ch4.adb: Minor reformatting.
7500
7501 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7502
7503 * sem_ch12.adb (Analyze_Associations): minor reformatting.
7504 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
7505 point type actual that has user-defined arithmetic primitives,
7506 when there is a previous actual for a formal package that defines
7507 a fixed-point type with the parent user-defined operator.
7508
7509 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7510
7511 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
7512 * sem_attr.adb (Resolve_Attribute): Generate a range check when
7513 the component type allows range checks.
7514
7515 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7516
7517 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
7518 corresponding declaration, because formal derived types are
7519 rewritten as private extensions.
7520
7521 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7522
7523 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
7524 dimensions of operands if node has been analyzed already, because
7525 previous analysis and dimension checking will have removed the
7526 dimension information from the operands.
7527
7528 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7529
7530 * debug.adb: Document the use of switch -gnatd.s.
7531 * einfo.ads Update the documentation on attribute
7532 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
7533 the uses of these attributes from certain entities.
7534 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
7535 which determines whether the block should continue to manage
7536 the secondary stack.
7537 (Manages_Sec_Stack): New routine.
7538
7539 2017-04-27 Bob Duff <duff@adacore.com>
7540
7541 * atree.ads: Minor edit.
7542
7543 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7544
7545 * sinfo.ads: Update the section on Ghost mode. Add
7546 a section on SPARK mode. Update the placement of section on
7547 expression functions.
7548
7549 2017-04-27 Bob Duff <duff@adacore.com>
7550
7551 * sinput.adb (Get_Source_File_Index): Don't
7552 assert that S is in the right range in the case where this is
7553 a .dg file under construction.
7554
7555 2017-04-27 Yannick Moy <moy@adacore.com>
7556
7557 * sem_util.adb (Check_Result_And_Post_State):
7558 Handle more precisely each conjunct in expressions formed by
7559 and'ing sub-expressions.
7560
7561 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7562
7563 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
7564
7565 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7566
7567 * gnat_rm.texi, gnat_ugn.texi,
7568 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7569 doc/gnat_ugn/platform_specific_information.rst,
7570 doc/gnat_ugn/gnat_and_program_execution.rst,
7571 doc/gnat_ugn/gnat_utility_programs.rst,
7572 doc/gnat_ugn/the_gnat_compilation_model.rst,
7573 doc/gnat_rm/implementation_defined_attributes.rst,
7574 doc/gnat_rm/the_gnat_library.rst,
7575 doc/gnat_rm/implementation_defined_pragmas.rst,
7576 doc/gnat_rm/representation_clauses_and_pragmas.rst,
7577 doc/gnat_rm/implementation_of_specific_ada_features.rst,
7578 doc/gnat_rm/implementation_defined_aspects.rst,
7579 doc/gnat_rm/implementation_defined_characteristics.rst: Update
7580 documentation.
7581
7582 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7583
7584 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
7585 generating C code on complex case expressions.
7586
7587 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7588
7589 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
7590 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
7591 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
7592 Ada_2012 instead of Ada_2005 to be compatible with the above
7593 change.
7594 * bindgen.adb: Silence new warning on pragma Ada_95.
7595
7596 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7597
7598 * checks.adb (Generate_Range_Check): Revert part of previous change.
7599
7600 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7601
7602 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
7603 container indexing operation that appears as a an actual in a
7604 parameter association in a procedure call.
7605
7606 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
7607
7608 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
7609 Fix spelling mistakes.
7610
7611 2017-04-25 Bob Duff <duff@adacore.com>
7612
7613 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
7614 * sinput-p.adb: Use regular fat pointers, with bounds checking,
7615 for source buffers. Fix misc obscure bugs.
7616 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
7617 checking, for source buffers. Modify representation clause for
7618 Source_File_Record as appropriate. Move Source_File_Index_Table
7619 from spec to body, because it is not used outside the body.
7620 Move Set_Source_File_Index_Table into the private part, because
7621 it is used only in the body and in children. Use trickery to
7622 modify the dope in the generic instantiation case. It's ugly,
7623 but not as ugly as the previous method. Fix documentation.
7624 Remove obsolete code.
7625 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
7626 indexing in source buffers.
7627 * fmap.adb: Avoid conversions from one string type to another.
7628 Remove a use of global name buffer.
7629 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
7630 fixes.
7631
7632 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7633
7634 * exp_util.adb, exp_ch4.adb: Minor reformatting.
7635
7636 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7637
7638 * checks.adb: Code clean up in various routines.
7639 (Generate_Range_Check): Do not generate a range check when the
7640 expander is not active or when index/range checks are suppressed
7641 on the target type.
7642 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
7643 Remove variants that include a Supress parameter. These routines
7644 are never used, and were introduced before the current scope-based
7645 check suppression method.
7646
7647 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
7648
7649 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
7650 code and some subprogram calls that are now noop.
7651
7652 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7653
7654 * exp_ch4.adb (Expand_N_Case_Expression): Take
7655 Minimize_Expression_With_Actions into account when possible.
7656
7657 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7658
7659 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
7660 (Known_Null): Moved to Sem_Util.
7661 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
7662 (Known_Null): Moved to Sem_Util.
7663 * sem_util.adb Add new enumeration type Null_Status_Kind.
7664 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
7665 this routine is now carried out by Null_Status.
7666 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
7667 is now carried out by Null_Status.
7668 (Null_Status): New routine.
7669 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
7670 (Known_Null): Moved from Exp_Util.
7671
7672 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7673
7674 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
7675 error on the return type of an expression function that is a
7676 completion, if the type is derived from a generic formal type.
7677
7678 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7679
7680 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
7681 conversion are those of the target type.
7682
7683 2017-04-25 Bob Duff <duff@adacore.com>
7684
7685 * a-clrefi.adb: Minor cleanup.
7686
7687 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7688
7689 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
7690
7691 2017-04-25 Bob Duff <duff@adacore.com>
7692
7693 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
7694 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
7695 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
7696 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
7697 the Internal_Source buffer. This removes the incorrect call to "="
7698 the customer noticed.
7699 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
7700 eventually need to eliminate them altogether. Or else get rid
7701 of zero-origin addressing.
7702
7703 2017-04-25 Claire Dross <dross@adacore.com>
7704
7705 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
7706 function used in GNATprove to know if an expression contains
7707 non-dispatching calls on primitives of a tagged type.
7708
7709 2017-04-25 Bob Duff <duff@adacore.com>
7710
7711 * rtsfind.adb (Initialize): Initialize
7712 First_Implicit_With. Building the compiler with Normalize_Scalars
7713 and validity checking finds this being used as an uninitialized
7714 variable.
7715
7716 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7717
7718 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
7719 Add a warning about SPARK mode management. The routine now
7720 saves and restores both the mode and associated pragma.
7721 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
7722 SPARK mode management. The routine now saves and restores both
7723 the mode and associated pragma.
7724 (Analyze_Object_Contract):
7725 Add a warning about SPARK mode management. The routine
7726 now saves and restores both the mode and associated pragma.
7727 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
7728 management. The routine now saves and restores both the mode
7729 and associated pragma. (Analyze_Package_Contract): Add a warning
7730 about SPARK mode management. The routine now saves and restores
7731 both the mode and associated pragma.
7732 (Analyze_Task_Contract):
7733 Add a warning about SPARK mode management. The routine now saves
7734 and restores both the mode and associated pragma.
7735 * expander.adb (Expand): Change the way the Ghost mode is saved
7736 and restored.
7737 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
7738 saved and restored.
7739 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
7740 and restored.
7741 * exp_util.adb (Build_DIC_Procedure_Body):
7742 Change the way the Ghost mode is saved and restored.
7743 (Build_DIC_Procedure_Declaration): Change the way the Ghost
7744 mode is saved and restored.
7745 (Build_Invariant_Procedure_Body):
7746 Change the way the Ghost mode is saved and restored.
7747 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
7748 mode is saved and restored.
7749 (Make_Predicate_Call): Change the
7750 way the Ghost mode is saved and restored.
7751 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
7752 saved and restored.
7753 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7754 and its assignment.
7755 (Mark_And_Set_Ghost_Body): Remove parameter
7756 Mode and its assignment.
7757 (Mark_And_Set_Ghost_Completion):
7758 Remove parameter Mode and its assignment.
7759 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
7760 assignment.
7761 (Mark_And_Set_Ghost_Instantiation): Remove parameter
7762 Mode and its assignment.
7763 (Mark_And_Set_Ghost_Procedure_Call):
7764 Remove parameter Mode and its assignment.
7765 (Set_Ghost_Mode):
7766 Remove parameter Mode and its assignment.
7767 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7768 and update the comment on usage.
7769 (Mark_And_Set_Ghost_Body):
7770 Remove parameter Mode and update the comment on usage.
7771 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
7772 update the comment on usage.
7773 (Mark_And_Set_Ghost_Declaration):
7774 Remove parameter Mode and update the comment on usage.
7775 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
7776 update the comment on usage.
7777 (Mark_And_Set_Ghost_Procedure_Call):
7778 Remove parameter Mode and update the comment on usage.
7779 (Set_Ghost_Mode): Remove parameter Mode and update the comment
7780 on usage.
7781 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
7782 types.
7783 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
7784 of obsolete field SPARK_Mode_Pragma.
7785 (Load_Main_Source): Remove
7786 the assignment of obsolete field SPARK_Mode_Pragma.
7787 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
7788 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
7789 the assignment of obsolete field SPARK_Mode_Pragma.
7790 (Ensure_System_Dependency): Remove the assignment of obsolete
7791 field SPARK_Mode_Pragma.
7792 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
7793 mode management. Change the way Ghost and SPARK modes are saved
7794 and restored.
7795 * sem.adb (Analyze): Change the way the Ghost mode is saved
7796 and restored.
7797 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
7798 Ghost mode is saved and restored.
7799 (Process_Full_View): Change
7800 the way the Ghost mode is saved and restored.
7801 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
7802 mode is saved and restored.
7803 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
7804 mode is saved and restored.
7805 (Analyze_Subprogram_Body_Helper):
7806 Change the way the Ghost mode is saved and restored.
7807 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
7808 Ghost mode is saved and restored.
7809 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
7810 management. Save the SPARK mode-related data prior to any changes
7811 to the scope stack and contexts. The mode is then reinstalled
7812 before the subunit is analyzed in order to restore the original
7813 view of the subunit.
7814 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
7815 warning on region management. Change the way the Ghost and
7816 SPARK modes are saved and restored.
7817 (Inline_Instance_Body):
7818 Add a warning about SPARK mode management. Code clean up.
7819 (Analyze_Subprogram_Instantiation): Update the warning on region
7820 management. Change the way the Ghost and SPARK modes are saved
7821 and restored.
7822 (Instantiate_Package_Body): Update the warning
7823 on region management. Change the way the Ghost and SPARK modes
7824 are saved and restored.
7825 (Instantiate_Subprogram_Body): Update
7826 the warning on region management. Change the way the Ghost and
7827 SPARK modes are saved and restored.
7828 (Set_Instance_Env): Add a
7829 warning about SPARK mode management. Change the way SPARK mode
7830 is saved and restored.
7831 * sem_ch13.adb (Build_Predicate_Functions):
7832 Change the way the Ghost mode is saved and restored.
7833 (Build_Predicate_Function_Declaration): Change the way the Ghost
7834 mode is saved and restored.
7835 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
7836 mode management. Change the way SPARK mode is saved and restored.
7837 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
7838 Change the way the Ghost mode is saved and restored.
7839 (Analyze_Initial_Condition_In_Decl_Part): Change the way
7840 the Ghost mode is saved and restored.
7841 (Analyze_Pragma):
7842 Change the way the Ghost mode is saved and restored.
7843 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
7844 Ghost mode is saved and restored.
7845 * sem_util.adb (Install_SPARK_Mode): New routine.
7846 (Restore_SPARK_Mode): New routine.
7847 (Save_SPARK_Mode_And_Set): Removed.
7848 (Set_SPARK_Mode): New routine.
7849 * sem_util.ads (Install_SPARK_Mode): New routine.
7850 (Restore_SPARK_Mode): New routine.
7851 (Save_SPARK_Mode_And_Set): Removed.
7852 (Set_SPARK_Mode): New routine.
7853
7854 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7855
7856 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
7857 to determine whether a type is declared in a local package that
7858 has not yet been frozen.
7859 * freeze.adb (Freeze_Before): Use new predicate to determine
7860 whether a local package must be installed on the scope stack
7861 in order to evaluate in the proper scope actions generated by
7862 aspect specifications, such as Predicate
7863 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
7864 using new predicate.
7865
7866 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7867
7868 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
7869 comparisons between non- scalar expressions expressions because
7870 their values cannot be invalidated.
7871 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
7872 comment on usage.
7873
7874 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7875
7876 * par_sco.adb: Minor reformatting.
7877
7878 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7879
7880 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
7881 is a type from an unfrozen local package, install package to
7882 complete the analysis of delayed aspects of the type.
7883
7884 2017-04-25 Tristan Gingold <gingold@adacore.com>
7885
7886 * bingen.adb (System_Version_Control_Used): New variable.
7887 (Resolve_Binder_Options): Set the above variable.
7888 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
7889 (Gen_Elab_Order): Emit blank line before.
7890
7891 2017-04-25 Justin Squirek <squirek@adacore.com>
7892
7893 * sem_cat.adb (Validate_RT_RAT_Component): Added
7894 an extra check to ignore incomplete types.
7895
7896 2017-04-25 Thomas Quinot <quinot@adacore.com>
7897
7898 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
7899 bogus circuitry for the case where Name is Predicate.
7900
7901 2017-04-25 Thomas Quinot <quinot@adacore.com>
7902
7903 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
7904 Create SCOs for Predicate aspects in disabled
7905 state initially, to be enabled later on by...
7906 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
7907 SCO for predicate as enabled.
7908
7909 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7910
7911 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
7912 pragmas Warnings Off / On.
7913 * namet.adb (Finalize): Remove now obsolete pair of pragmas
7914 Warnings Off / On.
7915 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
7916 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
7917 consider comparisons between static expressions because their
7918 values cannot be invalidated.
7919 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
7920 Warnings Off / On.
7921 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
7922 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
7923
7924 2017-04-25 Bob Duff <duff@adacore.com>
7925
7926 * sem_elab.adb (In_Task_Activation): Trace internal calls in
7927 task bodies.
7928
7929 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7930
7931 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
7932 typo fixes.
7933
7934 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7935
7936 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
7937 On/Off to defend against a spurious warning in conditional
7938 compilation.
7939 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
7940 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
7941 defend against a spurious warning in conditional compilation.
7942 * output.adb Add a pair of pragma Warnings On/Off to defend
7943 against a spurious warning in conditional compilation.
7944 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
7945 (Fold_General_Op): New routine.
7946 (Fold_Static_Real_Op): New routine.
7947 (Test_Comparison): New routine.
7948 * sem_eval.ads (Test_Comparison): New routine.
7949 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
7950 (Warn_On_Constant_Valid_Condition): New routine.
7951 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
7952 to detect a specific case.
7953 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
7954 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
7955 to defend against a spurious warning in conditional compilation.
7956 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
7957 against a spurious warning in conditional compilation.
7958 * usage.adb Add a pair of pragma Warnings On/Off to defend
7959 against a spurious warning in conditional compilation.
7960
7961 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7962
7963 * sinfo.ads, sem_ch13.adb: Update comment.
7964
7965 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7966
7967 * sem_util.adb (Is_Post_State): A reference to a
7968 generic in out parameter is considered a change in the post-state
7969 of a subprogram.
7970
7971 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7972
7973 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
7974 declaration of a subprogram instance within its wrapper package,
7975 skip over null statements that may result from the rewriting of
7976 ignored pragmas.
7977
7978 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7979
7980 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
7981 If the type is an unchecked_union, replace the attribute with
7982 a Raise_Program_Error (rather than inserting such before the
7983 attribute reference) to handle properly the case where we are
7984 processing a component of a larger record, and we need to prevent
7985 further expansion for the unchecked union.
7986 (Expand_Attribute_Reference, case 'Write): If the type is
7987 an unchecked_union, check whether enclosing scope is a Write
7988 subprogram. Replace attribute with a Raise_Program_Error if the
7989 discriminants of the unchecked_union type have not default values
7990 because such a use is erroneous..
7991
7992 2017-04-25 Tristan Gingold <gingold@adacore.com>
7993
7994 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
7995 Add relative_deadline to task record on edf profile.
7996 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
7997 (Make_Task_Create_Call): Pass relative_deadline value.
7998 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
7999 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
8000 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
8001 * sem_prag.adb (Set_Ravenscar_Profile): Handle
8002 GNAT_Ravenscar_EDF (set scheduling policy).
8003 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
8004 pragma.
8005 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
8006 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
8007 New names.
8008 (Pragma_Deadline_Floor): New pragma.
8009 * targparm.adb (Get_Target_Parameters): Recognize
8010 GNAT_Ravenscar_EDF profile.
8011
8012 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8013
8014 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
8015
8016 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8017
8018 * sem_aux.adb (Nearest_Ancestor): Use original node of type
8019 declaration to locate nearest ancestor, because derived
8020 type declarations for record types are rewritten as record
8021 declarations.
8022 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
8023 properly derivations that are completions of private types.
8024 (Add_Predicates): If type is private, examine rep. items of full
8025 view, which may include inherited predicates.
8026 (Build_Predicate_Functions): Ditto.
8027
8028 2017-04-25 Javier Miranda <miranda@adacore.com>
8029
8030 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
8031 to generate new entities for subtype declarations located in
8032 Expression_With_Action nodes.
8033
8034 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8035
8036 * sem_elab.adb (Check_A_Call): Remove
8037 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
8038 need for Elaborate_All when SPARK elaboration checks are
8039 required. Update the checks for instances, variables, and calls
8040 to Default_Initial_Condition procedures.
8041
8042 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8043
8044 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
8045 into a boolean aspect, in analogy with the Ada aspect No_Return.
8046
8047 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8048
8049 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
8050
8051 2017-04-25 Bob Duff <duff@adacore.com>
8052
8053 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
8054 Is_True_Constant for an array variable that is passed to a
8055 foreign function as an 'in' parameter.
8056 * debug.adb: Document -gnatd.q.
8057
8058 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8059
8060 * sem_ch6.adb (Analyze_Expression_Function): If expression function
8061 is completion and return type is an access type do not freeze
8062 designated type: this will be done in the process of freezing
8063 the expression if needed.
8064 (Freeze_Expr_Types): Check whether type is complete before
8065 creating freeze node, to provide a better error message if
8066 reference is premature.
8067 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
8068 functions created by type derivations.
8069
8070 2017-04-25 Pascal Obry <obry@adacore.com>
8071
8072 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
8073
8074 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8075
8076 * sem_res.adb (Resolve_Type_Conversion):
8077 When resolving against any fixed type, set the type of the
8078 operand as universal real when the operand is a multiplication
8079 or a division where both operands are of any fixed type.
8080 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
8081 placement of an error message by pointing to the operand of a
8082 type conversion rather than the conversion itself.
8083
8084 2017-04-25 Thomas Quinot <quinot@adacore.com>
8085
8086 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
8087 Needs_Debug_Info when producing SCOs.
8088
8089 2017-04-25 Thomas Quinot <quinot@adacore.com>
8090
8091 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
8092 Always pass a null finalization master for a library level named access
8093 type to which a pragme No_Heap_Finalization applies.
8094
8095 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8096
8097 PR ada/78845
8098
8099 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
8100 set to A'First(2) and vice versa.
8101
8102 2017-04-25 Yannick Moy <moy@adacore.com>
8103
8104 * freeze.adb (Freeze_Record_Type): Remove obsolete
8105 rule on volatile tagged record restriction on SPARK code.
8106
8107 2017-04-25 Yannick Moy <moy@adacore.com>
8108
8109 * sem_prag.adb (minor) Fix SPARK RM reference.
8110
8111 2017-04-25 Yannick Moy <moy@adacore.com>
8112
8113 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
8114 comment to reflect which entity is chosen as unique entity.
8115 (Unique_Entity): Return full view instead of private spec for
8116 protected type or task type. Fix possible incorrect access when
8117 called on entry.
8118
8119 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8120
8121 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
8122 array types only instead of all packed array types.
8123
8124 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8125
8126 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
8127 dimension system, verify that dimensions of both match.
8128 (Check_Conformance): Add error message in case of dimension
8129 mismatch.
8130 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
8131 predicate.
8132
8133 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8134
8135 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
8136 confusing.
8137
8138 2017-04-25 Yannick Moy <moy@adacore.com>
8139
8140 * sem_util.adb: Minor refactoring.
8141 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
8142
8143 2017-04-25 Claire Dross <dross@adacore.com>
8144
8145 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
8146 ultimate alias when accessing overridden operation. Indeed, if the
8147 overridden operation is itself inherited, it won't have any explicit
8148 contract.
8149
8150 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8151
8152 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
8153 overlap if the two formals have different types, because formally
8154 the corresponding actuals cannot designate the same objects.
8155
8156 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8157
8158 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
8159 dimensions are present from context, use them. b) If operand is
8160 a static constant rewritten as a literal, obtain the dimensions
8161 from the original declaration, otherwise use dimensions of type
8162 established from context.
8163
8164 2017-04-25 Yannick Moy <moy@adacore.com>
8165
8166 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
8167 of array that is private.
8168
8169 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8170
8171 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
8172 reformatting.
8173
8174 2017-04-25 Yannick Moy <moy@adacore.com>
8175
8176 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
8177 on body.
8178
8179 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8180
8181 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
8182 the check that recognizes a call to a private overridding and
8183 replaces the called subprogram with its alias.
8184
8185 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8186
8187 * exp_util.adb: Minor reformatting.
8188
8189 2017-04-25 Justin Squirek <squirek@adacore.com>
8190
8191 * exp_ch3.adb (Freeze_Type): Add condition to always treat
8192 interface types as a partial view of a private type for the
8193 generation of invariant procedure bodies.
8194 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
8195 Add a condition to get the Corresponding_Record_Type for
8196 concurrent types, add condition to return in the absence of a
8197 class in the pragma, remove call to Replace_Type_References,
8198 and add call to Replace_References.
8199 (Add_Interface_Invariatns),
8200 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
8201 to including the working type T.
8202 (Add_Own_Invariants): Remove
8203 legacy condition for separate units, remove dispatching for ASIS
8204 and save a copy of the expression in the pragma expression.
8205 (Build_Invariant_Procedure_Body): Default initalize vars,
8206 remove return condition on interfaces, always use the
8207 private type for interfaces, and move the processing of types
8208 until after the processing of invariants for the full view.
8209 (Build_Invariant_Procedure_Declaration): Remove condition
8210 to return if an interface type is encountered and add
8211 condition to convert the formal parameter to its class-wide
8212 counterpart if Work_Typ is abstract.
8213 (Replace_Type): Add call to Remove_Controlling_Arguments.
8214 (Replace_Type_Ref): Remove class-wide dispatching for the current
8215 instance of the type.
8216 (Replace_Type_References): Remove parameter "Derived"
8217 (Remove_Controlling_Arguments): Created in order to removing
8218 the controlliong argument from calls to primitives in the case
8219 of the formal parameter being an class-wide abstract type.
8220 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
8221 to the change made to Freeze_Type in exp_ch3. Add a condition
8222 to treat interface types as a partial view.
8223 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
8224 to Build_Invariant_Procedure_Declaration to properly generate a
8225 "partial" invariant procedure when Typ is an interface.
8226
8227 2017-04-25 Bob Duff <duff@adacore.com>
8228
8229 * a-numeri.ads: Go back to using brackets encoding for the Greek
8230 letter pi.
8231
8232 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8233
8234 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
8235 (10-15): if derived type T with progenitors is abstract,
8236 and primitive P of this type inherits non-trivial classwide
8237 preconditions from both a parent operation and from an interface
8238 operation, then the inherited operation is abstract if the parent
8239 operation is not null.
8240 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
8241 with Covered_Interface_Op to yield the actual interface operation
8242 that is implemented by a given inherited operation.
8243
8244 2017-04-25 Javier Miranda <miranda@adacore.com>
8245
8246 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
8247 and right operands after performing the validity checks. Required
8248 because validity checks may remove side effects from the operands.
8249
8250 2017-04-25 Javier Miranda <miranda@adacore.com>
8251
8252 * exp_attr.adb (Attribute_Unrestricted_Access):
8253 Do not disable implicit type conversion. Required to generate
8254 code that displaces the pointer to reference the secondary
8255 dispatch table.
8256
8257 2017-04-25 Pascal Obry <obry@adacore.com>
8258
8259 * prj-attr.adb, snames.ads-tmpl: Add package Install's
8260 Required_Artifacts attribute.
8261
8262 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8263
8264 * sem_util.adb (Same_Value): String literals are compile-time
8265 values, and comparing them must use Expr_Value_S.
8266
8267 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8268
8269 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
8270 dereference is introduced for the object, and the object is
8271 overloaded, do not check whether it is aliased, because it may
8272 include an implicit dereference.
8273 * sem_type.adb (Disambiguate): If two interpretations are access
8274 attribute types with the same designated type keep either of
8275 them and do not report an ambiguity. A true ambiguity will be
8276 reported elsewhere.
8277
8278 2017-04-25 Bob Duff <duff@adacore.com>
8279
8280 * a-numeri.ads: Change the encoding of Greek letter Pi from
8281 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
8282 to indicate the encoding. We considered using a byte order mark
8283 (BOM), but that causes various trouble (misc software eats the
8284 BOM, if you have a patch with a BOM, then it's not at the start
8285 of the patch, so it's not a BOM, the BOM affects with-ing files,
8286 etc.).
8287 * scng.adb, s-wchcnv.adb: Minor.
8288
8289 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8290
8291 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
8292 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8293
8294 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
8295 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
8296 Improve error message on operations that inherit non-conforming
8297 classwide preconditions from ancestor and progenitor.
8298 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
8299 moved here from sem_ch3.
8300 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
8301 check given in RM 6.1.1 (17) concerning renamings of overriding
8302 operations that inherits class-wide preconditions from ancestor
8303 or progenitor.
8304
8305 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8306
8307 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
8308 (Build_Adjust_Statements): Code cleanup.
8309 (Build_Finalizer): Update the initialization of
8310 Exceptions_OK.
8311 (Build_Finalize_Statements): Code cleanup.
8312 (Build_Initialize_Statements): Code cleanup.
8313 (Make_Deep_Array_Body): Update the initialization of
8314 Exceptions_OK.
8315 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
8316 (Process_Object_Declaration): Generate a null exception handler only
8317 when exceptions are allowed.
8318 (Process_Transients_In_Scope): Update the initialization of
8319 Exceptions_OK.
8320 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
8321 routine.
8322 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
8323 restrictions when the handler is internally generated and the
8324 mode is warnings.
8325
8326 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8327
8328 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
8329 enforce legality rule on classwide preconditions inherited from
8330 both an ancestor and a progenitor (RM 6.1.1 (10-13).
8331 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
8332 subprogram need not be dispatching if it appears in a precondition
8333 for an abstract or null subprogram.
8334
8335 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8336
8337 * sem_ch10.adb: Minor typo fix.
8338
8339 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8340
8341 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
8342
8343 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8344
8345 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
8346 have a length which is a power of 2.
8347 (Is_Predefined_File_Name): Likewise. Adjust comment.
8348
8349 2017-04-25 Bob Duff <duff@adacore.com>
8350
8351 * exp_aggr.adb (Component_Count): Protect the
8352 arithmetic from attempting to convert a value >= 2**31 to Int,
8353 which would otherwise raise Constraint_Error.
8354
8355 2017-04-25 Bob Duff <duff@adacore.com>
8356
8357 * opt.ads (Locking_Policy): Fix incorrect documentation. The
8358 first character of the policy name is not unique.
8359
8360 2017-04-25 Bob Duff <duff@adacore.com>
8361
8362 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
8363 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
8364 about this flag not being used. It was already used, and it is
8365 now used more.
8366
8367 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8368
8369 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
8370 (Ignore_SPARK_Mode_Pragmas): New routine.
8371 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
8372 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
8373 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
8374 related entities.
8375 (Ignore_SPARK_Mode_Pragmas): New routine
8376 along with pragma Inline.
8377 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
8378 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
8379 Ignore_SPARK_Mode_Pragmas_In_Instance.
8380 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8381 Save and restore the value of global flag
8382 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
8383 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
8384 the corresponding spec or the body must ignore all SPARK_Mode
8385 pragmas found within.
8386 (Analyze_Subprogram_Declaration): Mark
8387 the spec when it needs to ignore all SPARK_Mode pragmas found
8388 within to allow the body to infer this property in case it is
8389 instantiated or inlined later.
8390 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
8391 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8392 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8393 when the corresponding spec also ignored all SPARK_Mode pragmas
8394 found within.
8395 (Analyze_Package_Declaration): Mark the spec when
8396 it needs to ignore all SPARK_Mode pragmas found within to allow
8397 the body to infer this property in case it is instantiated or
8398 inlined later.
8399 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
8400 Save and restore the value of flag
8401 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8402 formal spec when it needs to ignore all SPARK_Mode
8403 pragmas found within to allow the body to infer this
8404 property in case it is instantiated or inlined later.
8405 (Analyze_Package_Instantiation): Save and restore the value
8406 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
8407 the instance spec when it needs to ignore all SPARK_Mode
8408 pragmas found within to allow the body to infer this
8409 property in case it is instantiated or inlined later.
8410 (Analyze_Subprogram_Instantiation): Save and restore the value
8411 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8412 instance spec and anonymous package when they need to ignore
8413 all SPARK_Mode pragmas found within to allow the body to infer
8414 this property in case it is instantiated or inlined later.
8415 (Instantiate_Package_Body): Save and restore the value of global
8416 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
8417 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
8418 corresponding instance spec also ignored all SPARK_Mode pragmas
8419 found within.
8420 (Instantiate_Subprogram_Body): Save and restore the
8421 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8422 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8423 when the corresponding instance spec also ignored all SPARK_Mode
8424 pragmas found within.
8425 * sem_prag.adb (Analyze_Pragma): Update the reference to
8426 Ignore_Pragma_SPARK_Mode.
8427 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
8428 all SPARK_Mode pragmas defined within yields mode "off".
8429
8430 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8431
8432 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
8433
8434 2017-04-25 Bob Duff <duff@adacore.com>
8435
8436 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
8437 All_Checks" to avoid generating unnecessary checks.
8438 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
8439 All_Checks".
8440 * sem.ads: Fix comment.
8441 * expander.ads: Fix comment.
8442 * exp_atag.ads: Fix comment: "Index = 0" should be
8443 "Index >= 0".
8444
8445 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8446
8447 * s-taprop-linux.adb: Minor editorial fixes.
8448
8449 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8450
8451 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
8452 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
8453 variable and set it to True whenever the main hash table is
8454 populated. Short- circuit the Assoc function if it is false
8455 and add associated guards.
8456
8457 2017-04-25 Olivier Hainque <hainque@adacore.com>
8458
8459 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
8460 specs without elaboration code that have an elaboration counter
8461 nevertheless, e.g. when compiled with -fpreserve-control-flow.
8462 * sem_ch10.adb (Analyze_Compilation_Unit):
8463 Set_Elaboration_Entity_Required when requested to preserve
8464 control flow, to ensure the unit elaboration is materialized at
8465 bind time, resulting in the inclusion of the unit object file
8466 in the executable closure at link time.
8467
8468 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
8469
8470 * exp_dbug.adb: In Debug_Renaming_Declaration,
8471 when dealing with indexed component, accept to produce a renaming
8472 symbol when the index is an IN parameter or when it is a name
8473 defined in an outer scope.
8474
8475 2017-04-25 Yannick Moy <moy@adacore.com>
8476
8477 * errout.adb (Error_Msg): Adapt continuation
8478 message in instantiations and inlined bodies for info messages.
8479
8480 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8481
8482 * fname.adb (Has_Internal_Extension): Add pragma Inline.
8483 Use direct 4-character slice comparisons.
8484 (Has_Prefix): Add
8485 pragma Inline. (Has_Suffix): Delete.
8486 (Is_Internal_File_Name):
8487 Test Is_Predefined_File_Name first.
8488 (Is_Predefined_File_Name):
8489 Use direct slice comparisons as much as possible and limit all
8490 comparisons to at most 8 characters.
8491
8492 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8493
8494 * checks.adb (Insert_Valid_Check): Code cleanup.
8495 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
8496 (Expand_Actuals): Generate proper copy-back for a validation
8497 variable when it acts as the argument of a type conversion.
8498 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
8499 predicate to operate on type qualifications.
8500
8501 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8502
8503 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
8504 Minor reformatting.
8505
8506 2017-04-25 Bob Duff <duff@adacore.com>
8507
8508 * sem_prag.adb (No_Return): Give an error if the pragma applies
8509 to a body. Specialize the error for the specless body case,
8510 as is done for (e.g.) pragma Convention.
8511 * debug.adb: Add switch -gnatd.J to disable the above legality
8512 checks. This is mainly for use in our test suite, to avoid
8513 rewriting a lot of illegal (but working) code. It might also
8514 be useful to customers. Under this switch, if a pragma No_Return
8515 applies to a body, and the procedure raises an exception (as it
8516 should), the pragma has no effect. If the procedure does return,
8517 execution is erroneous.
8518
8519 2017-04-25 Bob Duff <duff@adacore.com>
8520
8521 * exp_ch6.adb (Expand_Actuals): This is the
8522 root of the problem. It took N as an 'in out' parameter, and in
8523 some cases, rewrote N, but then set N to Original_Node(N). So
8524 the node returned in N had no Parent. The caller continued
8525 processing of this orphaned node. In some cases that caused a
8526 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
8527 and trips over the Empty Parent). The solution is to make N an
8528 'in' parameter. Instead of rewriting it, return the list of
8529 post-call actions, so the caller can do the rewriting later,
8530 after N has been fully processed.
8531 (Expand_Call_Helper): Move most of Expand_Call here. It has
8532 too many premature 'return' statements, and we want to do the
8533 rewriting on return.
8534 (Insert_Post_Call_Actions): New procedure to insert the post-call
8535 actions in the appropriate place. In the problematic case,
8536 that involves rewriting N as an Expression_With_Actions.
8537 (Expand_Call): Call the new procedures Expand_Call_Helper and
8538 Insert_Post_Call_Actions.
8539
8540 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8541
8542 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
8543 properly type derived from generic formal types, to handle
8544 properly modified version of ACATS 4.1B B611017.
8545
8546 2017-04-25 Javier Miranda <miranda@adacore.com>
8547
8548 * exp_unst.adb (Subp_Index): Adding missing
8549 support for renamings and functions that return a constrained
8550 array type (i.e. functions for which the frontend built a
8551 procedure with an extra out parameter).
8552
8553 2017-04-25 Pascal Obry <obry@adacore.com>
8554
8555 * s-string.adb: Minor code clean-up.
8556
8557 2017-04-25 Bob Duff <duff@adacore.com>
8558
8559 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
8560 procedure.
8561 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
8562 function for Non_Blocking_Wait_Process.
8563
8564 2017-04-25 Bob Duff <duff@adacore.com>
8565
8566 * prep.adb (Preprocess): Remove incorrect
8567 Assert. Current character can be ASCII.CR.
8568
8569 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8570
8571 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
8572 convention Stdcall, which has a number of exceptions. Convention
8573 is legal on a component declaration whose type is an anonymous
8574 access to subprogram.
8575
8576 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8577
8578 * sem_ch4.adb: sem_ch4.adb Various reformattings.
8579 (Try_One_Prefix_Interpretation): Use the base type when dealing
8580 with a subtype created for purposes of constraining a private
8581 type with discriminants.
8582
8583 2017-04-25 Javier Miranda <miranda@adacore.com>
8584
8585 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
8586 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
8587 dispatching primitives (Restore_Warnings): Restore warning on
8588 late dispatching primitives (Save_Warnings): Save warning on late
8589 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
8590 to enable/disable this warning.
8591 (WA_Warnings): Set warning on late dispatching primitives.
8592 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
8593 that its parent type has a private extension.
8594 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
8595 New subprogram.
8596 * usage.adb: Document -gnatw.j and -gnatw.J.
8597
8598 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8599
8600 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
8601 reformatting.
8602
8603 2017-04-25 Bob Duff <duff@adacore.com>
8604
8605 * binde.adb (Validate): Do not pass dynamic strings
8606 to pragma Assert, because older compilers do not support that.
8607
8608 2017-04-25 Bob Duff <duff@adacore.com>
8609
8610 * s-fileio.adb (Close): When a temp file is
8611 closed, delete it and clean up its Temp_File_Record immediately,
8612 rather than waiting until later.
8613 (Temp_File_Record): Add File
8614 component, so Close can know which Temp_File_Record corresponds
8615 to the file being closed.
8616 (Delete): Don't delete temp files,
8617 because they are deleted by Close.
8618 (Open): Set the File component
8619 of Temp_File_Record. This requires moving the creation of the
8620 Temp_File_Record to the end, after the AFCB has been created.
8621
8622 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8623
8624 * checks.adb (Insert_Valid_Check): Do not generate
8625 a validity check when inside a generic.
8626
8627 2017-04-25 Yannick Moy <moy@adacore.com>
8628
8629 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
8630
8631 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8632
8633 * snames.ads-tmpl (Snames): More names for detecting predefined
8634 potentially blocking subprograms.
8635
8636 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8637
8638 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
8639 concerning inheritance of class-wide preconditions do not apply
8640 to postconditions.
8641
8642 2017-04-25 Bob Duff <duff@adacore.com>
8643
8644 * s-ficobl.ads: Minor comment fix.
8645
8646 2017-04-25 Yannick Moy <moy@adacore.com>
8647
8648 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
8649 conversions from float to integer in GNATprove mode.
8650 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
8651 to call Apply_Type_Conversion_Checks, so that range checks
8652 are properly positioned when needed on conversions, including
8653 when converting from float to integer. (Determine_Range): In
8654 GNATprove mode, take into account the possibility of conversion
8655 from float to integer.
8656 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
8657 check on conversions from fixed-point to integer, not anymore
8658 on conversions from floating-point to integer, when in GNATprove
8659 mode.
8660
8661 2017-04-25 Yannick Moy <moy@adacore.com>
8662
8663 * checks.adb (Determine_Range_R): Special case type conversions
8664 from integer to float in order to get bounds in that case too.
8665 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
8666 mode, for computations involved in interval checking.
8667
8668 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8669
8670 * checks.adb (Insert_Valid_Check): Partially reimplement validity
8671 checks.
8672 * einfo.adb Node36 is now used as Validated_Object.
8673 (Validated_Object): New routine.
8674 (Set_Validated_Object): New routine.
8675 (Write_Field36_Name): Add an entry for Validated_Object.
8676 * einfo.ads Add new attribute Validated_Object along with
8677 usage in entities.
8678 (Validated_Object): New routine along with pragma Inline.
8679 (Set_Validated_Object): New routine along with pragma Inline.
8680 * exp_attr.adb (Make_Range_Test): Add processing for validation
8681 variables to avoid extra reads and copies of the prefix.
8682 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
8683 variables in order to reflect any changes done in the variable
8684 back into the original object.
8685 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
8686 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
8687
8688 2017-04-25 Steve Baird <baird@adacore.com>
8689
8690 * exp_ch7.adb (Build_Array_Deep_Procs,
8691 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
8692 generate Finalize_Address routines for CodePeer.
8693
8694 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8695
8696 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
8697 Analyze_Pre_Post_Condition, to implement the legality checks
8698 mandated by AI12-0131: Pre'Class shall not be specified for an
8699 overriding primitive subprogram of a tagged type T unless the
8700 Pre'Class aspect is specified for the corresponding primitive
8701 subprogram of some ancestor of T.
8702
8703 2017-04-25 Bob Duff <duff@adacore.com>
8704
8705 * sem_ch8.adb (Use_One_Type): If a use_type_clause
8706 is redundant, set its Used_Operations to empty. This is only
8707 necessary for use clauses that appear in the parent of a generic
8708 child unit, because those use clauses get reanalyzed when we
8709 instantiate the generic, and we don't want the Used_Operations
8710 carried over from the original context (where it was probably
8711 not redundant).
8712
8713 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8714
8715 * exp_ch6.adb: Minor reformatting.
8716
8717 2017-04-25 Bob Duff <duff@adacore.com>
8718
8719 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
8720 Use Source_Index (Current_Sem_Unit) to find the correct casing.
8721 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
8722 (Current_Sem_Unit) to find the correct casing.
8723 * par.adb (Par): Null out Current_Source_File, to ensure that
8724 the above bugs won't rear their ugly heads again.
8725
8726 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8727
8728 * sem_ch8.adb (Find_Type): For an attribute reference
8729 'Class, if prefix type is synchronized and previous errors
8730 have suppressed the creation of the corresponding record type,
8731 create a spurious class-wide for the synchonized type itself,
8732 to catch other misuses of the attribute
8733
8734 2017-04-25 Steve Baird <baird@adacore.com>
8735
8736 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
8737 is True, then don't generate the accessibility check for the
8738 tag of a tagged result.
8739 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
8740 if CodePeer_Mode is True, then don't generate the
8741 tag checks for the result of call to an instance of
8742 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
8743 descendant of" check and the accessibility check).
8744
8745 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8746
8747 * sem_ch13.adb: Code cleanups.
8748 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
8749 * sem_ch8.ads: Minor comment fix.
8750
8751 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8752
8753 * exp_ch4.adb (Library_Level_Target): New function.
8754 (Expand_Concatenate): When optimization is enabled, also expand
8755 the operation out-of-line if the concatenation is present within
8756 the expression of the declaration of a library-level object and
8757 not only if it is the expression of the declaration.
8758
8759 2017-04-25 Bob Duff <duff@adacore.com>
8760
8761 * freeze.adb (Freeze_Object_Declaration): Do
8762 not Remove_Side_Effects if there is a pragma Linker_Section,
8763 because in that case we want static initialization in the
8764 appropriate section.
8765
8766 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8767
8768 * exp_dbug.adb: Minor rewording and reformatting.
8769
8770 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8771
8772 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
8773 handle the proposed changes to rules concerning potentially
8774 unevaluated expressions, to include selected components that
8775 do not depend on discriminants, and indexed components with
8776 static indices.
8777 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
8778 predicate in quantified expression, and fix bugs in the handling
8779 of case expressions and membership test.
8780 (Analyze_Attribute_Old_Result): use new predicate.
8781 (Analyze_Attribute, case Loop_Entry): ditto.
8782
8783 2017-04-25 Bob Duff <duff@adacore.com>
8784
8785 * s-secsta.adb (SS_Info): Add a comment
8786 explaining why we don't need to walk all the chunks in order to
8787 compute the total size.
8788
8789 2017-04-25 Bob Duff <duff@adacore.com>
8790
8791 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
8792 of the global name buffer to 4*Max_Line_Length.
8793
8794 2017-04-25 Javier Miranda <miranda@adacore.com>
8795
8796 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
8797 renaming entity for debug information, mark the entity as needing debug
8798 info if it comes from sources.
8799
8800 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8801
8802 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
8803 restriction converning the use of 'Address where the prefix is
8804 of a controlled type.
8805
8806 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
8807
8808 * exp_dbug.adb: In Debug_Renaming_Declaration,
8809 skip slices that are made redundant by an indexed component
8810 access.
8811 * atree.h: New definition for Original_Node.
8812
8813 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8814
8815 * sem_prag.adb, sem_prag.ads: Minor reformatting.
8816
8817 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8818
8819 * sem_ch3.adb (Check_Entry_Contract): Call
8820 Preanalyze_Spec_Expression so that resolution takes place as well.
8821 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
8822 internal calls that appear in preconditions of protected
8823 operations, in default values for same, and in contract guards
8824 for contract cases in SPARK.
8825
8826 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8827
8828 * a-numaux.ads: Fix description of a-numaux-darwin
8829 and a-numaux-x86.
8830 (Double): Define to Long_Float.
8831 * a-numaux-vxworks.ads (Double): Likewise.
8832 * a-numaux-darwin.ads
8833 (Double): Likewise.
8834 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
8835 * a-numaux-x86.ads: Fix package description.
8836 * a-numaux-x86.adb (Is_Nan): Minor tweak.
8837 (Reduce): Adjust and complete description. Call Is_Nan instead of
8838 testing manually. Use an integer temporary to hold rounded value.
8839 * a-numaux-darwin.adb (Reduce): Likewise.
8840 (Is_Nan): New function.
8841
8842 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8843
8844 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
8845 on analysis of prefix whose type is a current instance of a
8846 synchronized type, but where the prefix itself is an entity that
8847 is an object.
8848
8849 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8850
8851 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
8852 the identity of callable entities therein, because they have been
8853 properly resolved, and prefixed calls may have been rewritten
8854 as normal calls.
8855
8856 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
8857
8858 * exp_ch3.adb (Build_Init_Statements): Convert
8859 the expression of the pragma/aspect Secondary_Stack_Size to
8860 internal type System.Parameters.Size_Type before assigning
8861 it to the Secondary_Stack_Size component of the task type's
8862 corresponding record.
8863
8864 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8865
8866 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
8867 (etc) optimizations when the type is modular and the offsets
8868 are equal.
8869
8870 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8871
8872 * s-osinte-freebsd.ads: Minor comment tweaks
8873
8874 2017-04-25 Javier Miranda <miranda@adacore.com>
8875
8876 * urealp.adb (UR_Write): Reverse previous patch
8877 adding documentation on why we generate multiplications instead
8878 of divisions (needed to avoid expressions whose computation with
8879 large numbers may cause division by 0).
8880
8881 2017-04-25 Bob Duff <duff@adacore.com>
8882
8883 * erroutc.adb (Set_Specific_Warning_Off,
8884 Set_Warnings_Mode_Off): Use the correct source file for
8885 Stop. Was using Current_Source_File, which is only valid during
8886 parsing. Current_Source_File will have a leftover value from
8887 whatever file happened to be parsed last, because of a with_clause
8888 or something.
8889
8890 2017-04-25 Bob Duff <duff@adacore.com>
8891
8892 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
8893 to In_Predefined_Unit, but including GNAT units.
8894 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
8895 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
8896 because Should_Ignore_Pragma was not working reliably outside
8897 the parser, because Current_Source_File is not valid.
8898 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
8899 * par-prag.adb: Call Should_Ignore_Pragma_Par.
8900
8901 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8902
8903 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
8904 codepeer mode.
8905
8906 2017-04-25 Javier Miranda <miranda@adacore.com>
8907
8908 * urealp.adb (UR_Write): Fix output of constants with a base other
8909 that 10.
8910
8911 2017-04-25 Justin Squirek <squirek@adacore.com>
8912
8913 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
8914 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
8915 Add extra parameter for Process_Interface_Name.
8916 (Process_Interface_Name): Add parameter for pragma to analyze
8917 corresponding aspect.
8918 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
8919 from sem_ch13.adb
8920
8921 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8922
8923 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
8924 correction.
8925
8926 2017-04-25 Yannick Moy <moy@adacore.com>
8927
8928 * sem_res.adb (Resolve_Comparison_Op): Do not
8929 attempt evaluation of relational operations inside assertions.
8930
8931 2017-04-25 Justin Squirek <squirek@adacore.com>
8932
8933 * exp_util.adb (Add_Interface_Invariants):
8934 Restored, code moved back from Build_Invariant_Procedure_Body.
8935 (Add_Parent_Invariants): Restored, code moved back from
8936 Build_Invariant_Procedure_Body.
8937 (Build_Invariant_Procedure_Body):
8938 Remove refactored calls and integrated code from
8939 Add_Parent_Invariants and Add_Interface_Invariants.
8940
8941 2017-04-25 Johannes Kanig <kanig@adacore.com>
8942
8943 * errout.adb (Output_Messages): Adjust computation of total
8944 errors
8945 * erroutc.adb (Error_Msg): In statistics counts, deal
8946 correctly with informational messages that are not warnings.
8947 * errutil.adb (Finalize): adjust computation of total errors.
8948
8949 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8950
8951 * terminals.c (__gnat_terminate_pid): New.
8952 * g-exptty.ads (Terminate_Process): New. Update comments.
8953
8954 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8955
8956 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
8957
8958 2017-04-25 Justin Squirek <squirek@adacore.com>
8959
8960 * sem_ch3.adb (Analyze_Declarations): Minor
8961 correction to comments, move out large conditional and scope
8962 traversal into a predicate.
8963 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
8964 logic.
8965
8966 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8967
8968 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
8969 of prefix whose type is a current instance of a synchronized
8970 type. If the prefix is an object this is an external call (or
8971 requeue) that can only access public operations of the object. The
8972 previous predicate was too restrictive, and did not allow public
8973 protected operations, only task entries.
8974
8975 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8976
8977 * sem_ch5.adb, fname.adb: Minor reformatting.
8978
8979 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8980
8981 * einfo.adb (Is_Anonymous_Access_Type): New routine.
8982 * einfo.ads Update the placement of
8983 E_Anonymous_Access_Subprogram_Type along with all subtypes that
8984 mention the ekind.
8985 (Is_Anonymous_Access_Type): New routine.
8986 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
8987 master for an access type subject to pragma No_Heap_Finalization.
8988 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
8989 allocated or deallocated does not finalization actions if the
8990 associated access type is subject to pragma No_Heap_Finalization.
8991 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
8992 * par-prag.adb Pragma No_Heap_Finalization does not need special
8993 processing from the parser.
8994 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
8995 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
8996 * sem_prag.adb Add an entry in table Sig_Flags for pragma
8997 No_Heap_Finalization.
8998 (Analyze_Pragma): Add processing for
8999 pragma No_Heap_Finalization. Update various error messages to
9000 use Duplication_Error.
9001 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
9002 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
9003 and corresponding pragma id.
9004
9005 2017-04-25 Bob Duff <duff@adacore.com>
9006
9007 * freeze.adb (Freeze_Record_Type): Use the
9008 underlying type of the component type to determine whether it's
9009 elementary. For representation clause purposes, a private type
9010 should behave the same as its full type.
9011 * fname.ads, fname.adb (Is_Predefined_File_Name):
9012 Make sure things like "system.ali" are recognized as predefined.
9013
9014 2017-04-25 Javier Miranda <miranda@adacore.com>
9015
9016 * debug.adb: Update documentation of -gnatd.6.
9017
9018 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9019
9020 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
9021 element iterator when the name is an overloaded function call,
9022 one of whose interpretations yields an array.
9023
9024 2017-04-25 Bob Duff <duff@adacore.com>
9025
9026 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
9027 Is_Internal_Unit_Name): New functions for operating on unit
9028 names, as opposed to file names. There's some duplicated code
9029 with fname.adb, which is unfortunate, but it seems like we don't
9030 want to add dependencies here.
9031 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
9032 to Is_Predefined_Unit_Name; the former was wrong, because Uname
9033 is not a file name at all.
9034 * fname.ads, fname.adb: Document the fact that
9035 Is_Predefined_File_Name and Is_Internal_File_Name can be called
9036 for ALI files, and fix the code so it works properly for ALI
9037 files. E.g. these should return True for "system.ali".
9038
9039 2017-04-25 Justin Squirek <squirek@adacore.com>
9040
9041 * exp_util.adb (Add_Invariant): Removed,
9042 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
9043 and Add_Own_Invariant. (Add_Invariant_Check): Used
9044 for adding runtime checks from any kind of invariant.
9045 (Add_Inherited_Invariant): Generates invariant checks for
9046 class-wide invariants (Add_Interface_Invariants): Removed, code
9047 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
9048 Create a types own invariant procedure (Add_Parent_Invariants):
9049 Removed, code moved to Build_Invariant_Procedure_Body
9050 (Build_Invariant_Procedure_Body): Add refactored calls
9051 and integrated code from Add_Parent_Invariants and
9052 Add_Interface_Invariants.
9053 (Process_Type): Removed, the
9054 relavant code was inlined into both Add_Own_Invariant and
9055 Add_Inherited_Invariant.
9056
9057 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9058
9059 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
9060 scn.adb, osint.adb, fname.adb: Minor reformatting.
9061
9062 2017-04-25 Pascal Obry <obry@adacore.com>
9063
9064 * s-taprop-mingw.adb: Do not check for CloseHandle in
9065 Finalize_TCB.
9066
9067 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9068
9069 * sem_util.adb (Check_Part_Of_Reference):
9070 Continue to examine the context if the reference appears within
9071 an expression function.
9072
9073 2017-04-25 Justin Squirek <squirek@adacore.com>
9074
9075 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
9076 and Build_Invariant_Procedure_Declaration.
9077 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
9078 and Build_Invariant_Procedure_Declaration from exp_ch7
9079 and break-out Is_Untagged_Private_Derivation from
9080 Build_Invariant_Procedure_Body.
9081 (Replace_Type_References):
9082 Append an extra parameter to allow for dispatching replacements
9083 and add the corrasponding logic.
9084 (Type_Invariant): Remove
9085 Replace_Typ_Refs and replace its references with calls to
9086 Replace_Type_References.
9087 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
9088
9089 2017-04-25 Bob Duff <duff@adacore.com>
9090
9091 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
9092 that returns True when appropriate.
9093 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
9094 when compiling predefined files.
9095 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
9096 "gnat.adc" should not be considered a predefined file name.
9097 That required (or at least encouraged) a lot of cleanup of global
9098 variable usage. We shouldn't be communicating information via
9099 the global name buffer.
9100 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
9101 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
9102 required by the above-mentioned cleanup.
9103
9104 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9105
9106 * osint.adb (Find_File): Handle properly a request for a
9107 configuration file whose name is a directory.
9108
9109 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9110
9111 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
9112
9113 2017-04-25 Bob Duff <duff@adacore.com>
9114
9115 * types.ads: Minor: Fix '???' comment.
9116 * sem_ch8.adb: Minor comment fix.
9117
9118 2017-04-25 Bob Duff <duff@adacore.com>
9119
9120 * sem_prag.adb: Remove suspicious uses of Name_Buf.
9121 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
9122 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
9123 Add String_To_Name with no side effects.
9124
9125 2017-04-25 Justin Squirek <squirek@adacore.com>
9126
9127 * sem_ch3.adb (Analyze_Declarations): Add
9128 additional condition for edge case.
9129
9130 2017-04-25 Bob Duff <duff@adacore.com>
9131
9132 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
9133 reserved words inside pragmas. This is necessary to allow the
9134 pragma name Interface to be used in pragma Ignore_Pragma.
9135 * par.adb: Minor comment fix.
9136
9137 2017-04-25 Javier Miranda <miranda@adacore.com>
9138
9139 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
9140 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
9141 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
9142 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
9143 occurrences of RE_Type_Is_Abstract
9144
9145 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9146
9147 * exp_util.adb (Build_Chain): Account for ancestor
9148 subtypes while traversing the derivation chain.
9149
9150 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9151
9152 * sem_attr.adb: minor reformatting.
9153
9154 2017-04-25 Doug Rupp <rupp@adacore.com>
9155
9156 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
9157
9158 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9159
9160 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
9161 the first pass over an assignment statement with target names,
9162 to prevent the generation of subtypes (such as discriminated
9163 record components)that may carry the target name outside of the
9164 tree for the assignment. The subtypes will be generated when
9165 the assignment is reanalyzed in full.
9166 (Analyze_Target_Name): Handle properly class-wide types.
9167
9168 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9169
9170 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
9171 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9172 the purposes of freezing.
9173 * exp_util.adb Update the documentation and structure of the
9174 type map used in class-wide semantics of assertion expressions.
9175 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9176 and resolve the triaged expression because all substitutions
9177 refer to the proper entities. Update the replacement of
9178 references.
9179 (Build_DIC_Procedure_Body): Add formal parameter
9180 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9181 are now only processed when freezing occurs. Build a body only
9182 when one is needed.
9183 (Entity_Hash): Removed.
9184 (Map_Types): New routine.
9185 (Replace_Object_And_Primitive_References): Removed.
9186 (Replace_References): New routine.
9187 (Replace_Type_References): Moved to the library level of Exp_Util.
9188 (Type_Map_Hash): New routine.
9189 (Update_Primitives_Mapping): Update the mapping call.
9190 (Update_Primitives_Mapping_Of_Types): Removed.
9191 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9192 parameter For_Freeze and update the comment on usage.
9193 (Map_Types): New routine.
9194 (Replace_References): New routine.
9195 (Replace_Type_References): Moved to the library level of Exp_Util.
9196 (Update_Primitives_Mapping_Of_Types): Removed.
9197 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9198 properties of the private type to the full view in case the full
9199 view derives from a parent type and inherits a DIC pragma.
9200 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9201 DIC pragma is placed at the top of a declarative region.
9202
9203 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9204
9205 * a-tasatt.adb: Complete previous change and use an unsigned
9206 int to avoid overflow checks.
9207
9208 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9209
9210 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
9211 the error message when the attribute reference is an actual in
9212 a call to a subprogram inherited from a generic formal type with
9213 unknown discriminants, which makes the subprogram and its formal
9214 parameters intrinsic (see RM 6.3.1 (8) and (13)).
9215
9216 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9217
9218 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
9219 sem_prag.adb: Minor reformatting.
9220
9221 2017-04-25 Bob Duff <duff@adacore.com>
9222
9223 * sem_attr.adb (Type_Key): Add code in the
9224 recursive Compute_Type_Key to protect against fetching the source
9225 code for Standard, in case a component of the type is declared
9226 in Standard. There was already code to do this for the original
9227 type, but not for its components.
9228
9229 2017-04-25 Javier Miranda <miranda@adacore.com>
9230
9231 * exp_ch3.adb (Build_Initialization_Call): Handle
9232 subtypes of private types when searching for the underlying full
9233 view of a private type.
9234
9235 2017-04-25 Javier Miranda <miranda@adacore.com>
9236
9237 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
9238 real conditional expression can appear in a fixed-type context
9239 and must be resolved with that context to facilitate the code
9240 generation to the backend.
9241
9242 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9243
9244 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
9245 to indicate whether during inline processing, when some unit U1
9246 appears in the context of a unit U2 compiled for instantiation
9247 or inlining purposes, the body of U1 needs to be compiled as well.
9248 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
9249 context is a package declaration.
9250 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
9251 Analyze_Generic_Package_Declaration): ditto.
9252 * inline.adb (Analyze_Inlined_Bodies): Check
9253 Body_Needed_For_Inlining.
9254
9255 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9256
9257 * par.adb (Current_Assign_Node): Global variable use to record
9258 the presence of a target_name in the right hand side of the
9259 assignment being parsed.
9260 * par-ch4.adb (P_Name): If the name is a target_name, mark the
9261 enclosing assignment node accordingly.
9262 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
9263 appropriately.
9264 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
9265 analyzing RHS if the statement has target_names.
9266 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
9267 properly choices that are subtype marks.
9268 * exp_ch5.adb: Code cleanup.
9269
9270 2017-04-25 Bob Duff <duff@adacore.com>
9271
9272 * s-memory.adb: Add a comment regarding efficiency.
9273 * atree.adb: Fix the assertion, and combine 2 assertions into one,
9274 "the source has an extension if and only if the destination does."
9275 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
9276
9277 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9278
9279 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
9280 conversion.
9281
9282 2017-04-25 Doug Rupp <rupp@adacore.com>
9283
9284 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
9285 handling for ppc64-vx7.
9286 * sigtramp-vxworks-target.inc
9287 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
9288
9289 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9290
9291 * ada_get_targ.adb: New file.
9292
9293 2017-04-25 Bob Duff <duff@adacore.com>
9294
9295 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
9296 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
9297 (UI_GCD): Remove ??? comment involving possible efficiency
9298 improvements. This just isn't important after all these years.
9299 Also minor cleanup.
9300 * uintp.ads: Minor cleanup.
9301
9302 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9303
9304 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
9305 Revert previous changes.
9306 * scng.adb: Minor reformatting.
9307 * s-stratt.ads: Fix unbalanced parens in comment.
9308
9309 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9310
9311 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
9312 Minor reformatting.
9313
9314 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9315
9316 * scng.adb (Scan): Handle '@' appropriately.
9317 * sem_ch5.adb: Code cleanup.
9318
9319 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9320
9321 * freeze.adb (Check_Expression_Function): Do not check for the
9322 use of deferred constants if the freezing of the expression
9323 function is triggered by its generated body, rather than a
9324 premature use.
9325
9326 2017-04-25 Javier Miranda <miranda@adacore.com>
9327
9328 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
9329 subtypes of private types when performing the view conversion.
9330
9331 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9332
9333 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9334 the purposes of freezing.
9335 * exp_util.adb Update the documentation and structure of the
9336 type map used in class-wide semantics of assertion expressions.
9337 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9338 and resolve the triaged expression because all substitutions
9339 refer to the proper entities. Update the replacement of
9340 references.
9341 (Build_DIC_Procedure_Body): Add formal parameter
9342 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9343 are now only processed when freezing occurs. Build a body only
9344 when one is needed.
9345 (Entity_Hash): Removed.
9346 (Map_Types): New routine.
9347 (Replace_Object_And_Primitive_References): Removed.
9348 (Replace_References): New routine.
9349 (Replace_Type_References): Moved to the library level of Exp_Util.
9350 (Type_Map_Hash): New routine.
9351 (Update_Primitives_Mapping): Update the mapping call.
9352 (Update_Primitives_Mapping_Of_Types): Removed.
9353 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9354 parameter For_Freeze and update the comment on usage.
9355 (Map_Types): New routine.
9356 (Replace_References): New routine.
9357 (Replace_Type_References): Moved to the library level of Exp_Util.
9358 (Update_Primitives_Mapping_Of_Types): Removed.
9359 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9360 properties of the private type to the full view in case the full
9361 view derives from a parent type and inherits a DIC pragma.
9362 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9363 DIC pragma is placed at the top of a declarative region.
9364
9365 2017-04-25 Tristan Gingold <gingold@adacore.com>
9366
9367 * s-mmap.ads (Data): Add pragma Inline.
9368
9369 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9370
9371 * checks.adb (Insert_Valid_Check): Do not use
9372 a renaming to alias a volatile name because this will lead to
9373 multiple evaluations of the volatile name. Use a constant to
9374 capture the value instead.
9375
9376 2017-04-25 Doug Rupp <rupp@adacore.com>
9377
9378 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
9379
9380 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9381
9382 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
9383 Add out parameter to indicate to caller that a wrapper must
9384 be constructed for an inherited primitive whose inherited
9385 pre/postcondition has called to overridden primitives.
9386 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
9387 for inherited primitive that requires it.
9388 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
9389 legal primitive operations and belong to the list of bodies
9390 generated after the freeze point of a type.
9391 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
9392 of Build_Class_Wide_Expression.
9393 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
9394 to construct the specification of the wrapper subprogram created
9395 for an inherited operation.
9396
9397 2017-04-25 Bob Duff <duff@adacore.com>
9398
9399 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
9400 pthread_mutexattr_setprioceiling): Add new interfaces for these
9401 pthread operations.
9402 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
9403 protocols as appropriate for Locking_Policy 'C' and 'I'.
9404 * s-taprop-posix.adb: Minor reformatting to make it more similar
9405 to s-taprop-linux.adb.
9406
9407 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9408
9409 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
9410 Handle properly a multi- level derivation involving both renamed
9411 and constrained parent discriminants, when the type to be
9412 constrained has fewer discriminants that the ultimate ancestor.
9413
9414 2017-04-25 Bob Duff <duff@adacore.com>
9415
9416 * sem_util.adb (Is_Object_Reference): In the
9417 case of N_Explicit_Dereference, return False if it came from a
9418 conditional expression.
9419
9420 2017-04-25 Bob Duff <duff@adacore.com>
9421
9422 * par-ch4.adb (P_Case_Expression): If a semicolon
9423 is followed by "when", assume that ";" was meant to be ",".
9424
9425 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9426
9427 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
9428 fixes.
9429
9430 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9431
9432 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
9433 loading of an entity.
9434 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
9435 previously repeated in the analysis.
9436 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
9437 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
9438 use new procedure SPARK_Implicit_Load.
9439 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
9440 SPARK_Implicit_Load.
9441
9442 2017-04-25 Javier Miranda <miranda@adacore.com>
9443
9444 * sem_util.adb (New_Copy_Tree): By default
9445 copying of defining identifiers is prohibited because
9446 this would introduce an entirely new entity into the
9447 tree. This patch introduces an exception to this general
9448 rule: the declaration of constants and variables located in
9449 Expression_With_Action nodes.
9450 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
9451 (In_Map): New subprogram.
9452 (Visit_Entity): New subprogram.
9453 (Visit_Node): Handle EWA_Level,
9454 EWA_Inner_Scope_Level, and take care of defining entities defined
9455 in Expression_With_Action nodes.
9456
9457 2017-04-25 Thomas Quinot <quinot@adacore.com>
9458
9459 * exp_ch6.adb: minor comment edit.
9460 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
9461 procedure specifications that come from source.
9462 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
9463 Null_Statement attribute.
9464 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
9465 procedure, generate statement SCO for the generated NULL statement.
9466 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
9467 parser, if available.
9468
9469 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9470
9471 * system-linux-s390.ads: Use Long_Integer'Size to define
9472 Memory_Size.
9473
9474 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
9475
9476 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
9477
9478 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
9479
9480 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
9481 * g-socket.adb (To_Host_Entry): Fix typo in comment.
9482 * gnat_ugn.texi: Fix typo.
9483 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
9484 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
9485 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
9486 * sem_util.adb (Mark_Coextensions): Likewise.
9487 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
9488
9489 2017-03-28 Andreas Schwab <schwab@suse.de>
9490
9491 PR ada/80117
9492 * system-linux-aarch64-ilp32.ads: New file.
9493 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
9494 from LIBGNAT_TARGET_PAIRS.
9495 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
9496 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
9497 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
9498 or -mabi=ilp32, resp.
9499
9500 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
9501
9502 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
9503
9504 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
9505
9506 PR ada/79903
9507 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
9508
9509 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
9510
9511 PR ada/79945
9512 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
9513
9514 * system-linux-arm.ads (Default_Bit_Order): Likewise.
9515 * system-linux-mips.ads (Default_Bit_Order): Likewise.
9516 * system-linux-armeb.ads: Delete.
9517 * system-linux-mipsel.ads: Likewise.
9518 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
9519 (ARM/Linux): Likewise.
9520
9521 2017-02-24 Jakub Jelinek <jakub@redhat.com>
9522
9523 PR c/79677
9524 * gcc-interface/misc.c (gnat_handle_option): Pass true to
9525 handle_generated_option GENERATED_P.
9526
9527 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9528
9529 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
9530 around a justified modular type if it doesn't have the same scalar
9531 storage order as the enclosing record type.
9532
9533 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9534
9535 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
9536 of boolean rvalues to function calls.
9537
9538 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9539
9540 * gcc-interface/utils.c (fold_bit_position): New function.
9541 (rest_of_record_type_compilation): Call it instead of bit_position to
9542 compute the field position and remove the call to remove_conversions.
9543 (compute_related_constant): Factor out the multiplication in both
9544 operands, if any, and streamline the final test.
9545
9546 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9547
9548 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
9549
9550 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9551
9552 * gcc-interface/decl.c: Include demangle.h.
9553 (is_cplusplus_method): Return again true for a primitive operation
9554 only if it is dispatching. For a subprogram with an interface name,
9555 call the demangler to get the number of C++ parameters and compare it
9556 with the number of Ada parameters.
9557
9558 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9559
9560 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
9561 there is no end label, put the location of the At_End procedure on
9562 the call to the procedure.
9563
9564 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9565
9566 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
9567 value for array types with TYPE_INDEX_TYPE set on their domain type.
9568 * gcc-interface/utils.c (max_size): For operations and expressions, do
9569 not build a new node if the operands have not changed or are missing.
9570
9571 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9572
9573 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
9574 argument when recursing on TRUTH_NOT_EXPR.
9575
9576 2017-02-12 John Marino <gnugcc@marino.st>
9577
9578 * system-freebsd-x86.ads: Rename into...
9579 * system-freebsd.ads: ...this.
9580 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
9581 * gcc-interface/Makefile.in: Support aarch64-freebsd.
9582 (x86-64/FreeBSD): Adjust to above renaming.
9583 (i386/FreeBSD): Likewise.
9584
9585 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
9586
9587 * comperr.adb: Update FSF bug reporting URL.
9588
9589 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
9590 Jakub Jelinek <jakub@redhat.com>
9591
9592 PR ada/79309
9593 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
9594
9595 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
9596
9597 PR lto/79061
9598 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
9599 to build_translation_unit_decl.
9600
9601 2017-01-23 Javier Miranda <miranda@adacore.com>
9602
9603 * sem_util.adb (New_Copy_Tree): Code cleanup:
9604 removal of the internal map (ie. variable Actual_Map, its
9605 associated local variables, and all the code handling it).
9606 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
9607 force loading of the System package when processing a task type.
9608 (Analyze_Protected_Type_Declaration): in GNATprove mode force
9609 loading of the System package when processing a protected type.
9610 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
9611 force loading of the System package when processing compilation
9612 unit with a main-like subprogram.
9613 * frontend.adb (Frontend): remove forced loading of the System
9614 package.
9615
9616 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9617
9618 * sem_prag.adb (Default_Initial_Condition): If the desired type
9619 declaration is a derived type declaration with discriminants,
9620 it is rewritten as a private type declaration.
9621 * sem_ch13.adb (Replace_Type_References_Generic,
9622 Visible_Component): A discriminated private type with descriminnts
9623 has components that must be rewritten as selected components
9624 if they appear as identifiers in an aspect expression such as
9625 a Default_Initial_Condition.
9626 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
9627 nodes.
9628
9629 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9630
9631 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
9632 * gnat1drv.adb Generate an empty object file for an ignored
9633 Ghost compilation unit.
9634 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
9635
9636 2017-01-23 Yannick Moy <moy@adacore.com>
9637
9638 * sem_ch4.adb (Analyze_Indexed_Component_Form):
9639 Adapt to inlined prefix with string literal subtype.
9640 * inline.adb (Expand_Inlined_Call): Keep unchecked
9641 conversion inside inlined call when formal type is constrained.
9642
9643 2017-01-23 Javier Miranda <miranda@adacore.com>
9644
9645 * sem_util.adb (New_Copy_Tree): Code cleanup:
9646 removal of global variables. All the global variables, global
9647 functions and tables of this subprogram are now declared locally.
9648
9649 2017-01-23 Gary Dismukes <dismukes@adacore.com>
9650
9651 * exp_strm.ads: Minor reformatting and typo fixes.
9652
9653 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9654
9655 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
9656 exp_aggr.adb: Minor reformatting.
9657 * g-diopit.adb: minor grammar/punctuation fix in comment.
9658 * g-byorma.ads: minor fix of unbalanced parens in comment.
9659
9660 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9661
9662 * par.adb: Update the documentation of component Labl.
9663 * par-ch6.adb (P_Return_Statement): Set the expected label of
9664 an extended return statement to Error.
9665
9666 2017-01-23 Tristan Gingold <gingold@adacore.com>
9667
9668 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
9669
9670 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9671
9672 * expander.adb: Handle N_Delta_Aggregate.
9673
9674 2017-01-23 Javier Miranda <miranda@adacore.com>
9675
9676 * exp_ch6.adb (Expand_Call): Improve the code that
9677 checks if some formal of the called subprogram is a class-wide
9678 interface, to handle subtypes of class-wide interfaces.
9679
9680 2017-01-23 Javier Miranda <miranda@adacore.com>
9681
9682 * checks.adb (Apply_Parameter_Aliasing_Checks):
9683 Remove side effects of the actuals before generating the overlap
9684 check.
9685
9686 2017-01-23 Justin Squirek <squirek@adacore.com>
9687
9688 * exp_strm.ads, exp_strm.ads
9689 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
9690 as to avoid getting the underlying type by default.
9691 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
9692 underlying type in the Iiput and output attribute cases when
9693 building their respective functions.
9694
9695 2017-01-23 Gary Dismukes <dismukes@adacore.com>
9696
9697 * scng.adb: Minor reformatting of error message.
9698
9699 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9700
9701 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
9702 to freeze the return type of an expression funxtion that is a
9703 completion, if the type is a limited view and the non-limited
9704 view is available.
9705
9706 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9707
9708 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
9709 aggregate construct.
9710 (P_Record_Or_Array_Component_Association): An array aggregate
9711 can start with an Iterated_Component_Association.
9712 * scng.adb: Modify error message on improper use of @ in earlier
9713 versions of the language.
9714 * sinfo.ads: New node kind N_Delta_Aggregate.
9715 * sinfo.adb: An N_Delta_Aggregate has component associations and
9716 an expression.
9717 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
9718 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
9719 Create a new index for each one of the choices in the association,
9720 to prevent spurious homonyms in the scope.
9721 (Resolve_Delta_Aggregate): New.
9722 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
9723 * exp_util.adb (Insert_Actions): Take into account
9724 N_Delta_Aggregate.
9725 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
9726 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
9727 and local procedures Expand_Delta_Array_Aggregate and
9728 expand_Delta_Record_Aggregate.
9729 * sprint.adb: Handle N_Delta_Aggregate.
9730
9731 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9732
9733 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
9734 empty name when the exception declaration is subject to pragma
9735 Discard_Names.
9736 (Null_String): New routine.
9737
9738 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9739
9740 * par-ch9.adb (P_Protected_Definition): Parse
9741 any optional and potentially illegal pragmas which appear in
9742 a protected operation declaration list.
9743 (P_Task_Items): Parse
9744 any optional and potentially illegal pragmas which appear in a
9745 task item list.
9746
9747 2017-01-23 Pascal Obry <obry@adacore.com>
9748
9749 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
9750 is needed when a foreign thread call a Win32 API using a thread handle
9751 like GetThreadTimes() for example.
9752
9753 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9754
9755 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9756 allow an 'Address clause to be specified on a prefix of a
9757 class-wide type.
9758
9759 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9760
9761 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9762 attribute 'Valid is a renaming of the original expression when
9763 the expression denotes a name. For all other kinds of expression,
9764 use a constant to capture the value.
9765 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9766 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9767
9768 2017-01-23 Justin Squirek <squirek@adacore.com>
9769
9770 * sem_eval.adb (Eval_Integer_Literal): Add special
9771 case to avoid optimizing out check if the literal appears in
9772 an if-expression.
9773
9774 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9775
9776 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9777 allow an 'Address clause to be specified on a prefix of a
9778 class-wide type.
9779
9780 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9781
9782 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9783 attribute 'Valid is a renaming of the original expression when
9784 the expression denotes a name. For all other kinds of expression,
9785 use a constant to capture the value.
9786 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9787 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9788
9789 2017-01-23 Justin Squirek <squirek@adacore.com>
9790
9791 * sem_eval.adb (Eval_Integer_Literal): Add special
9792 case to avoid optimizing out check if the literal appears in
9793 an if-expression.
9794
9795 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9796
9797 * sem_ch4.adb (Try_Primitive_Operations,
9798 Is_Valid_First_Argument_Of): argument is valid if it is a derived
9799 type with unknown discriminants that matches its underlying
9800 record view.
9801 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
9802 expression if its type is derived from a limited type with
9803 unknown discriminants, because the expansion (which is a call)
9804 must be expanded in the enclosing context to add the proper build-
9805 in-place parameters to the call.
9806 * lib.ads, exp_ch9.adb: Minor fixes in comments.
9807
9808 2017-01-23 Yannick Moy <moy@adacore.com>
9809
9810 * frontend.adb (Frontend): Do not load runtime
9811 unit for GNATprove when parsing failed.
9812 * exp_ch9.adb: minor removal of extra whitespace
9813 * exp_ch6.adb: minor typo in comment
9814 * sem_util.adb: Code cleanup.
9815 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
9816 * a-ngcefu.adb: minor style fix in whitespace
9817
9818 2017-01-23 Thomas Quinot <quinot@adacore.com>
9819
9820 * scos.ads: Document usage of 'd' as default SCO kind for
9821 declarations.
9822 * par_sco.adb (Traverse_Declarations_Or_Statements.
9823 Traverse_Degenerate_Subprogram): New supporting routine for expression
9824 functions and null procedures.
9825 (Traverse_Declarations_Or_Statements.Traverse_One): Add
9826 N_Expression_Function to the subprogram case; add required
9827 support for null procedures and expression functions.
9828
9829 2017-01-23 Bob Duff <duff@adacore.com>
9830
9831 * namet.ads (Bounded_String): Decrease the size of type
9832 Bounded_String to avoid running out of stack space.
9833 * namet.ads (Append): Don't ignore buffer overflow; raise
9834 Program_Error instead.
9835
9836 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9837
9838 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
9839 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
9840 reformatting.
9841 * exp_ch9.adb: minor style fix in comment.
9842
9843 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9844
9845 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
9846 for a limited record extension with unknown discriminants whose
9847 full view has no discriminants.
9848
9849 2017-01-23 Yannick Moy <moy@adacore.com>
9850
9851 * exp_spark.adb: Alphabetize with clauses.
9852
9853 2017-01-23 Yannick Moy <moy@adacore.com>
9854
9855 * sem_util.adb (Has_Enabled_Property): Treat
9856 protected objects and variables differently from other variables.
9857
9858 2017-01-23 Thomas Quinot <quinot@adacore.com>
9859
9860 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
9861 Split original Ada 95 part off into new subprogram
9862 below. Call that subprogram (instead of proceeding with
9863 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
9864 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
9865 * debug.adb Document new switch -gnatd.p
9866 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
9867 record for reverse bit order if an error has already been posted
9868 on the record type. This avoids generating extraneous "info:"
9869 messages for illegal code.
9870
9871 2017-01-23 Justin Squirek <squirek@adacore.com>
9872
9873 * sem_ch3.adb (Analyze_Declarations): Correct comments
9874 * freeze.adb (Find_Constant): Add detection of deferred constants
9875 so they are not incorrectly flagged as premature.
9876
9877 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9878
9879 * scans.ads: New token At_Sign. Remove '@' from list of illegal
9880 characters for future version of the language. '@' is legal name.
9881 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
9882 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
9883 denotes a Target_Name.
9884 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
9885 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
9886 (Has_Target_Names): New flag on N_Assignment_Statement, to
9887 indicate that RHS has occurrences of N_Target_Name.
9888 * sem.adb: Call Analyze_Target_Name.
9889 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
9890 (urrent_LHS): Global variable that denotes LHS of assignment,
9891 used in the analysis of Target_Name nodes.
9892 * sem_res.adb (Resolve_Target_Name): New procedure.
9893 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
9894 N is an assignment statement whose RHS contains occurences of @
9895 that designate the value of the LHS of the assignment. If the
9896 LHS is side-effect free the target names can be replaced with
9897 a copy of the LHS; otherwise the semantics of the assignment
9898 is described in terms of a procedure with an in-out parameter,
9899 and expanded as such.
9900 (Expand_N_Assignment_Statement): Call
9901 Expand_Assign_With_Target_Names when needed.
9902 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
9903 * sprint.adb: Handle N_Target_Name.
9904
9905 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
9906
9907 * checks.adb: Minor fix in comment.
9908
9909 2017-01-23 Philippe Gil <gil@adacore.com>
9910
9911 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
9912 count in Sort = Memory_Usage or Allocations_Count
9913
9914 2017-01-23 Justin Squirek <squirek@adacore.com>
9915
9916 * sem_ch3.adb: Code cleanup.
9917
9918 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9919
9920 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
9921 variables to the local variable section. Update the profile
9922 of various nested routine that previously had visibility
9923 of those globals. One the matching phase has completed,
9924 remove certain classes of clauses which are considered noise.
9925 (Check_Dependency_Clause): Properly detect a match between two
9926 'Result attributes. Update the various post-match cases to use
9927 Is_Already_Matched as this routine now automatically recognizes
9928 a previously matched 'Result attribute.
9929 (Is_Already_Matched): New routine.
9930 (Remove_Extra_Clauses): New routine.
9931 (Report_Extra_Clauses): Remove the detection of ... => null
9932 clauses as this is now done in Remove_Extra_Clauses.
9933
9934 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9935
9936 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
9937 report on spurious overlaps between values involving a subtype
9938 with a static predicate, because the expansion of such a subtype
9939 into individual ranges in inhibited in ASIS mode.
9940
9941 2017-01-23 Justin Squirek <squirek@adacore.com>
9942
9943 * sem_ch3.adb (Analyze_Declarations): Add detection
9944 of an edge case and delay freezing if it is present.
9945
9946 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9947
9948 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
9949 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
9950
9951 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9952
9953 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
9954 access-to-subprogram types inherit the convention of the
9955 associated subprogram. (Set_Profile_Convention): New routine.
9956 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
9957 of the two entities directly, use Conventions_Match to account
9958 for anonymous access-to-subprogram and subprogram types.
9959 (Conventions_Match): New routine.
9960
9961 2017-01-23 Claire Dross <dross@adacore.com>
9962
9963 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
9964 which return Universal_Integer, force the overflow check flag for
9965 Length and Range_Length for types as big as Long_Long_Integer.
9966
9967 2017-01-23 Claire Dross <dross@adacore.com>
9968
9969 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
9970 attributes which return Universal_Integer, introduce a conversion
9971 to the expected type with the appropriate check flags set.
9972 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
9973 base type if the range is null. It may still be invalid if it
9974 is higher than the lower bound. This is checked later in the
9975 context in which the range appears.
9976
9977 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
9978
9979 * scos.ads: Introduce a constant to represent ignored
9980 dependencies in SCO_Unit_Table_Entry.
9981
9982 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9983
9984 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
9985 spaces from error messages.
9986
9987 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9988
9989 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
9990 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
9991 an object declaration for an array type with a modular index type
9992 with the size of Long_Long_Integer. Special processing is needed
9993 in this case to compute reliably the size of the object, and
9994 eventually to raise Storage_Error, when wrap-around arithmetic
9995 might compute a meangingless size for the object.
9996
9997 2017-01-23 Justin Squirek <squirek@adacore.com>
9998
9999 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
10000 sem_type.adb: Code cleanups.
10001
10002 2017-01-23 Bob Duff <duff@adacore.com>
10003
10004 * sem_res.adb (Resolve_Call): In the part of the code where
10005 it is deciding whether to turn the call into an indexed
10006 component, avoid doing so if the call is to an instance of
10007 Unchecked_Conversion. Otherwise, the compiler turns it into an
10008 indexed component, and resolution of that turns it back into a
10009 function call, and so on, resulting in infinite recursion.
10010 * sem_util.adb (Needs_One_Actual): If the first formal has a
10011 default, then return False.
10012
10013 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
10014
10015 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
10016 optimizations when the type is modular and the offsets are equal.
10017
10018 2017-01-20 Thomas Quinot <quinot@adacore.com>
10019
10020 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
10021 message.
10022
10023 2017-01-20 Nicolas Roche <roche@adacore.com>
10024
10025 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
10026
10027 2017-01-20 Bob Duff <duff@adacore.com>
10028
10029 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
10030 (etc) optimizations when the type is modular.
10031
10032 2017-01-20 Yannick Moy <moy@adacore.com>
10033
10034 * sem_ch6.adb (Move_Pragmas): move some pragmas,
10035 but copy the SPARK_Mode pragma instead of moving it.
10036 (Build_Subprogram_Declaration): Ensure that the generated spec
10037 and original body share the same SPARK_Pragma aspect/pragma.
10038 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
10039 procedure to copy SPARK_Mode aspect.
10040
10041 2017-01-20 Bob Duff <duff@adacore.com>
10042
10043 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
10044 even in ASIS mode.
10045 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
10046 Empty even in ASIS mode.
10047
10048 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10049
10050 * exp_ch9.adb: minor style fixes in comments.
10051 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
10052 relative statement introduces an implicit dependency on
10053 Ada.Real_Time.Clock_Time.
10054 * sem_util.adb: Minor reformatting.
10055
10056 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10057
10058 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
10059 must be treated as delayed aspect even if the expression is
10060 a literal, because the aspect affects the freezing and the
10061 elaboration of the object to which it applies.
10062
10063 2017-01-20 Tristan Gingold <gingold@adacore.com>
10064
10065 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
10066
10067 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10068
10069 * lib-xref.adb (Generate_Reference): Do not warn about the
10070 presence of a pragma Unreferenced if the entity appears as the
10071 actual in a procedure call that does not come from source.
10072
10073 2017-01-20 Pascal Obry <obry@adacore.com>
10074
10075 * expect.c, terminals.c: Fix some warnings about unused variables.
10076 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
10077 of the runtime.
10078
10079 2017-01-20 Bob Duff <duff@adacore.com>
10080
10081 * exp_attr.adb (Constrained): Apply an access check (check that
10082 the prefix is not null) when the prefix denotes an object of an
10083 access type; that is, when there is an implicit dereference.
10084
10085 2017-01-20 Gary Dismukes <dismukes@adacore.com>
10086
10087 * s-rident.ads (constant Profile_Info): Remove
10088 No_Calendar from GNAT_Extended_Ravenscar restrictions.
10089
10090 2017-01-20 Tristan Gingold <gingold@adacore.com>
10091
10092 * s-maccod.ads: Add pragma No_Elaboration_Code_All
10093
10094 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10095
10096 * ghost.adb (Mark_Ghost_Clause): New routine.
10097 (Prune_Node): Do not prune compilation unit nodes.
10098 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
10099 This does not touch the node itself, but does prune all its fields.
10100 * ghost.ads (Mark_Ghost_Clause): New routine.
10101 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
10102 package clause mentions Ghost and non-Ghost packages. Mark a
10103 use package clause as Ghost when it mentions a Ghost package.
10104 (Analyze_Use_Type): Emit an error when a use type clause mentions
10105 Ghost and non-Ghost types. Mark a use type clause as Ghost when
10106 it mentions a Ghost type.
10107 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
10108 Ghost when it withs a Ghost unit.
10109
10110 2017-01-20 Javier Miranda <miranda@adacore.com>
10111
10112 * sem_res.adb (Resolve_Call): If a function call
10113 returns a limited view of a type and at the point of the call the
10114 function is not declared in the extended main unit then replace
10115 it with the non-limited view, which must be available. If the
10116 called function is in the extended main unit then no action is
10117 needed since the back-end handles this case.
10118
10119 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
10120
10121 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
10122 (Contains_Subprograms_Refs): ...this. Adjust comment
10123 for constants. (Is_Subp_Or_Const_Ref): Rename into...
10124 (Is_Subprogram_Ref): ...this.
10125 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
10126 Has_Non_Subprograms_Referencer and adjust comment. Remove
10127 incorrect shortcut for package declarations and bodies.
10128
10129 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10130
10131 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
10132 base type differs from that of the completion and the private
10133 subtype is an itype (created for a constraint on an access
10134 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
10135 anomalies in gigi.
10136
10137 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10138
10139 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10140 When inheriting the SPARK_Mode of a prior expression function,
10141 look at the properly resolved entity rather than the initial
10142 candidate which may denote a homonym.
10143
10144 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10145
10146 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
10147 Precondition or Postcondition, and the context is pragma
10148 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
10149 and suggest the standard names Assertion_Policy /Pre /Post
10150 instead.
10151
10152 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10153
10154 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
10155
10156 2017-01-20 Javier Miranda <miranda@adacore.com>
10157
10158 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
10159 Entity attribute.
10160 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
10161 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
10162 malformed trees.
10163
10164 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10165
10166 * sem_ch13.adb (Analyze_Aspect_Specification, case
10167 Dynamic_Predicate): If the entity E is a subtype that inherits
10168 a static predicate for its parent P,, the inherited and the
10169 new predicate combine in the generated predicate function,
10170 and E only has a dynamic predicate.
10171
10172 2017-01-20 Tristan Gingold <gingold@adacore.com>
10173
10174 * s-boustr.ads, s-boustr.adb: New package.
10175 * Makefile.rtl: Add s-boustr.
10176
10177 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10178
10179 * inline.adb (Process_Formals): Qualify the
10180 expression of a return statement when it yields a universal type.
10181
10182 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10183
10184 * freeze.adb (Freeze_All): Freeze the default
10185 expressions of all eligible formal parameters that appear in
10186 entries, entry families, and protected subprograms.
10187
10188 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10189
10190 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
10191 for illegal inherited Implicit_Dereference aspects with renamed
10192 discriminants.
10193
10194 2017-01-20 Javier Miranda <miranda@adacore.com>
10195
10196 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
10197 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
10198 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
10199 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
10200 Set_Prev, Tree_Read): Adding assertion.
10201 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
10202 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
10203 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
10204 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
10205 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
10206 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
10207 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
10208 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
10209 Set_ListN_With_Parent): Adding assertion.
10210
10211 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10212
10213 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
10214 import that applies to several homograph subprograms. when one
10215 of them is declared by a subprogram body.
10216
10217 2017-01-20 Justin Squirek <squirek@adacore.com>
10218
10219 * exp_ch6.adb (Expand_Call): Remove optimization
10220 that nulls out calls to null procedures.
10221
10222 2017-01-20 Yannick Moy <moy@adacore.com>
10223
10224 * inline.adb (Expand_Inlined_Call): Keep more
10225 precise type of actual for inlining whenever possible. In
10226 particular, do not switch to the formal type in GNATprove mode in
10227 some case where the GNAT backend might require it for visibility.
10228
10229 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10230
10231 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
10232 aspect Implicit_Dereference can be inherited by a full view if
10233 the partial view has no discriminants, because there is no way
10234 to apply the aspect to the partial view.
10235 (Build_Derived_Record_Type): If derived type renames discriminants
10236 of the parent, the new discriminant inherits the aspect from
10237 the old one.
10238 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
10239 call through an access discriminant designating a subprogram.
10240 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
10241 properly a parameterless call through an access discriminant on
10242 the left-hand side of an assignment.
10243 * sem_res.adb (resolve): If an interpreation involves a
10244 discriminant with an implicit dereference and the expression is an
10245 entity, resolution takes place later in the appropriate routine.
10246 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
10247 access discriminants that designate a subprogram type.
10248
10249 2017-01-20 Pascal Obry <obry@adacore.com>
10250
10251 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
10252
10253 2017-01-20 Yannick Moy <moy@adacore.com>
10254
10255 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
10256 on implicitly with'ed units in GNATprove mode.
10257 * sinfo.ads (Implicit_With): Document use of flag for implicitly
10258 with'ed units in GNATprove mode.
10259
10260 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10261
10262 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
10263 unit Do not report an error on a non-static entity that appears
10264 in the context of a spec expression, such as an aspect expression.
10265
10266 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10267
10268 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
10269 (Is_Underlying_Full_View): New routine.
10270 (Set_Is_Underlying_Full_View): New routine.
10271 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
10272 * einfo.ads Add new attribute Is_Underlying_Full_View.
10273 (Is_Underlying_Full_View): New routine along with pragma Inline.
10274 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
10275 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
10276 class-wide types and underlying full views. The first subtype
10277 is used as the working type for all Itypes, not just array base types.
10278 (Build_DIC_Procedure_Declaration): Do not consider
10279 class-wide types and underlying full views. The first subtype
10280 is used as the working type for all Itypes, not just array
10281 base types.
10282 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
10283 view or an underlying full view without clobbering the attributes
10284 of a previous freeze node.
10285 (Inherit_Freeze_Node): New routine.
10286 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
10287 full view as such.
10288 (Build_Underlying_Full_View): Mark an underlying full view as such.
10289 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
10290 full view as such.
10291
10292 2017-01-20 Yannick Moy <moy@adacore.com>
10293
10294 * sinfo.ads: Document lack of Do_Division_Check flag
10295 on float exponentiation.
10296
10297 2017-01-19 Javier Miranda <miranda@adacore.com>
10298
10299 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
10300 identifier attribute of a block-statement node. Required to avoid
10301 assertion failure when building the new containers library.
10302
10303 2017-01-19 Bob Duff <duff@adacore.com>
10304
10305 * exp_ch3.adb: Update comment.
10306
10307 2017-01-19 Vincent Celier <celier@adacore.com>
10308
10309 * gprep.adb (Gnatprep): Parse the definition file without
10310 "replace in comments" even when switch -C is used.
10311
10312 2017-01-19 Justin Squirek <squirek@adacore.com>
10313
10314 * exp_ch9.adb (Is_Pure_Barrier): Create function
10315 Is_Count_Attribute to identify an expansion of the 'Count
10316 attribute.
10317
10318 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10319
10320 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
10321 statements within an element iterator loop are only analyzed
10322 agter the loop is rewritten. Within a generic the analysis must
10323 be performed in any case to complete name capture.
10324
10325 2017-01-19 Bob Duff <duff@adacore.com>
10326
10327 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
10328 before checking for unrecognized pragmas.
10329 Initialize Pname on its declarations; that's always good style.
10330
10331 2017-01-19 Claire Dross <dross@adacore.com>
10332
10333 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
10334 body into the tree for GNATprove by setting its Parent field. The
10335 components invariants of composite types are not checked by
10336 the composite type's invariant procedure in GNATprove mode.
10337 (Build_Invariant_Procedure_Declaration): Semi-insert the
10338 declaration into the tree for GNATprove by setting its Parent
10339 field.
10340 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
10341 the component invariants to the array type invariant procedure
10342 so that the procedure can be used to check the array type
10343 invariants if any.
10344 (Freeze_Record_Type): In GNATprove mode, do
10345 not add the component invariants to the record type invariant
10346 procedure so that the procedure can be used to check the record
10347 type invariants if any.
10348
10349 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10350
10351 * lib-xref-spark_specific.adb: Minor reformatting.
10352 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
10353
10354 2017-01-19 Javier Miranda <miranda@adacore.com>
10355
10356 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
10357 Build_Back_End_Aggregate.
10358 (Generate_Aggregate_For_Derived_Type): Code cleanup.
10359 (Prepend_Stored_Values): Code cleanup.
10360
10361 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10362
10363 * sem_ch6.adb (Analyze_Expression_Function): Check for an
10364 incomplete return type after attempting to freeze it, so that
10365 other freeze actiona are generated in the proper order.
10366
10367 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10368
10369 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
10370 type, ie. a type whose component is a character type, and the
10371 aggregate is positional, do not convert into a string literal
10372 if the index type is not an integer type, because the original
10373 type may be required in an enclosing operation.
10374
10375 2017-01-19 Bob Duff <duff@adacore.com>
10376
10377 * binde.adb, debug.adb: Enable new elaboration order algorithm
10378 by default. -dp switch reverts to the old algorithm.
10379
10380 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10381
10382 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
10383 (Analyze_Declarations): Create the DIC and Invariant
10384 procedure bodies s after all freezing has taken place.
10385 (Build_Assertion_Bodies): New routine.
10386 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
10387 and Exp_Util.
10388 (Analyze_Package_Specification): Remove the
10389 generation of the DIC and Invariant procedure bodies. This is
10390 now done by Analyze_Declarations.
10391 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
10392 procedures are never treated as primitives.
10393
10394 2017-01-19 Yannick Moy <moy@adacore.com>
10395
10396 * frontend.adb: Analyze inlined bodies and check elaboration
10397 rules in GNATprove mode too.
10398 * sem_elab.adb (Delay_Element): Add Boolean component to save
10399 indication that call is in SPARK code. (Check_Elab_Calls):
10400 Check elaboration rules in GNATprove mode, and correctly set
10401 the current value of SPARK_Mode.
10402 * lib-xref-spark_specific.adb
10403 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
10404
10405 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10406
10407 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
10408 checks on the expression for the high bound of concatenation
10409 when checks are disabled, to suppress warnings about potential
10410 constraint errors in restricted runtimes.
10411
10412 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10413
10414 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
10415 representation-to-position function as inlined.
10416 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
10417 the purity of an internally generated entity if it has been
10418 explicitly marked as pure for optimization purposes.
10419 * exp_aggr.adb: Minor reformatting.
10420
10421 2017-01-19 Javier Miranda <miranda@adacore.com>
10422
10423 * exp_ch6.adb (Expand_Call): Remove side effects on
10424 actuals that are allocators with qualified expression since the
10425 initialization of the object is performed by means of individual
10426 statements (and hence it must be done before the call).
10427
10428 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10429
10430 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
10431 (Build_Derived_Enumeration_Type): If the derived type inherits a
10432 dynamic predicate from its parent, the bounds of the type must
10433 freeze because an explicit constraint is constructed for the
10434 type and the corresponding range is elaborated now.
10435
10436 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10437
10438 * sem_attr.ads: minor fix of inconsistent casing in comment
10439 * lib-writ.ads: minor align comments in columns
10440 * sem_ch3.adb: Minor reformatting.
10441 * spark_xrefs.ads: minor fix typo in SPARK-related comment
10442 * table.ads: minor style fix in comment
10443 * lib-xref-spark_specific.adb
10444 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
10445 * sem_ch12.adb: minor whitespace fix
10446 * freeze.adb: Add comment.
10447 * sem_util.adb (Unique_Name): for instances of
10448 generic subprograms ignore the name of the wrapper package.
10449
10450 2017-01-19 Javier Miranda <miranda@adacore.com>
10451
10452 * exp_aggr.adb (Resolve_Record_Aggregate):
10453 Factorize code needed for aggregates of limited and unlimited
10454 types in a new routine.
10455 (Pass_Aggregate_To_Back_End): New subprogram.
10456
10457 2017-01-19 Yannick Moy <moy@adacore.com>
10458
10459 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
10460
10461 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10462
10463 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
10464 public, for use elsewhere.
10465 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
10466 an Inlined_body, recognize a call that uses object notation
10467 and has not been rewritten as a regular call because regular
10468 expansion has not taken place.
10469
10470 2017-01-19 Bob Duff <duff@adacore.com>
10471
10472 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
10473 in case of generic formal discrete types, because it causes crashes in
10474 the compiler when built with assertions on.
10475
10476 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10477
10478 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
10479 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
10480
10481 2017-01-19 Bob Duff <duff@adacore.com>
10482
10483 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
10484 Increment Warnings_Detected. It was decrementing, which is
10485 wrong since we just issued a warning message.
10486 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
10487 these variables to be of subtype Nat instead of Int, because
10488 they should never be negative.
10489
10490 2017-01-19 Javier Miranda <miranda@adacore.com>
10491
10492 * contracts.adb (Build_Postconditions_Procedure): Replace
10493 Generate_C_Code by Modify_Tree_For_C.
10494 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
10495 Replace Generate_C_Code by Modify_Tree_For_C.
10496 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
10497 Modify_Tree_For_C.
10498 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
10499 Generate_C_Code by Modify_Tree_For_C.
10500 * exp_ch4.adb (Expand_Allocator_Expression): Replace
10501 Generate_C_Code by Modify_Tree_For_C.
10502 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
10503 by Modify_Tree_For_C.
10504 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
10505 Generate_C_Code by Modify_Tree_For_C.
10506 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
10507 by Modify_Tree_For_C.
10508 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
10509
10510 2017-01-19 Javier Miranda <miranda@adacore.com>
10511
10512 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
10513 subprogram.
10514 (Is_Inlinable_Expression_Function): New subprogram.
10515 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
10516 to Sem_Util.
10517 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
10518
10519 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10520
10521 * sem_ch4.adb (Diagnose_Call): Improve error message when a
10522 selected component has a prefix that might be interpreted
10523 as a parameterless function call, but none of the candidate
10524 interpretations is parameterless, and there is a hidden homonym
10525 of the prefix that is a package.
10526 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
10527 interpreted as a parameterless function call and its analysis
10528 fails, do not call Analyze_Selected_Component.
10529
10530 2017-01-19 Steve Baird <baird@adacore.com>
10531
10532 * sem_util.ads: Add new Use_Full_View Boolean parameter to
10533 Get_Index_Bounds.
10534 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
10535 calls to a newly-defined Scalar_Range_Of_Right_View function.
10536
10537 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10538
10539 * gnat1drv.adb: minor fix of unbalanced parens in comment
10540 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
10541 to visible part of the package to allow re-use in GNATprove.
10542 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
10543 from repeated code of Traverse_Compilation_Unit.
10544 (Traverse_Declaration_Or_Statement): fixed detection of
10545 generic subprograms and packages; also, iteration over case
10546 statement alternatives rewritten to avoid testing if the first
10547 alternative is present (since it must be present due to Ada
10548 syntax restrictions).
10549
10550 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10551
10552 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
10553 returning by reference not just for subprogram body stubs,
10554 but for all subprogram cases.
10555 * sem_util.adb: Code reformatting.
10556 (Requires_Transient_Scope): Update the call to Results_Differ.
10557 (Results_Differ): Update the parameter profile and the associated
10558 comment on usage.
10559
10560 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10561
10562 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
10563 identifier nodes that do not come from source, to handle properly
10564 dimensionality check within an inlined body which inclddes both
10565 original operands and rewritten operands. This removes spurious
10566 dimensionality errors in the presence of front-end inlining,
10567 as well as in SPARK mode.
10568
10569 2017-01-16 Jakub Jelinek <jakub@redhat.com>
10570
10571 PR driver/49726
10572 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
10573
10574 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10575
10576 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
10577
10578 2017-01-13 Arnaud Charlet <charlet@adacore.com>
10579
10580 * doc/gnat_ugn/getting_started_with_gnat.rst,
10581 doc/gnat_ugn/inline_assembler.rst,
10582 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
10583 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
10584 doc/gnat_ugn/about_this_guide.rst,
10585 doc/gnat_ugn/platform_specific_information.rst,
10586 doc/gnat_ugn/example_of_binder_output.rst,
10587 doc/gnat_ugn/gnat_and_program_execution.rst,
10588 doc/gnat_ugn/gnat_utility_programs.rst,
10589 doc/gnat_ugn/the_gnat_compilation_model.rst,
10590 doc/gnat_rm/implementation_defined_attributes.rst,
10591 doc/gnat_rm/compatibility_and_porting_guide.rst,
10592 doc/gnat_rm/standard_library_routines.rst,
10593 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
10594 doc/gnat_rm/implementation_defined_pragmas.rst,
10595 doc/gnat_rm/the_gnat_library.rst,
10596 doc/gnat_rm/obsolescent_features.rst,
10597 doc/gnat_rm/about_this_guide.rst,
10598 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
10599 doc/gnat_rm/implementation_of_ada_2012_features.rst,
10600 doc/gnat_rm/interfacing_to_other_languages.rst,
10601 doc/gnat_rm/implementation_defined_aspects.rst,
10602 doc/gnat_rm.rst: Update documentation.
10603 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
10604
10605 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10606
10607 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
10608 * scil_ll.adb: Minor style fix in comment.
10609 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
10610 even if entity is already set, because the node may be renalyzed
10611 after inlining transformations.
10612
10613 2017-01-13 Javier Miranda <miranda@adacore.com>
10614
10615 * sem_res.adb (Resolve_Call): Do not establish a transient scope
10616 for a call to inlinable expression function (since the call will
10617 be replaced by its returned object).
10618 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
10619 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
10620 (Expand_Call): For inlinable expression function call replace the
10621 call by its returned object.
10622 (Is_Inlinable_Expression_Function): New subprogram.
10623
10624 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10625
10626 * checks.adb: Minor typo fix and reformatting.
10627
10628 2017-01-13 Javier Miranda <miranda@adacore.com>
10629
10630 * contracts.adb (Contract_Only_Subprograms): Remove formal.
10631 (Copy_Original_Specification): Removed.
10632 (Skip_Contract_Only_Subprogram): Move here checks previously
10633 located in the caller of this routine (to leave the code more clean).
10634 (Build_Contract_Only_Subprogram): Code cleanup.
10635 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
10636 (Get_Contract_Only_Missing_Body_Name): Removed.
10637
10638 2017-01-13 Javier Miranda <miranda@adacore.com>
10639
10640 * sem_ch6.adb (Cloned_Expression): New subprogram.
10641 (Freeze_Expr_Types): Complete previous patch since the expression
10642 of an expression-function may have iterators and loops with
10643 defining identifiers which, as part of the preanalysis of the
10644 expression, may be left decorated with itypes that will not be
10645 available in the tree passed to the backend.
10646
10647 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10648
10649 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
10650 conversion to Integer of an expression that is an attribute
10651 reference 'Pos on an enumeration type.
10652
10653 2017-01-13 Bob Duff <duff@adacore.com>
10654
10655 * atree.ads: Minor comment fix.
10656
10657 2017-01-13 Justin Squirek <squirek@adacore.com>
10658
10659 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
10660 calls in accessibility check on return statement.
10661
10662 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10663
10664 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10665 Ensure that the input body is a subprogram body before trying to
10666 determine whether it denoted an expression function. Note that
10667 subprogram body stubs cannot denote expression functions.
10668
10669 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10670
10671 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
10672 and typo fixes.
10673
10674 2017-01-13 Javier Miranda <miranda@adacore.com>
10675
10676 * einfo.ads (Component_Bit_Offset): Fix documentation.
10677 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
10678 on record holes for components with unknown compile-time offsets.
10679
10680 2017-01-13 Bob Duff <duff@adacore.com>
10681
10682 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
10683 * g-locfil.ads: Minor comment fix.
10684
10685 2017-01-13 Bob Duff <duff@adacore.com>
10686
10687 * binde.adb (Elab_New): New elaboration order algorithm
10688 that is expected to cause fewer ABE issues. This is a work in
10689 progress. The new algorithm is currently disabled, and can be
10690 enable by the -dp switch, or by modifying the Do_Old and Do_New
10691 etc. flags and rebuilding. Experimental code is included to
10692 compare the results of the old and new algorithms.
10693 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
10694 can have multiple of these tables, so the old and new algorithms
10695 can coexist.
10696 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
10697 parameter of type array. This avoids the global variable, and
10698 allows bounds checking (which is normally defeated by the tables
10699 packages). It also ensures that the Elab_Order is read-only
10700 to Bindgen.
10701 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
10702 subprograms that need it, as above.
10703 * debug.adb: Document new -dp switch. Modify doc of old -do
10704 switch.
10705 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
10706 and Bindgen. Move writing of closure (-R and -Ra switches)
10707 to Binde; that's more convenient.
10708
10709 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10710
10711 * sem_ch6.adb (Analyze_Expression_Function): If the expression
10712 function is a completion, all entities referenced in the
10713 expression are frozen. As a consequence, a reference to an
10714 uncompleted private type from an enclosing scope is illegal.
10715
10716 2017-01-13 Javier Miranda <miranda@adacore.com>
10717
10718 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
10719 (Analyze_Subprogram_Body_Helper): At the occurrence of an
10720 expression function declaration that is a completion, its
10721 expression causes freezing (AI12-0103).
10722
10723 2017-01-13 Vadim Godunko <godunko@adacore.com>
10724
10725 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
10726 Reference functions of Ada.Containers.Indefinite_Holders.
10727
10728 2017-01-13 Bob Duff <duff@adacore.com>
10729
10730 * s-os_lib.ads: Minor comment fixes.
10731
10732 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10733
10734 * exp_ch3.adb (Default_Initialize_Object): Do not default
10735 initialize an object when it is of a task type and restriction
10736 No_Tasking is in effect because the initialization is obsolete.
10737 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
10738 restriction No_Tasking is in effect.
10739 (Build_Master_Renaming): Do not rename a master when restriction
10740 No_Tasking is in effect.
10741
10742 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10743
10744 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
10745 the legality of An others clause applies as well to a choice in
10746 an Iterated_component_ association.
10747 (Resolve_Iterated_Component_Association): An others choice
10748 is legal.
10749 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
10750 Iterated_Component_Association is not static.
10751
10752 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10753
10754 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
10755 control is passed to the expresion handler before the new mode
10756 is set.
10757 * sem_ch12.adb (Analyze_Package_Instantiation,
10758 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
10759 in case control is passed to the expresion handler before the
10760 new mode is set.
10761
10762 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10763
10764 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
10765 exp_aggr.adb: Minor reformatting.
10766
10767 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10768
10769 * inline.adb: Minor reformatting and typo fix.
10770
10771 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10772
10773 * sem_util.ads, sem_util.adb (Choice_List): Move function here
10774 from sem_aggr.adb, for use elsewhere.
10775 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
10776 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
10777 Iterated_Component_Present.
10778 * exp_aggr.adb: Use Choice_List throughout, to handle
10779 Iterated_Component_Associations.
10780 (Gen_Loop): Generate proper loop for an
10781 Iterated_Component_Association: loop variable has the identifier
10782 of the original association. Generate a loop even for a single
10783 component choice, in order to make loop parameter visible in
10784 expression.
10785 (Flatten): An Iterated_Component_Association is not static.
10786
10787 2017-01-13 Yannick Moy <moy@adacore.com>
10788
10789 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
10790 float exponentiation for statically known small negative values
10791 is the reciprocal of the exponentiation for the opposite value
10792 of the exponent.
10793 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
10794 Ensure that the value of float exponentiation for negative values
10795 is the reciprocal of the exponentiation for the opposite value
10796 of the exponent.
10797 * inline.adb (Expand_Inlined_Call): Fix the count
10798 for the number of generated gotos.
10799
10800 2017-01-13 Yannick Moy <moy@adacore.com>
10801
10802 * inline.adb: Code cleanup.
10803 * sem_util.adb (Is_OK_Volatile_Context): Add
10804 expression in delay statement as OK for volatile context.
10805
10806 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10807
10808 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
10809 mode a choice that is a subtype with a static predicate is
10810 replaced by the values it covers. This transformation must not
10811 be performed in ASIS mode, to preserve the source for analysis.
10812
10813 2017-01-13 Justin Squirek <squirek@adacore.com>
10814
10815 * nlists.ads: Correct minor typo.
10816
10817 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10818
10819 * sem_ch13.adb: Minor reformatting and typo fix.
10820
10821 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10822
10823 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
10824 Iterated_Component_Association is a named association in an
10825 array aggregate.
10826 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
10827 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
10828 and resolve the discrete choices and the expression of the
10829 new construct.
10830 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
10831 Loop_Actions and Box_Present are attributes of
10832 N_Iterated_Component_Association nodes. Box_Present is always
10833 False in this case.
10834 * sprint.adb (Sprint_Node): An Iterated_Component_Association
10835 has a Discrete_Choices list, as specified in the RM. A
10836 Component_Association for aggregate uses instead a Choices list.
10837 We have to live with this small inconsistency because the new
10838 construct also has a defining identifier, and there is no way
10839 to merge the two node structures.
10840
10841 2017-01-13 Yannick Moy <moy@adacore.com>
10842
10843 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
10844 list of pragmas to remove. Remove pragmas from the list of
10845 statements in the body to inline.
10846 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
10847
10848 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10849
10850 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
10851 Analyze_Declarations, to analyze and resolve the expressions of
10852 aspect specifications in the current declarative list, so that
10853 the expressions have proper entity and type info. This is needed
10854 for ASIS when there is no subsequent expansion to generate this
10855 semantic information.
10856 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
10857 original expression, to suppress cascaded errors when expression
10858 has been constant-folded.
10859 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
10860 ASIS mode, because there is no subsequent expansion to decorate
10861 the tree.
10862
10863 2017-01-13 Yannick Moy <moy@adacore.com>
10864
10865 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
10866 New function to detect when a call may be inlined or not in
10867 GNATprove mode.
10868 (Expand_Inlined_Call): Ensure that a temporary
10869 is always created in the cases where a type conversion may be
10870 needed on an input parameter in GNATprove mode, so that GNATprove
10871 sees the check to perform.
10872 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
10873 when not applicable due to actual requiring type conversion
10874 with possible check but no temporary value can be copied for
10875 GNATprove to see the check.
10876
10877 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10878
10879 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
10880 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
10881 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
10882 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
10883 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
10884 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
10885 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
10886 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
10887 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
10888 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
10889 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
10890 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
10891 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
10892 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
10893 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
10894 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
10895 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
10896 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
10897 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
10898 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
10899 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
10900 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
10901 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
10902 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
10903 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
10904 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
10905 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
10906 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
10907 statements to reflect the new style for case alternatives. Various
10908 code clean up and reformatting.
10909
10910 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10911
10912 * exp_util.adb: Minor reformatting.
10913
10914 2017-01-13 Yannick Moy <moy@adacore.com>
10915
10916 * exp_spark.adb: Code cleanup.
10917 * sem_ch9.adb (Analyze_Delay_Until): Resolve
10918 expression so that calls are identified as such inside delay
10919 until.
10920
10921 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10922
10923 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
10924 * par-ch3.adb (P_Discrete_Choice_List): An
10925 Iterated_Component_Association is an array aggregate component.
10926 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
10927 (Is_Quantified_Expression): New function that performs a lookahead
10928 to distinguish quantified expressions from iterated component
10929 associations.
10930 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
10931 associations.
10932 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
10933 * sem.adb (Analyze): Handle Iterated_Component_Association.
10934 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
10935 component associations.
10936 * sinfo.ads, sinfo.adb: Entries for for
10937 N_Iterated_Component_Association and its fields.
10938 * sprint.adb (Sprint_Node_Actual): Handle
10939 N_Iterated_Component_Association.
10940
10941 2017-01-13 Justin Squirek <squirek@adacore.com>
10942
10943 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
10944 of the style check until after preanalysis of acutals.
10945
10946 2017-01-13 Yannick Moy <moy@adacore.com>
10947
10948 * sem_ch13.adb: Minor reformatting.
10949 * par-ch11.adb: minor style fix in whitespace
10950 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
10951 reduced to Add_Artificial_ALI_File; style fix in declaration of
10952 Text; grammar fix in comment.
10953 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
10954 * freeze.adb: Cleanup to pass pragma instead of
10955 expression to call.
10956 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
10957 replace System'To_Address by equivalent call.
10958
10959 2017-01-13 Arnaud Charlet <charlet@adacore.com>
10960
10961 * bindusg.adb: Improve usage output for -f switch.
10962
10963 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10964
10965 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
10966 Minor reformatting.
10967
10968 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10969
10970 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
10971 treat comparisons on strings as legal in a Static_Predicate.
10972 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
10973 a function call that is the expansion of a string comparison.The
10974 function call is built when compiling the corresponding predicate
10975 function, but the expression has been found legal as a static
10976 predicate during earlier analysis.
10977 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
10978 properly a function call that is the expansion of a string
10979 comparison operation, in order to recover the Static_Predicate
10980 expression and apply it to a static argument when needed.
10981
10982 2017-01-13 Tristan Gingold <gingold@adacore.com>
10983
10984 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
10985 (Open_Read): Re-implement using Open_Read_No_Exception.
10986 (Open_Write): Raise exception in case of error.
10987 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
10988 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
10989 reaise exception.
10990 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
10991
10992 2017-01-13 Yannick Moy <moy@adacore.com>
10993
10994 * checks.adb: Code cleanup.
10995
10996 2017-01-13 Yannick Moy <moy@adacore.com>
10997
10998 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
10999 expression instead of unanalyzed aspect expression for checking
11000 the validity of inheriting an operation. Also copy the expression
11001 being passing it to Build_Class_Wide_Expression, as this call
11002 modifies its argument.
11003 * sem_util.ads Fix comment to reference correct function name
11004 New_Copy_Tree.
11005
11006 2017-01-13 Javier Miranda <miranda@adacore.com>
11007
11008 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
11009 when we propagate information about the indexes back to the original
11010 indexing mode and the prefix of the index is a function call, do not
11011 remove any parameter from such call.
11012
11013 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11014
11015 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
11016 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
11017 a build-in-place function whose result type is tagged.
11018
11019 2017-01-13 Yannick Moy <moy@adacore.com>
11020
11021 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11022 Do not generate a wrapper when the only candidate is a class-wide
11023 subprogram.
11024 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
11025 inside a generic context.
11026
11027 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11028
11029 * exp_util.adb (Add_Inherited_Tagged_DIC):
11030 Pass the object parameters of both the parent and the derived
11031 type DIC procedure to the reference replacement circuitry.
11032 (Find_DIC_Type): Modify the circuitry to present the partial
11033 view of a private type in case the private type defines its own
11034 DIC pragma.
11035 (Replace_Object_And_Primitive_References): Add two
11036 optional formal parameters. Update the comment on usage. Update
11037 the replacement of references to object parameters.
11038
11039 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11040
11041 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
11042
11043 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11044
11045 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
11046 an out parameter that is a type conversion, independently of th
11047 range check that may apply to the expression of the conversion,
11048 for use in GNATProve.
11049
11050 2017-01-13 Yannick Moy <moy@adacore.com>
11051
11052 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
11053 GNATprove_Mode here to Frontend.
11054 * frontend.adb (Frontend): Move the implicit with for System
11055 in GNATprove_Mode here as it ismore correct this way; the old
11056 place only worked by chance, since there were no overloaded names.
11057 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
11058 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
11059 four attributes identified in SRM 9(18), add an implicit with
11060 to Ada.Task_Identification.
11061 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11062 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
11063 mode.
11064 * checks.adb (Apply_Discriminant_Check,
11065 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
11066 In GNATprove mode, we do not apply the checks, but we still
11067 analyze the expression to possibly issue errors on SPARK
11068 code when a run-time error can be detected at compile time.
11069 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
11070 in GNATprove mode.
11071
11072 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11073
11074 * expander.adb (Expand): Add a warning about using return
11075 statements in Ghost management code.
11076 * exp_ch3.adb (Freeze_Type): Add a warning about using return
11077 statements in Ghost management code.
11078 * exp_ch7.adb (Build_Invariant_Procedure_Body,
11079 Build_Invariant_Procedure_Declaration): Add a warning about
11080 using return statements in Ghost management code.
11081 * exp_disp.adb (Make_DT): Add a warning about using return
11082 statements in Ghost management code.
11083 * exp_util.adb (Build_DIC_Procedure_Body,
11084 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
11085 warning about using return statements in Ghost management code.
11086 * freeze.adb (Freeze_Entity): Add a warning about using return
11087 statements in Ghost management code.
11088 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
11089 statements in Ghost management code.
11090 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
11091 a warning about using return statements in Ghost management code.
11092 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
11093 return statements in Ghost management code.
11094 * sem_ch6.adb (Analyze_Procedure_Call,
11095 Analyze_Subprogram_Body_Helper): Add a warning about using return
11096 statements in Ghost management code.
11097 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
11098 using return statements in Ghost management code.
11099 * sem_ch12.adb (Analyze_Package_Instantiation,
11100 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
11101 Instantiate_Subprogram_Body): Add a warning about using return
11102 statements in Ghost management code.
11103 * sem_ch13.adb (Build_Predicate_Functions,
11104 Build_Predicate_Function_Declarations): Add a warning about
11105 using return statements in Ghost management code.
11106 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
11107 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
11108 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
11109 using return statements in Ghost management code.
11110
11111 2017-01-13 Tristan Gingold <gingold@adacore.com>
11112
11113 * s-mmosin-mingw.adb: Fix pragma import.
11114
11115 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11116
11117 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
11118 codepeer mode.
11119
11120 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11121
11122 * atree.adb (Allocate_Initialize_Node): A newly created node is
11123 no longer marked as Ghost at this level.
11124 (Mark_New_Ghost_Node): New routine.
11125 (New_Copy): Mark the copy as Ghost.
11126 (New_Entity): Mark the entity as Ghost.
11127 (New_Node): Mark the node as Ghost.
11128 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
11129 apply to unanalyzed entities.
11130 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
11131 entities.
11132 (Set_Is_Checked_Ghost_Entity): This attribute now
11133 applies to all entities as well as unanalyzed entities.
11134 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
11135 all entities as well as unanalyzed entities.
11136 * expander.adb Add with and use clauses for Ghost.
11137 (Expand): Install and revert the Ghost region associated with the node
11138 being expanded.
11139 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
11140 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
11141 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
11142 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
11143 (Freeze_Type): Install and revert the Ghost region associated
11144 with the type being frozen.
11145 * exp_ch5.adb Remove with and use clauses for Ghost.
11146 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
11147 * exp_ch6.adb Remove with and use clauses for Ghost.
11148 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
11149 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
11150 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
11151 Ghost region of the working type.
11152 (Build_Invariant_Procedure_Declaration): Install and revert
11153 the Ghost region of the working type.
11154 (Expand_N_Package_Body): Remove all Ghost-related code.
11155 * exp_ch8.adb Remove with and use clauses for Ghost.
11156 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
11157 code.
11158 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
11159 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
11160 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
11161 code.
11162 * exp_ch13.adb Remove with and use clauses for Ghost.
11163 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
11164 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
11165 the tagged type. Move the generation of various entities within
11166 the Ghost region of the type.
11167 * exp_prag.adb Remove with and use clauses for Ghost.
11168 (Expand_Pragma_Check): Remove all Ghost-related code.
11169 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
11170 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
11171 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
11172 * exp_util.adb (Build_DIC_Procedure_Body): Install
11173 and revert the Ghost region of the working types.
11174 (Build_DIC_Procedure_Declaration): Install and revert the
11175 Ghost region of the working type.
11176 (Make_Invariant_Call): Install and revert the Ghost region of the
11177 associated type.
11178 (Make_Predicate_Call): Reimplemented. Install and revert the
11179 Ghost region of the associated type.
11180 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
11181 of the entity being frozen.
11182 (New_Freeze_Node): Removed.
11183 * ghost.adb Remove with and use clauses for Opt.
11184 (Check_Ghost_Completion): Update the parameter profile
11185 and all references to formal parameters.
11186 (Ghost_Entity): Update the comment on usage.
11187 (Install_Ghost_Mode): New routines.
11188 (Is_Ghost_Assignment): New routine.
11189 (Is_Ghost_Declaration): New routine.
11190 (Is_Ghost_Pragma): New routine.
11191 (Is_Ghost_Procedure_Call): New routine.
11192 (Is_Ghost_Renaming): Removed.
11193 (Is_OK_Declaration): Reimplemented.
11194 (Is_OK_Pragma): Reimplemented.
11195 (Is_OK_Statement): Reimplemented.
11196 (Is_Subject_To_Ghost): Update the comment on usage.
11197 (Mark_And_Set_Ghost_Assignment): New routine.
11198 (Mark_And_Set_Ghost_Body): New routine.
11199 (Mark_And_Set_Ghost_Completion): New routine.
11200 (Mark_And_Set_Ghost_Declaration): New routine.
11201 (Mark_And_Set_Ghost_Instantiation): New routine.
11202 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11203 (Mark_Full_View_As_Ghost): Removed.
11204 (Mark_Ghost_Declaration_Or_Body): New routine.
11205 (Mark_Ghost_Pragma): New routine.
11206 (Mark_Ghost_Renaming): New routine.
11207 (Mark_Pragma_As_Ghost): Removed.
11208 (Mark_Renaming_As_Ghost): Removed.
11209 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
11210 (Prune_Node): Freeze nodes no longer need special pruning, they
11211 are processed by the general ignored Ghost code mechanism.
11212 (Restore_Ghost_Mode): New routine.
11213 (Set_Ghost_Mode): Reimplemented.
11214 (Set_Ghost_Mode_From_Entity): Removed.
11215 * ghost.ads Add with and use clauses for Ghost.
11216 (Check_Ghost_Completion): Update the parameter profile
11217 along with the comment on usage.
11218 (Install_Ghost_Mode): New routine.
11219 (Is_Ghost_Assignment): New routine.
11220 (Is_Ghost_Declaration): New routine.
11221 (Is_Ghost_Pragma): New routine.
11222 (Is_Ghost_Procedure_Call): New routine.
11223 (Mark_And_Set_Ghost_Assignment): New routine.
11224 (Mark_And_Set_Ghost_Body): New routine.
11225 (Mark_And_Set_Ghost_Completion): New routine.
11226 (Mark_And_Set_Ghost_Declaration): New routine.
11227 (Mark_And_Set_Ghost_Instantiation): New routine.
11228 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11229 (Mark_Full_View_As_Ghost): Removed.
11230 (Mark_Ghost_Pragma): New routine.
11231 (Mark_Ghost_Renaming): New routine.
11232 (Mark_Pragma_As_Ghost): Removed.
11233 (Mark_Renaming_As_Ghost): Removed.
11234 (Restore_Ghost_Mode): New routine.
11235 (Set_Ghost_Mode): Redefined.
11236 (Set_Ghost_Mode_From_Entity): Removed.
11237 * sem.adb (Analyze): Install and revert the Ghost region of the
11238 node being analyzed.
11239 (Do_Analyze): Change the way a clean Ghost
11240 region is installed and reverted.
11241 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
11242 all Ghost-related code.
11243 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
11244 (Analyze_Number_Declaration): Remove all Ghost-related code.
11245 (Analyze_Object_Declaration): Install and revert the Ghost region of
11246 a deferred object declaration's completion.
11247 (Array_Type_Declaration): Remove all Ghost-related code.
11248 (Build_Derived_Type): Update the comment on
11249 the propagation of Ghost attributes from a parent to a derived type.
11250 (Derive_Subprogram): Remove all Ghost-related code.
11251 (Make_Class_Wide_Type): Remove all Ghost-related code.
11252 (Make_Implicit_Base): Remove all Ghost-related code.
11253 (Process_Full_View): Install and revert the Ghost region of
11254 the partial view. There is no longer need to check the Ghost
11255 completion here.
11256 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
11257 region of the left hand side.
11258 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
11259 all Ghost-related code.
11260 (Analyze_Expression_Function): Remove all Ghost-related code.
11261 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
11262 (Analyze_Procedure_Call): Install and revert the Ghost region of
11263 the procedure being called.
11264 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
11265 region of the spec or body.
11266 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
11267 (Build_Subprogram_Declaration): Remove all Ghost-related code.
11268 (Find_Corresponding_Spec): Remove all Ghost-related code.
11269 (Process_Formals): Remove all Ghost-related code.
11270 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
11271 the Ghost region of the spec.
11272 (Analyze_Package_Declaration): Remove all Ghost-related code.
11273 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
11274 Ghost when it aliases a Ghost entity.
11275 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
11276 a Ghost entity.
11277 (Analyze_Object_Renaming): Mark a renaming as Ghost when
11278 it aliases a Ghost entity.
11279 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
11280 a Ghost entity.
11281 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
11282 aliases a Ghost entity.
11283 * sem_ch11.adb Remove with and use clauses for Ghost.
11284 (Analyze_Exception_Declaration): Remove all Ghost-related code.
11285 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
11286 Ghost-related code.
11287 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
11288 code.
11289 (Analyze_Package_Instantiation): Install and revert the Ghost region
11290 of the package instantiation.
11291 (Analyze_Subprogram_Instantiation): Install
11292 and revert the Ghost region of the subprogram instantiation.
11293 (Instantiate_Package_Body): Code clean up. Install and revert the
11294 Ghost region of the package body.
11295 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
11296 Ghost region of the subprogram body.
11297 * sem_ch13.adb (Build_Predicate_Functions): Install
11298 and revert the Ghost region of the related type.
11299 (Build_Predicate_Function_Declaration): Code clean up. Install
11300 and rever the Ghost region of the related type.
11301 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
11302 Install and revert the Ghost region of the pragma.
11303 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
11304 Ghost region of the pragma.
11305 (Analyze_Pragma): Install and revert the Ghost region of various
11306 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
11307 or encloses a Ghost entity.
11308 (Analyze_Pre_Post_Condition): Install and revert the Ghost
11309 region of the pragma.
11310 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
11311 Ghost region of the pragma.
11312 * sem_res.adb (Resolve): Remove all Ghost-related code.
11313 * sem_util.adb (Is_Declaration): Reimplemented.
11314 (Is_Declaration_Other_Than_Renaming): New routine.
11315 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
11316 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
11317 (Is_Ghost_Pragma): Removed.
11318 (Is_Ignored_Ghost_Pragma): New routine.
11319 (Set_Is_Checked_Ghost_Pragma): New routine.
11320 (Set_Is_Ghost_Pragma): Removed.
11321 (Set_Is_Ignored_Ghost_Pragma): New routine.
11322 * sinfo.ads: Update the documentation on Ghost mode and
11323 Ghost regions. New attributes Is_Checked_Ghost_Pragma
11324 and Is_Ignored_Ghost_Pragma along with usages in nodes.
11325 Remove attribute Is_Ghost_Pragma along with usages in nodes.
11326 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11327 (Is_Ghost_Pragma): Removed along with pragma Inline.
11328 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11329 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11330 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
11331 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11332
11333 2017-01-12 Tristan Gingold <gingold@adacore.com>
11334
11335 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
11336 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
11337
11338 2017-01-12 Yannick Moy <moy@adacore.com>
11339
11340 * errout.adb, errout.ads (Initialize): Factor common treatment
11341 in Reset_Warnings.
11342 (Reset_Warnings): New procedure to reset counts related to warnings.
11343 (Record_Compilation_Errors): New variable to store the presence of an
11344 error, used in gnat2why to allow changing the Warning_Mode.
11345 (Compilation_Errors): Use new variable Record_Compilation_Errors to
11346 store the presence of an error.
11347
11348 2017-01-12 Javier Miranda <miranda@adacore.com>
11349
11350 * sem_ch13.adb (Analyze_Aspect_Specifications):
11351 For Interrupt_Handler and Attach_ Handler aspects, decorate the
11352 internally built reference to the protected procedure as coming
11353 from sources and force its analysis.
11354
11355 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11356
11357 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
11358 inherit predicates if any from the first_subtype of the parent,
11359 not from the anonymous parent type.
11360 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
11361 predicate is not a static subtype.
11362
11363 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11364
11365 * freeze.adb (Check_Suspicious_Convention): New procedure
11366 performing a warning check on discriminated record types with
11367 convention C or C++. Factored out of procedure Freeze_Record_Type,
11368 and changed to only apply to base types (to avoid spurious
11369 warnings on subtypes). Minor improvement of warning messages
11370 to refer to discriminated rather than variant record types.
11371 (Freeze_Record_Type): Remove code for performing a suspicious
11372 convention check.
11373 (Freeze_Entity): Only call Freeze_Record_Type
11374 on types that aren't declared within any enclosing generic units
11375 (rather than just excluding the type when the innermost scope
11376 is generic). Call Check_Suspicious_Convention whether or not
11377 the type is declared within a generic unit.
11378 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
11379 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
11380 from Sem_Ch8).
11381
11382 2017-01-12 Tristan Gingold <gingold@adacore.com>
11383
11384 * sysdep.c, adaint.c, rtinit.c, ming32.h:
11385 (__gnat_current_codepage): Renamed from CurrentCodePage
11386 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
11387
11388 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11389
11390 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
11391 quantified expressions, following AI12-050: the loop parameters
11392 of two quantified expressions are conformant if they have the
11393 same identifier.
11394
11395 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11396
11397 * gcc-interface/Makefile.in: Clean up VxWorks targets.
11398
11399 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11400
11401 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
11402 Hnadle properly the attribute reference when it appears as part
11403 of an expression in another loop aspect.
11404
11405 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11406
11407 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
11408 subsidiary of Build_Initialization_Call, to complete generation
11409 of predicate checks on discriminants whose (sub)types have
11410 predicates, and to add checks on variants that do not have an
11411 others clause.
11412 * sem_util.adb (Gather_Components): A missing Others alternative is
11413 not an error when the type of the discriminant is a static predicate
11414 (and coverage has been checked when analyzing the case statement). A
11415 runtime check is generated to verify that a given discriminant
11416 satisfies the predicate (RM 3.8.1. (21.1/2)).
11417
11418 2017-01-12 Yannick Moy <moy@adacore.com>
11419
11420 * gnat1drv.adb (Adjust_Global_Switches): Only
11421 perform checking of exception mechanism when generating code.
11422
11423 2017-01-12 Justin Squirek <squirek@adacore.com>
11424
11425 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
11426 Remove handling of access component with invariant.
11427 (Build_Invariant_Procedure_Declaration): Remove return on class
11428 wide type.
11429 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
11430 conditional exception for component or array so Has_Own_Invariants
11431 flag is not falsly set.
11432 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
11433 wide type to have no invariant flags.
11434
11435 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11436
11437 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
11438 sem_ch13.adb: Minor reformatting.
11439
11440 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11441
11442 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
11443 adjustment primitive when the ancestor type was not properly frozen.
11444 (Gen_Assign): Guard against a missing initialization
11445 primitive when the component type was not properly frozen.
11446 (Initialize_Array_Component): Guard against a missing adjustment
11447 primitive when the component type was not properly frozen.
11448 (Initialize_Record_Component): Guard against a missing adjustment
11449 primitive when the component type was not properly frozen.
11450 (Process_Transient_Component_Completion): The transient object may
11451 not be finalized when its associated type was not properly frozen.
11452 * exp_ch3.adb (Build_Assignment): Guard against a missing
11453 adjustment primitive when the component type was not properly frozen.
11454 (Build_Initialization_Call): Guard against a missing
11455 initialization primitive when the associated type was not properly
11456 frozen.
11457 (Expand_N_Object_Declaration): Guard against a missing
11458 adjustment primitive when the base type was not properly frozen.
11459 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
11460 body when there is no adjustment primitive available. Create an
11461 empty Deep_Finalize body when there is no finalization primitive
11462 available.
11463 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
11464 missing finalization primitive when the designated type was
11465 not properly frozen.
11466 (Expand_N_Allocator): Guard against a missing initialization primitive
11467 when the designated type was not properly frozen.
11468 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
11469 only when the corresponding adjustment primitive is available.
11470 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
11471 adjustment/finalization statements only when there is an available
11472 primitive to carry out the action.
11473 (Build_Initialize_Statements): Generate the initialization/finalization
11474 statements only when there is an available primitive to carry out the
11475 action.
11476 (Make_Adjust_Call): Do not generate a call when the underlying
11477 type is not present due to a possible missing full view.
11478 (Make_Final_Call): Do not generate a call when the underlying
11479 type is not present due to a possible missing full view.
11480 (Make_Finalize_Address_Stmts): Generate an empty body when the
11481 designated type lacks a finalization primitive.
11482 (Make_Init_Call): Do not generate a call when the underlying type is
11483 not present due to a possible missing full view.
11484 (Process_Component_For_Adjust): Add the adjustment call only when the
11485 corresponding adjustment primitive is available.
11486 (Process_Component_For_Finalize): Add the finalization call only when
11487 the corresponding finalization primitive is available.
11488 (Process_Object_Declaration): Use a null statement to emulate a
11489 missing call to the finalization primitive of the object type.
11490 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
11491 (Make_Final_Call): Update the comment on usage.
11492 (Make_Init_Call): Update the comment on usage.
11493 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
11494
11495 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11496
11497 * einfo.ads: Update documentation of Address_Taken.
11498 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
11499 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
11500 for subprograms when setting Address_Taken flag.
11501
11502 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11503
11504 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
11505 Configurable_Run_Time_Mode off when analysing with'ed predefined
11506 libraries.
11507
11508 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11509
11510 * sem_prag.adb: Minor reformatting.
11511 * sem_util.adb (Unique_Entity): fix result for
11512 bodies of entry families.
11513
11514 2017-01-12 Justin Squirek <squirek@adacore.com>
11515
11516 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
11517 Resolve_Suppressible in the pragma Assertion_Policy case.
11518 (Resolve_Suppressible): Created this function to factor out
11519 common code used to resolve Suppress to either Ignore or Check
11520 * snames.ads-tmpl: Add name for Suppressible.
11521
11522 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11523
11524 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
11525 reformatting.
11526 * debug.adb: Minor comment fixes.
11527
11528 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11529
11530 * sem_util.adb (Unique_Entity): For concurrent
11531 bodies that are defined with stubs and complete a declaration
11532 of a single concurrent object return the entity of an implicit
11533 concurrent type, not the entity of the anonymous concurrent
11534 object.
11535 * debug.adb: -gnatd.J is no longer used.
11536 * make.adb (Globalize): Removed, no longer used.
11537 * sem_ch9.adb: minor typo in comment for entry index
11538
11539 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11540
11541 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11542 * exp_ch3.adb (Build_Init_Statements): As part of initialising
11543 the value record of a task, set its _Secondary_Stack_Size field
11544 if present.
11545 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11546 a _Secondary_Stack_Size field in the value record of
11547 the task if a Secondary_Stack_Size rep item is present.
11548 (Make_Task_Create_Call): Include secondary stack size
11549 parameter. If No_Secondary_Stack restriction is in place, passes
11550 stack size of 0.
11551 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11552 Secondary_Stack_Size.
11553 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11554 function to define the overhead of the secondary stack.
11555 * s-tarest.adb (Create_Restricted_Task,
11556 Create_Restricted_Task_Sequential): Functions now include
11557 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11558 * s-tarest.adb (Create_Restricted_Task,
11559 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
11560 include Secondary_Stack_Size parameter.
11561 (Task_Wrapper): Secondary stack now allocated to the size specified by
11562 the Secondary_Stack_Size parameter in the task's ATCB.
11563 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
11564 Secondary_Stack_Size component.
11565 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
11566 Create_Restricted_Task_Sequential): Function now include
11567 Secondary_Stack_Size parameter.
11568 (Task_Wrapper): Secondary stack now allocated to the size
11569 specified by the Secondary_Stack_Size parameter in the task's
11570 ATCB.
11571 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
11572 to include Secondary_Stack_Size parameter.
11573 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
11574 Secondary_Stack_Size aspect, turning the aspect into its corresponding
11575 internal attribute.
11576 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
11577 * snames.adb-tmpl, snames.ads-tmpl: Added names
11578 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
11579 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
11580
11581 2017-01-12 Yannick Moy <moy@adacore.com>
11582
11583 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
11584 subtree.
11585
11586 2017-01-12 Justin Squirek <squirek@adacore.com>
11587
11588 * exp_attr.adb (Expand_N_Attribute_Reference):
11589 Fix Finalization_Size case by properly resolving the type after
11590 rewritting the node.
11591
11592 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11593
11594 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
11595 the tree.
11596 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
11597 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
11598 exp_sel.ads: Minor reformatting.
11599
11600 2017-01-12 Justin Squirek <squirek@adacore.com>
11601
11602 * exp_ch6.adb (Expand_Call): Add guard to prevent
11603 invariant checks from being created for internally generated
11604 subprograms.
11605
11606 2017-01-12 Bob Duff <duff@adacore.com>
11607
11608 * lib-writ.ads: Remove incorrect comment.
11609
11610 2017-01-12 Javier Miranda <miranda@adacore.com>
11611
11612 * debug.adb (-gnatd.K): Enable generation of contract-only
11613 procedures in CodePeer mode.
11614 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
11615 New subprogram.
11616 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
11617 set.
11618 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
11619 subprogram.
11620 (Get_Contract_Only_Missing_Body_Name): New subprogram.
11621 (Get_Contract_Only_Body): New subprogram.
11622 (Set_Contract_Only_Body): New subprogram.
11623 (Is_Contract_Only_Body): New subprogram.
11624 (Set_Is_Contract_Only_Body): New subprogram.
11625 (SCIL_Nodes): Replace table by hash-table.
11626
11627 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11628
11629 * exp_ch6.adb: Minor reformatting.
11630 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
11631
11632 2017-01-12 Bob Duff <duff@adacore.com>
11633
11634 * binde.adb (Forced): New reason for a dependence.
11635 (Force_Elab_Order): Implementation of the new switch.
11636 * binde.ads: Minor comment fixes.
11637 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
11638 long ago that is no longer supported; removed comment about that.
11639 * opt.ads (Force_Elab_Order_File): Name of file specified for
11640 -f switch.
11641 * switch-b.adb: Parse -f switch.
11642
11643 2017-01-12 Justin Squirek <squirek@adacore.com>
11644
11645 * exp_ch6.adb (Check_View_Conversion): Created this function
11646 to properly chain calls to check type invariants that may be
11647 present in a subprogram call after the subprogram.
11648 (Expand_Call): Add a conditional to identify when a view conversion
11649 needs to be checked.
11650 * nlists.adb, nlists.ads (Prepend_New): New routine.
11651 (Prepend_New_To): New routine.
11652
11653 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11654
11655 * sinfo.ads: Minor reformatting.
11656
11657 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11658
11659 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
11660 reformatting.
11661
11662 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11663
11664 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
11665 variable Definite. Create a local object and pass its 'Access to the
11666 BIP function when the result type is either definite or it does not
11667 require any finalization or secondary stack management.
11668
11669 2017-01-12 Bob Duff <duff@adacore.com>
11670
11671 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
11672 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
11673 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
11674 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
11675 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
11676 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
11677 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
11678 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
11679 Change name to Pragma_Name_Unmapped.
11680 (Pragma_Name_Mapped): Change name to Pragma_Name.
11681 This is because the "mapped" version should be the usual case.
11682
11683 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
11684
11685 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
11686 Is_Default_Init_Cond_Procedure, and
11687 Has_Inherited_Default_Init_Cond. Add uses of flags
11688 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
11689 (Default_Init_Cond_Procedure): Removed.
11690 (DIC_Procedure): New routine.
11691 (Has_Default_Init_Cond): Removed.
11692 (Has_DIC): New routine.
11693 (Has_Inheritable_Invariants): The attribute applies to the base type.
11694 (Has_Inherited_Default_Init_Cond): Removed.
11695 (Has_Inherited_DIC): New routine.
11696 (Has_Inherited_Invariants): The attribute applies to the base type.
11697 (Has_Own_DIC): New routine.
11698 (Has_Own_Invariants): The attribute applies to the base type.
11699 (Is_Default_Init_Cond_Procedure): Removed.
11700 (Is_DIC_Procedure): New routine.
11701 (Set_Default_Init_Cond_Procedure): Removed.
11702 (Set_DIC_Procedure): New routine.
11703 (Set_Has_Default_Init_Cond): Removed.
11704 (Set_Has_Inheritable_Invariants): The attribute applies
11705 to the base type.
11706 (Set_Has_Inherited_Default_Init_Cond): Removed.
11707 (Set_Has_Inherited_DIC): New routine.
11708 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
11709 (Set_Has_Own_DIC): New routine.
11710 (Set_Has_Own_Invariants): The attribute applies to the base type.
11711 (Set_Is_Default_Init_Cond_Procedure): Removed.
11712 (Set_Is_DIC_Procedure): New routine.
11713 (Write_Entity_Flags): Update the output of all flags related to
11714 default initial condition.
11715 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
11716 of the call to the DIC procedure.
11717 (Freeze_Type): Generate the body of the DIC procedure.
11718 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
11719 all occurrences of Create_Append with Append_New_To. Do
11720 not generate an invariant procedure for a class-wide type.
11721 The generated body acts as a freeze action of the working type.
11722 (Build_Invariant_Procedure_Declaration): Do not generate an
11723 invariant procedure for a class-wide type.
11724 (Create_Append): Removed.
11725 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
11726 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
11727 class-wide pre/postcondition description and data structures from
11728 Sem_Prag.
11729 (Build_Class_Wide_Expression): Moved from Sem_Prag.
11730 (Build_DIC_Call): New routine.
11731 (Build_DIC_Procedure_Body): New routine.
11732 (Build_DIC_Procedure_Declaration): New routine.
11733 (Entity_Hash): Moved from Sem_Prag.
11734 (Find_DIC_Type): New routine.
11735 (Update_Primitives_Mapping): Reimplemented.
11736 (Update_Primitives_Mapping_Of_Types): New routine.
11737 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
11738 (Build_DIC_Call): New routine.
11739 (Build_DIC_Procedure_Body): New routine.
11740 (Build_DIC_Procedure_Declaration): New routine.
11741 (Update_Primitives_Mapping): Moved from Sem_Prag.
11742 (Update_Primitives_Mapping_Of_Types): New routine.
11743 * nlists.adb (Append_New): New routine.
11744 (Append_New_To): New routine.
11745 * nlists.ads (Append_New): New routine.
11746 (Append_New_To): New routine.
11747 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
11748 of DIC procedures here. This is now done at the end of the
11749 visible declarations, private declarations, and at the freeze
11750 point of a type.
11751 (Analyze_Private_Extension_Declaration):
11752 A private extension inherits the DIC pragma of a parent type.
11753 (Analyze_Subtype_Declaration): No need to propagate invariant
11754 attributes to a subtype as those apply to the base type.
11755 (Build_Derived_Record_Type): No need to inherit invariants here
11756 as this is now done in Build_Derived_Type.
11757 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
11758 a parent type.
11759 (Process_Full_View): Update the propagation of DIC attributes.
11760 (Propagate_Default_Init_Cond_Attributes): Removed.
11761 * sem_ch7.adb Add with and use clauses for Exp_Util.
11762 (Analyze_Package_Specification): Create the body of the DIC
11763 procedure at the end of the visible and private declarations.
11764 (Preserve_Full_Attributes): Propagate DIC attributes.
11765 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
11766 DIC attributes.
11767 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
11768 * sem_elab.adb (Check_A_Call): Update the call to
11769 Is_Nontrivial_Default_Init_Cond_Procedure.
11770 * sem_prag.adb Remove the with and use clauses for
11771 GNAT.HTable. Move the handling of class- wide pre/postcondition
11772 description and data structures to Exp_Util.
11773 (Analyze_Pragma): Create the declaration of the DIC procedure. There
11774 is no need to propagate invariant-related attributes at this point
11775 as this is done in Build_Invariant_Procedure_Declaration.
11776 (Build_Class_Wide_Expression): Moved to Exp_Util.
11777 (Entity_Hash): Moved to Exp_Util.
11778 (Update_Primitives_Mapping): Moved to Exp_Util.
11779 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
11780 (Update_Primitives_Mapping): Moved to Exp_Util.
11781 * sem_util.adb: Remove with and use clauses for Ghost
11782 and Sem_Ch13.
11783 (Build_Default_Init_Cond_Call): Removed.
11784 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11785 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11786 (Get_Views): Reimplemented.
11787 (Has_Full_Default_Initialization): Reimplement the section on DIC.
11788 (Inherit_Default_Init_Cond_Procedure): Removed.
11789 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11790 (Is_Nontrivial_DIC_Procedure): New routine.
11791 (Is_Verifiable_DIC_Pragma): New routine.
11792 (Propagate_DIC_Attributes): New routine.
11793 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
11794 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11795 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11796 (Inherit_Default_Init_Cond_Procedure): Removed.
11797 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11798 (Is_Nontrivial_DIC_Procedure): New routine.
11799 (Is_Verifiable_DIC_Pragma): New routine.
11800 (Propagate_DIC_Attributes): New routine.
11801 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
11802 on DIC.
11803 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
11804 usage in nodes.
11805 (Expression_Copy): New routine along with pragma Inline.
11806 (Set_Expression_Copy): New routine along with pragma Inline.
11807
11808 2017-01-06 Bob Duff <duff@adacore.com>
11809
11810 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
11811 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
11812 we won't generate the call to s_stalib_adafinal when the main
11813 is not written in Ada.
11814
11815 2017-01-06 Bob Duff <duff@adacore.com>
11816
11817 * sem_prag.adb: Minor: remove pragma Warnings.
11818
11819 2017-01-06 Tristan Gingold <gingold@adacore.com>
11820
11821 * Makefile.rtl: Do not compile s-stchop by default.
11822
11823 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
11824
11825 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
11826 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
11827 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
11828 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
11829 Reverted previous change for now.
11830
11831 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11832
11833 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
11834 check to default discriminant value if checks are enabled.
11835 (Build_Assignment): If type of component has static predicate,
11836 apply check to its default value, if any.
11837
11838 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
11839
11840 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11841 * exp_ch3.adb (Build_Init_Statements): As part of initialising
11842 the value record of a task, set its _Secondary_Stack_Size field
11843 if present.
11844 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11845 a _Secondary_Stack_Size field in the value record of
11846 the task if a Secondary_Stack_Size rep item is present.
11847 (Make_Task_Create_Call): Include secondary stack size
11848 parameter. If No_Secondary_Stack restriction is in place, passes
11849 stack size of 0.
11850 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11851 Secondary_Stack_Size.
11852 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11853 function to define the overhead of the secondary stack.
11854 * s-tarest.adb (Create_Restricted_Task,
11855 Create_Restricted_Task_Sequential): Functions now include
11856 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11857 * s-tarest.adb (Create_Restricted_Task,
11858 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
11859 now include Secondary_Stack_Size parameter.
11860 (Task_Wrapper):
11861 Secondary stack now allocated to the size specified by the
11862 Secondary_Stack_Size parameter in the task's ATCB.
11863 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
11864 Secondary_Stack_Size component.
11865 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
11866 Create_Restricted_Task_Sequential): Function now include
11867 Secondary_Stack_Size parameter.
11868 (Task_Wrapper): Secondary stack
11869 now allocated to the size specified by the Secondary_Stack_Size
11870 parameter in the task's ATCB.
11871 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
11872 for Secondary_Stack_Size aspect, turning the aspect into its
11873 corresponding internal attribute.
11874 (Analyze_Attribute_Definition):
11875 Process Secondary_Stack_Size attribute.
11876 * snames.adb-tmpl, snames.ads-tmpl: Added names
11877 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
11878 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
11879
11880 2017-01-06 Pascal Obry <obry@adacore.com>
11881
11882 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
11883 Sequential_IO and Direct_IO.
11884
11885 2017-01-06 Bob Duff <duff@adacore.com>
11886
11887 * snames.ads-tmpl (Renamed): New name for the pragma argument.
11888 * par-ch2.adb: Allow the new pragma (with analysis deferred
11889 to Sem_Prag).
11890 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
11891 Keep a mapping from new pragma names to old names.
11892 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
11893 implement it by calling Map_Pragma_Name.
11894 * checks.adb, contracts.adb, einfo.adb, errout.adb,
11895 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
11896 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
11897 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
11898 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
11899 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
11900 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
11901 as appropriate.
11902
11903 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11904
11905 * exp_ch9.adb: Minor reformatting.
11906
11907 2017-01-06 Tristan Gingold <gingold@adacore.com>
11908
11909 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
11910 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
11911 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
11912 (unused).
11913 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
11914 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
11915 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
11916 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
11917
11918 2017-01-06 Bob Duff <duff@adacore.com>
11919
11920 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
11921 dummy implementation of Map_Pragma_Name.
11922
11923 2017-01-06 Tristan Gingold <gingold@adacore.com>
11924
11925 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
11926 entry_body variable constant.
11927 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
11928 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
11929 to constant.
11930 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
11931 now access to constant.
11932
11933 2017-01-06 Gary Dismukes <dismukes@adacore.com>
11934
11935 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
11936 reformatting and typo fixes.
11937
11938 2017-01-06 Bob Duff <duff@adacore.com>
11939
11940 * snames.ads-tmpl: New names for pragma renaming.
11941 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
11942 * par-prag.adb: Add new pragma name to case statement.
11943 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
11944 of the pragma.
11945 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
11946 Dummy implementation of Pragma_Name_Mapped.
11947
11948 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11949
11950 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
11951 better detect call within an entry_wrapper.
11952 * sem_res.adb (Resolve_Call): A protected call within an
11953 entity_wrapper is analyzed in the context of the protected
11954 object but corresponds to a pre-analysis and is not an access
11955 before elaboration.
11956 * sem_attr.adb: Minor reformatting.
11957
11958 2017-01-06 Justin Squirek <squirek@adacore.com>
11959
11960 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
11961 Finalization_Size to allow a prefix of any non-class-wide type.
11962 * sem_attr.ads Modify comment for Finalization_Size to include
11963 definite type use case.
11964
11965 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11966
11967 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
11968 on procedures that are wrappers created for entries that have
11969 preconditions.
11970 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
11971 body is an entry_wrapper, compile it in the context of the
11972 synchronized type, because a precondition may refer to funtions
11973 of the type.
11974 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
11975 body entity.
11976 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
11977 within an Entry_Wrapper this is an external call whose target
11978 is the synchronized object that is the actual in the call to
11979 the wrapper.
11980
11981 2017-01-06 Yannick Moy <moy@adacore.com>
11982
11983 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
11984 in tree, which means not analyzing the previous prefix if the node has
11985 been rewritten into its prefix.
11986
11987 2017-01-06 Gary Dismukes <dismukes@adacore.com>
11988
11989 * s-tpobop.adb: Minor reformatting.
11990
11991 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11992
11993 * checks.adb (Ensure_Valid): Do not generate a validity check
11994 within a generated predicate function, validity checks will have
11995 been applied earlier when required.
11996
11997 2017-01-06 Tristan Gingold <gingold@adacore.com>
11998
11999 * s-tpoben.ads (Protection_Entries): Add comment and reorder
12000 components for performances.
12001 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
12002 semantic.
12003
12004 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12005
12006 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
12007 If expression is compile-time known and obeys a static predicate
12008 it must be labelled as static, to prevent spurious warnings and
12009 run-time errors, e.g. in case statements. This is relevant when
12010 the expression is the result of constant-folding a type conversion
12011 whose expression is a variable with a known static value.
12012
12013 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12014
12015 * exp_attr.adb, sem_attr.ads: Minor reformatting.
12016
12017 2017-01-06 Justin Squirek <squirek@adacore.com>
12018
12019 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
12020 expansion of Finalization_Size attribute.
12021 * sem_attr.adb (Analyze_Attribute): Add entry to check the
12022 semantics of Finalization_Size.
12023 (Eval_Attribute): Add null entry for Finalization_Size.
12024 * sem_attr.ads: Add Finalization_Size to the implementation
12025 dependent attribute list.
12026 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
12027
12028 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12029
12030 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
12031 iterator specification with a serious syntactic error, transform
12032 construct into an infinite loop in order to continue analysis
12033 and prevent a compiler abort.
12034
12035 2017-01-06 Tristan Gingold <gingold@adacore.com>
12036
12037 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
12038 max_queue_lengths_array if unused.
12039
12040 2017-01-06 Bob Duff <duff@adacore.com>
12041
12042 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
12043 array access, in case "\" is at the end of Text.
12044 * stylesw.adb (Set_Style_Check_Options): Don't include input
12045 characters in the error message template, because they could
12046 be control characters such as "\", which Errout will try to
12047 interpret.
12048
12049 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12050
12051 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
12052 For a private type examine the visible declarations that follow
12053 the partial view, not just the private declarations that follow
12054 the full view.
12055
12056 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12057
12058 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
12059 code cleanup.
12060
12061 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12062
12063 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
12064 alias of the inherited op is the parent iterator, no need to
12065 examine dispatch table positions which might not be established
12066 yet if type is not frozen.
12067 * sem_disp.adb (Check_Controlling_Formals): The formal of a
12068 predicate function may be a subtype of a tagged type.
12069 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
12070 of representation items for the completion of a type extension
12071 where a predicate applies to the partial view.
12072 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
12073 parameter that designates function whose actual receives a
12074 predicate check, to improve warning message when the check will
12075 lead to infinite recursion.
12076 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
12077 Apply_Predicate_Check.
12078
12079 2017-01-06 Tristan Gingold <gingold@adacore.com>
12080
12081 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
12082 Gnat_Extended_Ravenscar.
12083 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
12084
12085 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12086
12087 * sem_util.ads: Minor typo fix and reformatting.
12088
12089 2017-01-06 Yannick Moy <moy@adacore.com>
12090
12091 * ghost.adb Minor fixing of references to SPARK RM.
12092 (Check_Ghost_Context): Check whether reference is to a lvalue
12093 before issuing an error about violation of SPARK RM 6.9(13)
12094 when declaration has Ghost policy Check and reference has Ghost
12095 policy Ignore.
12096 * sem_util.adb Minor indentation.
12097 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
12098 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
12099 * sem_util.ads (Unique_Defining_Entity): Document the result
12100 for package body stubs.
12101
12102 2017-01-06 Tristan Gingold <gingold@adacore.com>
12103
12104 * raise-gcc.c (abort): Macro to call Abort_Propagation.
12105 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
12106 constant.
12107 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12108 Do not generate the Entry_Max_Queue_Lengths_Array if all default
12109 values.
12110 * exp_util.adb (Corresponding_Runtime_Package): Consider
12111 Max_Queue_Length pragma.
12112
12113 2017-01-06 Justin Squirek <squirek@adacore.com>
12114
12115 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12116 Remove declaration generation in the case of
12117 System_Tasking_Protected_Objects_Single_Entry being used,
12118 and add a warning message when this is detected to occur.
12119 (Make_Initialize_Protection): Remove reference pass in the case
12120 of System_Tasking_Protected_Objects_Single_Entry.
12121 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
12122 * s-tposen.adb (Initialize_Protection_Entry): Remove
12123 Entry_Queue_Max parameter.
12124 * s-tposen.ads: Remove the types use to store the entry queue
12125 maximum.
12126 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
12127
12128 2017-01-06 Yannick Moy <moy@adacore.com>
12129
12130 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
12131 behavior of function, to also accept out of range positions
12132 and raise Constraint_Error in such case, and to copy sloc from
12133 literal if No_Location passed as location.
12134 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
12135 of functions to raise Constraint_Error in case of value not in
12136 appropriate range.
12137
12138 2017-01-06 Tristan Gingold <gingold@adacore.com>
12139
12140 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
12141 Invalidate_Stack_Cache.
12142
12143 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
12144
12145 * s-os_lib.adb: Minor fix to the signature of Readlink.
12146
12147 2017-01-06 Javier Miranda <miranda@adacore.com>
12148
12149 * sem_ch6.adb (Conforming_Types): Handle another
12150 confusion between views in a nested instance with an actual
12151 private type whose full view is not in scope.
12152
12153 2017-01-06 Arnaud Charlet <charlet@adacore.com>
12154
12155 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
12156 mark a rewritten if statement as explicit (Comes_From_Source).
12157
12158 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12159
12160 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
12161
12162 2017-01-06 Tristan Gingold <gingold@adacore.com>
12163
12164 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
12165
12166 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12167
12168 * sem_case.adb: Minor reformatting.
12169
12170 2017-01-06 Thomas Quinot <quinot@adacore.com>
12171
12172 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
12173
12174 2017-01-06 Justin Squirek <squirek@adacore.com>
12175
12176 * aspects.adb: Register aspect in Canonical_Aspect.
12177 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
12178 into respective tables.
12179 * einfo.ads, einfo.adb: Add a new attribute for
12180 handling the parameters for Pragma_Max_Entry_Queue
12181 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
12182 for accessing and setting were added as well.
12183 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
12184 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
12185 declaration for pramga arguments and store them in the protected
12186 type node.
12187 (Make_Initialize_Protection): Pass a reference to
12188 the Entry_Max_Queue_Lengths_Array in the protected type node to
12189 the runtime.
12190 * rtsfind.adb: Minor grammar fix.
12191 * rtsfind.ads: Register new types taken from the
12192 runtime libraries RE_Protected_Entry_Queue_Max and
12193 RE_Protected_Entry_Queue_Max_Array
12194 * s-tposen.adb, s-tpoben.adb
12195 (Initialize_Protection_Entry/Initialize_Protection_Entries):
12196 Add extra parameter and add assignment to local object.
12197 * s-tposen.ads, s-tpoben.ads: Add new types to
12198 store entry queue maximums and a field to the entry object record.
12199 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
12200 for Aspect_Max_Queue_Length.
12201 (Check_Aspect_At_Freeze_Point):
12202 Add aspect to list of aspects that don't require delayed analysis.
12203 * sem_prag.adb (Analyze_Pragma): Add case statement for
12204 Pragma_Max_Queue_Length, check semantics, and register arugments
12205 in the respective entry nodes.
12206 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
12207 and Has_Max_Queue_Length
12208 * snames.ads-tmpl: Add constant for the new aspect-name
12209 Name_Max_Queue_Length and corrasponding pragma.
12210
12211 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12212
12213 * exp_util.adb (Is_Controlled_Function_Call):
12214 Reimplemented. Consider any node which has an entity as the
12215 function call may appear in various ways.
12216
12217 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12218
12219 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
12220 an unchecked type conversion when performing a view conversion
12221 to/from a private type. In all other cases use a regular type
12222 conversion to ensure that any relevant checks are properly
12223 installed.
12224
12225 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12226
12227 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
12228
12229 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12230
12231 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
12232 error on case expression that is an entity, when coverage is
12233 incomplete and entity has a static value obtained by local
12234 propagation.
12235 (Handle_Static_Predicate): New procedure, subsidiary of
12236 Check_Choices, to handle case alternatives that are either
12237 subtype names or subtype indications involving subtypes that
12238 have static predicates.
12239
12240 2017-01-06 Thomas Quinot <quinot@adacore.com>
12241
12242 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
12243 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
12244
12245 2017-01-06 Bob Duff <duff@adacore.com>
12246
12247 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
12248 Elaborate_All(P) to P itself. That could happen in obscure cases,
12249 and always introduced a cycle (P body must be elaborated before
12250 P body).
12251 * lib-writ.ads: Comment clarification.
12252 * ali-util.ads: Minor comment fix.
12253 * ali.adb: Minor reformatting.
12254
12255 2017-01-06 Tristan Gingold <gingold@adacore.com>
12256
12257 * a-exexpr-gcc.adb: Improve comment.
12258
12259 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12260
12261 * s-linux-mips.ads: Use correct signal and errno constants.
12262 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
12263
12264 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12265
12266 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
12267 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
12268 sections.
12269
12270 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
12271
12272 * gnatvsn.ads: Bump copyright year.
12273
12274 2017-01-01 Jakub Jelinek <jakub@redhat.com>
12275
12276 * gnat_ugn.texi: Bump @copying's copyright year.
12277 * gnat_rm.texi: Likewise.
12278 \f
12279 Copyright (C) 2017 Free Software Foundation, Inc.
12280
12281 Copying and distribution of this file, with or without modification,
12282 are permitted in any medium without royalty provided the copyright
12283 notice and this notice are preserved.
This page took 0.564797 seconds and 4 git commands to generate.