]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ada/ChangeLog
[Ada] Minor housekeeping work in Create_Standard
[thirdparty/gcc.git] / gcc / ada / ChangeLog
1 2019-12-18 Eric Botcazou <ebotcazou@adacore.com>
2
3 * cstand.adb (Create_Standard): Remove duplicate line and
4 adjust.
5
6 2019-12-18 Javier Miranda <miranda@adacore.com>
7
8 * debug.adb: Document -gnatd_K as a reserved switch for the
9 detection of known problem issues of previous releases.
10
11 2019-12-18 Ghjuvan Lacambre <lacambre@adacore.com>
12
13 * par-ch13.adb: Check if declarations allow aspect
14 specifications.
15
16 2019-12-18 Piotr Trojanek <trojanek@adacore.com>
17
18 * einfo.ads (Is_Ghost_Entity): Fix typo in comment.
19
20 2019-12-18 Eric Botcazou <ebotcazou@adacore.com>
21
22 * layout.adb (Layout_Type): In the case of composite types, do
23 not copy the Esize onto the RM_Size if the latter is not set.
24 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
25 Also cap the alignment if an Object_Size clause has been
26 specified. Pass VAR_DECL in the call to validate_size for the
27 Esize of a type.
28 (validate_size): Be prepared to give an error on an Object_Size
29 clause.
30
31 2019-12-18 Eric Botcazou <ebotcazou@adacore.com>
32
33 * einfo.ads (Handling of Type'Size Value): Add references to the
34 introduction of Object_Size in Ada 2020.
35 * sem_eval.adb (Subtypes_Statically_Match): Likewise.
36
37 2019-12-18 Bob Duff <duff@adacore.com>
38
39 * sem_ch3.adb (Derive_Subprogram): Do not set the
40 Requires_Overriding flag in the above-mentioned case.
41
42 2019-12-18 Bob Duff <duff@adacore.com>
43
44 * sem_ch8.adb (Note_Redundant_Use): It was already checking for
45 a use clause in the visible part of the child. Add an additional
46 check for a use clause in the context clause of the child.
47
48 2019-12-16 Bob Duff <duff@adacore.com>
49
50 * errout.adb (Handle_Serious_Error): Disable the above-mentioned
51 warnings.
52
53 2019-12-16 Bob Duff <duff@adacore.com>
54
55 * errout.adb, errout.ads: Improve comments.
56
57 2019-12-16 Bob Duff <duff@adacore.com>
58
59 * sem_util.ads: Minor comment fix.
60
61 2019-12-16 Bob Duff <duff@adacore.com>
62
63 * errout.ads, errout.adb (Is_Size_Too_Small_Message): Check for
64 "size for" instead of "size for& too small, minimum allowed is
65 ^".
66
67 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
68
69 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Set only
70 the RM_Size on the subtype built for a Component_Size clause
71 when the component type is a biased integer type.
72
73 2019-12-16 Arnaud Charlet <charlet@adacore.com>
74
75 * socket.c: Shutdown warning.
76
77 2019-12-16 Arnaud Charlet <charlet@adacore.com>
78
79 * libgnarl/s-tataat.ads (Deallocator): Mark as Favor_Top_Level.
80
81 2019-12-16 Arnaud Charlet <charlet@adacore.com>
82
83 * libgnat/s-aotase.adb, libgnat/s-aotase.ads,
84 libgnat/s-atoope.ads, libgnat/s-atopar.adb,
85 libgnat/s-atopar.ads, libgnat/s-atopex.adb,
86 libgnat/s-atopex.ads: New files.
87 * libgnat/s-atopri.ads: Add new intrinsics.
88 * Makefile.rtl: Add new runtime files.
89 * impunit.adb: Add new units to Ada 2020 list.
90
91 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
92
93 * freeze.adb (Check_Strict_Alignment): Remove new check on
94 Has_Aliased_Components for array types.
95
96 2019-12-16 Ed Schonberg <schonberg@adacore.com>
97
98 * sem_ch4.adb (Try_Container_Indexing): In the case of a derived
99 container type, use the base type to look for candidate indexing
100 operations, because the object may be a constrained subtype or
101 itype with no explicit declaration. Candidate indexing
102 operations are found in the same scope and list of declarations
103 as the declaration of the base type.
104
105 2019-12-16 Ed Schonberg <schonberg@adacore.com>
106
107 * scng.adb (Scan): In Ada2020, a left-bracket indicates the
108 start of an homogenous aggregate.
109 * par-ch4.adb (P_Reduction_Attribute_Reference): New procedure.
110 (P_Aggregate): Recognize Ada2020 bracket-delimited aggregates.
111 (P_Primary): Ditto.
112 * par-util.adb (Comma_Present): Return false on a right bracket
113 in Ada2020, indicating the end of an aggregate.
114 * snames.ads-tmpl: Introduce Name_Reduce and Attribute Reduce.
115 * sinfo.ads, sinfo.adb (Is_Homogeneous_Aggregate): New flag on
116 aggregates, to designate an Ada2020 array or container aggregate
117 that is bracket-delimited in the source.
118 * sem_attr.adb (Analyze_Attribute): For attribute Reduce, verify
119 that two arguments are present, and verify that the prefix is a
120 stream or an object that is iterable (array or contrainer).
121 (Resolve_Attribute): For attribute Reduce, resolve initial value
122 with the type of the context. Type-checking of element type of
123 prefix is performed after expansion.
124 * exp_attr.adb (Expand_N_Attribute_Reference): For attribute
125 Reduce, expand into a loop: a) If prefix is an aggregate with a
126 single iterated component association, use its iterator
127 specification to construct a loop, b) If prefix is a name, build
128 a loop using an element iterator loop.
129 * scans.ads: Add brackets tokens.
130
131 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
132
133 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust calls to
134 validate_size.
135 (gnat_to_gnu_component_type): Likewise.
136 (gnat_to_gnu_field): Likewise and pass string for error messages.
137 (components_need_strict_alignment): Remove test on Is_Aliased and
138 add test for the independence of the component.
139 (validate_size): Add S1 and S2 string parameters and use them to
140 give better error messages for fields. Tweak a couple of messages.
141 * einfo.ads (Has_Independent_Components): Document more cases.
142 (Is_Independent): Likewise.
143 (Strict_Alignment): Document new semantics.
144 * exp_ch9.adb (Install_Private_Data_Declarations): Also set the
145 Is_Independent flag along with Is_Aliased on the renaming
146 entity.
147 * freeze.adb (Size_Known): Remove always-false test and add test
148 for the strict-alignment on the record type. Remove redundant
149 tests and add test for the strict-alignment on the component
150 type.
151 (Check_Strict_Alignment): Set the flag if the type is by-ref and
152 remove now redundant conditions. Set the flag on an array type
153 if it has aliased components. In the record type case, do not
154 set type for C_Pass_By_Copy convention.
155 (Freeze_Array_Type): Move code checking for conflicts between
156 representation aspects and clauses to before specific handling
157 of packed array types. Give a warnind instead of an error for a
158 conflict with pragma Pack. Do not test Has_Pragma_Pack for the
159 specific handling of packed array types.
160 (Freeze_Record_Type): Move error checking of representation
161 clause to...
162 (Freeze_Entity): ...here after Check_Strict_Alignment is called.
163 * sem_aggr.adb (Array_Aggr_Subtype): Also set the Is_Independent
164 flag along with Is_Aliased on the Itype.
165 * sem_ch13.adb (Check_Record_Representation_Clause): Do not set
166 the RM size for a strict-alignment type.
167 * sem_ch3.adb (Add_Interface_Tag_Components): Also set the
168 Is_Independent flag along with Is_Aliased on the tag.
169 (Add_Interface_Tag_Components): Likewise on the offset.
170 (Analyze_Component_Declaration): Likewise on the component.
171 (Analyze_Object_Declaration): Likewise on the object.
172 (Constrain_Array): Likewise on the array.
173 (Record_Type_Declaration: Likewise on the tag.
174 (Array_Type_Declaration): Also set the
175 Has_Independent_Components flag along with
176 Has_Aliased_Components on the array.
177 (Copy_Array_Base_Type_Attributes): Copy
178 Has_Independent_Components.
179 (Copy_Array_Subtype_Attributes): Copy Is_Atomic, Is_Independent
180 and Is_Volatile_Full_Access.
181 (Analyze_Iterator_Specification): Set Is_Independent on the loop
182 variable according to Independent_Components on the array.
183 * sem_ch5.adb: Likewise.
184 * sem_ch6.adb (Process_Formals): Also set the Is_Independent
185 flag along with Is_Aliased on the formal.
186
187 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
188
189 * sem_ch8.adb (Analyze_Object_Renaming): Set Atomic, Independent
190 and Volatile_Full_Access aspects on the entity of the renaming
191 the same way as the Volatile aspect is set.
192 * sem_util.ads (Is_Atomic_Object_Entity): Move declaration to...
193 (Is_Independent_Object): New function.
194 (Is_Volatile_Full_Access_Object): Likewise.
195 * sem_util.adb (Is_Atomic_Object_Entity): ...here.
196 (Prefix_Has_Atomic_Components): Minor tweak.
197 (Is_Atomic_Object): Test Is_Atomic on the Etype uniformly.
198 (Is_Atomic_Or_VFA_Object): Call Is_Volatile_Full_Access_Object.
199 (Is_Independent_Object): New predicate.
200 (Is_Subcomponent_Of_Atomic_Object): Remove redundant test.
201 (Is_Volatile_Full_Access_Object): New predicate.
202 (Is_Volatile_Prefix): Rename into...
203 (Prefix_Has_Volatile_Components): ... and call
204 Is_Volatile_Object.
205 (Object_Has_Volatile_Components): Delete.
206 (Is_Volatile_Object): Simplify.
207 * gcc-interface/trans.c (node_is_volatile_full_access): Adjust
208 comment.
209
210 2019-12-16 Bob Duff <duff@adacore.com>
211
212 * par.adb: Add Scopes function to do range checking on the scope
213 stack. Call Scopes all over the parser. Add
214 SIS_Aspect_Import_Seen flag.
215 * par-ch6.adb (P_Subprogram): Initialize SIS_Aspect_Import_Seen
216 to False at the start, and check it at the end.
217 * par-ch13.adb (Get_Aspect_Specifications): Set
218 SIS_Aspect_Import_Seen to True when appropriate.
219 * par-ch10.adb, par-ch12.adb, par-ch2.adb, par-ch3.adb,
220 par-ch5.adb, par-ch7.adb, par-ch9.adb, par-endh.adb,
221 par-util.adb: Call Scopes.
222
223 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
224
225 * sem_prag.adb (Atomic_Components): Remove local variable and
226 fix consistency issues. Call Component_Type on the Etype of E.
227 (Independent_Components): Remove local variable.
228 * sem_util.adb (Is_Subcomponent_Of_Atomic_Object): Properly deal
229 with prefixes that are access values.
230 * gcc-interface/trans.c (atomic_acces_t): New enumeral type.
231 (node_is_atomic) <N_Indexed_Component>: Test the prefix.
232 (node_has_volatile_full_access): Rename into...
233 (node_is_volatile_full_access): ...this.
234 (node_is_component): New predicare.
235 (gnat_strip_type_conversion): Delete.
236 (outer_atomic_access_required_p): Likewise.
237 (atomic_access_required_p): Rename into...
238 (get_atomic_access): ...this. Implement the 3 different semantics
239 of Atomic and Volatile_Full_Access.
240 (simple_atomic_access_required_p): New predicate.
241 (Call_to_gnu): Remove outer_atomic_access parameter and change the
242 type of atomic_access parameter to atomic_acces_t. Replace call to
243 atomic_access_required_p with simple_atomic_access_required_p for
244 the in direction and call get_atomic_access for the out direction
245 instead of [outer_]atomic_access_required_p.
246 (lhs_or_actual_p): Constify local variables.
247 (present_in_lhs_or_actual_p): Likewise.
248 (gnat_to_gnu) <N_Identifier>: Replace call to atomic_access_required_p
249 with simple_atomic_access_required_p.
250 <N_Explicit_Dereference>: Likewise.
251 <N_Indexed_Component>: Likewise.
252 <N_Selected_Component>: Likewise.
253 <N_Assignment_Statement>: Call get_atomic_access for the name instead
254 of [outer_]atomic_access_required_p. Adjust call to Call_to_gnu.
255 <N_Function_Call>: Adjust call to Call_to_gnu.
256 (get_controlling_type): Fix typo in comment.
257
258 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
259
260 * fe.h (Ada_Version_Type): New typedef.
261 (Ada_Version): Declare.
262 * opt.ads (Ada_Version_Type): Add Convention C and WARNING line.
263 (Ada_Version): Add WARNING line.
264 (Exception_Mechanism_Type): Likewise.
265
266 2019-12-16 Gary Dismukes <dismukes@adacore.com>
267
268 * checks.adb, sem_util.adb: Minor reformatting and U.S. spelling
269 adjustment.
270
271 2019-12-16 Bob Duff <duff@adacore.com>
272
273 * sem_ch10.adb (Analyze_Subunit): Give an error if the subunit
274 is not a proper body. This hides the confusing "duplicate body"
275 message that was previously given.
276
277 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
278
279 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Document
280 third special case of renamings requiring special handling.
281 (Evaluation_Required): Return true for an atomic or VFA prefix.
282
283 2019-12-16 Ed Schonberg <schonberg@adacore.com>
284
285 * checks.adb (Apply_Float_Conversion_Check): Use node of type
286 conversion and not its parent, when inserting the declaration
287 for the temporary that hold the result of the conversion.
288 Previously the declaration was inserted above the parent of the
289 conversion, apparently as a small optimization for the
290 subsequent traversal in Insert_Actions. Unfortunately a similar
291 optimization takes place in Insert_Actions, assuming that the
292 insertion point must be above the expression that creates the
293 actions to insert. This is not correct in the presence of
294 conditional expressions (i.e. since Ada2012), where the
295 insertion must be in the list of actions attached to the current
296 alternative.
297
298 2019-12-16 Bob Duff <duff@adacore.com>
299
300 * sem_attr.adb (Analyze_Attribute): Use Known_RM_Size. But we
301 still need Size_Known_At_Compile_Time, because when the size
302 really is known, sometimes only one or the other of these is
303 True.
304
305 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
306
307 * sem_util.adb (Is_Atomic_Or_VFA_Object): Also return true for
308 components whose type is Volatile_Full_Access or which are
309 subject to the aspect/pragma individually.
310 * sem_util.ads (Is_Atomic_Object_Entity): Small comment fix.
311
312 2019-12-16 Yannick Moy <moy@adacore.com>
313
314 * exp_ch6.adb: Fix comment.
315 * sem_res.adb (Resolve_Call): Do not check No_Recursion
316 restriction or indirectly No_Secondary_Stack restriction, when
317 inside an ignored ghost subprogram.
318
319 2019-12-16 Arnaud Charlet <charlet@adacore.com>
320
321 * impunit.adb: Add a-nbnbin, a-nbnbre, a-nubinu to Ada 2020
322 units.
323 * Makefile.rtl: Enable new file.
324 * libgnat/a-nbnbin.adb, libgnat/a-nbnbin.ads,
325 libgnat/a-nbnbre.adb, libgnat/a-nbnbre.ads,
326 libgnat/a-nubinu.ads: New files. Provide default standalone
327 implementation of Ada.Numerics.Big_Numbers.Big_* based on
328 System.Generic_Bignum.
329 * libgnat/a-nbnbin__gmp.adb: Alternate implementation of
330 Ada.Numerics.Big_Numbers.Big_Integers based on GMP. Not enabled
331 for now.
332 * libgnat/s-bignum.ads, libgnat/s-bignum.adb: Now a simple
333 wrapper on top of s-genbig.ads.
334 * libgnat/s-genbig.ads, libgnat/s-genbig.adb: New files, making
335 s-bignum generic for reuse in Ada.Numerics.Big_Numbers.
336
337 2019-12-16 Bob Duff <duff@adacore.com>
338
339 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
340 Correct documentation of -gnatw_C switch
341 * gnat_ugn.texi: Regenerate.
342
343 2019-12-16 Joel Brobecker <brobecker@adacore.com>
344
345 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
346 (_Switches_for_gnatbind): Reword the section explaining the
347 impact of -minimal on debugging.
348 * gnat_ugn.texi: Regenerate.
349
350 2019-12-16 Gary Dismukes <dismukes@adacore.com>
351
352 * libgnat/g-exptty.adb, libgnat/g-exptty.ads: Typo fixes and
353 minor reformatting.
354
355 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
356
357 * exp_ch6.adb (Requires_Atomic_Or_Volatile_Copy): New predicate.
358 (Expand_Actuals): Use it to decide whether to add call by copy
359 code as per the RM C.6(19) clause.
360 * fe.h (Is_Atomic_Object): Remove.
361 (Is_Volatile_Object): Likewise.
362 * sem_util.ads (Is_Atomic_Object): Remove WARNING note.
363 (Is_Volatile_Object): Likewise.
364 * gcc-interface/trans.c (atomic_or_volatile_copy_required_p): Delete.
365 (Call_to_gnu): Do not implement the RM C.6(19) clause.
366
367 2019-12-16 Ghjuvan Lacambre <lacambre@adacore.com>
368
369 * sem_ch12.adb (Validate_Access_Subprogram_Instance): Add
370 Can_Never_Be_Null checks.
371
372 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
373
374 * doc/gnat_rm/implementation_defined_pragmas.rst (VFA): Document
375 extension of the no-aliasing rule to any subcomponent.
376 * freeze.adb (Freeze_Object_Declaration): Small comment tweak.
377 (Freeze_Record_Type): Do not deal with delayed aspect
378 specifications for components here but...
379 (Freeze_Entity): ...here instead.
380 * sem_ch12.adb (Instantiate_Object): Improve wording of errors
381 given for legality rules in C.6(12) and implement the new rule
382 in C.6(13).
383 * sem_res.adb (Resolve_Actuals): Likewise.
384 * sem_prag.adb (Check_Atomic_VFA): New procedure implementing
385 the new legality rules in C.6(13).
386 (Process_Atomic_Independent_Shared_Volatile): Call
387 Check_Atomic_VFA to check the legality rules. Factor out code
388 marking types into...
389 (Mark_Type): ...this new procedure.
390 (Check_VFA_Conflicts): Do not check the legality rules here.
391 (Pragma_Atomic_Components): Call Check_Atomic_VFA on component
392 type.
393 * sem_util.ads (Is_Subcomponent_Of_Atomic_Object): Declare.
394 * sem_util.adb (Is_Subcomponent_Of_Atomic_Object): New
395 predicate.
396 * gnat_rm.texi: Regenerate.
397
398 2019-12-13 Gary Dismukes <dismukes@adacore.com>
399
400 * doc/gnat_rm/implementation_defined_pragmas.rst: Minor
401 rewording of one sentence.
402 * gnat_rm.texi: Regenerate.
403
404 2019-12-13 Arnaud Charlet <charlet@adacore.com>
405
406 * exp_unst.adb (Unnest_Subprogram): Account for trees produced
407 by Annex E constructs.
408
409 2019-12-13 Ghjuvan Lacambre <lacambre@adacore.com>
410
411 * doc/gnat_rm/implementation_defined_pragmas.rst: Update
412 Initialize_Scalars documentation.
413 * gnat_rm.texi: Regenerate.
414
415 2019-12-13 Javier Miranda <miranda@adacore.com>
416
417 * sem_ch13.adb (Analyze_Aspect_Specification): Processing a
418 precondition, if the expression is of the form A and then B, do
419 not generate separate Pre/Post aspects for the separate clases
420 when we are processing a generic unit. Required to avoid
421 reporting spurious visibility errors on the instantiations.
422
423 2019-12-13 Eric Botcazou <ebotcazou@adacore.com>
424
425 * sem_res.adb (Resolve_Actuals): Give canonical error for
426 illegal case of atomic/volatile parameter also if the formal is
427 aliased.
428
429 2019-12-13 Eric Botcazou <ebotcazou@adacore.com>
430
431 * sem_util.ads (Is_Atomic_Object): Mention relevant RM clauses.
432 * sem_util.adb (Is_Atomic_Object): For an indexed component,
433 only look at the Has_Atomic_Components aspect of the prefix and
434 do not recurse on it; for a selected component, do not look at
435 the prefix.
436 (Is_Atomic_Or_VFA_Object): Minor tweak.
437
438 2019-12-13 Arnaud Charlet <charlet@adacore.com>
439
440 * libgnat/a-calfor.ads, libgnat/a-calfor.adb (Split_Duration):
441 New procedure.
442 (Split, Image): Use Split_Duration. Update Image spec.
443
444 2019-12-13 Javier Miranda <miranda@adacore.com>
445
446 * exp_unst.adb (Unnest_Subprogram): Generate an extra temporary
447 to facilitate the C backend processing dereferences.
448
449 2019-12-13 Javier Miranda <miranda@adacore.com>
450
451 * sem_prag.adb (Analyze_Pragma): Propagate the
452 Linker_Section_Attribute to the ultimate alias of the subprogram
453 to facilitate the C backend processing this attribute.
454
455 2019-12-13 Yannick Moy <moy@adacore.com>
456
457 * sem_util.adb (Original_Aspect_Pragma_Name): Go through
458 Original_Node for pragma.
459
460 2019-12-13 Piotr Trojanek <trojanek@adacore.com>
461
462 * exp_aggr.adb, exp_unst.adb: Minor fix typo in comment.
463
464 2019-12-13 Steve Baird <baird@adacore.com>
465
466 * sem_res.adb (Resolve, Valid_Conversion): Add Base_Type call
467 when testing whether a type is a general access type.
468
469 2019-12-13 Javier Miranda <miranda@adacore.com>
470
471 * exp_ch4.adb (Expand_N_Unchecked_Type_Conversion): Generate an
472 extra temporary for cases unsupported by the C backend.
473
474 2019-12-13 Steve Baird <baird@adacore.com>
475
476 * einfo.ads: Correct comment for Derived_Type_Link to reflect
477 that fact that this function is now used for more than just
478 generation of warnings.
479 * sem_ch3.adb (Build_Derived_Type): Do not call
480 Set_Derived_Type_Link if the derived type and the parent type
481 are in different compilation units. Such a derivation cannot be
482 a problematic "early" derivation (identifying these is what the
483 Derived_Type_Link attribute is used for) and we don't like
484 inter-unit references that go in the opposite direction of
485 semantic dependencies.
486 * sem_ch13.adb (Is_Type_Related_Rep_Item): A new function,
487 analogous to the existing function Is_Operational_Item.
488 (Rep_Item_Too_Late): Generate a hard error (with same text as
489 the warning that was previously being generated) if the
490 AI12-0109 legality rule is violated.
491
492 2019-12-13 Eric Botcazou <ebotcazou@adacore.com>
493
494 * doc/gnat_rm/implementation_defined_pragmas.rst: Minor tweak to
495 Volatile_Full_Access wording in GNAT RM.
496 * gnat_rm.texi: Regenerate.
497
498 2019-12-13 Gary Dismukes <dismukes@adacore.com>
499
500 * exp_attr.adb (Expand_N_Attribute_Reference,
501 Attribute_Address): Suppress generation of a call to
502 Base_Address in the case where the Address attribute is being
503 used to initialize a corresponding component of an activation
504 record.
505 (Is_Unnested_Component_Init): New function to determine whether
506 an attribute reference for Address is used to initialized a
507 component of an activation record object that corresponds to the
508 object denoted by the prefix of the attribute (an assignment
509 used in support of unnesting for back ends like LLVM).
510
511 2019-12-13 Ed Schonberg <schonberg@adacore.com>
512
513 * sem_res.adb (Resolve): IF an entity reference is overloaded
514 because its type has an Implicit_Dereference aspect, we must
515 examine the discriminants of the type to determine whether an
516 explicit dereference must be inserted for use in code
517 generation. Previously this was done for other expressions but
518 not for entity references by themselves. This was sufficient to
519 handle uses of the aspect in container handling and iteration,
520 but not more generally.
521
522 2019-12-13 Javier Miranda <miranda@adacore.com>
523
524 * exp_disp.ads (Expand_Interface_Thunk): Adding one formal (the
525 interface type).
526 * exp_disp.adb (Expand_Interface_Thunk): Using the added formal
527 to ensure the correct profile of the thunk generated for
528 predefined primitives; in addition, the added formal is also
529 used to perform a check that ensures that the controlling type
530 of the thunk is the one expected by the GCC backend.
531 (Make_Secondary_DT, Register_Primitive): Adding the new formal
532 to the calls to Expand_Interface_Thunk.
533 * exp_ch6.adb (Register_Predefined_DT_Entry): Adding the new
534 formal to the call to Expand_Interface_Thunk.
535 * exp_intr.adb (Expand_Unc_Deallocation): When deallocating a
536 controlled type and the call to unchecked deallocation is
537 performed with a pointer to one of the convered interface types,
538 displace the pointer to the object to reference the base of the
539 object to deallocate its memory.
540 * gcc-interface/trans.c (maybe_make_gnu_thunk): Assert that the
541 controlling type of the thunk is an interface type.
542
543 2019-12-13 Bob Duff <duff@adacore.com>
544
545 * exp_attr.adb (Is_Available): Remove this function, and replace
546 all calls with RTE_Available. RTE_Available will return True if
547 "not Configurable_Run_Time_Mode". Remove the "???" comment.
548
549 2019-12-13 Ed Schonberg <schonberg@adacore.com>
550
551 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not call
552 Declare_Inherited_Private_Subprograms on s child body: the
553 required operations have already been created when analyzing the
554 corresponding package declaration. This prevents a redeclaration
555 of inehrited operation, and a crash when inserting the new
556 operation in the current scope.
557
558 2019-12-13 Yannick Moy <moy@adacore.com>
559
560 * sem_prag.adb (Analyze_Depends_In_Decl_Part,
561 Analyze_Global_In_Decl_Part,
562 Analyze_Refined_Depends_In_Decl_Part,
563 Analyze_Refined_Global_In_Decl_Part, Check_Missing_Part_Of):
564 Skip redundant checking involving visibility inside
565 instantiations.
566
567 2019-12-13 Yannick Moy <moy@adacore.com>
568
569 * sem_res.adb (Resolve_Call): Prevent inlining inside while loop
570 conditions.
571 * sem_util.adb, sem_util.ads (In_While_Loop_Condition): New
572 query function.
573
574 2019-12-13 Bob Duff <duff@adacore.com>
575
576 * impunit.ads: Add Ada_202X_Unit.
577 * impunit.adb: Add a table Non_Imp_File_Names_2X analogous to
578 the other tables. Add code to search this table.
579 * opt.ads: Add Warn_On_Ada_202X_Compatibility flag, currently
580 always True.
581 * sem_ch10.adb (Analyze_With_Clause): Give a warning if an Ada
582 2020 unit is with-ed when Ada_Version < Ada_2020. Change 'if'
583 to 'case': Full coverage rules rule.
584
585 2019-12-13 Bob Duff <duff@adacore.com>
586
587 * rtsfind.ads: Minor comment fix.
588
589 2019-12-13 Gary Dismukes <dismukes@adacore.com>
590
591 * sem_util.adb (Scope_Within): For the case of checking for a
592 task type procedure, check the Implementation_Base_Type of Curr.
593 (Scope_Within_Or_Same): For the case of checking for a task type
594 procedure, check the Implementation_Base_Type of Curr.
595
596 2019-12-13 Arnaud Charlet <charlet@adacore.com>
597
598 * impunit.adb (Non_Imp_File_Names_12): Add
599 Ada.Containers.Vectors.Generic_Parallel_Sorting.
600
601 2019-12-13 Justin Squirek <squirek@adacore.com>
602
603 * sem_res.adb (Resolve_Allocator): Add calls to
604 Check_Cond_Expr_Accessibility when a conditional expression is
605 found.
606 (Check_Allocator_Discrim_Accessibility_Exprs): Created to
607 recursively traverse a potentially compound conditional
608 expression and perform accessibility checks for each
609 alternative.
610 * sem_util.adb (Dynamic_Accessibility_Level): Avoid use of
611 original node of the expression in question so we can handle
612 dynamic accessibility in the limited case of a constant folded
613 conditional expression.
614
615 2019-12-13 Steve Baird <baird@adacore.com>
616
617 * exp_ch4.adb (Expand_N_Op_Eq.Is_Equality): Move this function
618 from within Expand_N_Op_Eq.Find_Equality out to immediately
619 within Expand_N_Op_Eq in order to give it greater visibility.
620 Add a new Typ parameter (defaulted to Empty) which, if
621 non-empty, means the function will return False in the case of
622 an equality op for some other type.
623 * (Expand_N_Op_Eq.User_Defined_Primitive_Equality_Op): A new
624 function. Given an untagged record type, finds the corresponding
625 user-defined primitive equality op (if any). May return Empty.
626 Ignores visibility.
627 * (Expand_N_Op): For Ada2012 or later, check for presence of a
628 user-defined primitive equality op before falling back on the
629 usual predefined component-by-component comparison. If found,
630 then call the user-defined op instead.
631
632 2019-12-13 Justin Squirek <squirek@adacore.com>
633
634 * sem_ch6.adb (Check_Overriding_Indicator): Modify condition to
635 take into account the modification of the Is_Hidden flag within
636 generic instances.
637 (Verify_Overriding_Indicator): Add an exception for controlled
638 primitives within an instance.
639
640 2019-12-13 Ed Schonberg <schonberg@adacore.com>
641
642 * sinfo.ads, sinfo.adb (Aspect_On_Partial_View,
643 Set_Aspect_On_Partial_View): New flag for use by SPARK, to
644 indicate whether an aspect that appears on a type declaration
645 applies to the partial view of that type.
646 * sem_ch13.adb (Analyze_Aspect_Specification): Set new flag
647 appropriately.
648
649 2019-12-12 Ed Schonberg <schonberg@adacore.com>
650
651 * sem_ch13.adb (Same_Reprewentation): if the actual in a call is
652 a generic actual type, use its bsae type to determine whether a
653 change of representastion may be necessary for proper parameter
654 passing.
655
656 2019-12-12 Ed Schonberg <schonberg@adacore.com>
657
658 * sem_type.adb (Find_Unique_Type): A call to the universal
659 access equality operator requires one operand to be a universal
660 access, and the other to be an access type. There is no
661 requirement, as previously implied by this routine, that
662 pool-specific access types were illegal in this context.
663
664 2019-12-12 Steve Baird <baird@adacore.com>
665
666 * sem_ch6.adb
667 (New_Overloaded_Entity.Check_Conforming_Paramters): Add new
668 Conformance_Type parameter. With the value of
669 Subtype_Conformant, the behavior of Check_Conforming_Parameters
670 is unchanged. The call in Matching_Entry_Or_Subprogram to
671 instead passes in Type_Conformant. This corresponds to the use
672 of "type conformant" in Ada RM 9.4(11.4/3).
673 (New_Overloaded_Entity.Has_Matching_Entry_Or_Subprogram): Add
674 new Normalized_First_Parameter_Type function to help in ignoring
675 the distinction between protected and access-to-protected first
676 parameters when checking prefixed-view profile matching. Replace
677 computations of the type of the first parameter with calls to
678 this function as appropriate.
679
680 2019-12-12 Ed Schonberg <schonberg@adacore.com>
681
682 * sem_ch5.adb: (Analyze_Iterator_Specification): If the
683 iteration is over a slice, complete the resolution of its
684 bounds, which may be aebitrary expressions. The previous
685 pre-analysis may have created itypes for the slice but has not
686 performed the expansion that for example may introduce actions
687 that specify explicit dereferences and run-time checks.
688
689 2019-12-12 Ed Schonberg <schonberg@adacore.com>
690
691 * sem_ch8.adb: Improve error message for dispatching subprogram
692 formals.
693
694 2019-12-12 Gary Dismukes <dismukes@adacore.com>
695
696 * exp_ch9.adb (Build_Protected_Entry): Set the Scope of the new
697 block to be the entity of the procedure created for the entry.
698
699 2019-12-12 Steve Baird <baird@adacore.com>
700
701 * sem_ch10.adb (Install_With_Clause): Check for the case of a
702 circular dependency involving a predefined (or GNAT-defined)
703 unit and handle that case by generating an appropropriate error
704 message.
705
706 2019-12-12 Gary Dismukes <dismukes@adacore.com>
707
708 * sem_ch4.adb, sem_res.adb: Minor reformatting.
709
710 2019-12-12 Justin Squirek <squirek@adacore.com>
711
712 * sem_ch4.adb (Analyze_One_Call): Add condition to check for
713 incorrectly resolved hidden controlled primitives.
714
715 2019-12-12 Ed Schonberg <schonberg@adacore.com>
716
717 * sem_res.adb: Fix processing of standard predefined operators.
718
719 2019-12-12 Piotr Trojanek <trojanek@adacore.com>
720
721 * libgnarl/a-dispat.ads (Yield): Update Global contract.
722
723 2019-12-12 Piotr Trojanek <trojanek@adacore.com>
724
725 * libgnat/g-altive.ads: Fix typo in comment.
726 * bindo-graphs.adb: Fix repeated words in comment.
727 * exp_ch4.adb: Likewise.
728 * exp_ch5.adb: Likewise.
729 * exp_ch7.adb: Likewise.
730 * exp_pakd.adb: Likewise.
731 * exp_unst.adb: Likewise.
732 * exp_util.adb: Likewise.
733 * freeze.adb: Likewise.
734 * inline.adb: Likewise.
735 * layout.adb: Likewise.
736 * sem_ch12.adb: Likewise.
737 * sem_ch13.adb: Likewise.
738 * sem_ch4.adb: Likewise.
739 * sem_ch9.adb: Likewise.
740 * sem_elab.adb: Likewise.
741 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix repeated
742 words in user documentation.
743 * gnat_ugn.texi: Regenerate.
744
745 2019-12-12 Eric Botcazou <ebotcazou@adacore.com>
746
747 * exp_attr.adb (Expand_Size_Attribute): Look directly at the
748 prefix to detect the bit-packed slices. Apply the checks last
749 in case the attribute needs to be processed by the back-end.
750 * exp_ch4.adb (Expand_N_Slice): Do not create a temporary for
751 a prefix of the Size attribute.
752
753 2019-12-12 Steve Baird <baird@adacore.com>
754
755 * sem_ch12.adb
756 (Instantiate_Type.Validate_Derived_Type_Instance): Implement the
757 legality check of AI12-0036
758
759 2019-12-12 Ed Schonberg <schonberg@adacore.com>
760
761 * sem_ch10.adb (Analyze_Subunit): Fix spurious visibility error
762 on subunit with optimization.
763
764 2019-12-12 Arnaud Charlet <charlet@adacore.com>
765
766 * raise-gcc.c (__gnat_personality_v0): Define for SEH.
767
768 2019-12-12 Gary Dismukes <dismukes@adacore.com>
769
770 * exp_ch9.adb (Build_Protected_Entry): Analyze the block created
771 to hold the declarations and statements of the protected entry
772 body right after it's created, and then call Reset_Scopes_To on
773 that block to reset the Scope of nested entities to the block
774 scope.
775 (Reset_Scope): Add handling for N_Freeze_Entity nodes, calling
776 Reset_Scopes recursively on the Actions of such nodes. Also, for
777 subprogram bodies that are encountered that might not have a
778 separate declaration (such as type init procedures), reset the
779 Scope of the subprogram's entity.
780
781 2019-12-12 Justin Squirek <squirek@adacore.com>
782
783 * sem_attr.adb (Analyze_Attribute): Add error message for
784 invalid usage of Attribute_Result.
785
786 2019-12-12 Bob Duff <duff@adacore.com>
787
788 * sem_attr.adb (Eval_Attribute): Never mark T'Descriptor_Size as
789 static, even if T is a static subtype, because otherwise we will
790 request the value of the attribute, which will crash because we
791 have not evaluated it.
792
793 2019-12-12 Ed Schonberg <schonberg@adacore.com>
794
795 * exp_ch5.adb (Expand_N_Assognment_Statement): Extend the
796 processing involving private types with unknown discriminants to
797 handle the case where the full view of the type is an
798 unconstrained array type.
799
800 2019-12-12 Bob Duff <duff@adacore.com>
801
802 * sem_ch4.adb (Transform_Object_Operation): Deal properly with
803 prefix notation in instances.
804
805 2019-12-12 Claire Dross <dross@adacore.com>
806
807 * libgnat/a-cofove.adb, libgnat/a-cfinve.adb (Find_Index): Use
808 Extended_Index for call to Last.
809
810 2019-12-12 Gary Dismukes <dismukes@adacore.com>
811
812 * sem_ch3.adb, sem_util.adb: Minor reformatting.
813
814 2019-12-12 Bob Duff <duff@adacore.com>
815
816 * doc/gnat_ugn/gnat_utility_programs.rst: Update gnatmetric
817 documentation for average lengths
818
819 2019-12-12 Ed Schonberg <schonberg@adacore.com>
820
821 * sem_ch3.adb (Constrain_Access): Remove obsolete comments and
822 warning concerning component types of an access type whose
823 designated type is a constrained record type. (Such constraints
824 were previously ignored). Set scope of itype for component to
825 the scope of the enclosing record.
826 * sem_ch4.adb: Remove call to Set_Ekind.
827 * sem_util.adb (Build_Actual_Subtype_Of_Component): Handle
828 components whose type is an access to a constrained
829 discriminant, where the constraints may be given by the
830 discriminants of the enclosing type. New subprogram
831 Build_Access_Record_Constraint.
832
833 2019-12-12 Justin Squirek <squirek@adacore.com>
834
835 * exp_ch6.adb (Expand_Call_Helper): Added null case for
836 'Loop_Entry, 'Old, and 'Result when calculating whether to
837 create extra accessibility parameters.
838 * sem_util.adb (Dynamic_Accessibility_Level): Added null case
839 for 'Loop_Entry, 'Old, and 'Result when calculating
840 accessibility level based on access-valued attributes. Also
841 added special handling for uses of 'Loop_Entry when used in its
842 indexed component form.
843
844 2019-12-12 Arnaud Charlet <charlet@adacore.com>
845
846 * raise-gcc.c: Remove references to VMS
847
848 2019-12-12 Eric Botcazou <ebotcazou@adacore.com>
849
850 * atree.ads, comperr.ads, debug.ads, einfo.ads, elists.ads,
851 err_vars.ads, errout.ads, exp_ch11.ads, exp_code.ads,
852 exp_dbug.ads, exp_tss.ads, exp_util.ads, lib.ads, namet.ads,
853 nlists.ads, opt.ads, repinfo.ads, restrict.ads, scos.ads,
854 sem_aggr.ads, sem_aux.ads, sem_eval.ads, sem_util.ads,
855 sinfo.ads, sinput.ads, stringt.ads, targparm.ads, types.ads,
856 urealp.ads warnsw.ads: Add WARNING line(s) in commentary.
857 * atree.h, elists.h, namet.h, nlists.h, repinfo.h, scos.h,
858 stringt.h, types.h, uintp.h, urealp.h: Tidy up.
859 * fe.h: Likewise. Document WARNING mark.
860
861 2019-12-12 Dmitriy Anisimkov <anisimko@adacore.com>
862
863 * libgnat/g-comlin.ads (Get_Argument): New routine similar to
864 original Get_Argument but with one more out parameter
865 End_Of_Arguments.
866 (Get_Arguments): Comment improved.
867 * libgnat/g-comlin.adb (Get_Argument): Implementation taken from
868 original Get_Argument and improved.
869 (Get_Argument): Calls new routine Get_Argument with additional
870 parameter.
871
872 2019-12-03 Eric Botcazou <ebotcazou@adacore.com>
873
874 * gcc-interface/utils.c (potential_alignment_gap): Delete.
875 (rest_of_record_type_compilation): Do not call above function. Use
876 the alignment of the field instead of that of its type, if need be.
877 When the original field has variable size, always lower the alignment
878 of the pointer type. Reset the bit-field status of the new field if
879 it does not encode a bit-field.
880
881 2019-12-03 Eric Botcazou <ebotcazou@adacore.com>
882
883 * gcc-interface/utils.c (fold_convert_size): New function.
884 (fold_bit_position): Invoke it to do further folding.
885
886 2019-12-03 Eric Botcazou <ebotcazou@adacore.com>
887
888 * gcc-interface/decl.c (gnat_to_gnu_subprog_type): With the Copy-In/
889 Copy-Out mechanism, do not promote the mode of the return type to an
890 integral mode if it contains a field on a non-integral type and even
891 demote it for 64-bit targets.
892
893 2019-11-25 Eric Botcazou <ebotcazou@adacore.com>
894
895 PR ada/92362
896 * gcc-interface/trans.c (gnat_to_gnu) <N_Attribute_Definition_Clause>:
897 Use a temporary instead of clobbering the result with a freeze node.
898
899 2019-11-25 Eric Botcazou <ebotcazou@adacore.com>
900
901 PR ada/92575
902 * expect.c (__gnat_expect_poll [VMS, HPUX]): Fix typo.
903
904 2019-11-06 Eric Botcazou <ebotcazou@adacore.com>
905 Alexandre Oliva <oliva@adacore.com>
906
907 * gcc-interface/misc.c (callgraph_info_file): Delete.
908
909 2019-10-27 Jakub Jelinek <jakub@redhat.com>
910
911 * locales.c (iso_3166): Add missing comma after "United-States".
912
913 2019-10-15 Arnaud Charlet <charlet@adacore.com>
914
915 * Makefile.rtl (a-except.o): Put -O1 earlier so that it can be
916 overriden if needed by other variables.
917
918 2019-10-12 Eric Botcazou <ebotcazou@adacore.com>
919
920 PR ada/91995
921 * sem_ch8.adb (Chain_Use_Clause): Remove second argument in calls
922 to Defining_Entity.
923 * sem_elab.adb (Find_Unit_Entity): Likewise. Deal with N_Subunit
924 here in lieu of in Defining_Entity.
925 * sem_util.ads (Defining_Entity): Remove 2nd and 3th parameters.
926 * sem_util.adb (Defining_Entity): Remove 2nd and 3th parameters,
927 and adjust accordingly. Deal with N_Compilation_Unit.
928
929 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
930
931 * gcc-interface/decl.c (elaborate_reference_1): Specifically deal with
932 pointer displacement.
933
934 * gcc-interface/decl.c (components_to_record): Use proper name.
935
936 * gcc-interface/trans.c (Sloc_to_locus): Use standard types.
937
938 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
939
940 * gcc-interface/decl.c (gnat_to_gnu_field): Adjust again the packing
941 for a field without strict alignment and with an oversized clause.
942
943 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
944
945 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Really test the
946 sign of the value when deciding to build a NEGATE_EXPR.
947 <PLUS_EXPR>: Remove redundant line.
948 <BIT_AND_EXPR>: Do the negation here.
949
950 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
951
952 * gcc-interface/decl.c (Gigi_Equivalent_Type) <E_Array_Subtype>: New
953 case. Return the base type if the subtype is not constrained.
954
955 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
956
957 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Named_{Integer|Real}>:
958 New case to deal with the definition of named numbers.
959 <E_Variable>: Minor tweaks. Set DECL_IGNORED_P on the CONST_DECL
960 if a corresponding variable is built.
961 * gcc-interface/trans.c (gnat_to_gnu) <N_Integer_Literal>: Return
962 error_mark_node instead of aborting on overflow for named numbers.
963 <N_Number_Declaration>: Reuse the <N_Object_Declaration> case and
964 deal with error_mark_node specifically.
965 * gcc-interface/utils.c (create_var_decl): Do not set DECL_IGNORED_P
966 on CONST_DECLs.
967 (gnat_write_global_declarations): Output global constants.
968
969 2019-10-10 Gary Dismukes <dismukes@adacore.com>
970
971 * exp_ch7.adb (Check_Unnesting_In_Decls_Or_Stmts): When
972 encountering a loop at the top level of a package declaration
973 list (that is, within the declarations of a package spec or
974 body) that has nested subprograms, call Unnest_Loop to create a
975 new library-level procedure that will contain the loop, to allow
976 for proper handling of up-level references from within nested
977 subprograms, such as to loop parameters.
978 (Unnest_Loop): New procedure that takes a loop statement and
979 creates a new procedure body to enclose the loop statement,
980 along with generating a call to the procedure.
981
982 2019-10-10 Arnaud Charlet <charlet@adacore.com>
983
984 * freeze.adb (Freeze_Subprogram): Ensure constructor is a C++
985 constructor.
986
987 2019-10-10 Gary Dismukes <dismukes@adacore.com>
988
989 * libgnat/a-ststio.ads (File_Type): Apply pragma
990 Preelaborable_Initialization to the type.
991
992 2019-10-10 Yannick Moy <moy@adacore.com>
993
994 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not peek
995 under private types whose completion is SPARK_Mode Off.
996
997 2019-10-10 Gary Dismukes <dismukes@adacore.com>
998
999 * exp_ch4.adb, sem_cat.adb, sem_ch12.adb, sem_ch3.adb,
1000 sem_ch6.adb, sem_prag.adb, sem_util.adb, sem_util.ads: Minor
1001 typo fixes.
1002
1003 2019-10-10 Ed Schonberg <schonberg@adacore.com>
1004
1005 * sem_warn.adb (Warn_On_Useless_Assignment): Do not warn if the
1006 second assignment is at the same source position as the first.
1007
1008 2019-10-10 Gary Dismukes <dismukes@adacore.com>
1009
1010 * sem_util.adb (Enclosing_Subprogram): Handle the case of
1011 E_Entry_Family, returning the entry family's associated
1012 Protected_Body_Subprogram (as was already done for E_Entry).
1013 * exp_ch9.adb (Expand_N_Accept_Statement): Call Reset_Scopes_To
1014 on the block created for an accept statement to reset the scopes
1015 of any local entities to the block scope.
1016
1017 2019-10-10 Ed Schonberg <schonberg@adacore.com>
1018
1019 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Propagate
1020 an aspect specification for Abstract_State from generic package
1021 to formal package, so that it is available when analyzing the
1022 constructed formal.
1023
1024 2019-10-10 Eric Botcazou <ebotcazou@adacore.com>
1025
1026 * sem_ch6.adb (Set_Actual_Subtypes): Put the freeze node of the
1027 actual subtype after its declaration when the type of the formal
1028 has a predicate.
1029
1030 2019-10-10 Eric Botcazou <ebotcazou@adacore.com>
1031
1032 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Do not use
1033 the Esize of the component to compute its layout, but only the
1034 Component_Clause. Do not issue a warning for the _Tag
1035 component. Also set the Esize of the component at the end of
1036 the layout.
1037 (Analyze_Record_Representation_Clause): Remove Hbit local
1038 variable. Lay out the Original_Record_Component only if it's
1039 distinct from the component.
1040 (Check_Record_Representation_Clause): Fix off-by-one bug for the
1041 Last_Bit of the artificial clause built for the _Tag component.
1042
1043 2019-10-10 Bob Duff <duff@adacore.com>
1044
1045 * treepr.ads, treepr.adb (ppar): New procedure.
1046
1047 2019-10-10 Bob Duff <duff@adacore.com>
1048
1049 * sem_aggr.adb (Resolve_Aggregate): Add missing cases in the
1050 Others_Allowed => True case -- N_Case_Expression_Alternative and
1051 N_If_Expression. Use Nkind_In.
1052 * atree.adb, atree.ads, sinfo.adb, sinfo.ads (Nkind_In): New
1053 16-parameter version.
1054
1055 2019-10-10 Ed Schonberg <schonberg@adacore.com>
1056
1057 * sem_aggr.adb (Resolve_Array_Aggregate): Set properly the
1058 Predicated_Parent link of an itype created for an aggregate, so
1059 that the predicate_function of the parent can support proofs on
1060 the object that it initializes.
1061
1062 2019-10-10 Eric Botcazou <ebotcazou@adacore.com>
1063
1064 * sem_ch3.adb (Analyze_Number_Declaration): Set
1065 Debug_Info_Needed in the case where the expression is an integer
1066 literal.
1067
1068 2019-10-10 Yannick Moy <moy@adacore.com>
1069
1070 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add subprograms
1071 with deep parameter or result type as not candidates for
1072 inlining.
1073
1074 2019-10-10 Vadim Godunko <godunko@adacore.com>
1075
1076 * libgnat/g-exptty.ads (TTY_Process_Descriptor): Set default
1077 value for Process.
1078
1079 2019-10-10 Bob Duff <duff@adacore.com>
1080
1081 * sem_prag.adb (Defer_Compile_Time_Warning_Error_To_BE): In
1082 addition to saving the pragma for further processing, copy the
1083 pragma into the main unit if necessary.
1084
1085 2019-10-10 Bob Duff <duff@adacore.com>
1086
1087 * einfo.ads, einfo.adb (Invariants_Ignored): New flag on types.
1088 This leaves just one unused flag.
1089 * sem_prag.adb (Invariant): Set the flag if appropriate.
1090 * exp_util.adb (Make_Invariant_Call): Check the flag.
1091
1092 2019-10-10 Arnaud Charlet <charlet@adacore.com>
1093
1094 * gnat1drv.adb (Gnat1drv): Skip code generation when handling an
1095 incomplete unit with -gnatceg.
1096
1097 2019-10-10 Gary Dismukes <dismukes@adacore.com>
1098
1099 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Various
1100 cleanups.
1101 (Set_Elab_Proc): New procedure to create the defining identifier
1102 for a procedure created to encapsulate top-level blocks
1103 occurring as a part of library package elaboration.
1104 (First_Local_Scope): Function replaced by
1105 Reset_Scopes_To_Elab_Proc.
1106 (Reset_Scopes_To_Elab_Proc): New recursive procedure based on
1107 First_Local_Scope, which it replaces, that is called to traverse
1108 the statements of a library package body to locate top-level
1109 blocks and determine whether they contain nested subprograms
1110 that might address library-level objects of the package. Such
1111 blocks (and loops) and certain top-level subprograms within the
1112 statements will have their Scope reset here to match an
1113 encapsulating procedure created by
1114 Check_Unnesting_Elaboration_Code that will contain the
1115 statements.
1116 (Check_Unnesting_In_Decls_Or_Stmts): Code for handling blocks
1117 factored out into Unnest_Block. Add handling for package
1118 declarations and bodies, making recursive calls for
1119 visible/private declarations, body declarations, statements, and
1120 exception handlers. Also remove test for Is_Compilation_Unit:
1121 caller tests for Is_Library_Level_Entity instead. Also, this
1122 proc's name was changed from Check_Unnesting_In_Declarations.
1123 (Check_Unnesting_In_Handlers): New procedure to traverse a
1124 sequence of exception handlers, calling
1125 Check_Unnesting_In_Decls_Or_Stmts on the statements of each
1126 handler.
1127 (Expand_N_Package_Body): Call Check_Unnesting_* routines only
1128 when Unnest_Subprogram_Mode is set and the current scope is a
1129 library-level entity (which includes packages and instantiations
1130 nested directly within a library unit).
1131 (Expand_N_Package_Declaration): Call Check_Unnesting_* routines
1132 only when Unnest_Subprogram_Mode is set and the current scope is
1133 a library-level entity (which includes packages and
1134 instantiations nested directly within a library unit).
1135 (Unnest_Block): New procedure factored out of
1136 Check_Unnesting_In_Decls_Or_Stmts, for creating a new procedure
1137 to replace a block statement and resetting the Scope fields of
1138 the block's top-level entities.
1139
1140 2019-10-10 Anthony Leonardo Gracio <leonardo@adacore.com>
1141
1142 * doc/gnat_ugn/about_this_guide.rst,
1143 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1144 doc/gnat_ugn/getting_started_with_gnat.rst,
1145 doc/gnat_ugn/gnat_and_program_execution.rst, errout.ads,
1146 exp_ch3.adb, gnatls.adb, impunit.adb, lib-writ.ads, opt.ads,
1147 sem_ch7.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
1148 terminals.c: Replace GPS by GNAT Studio.
1149 * gnat_ugn.texi: Regenerate.
1150
1151 2019-10-10 Ed Schonberg <schonberg@adacore.com>
1152
1153 * exp_ch6.adb (Expand_Simple_Function_Return_Statement): If the
1154 function to which the return statement applies is an
1155 Ignored_Ghost_Function, do not indicate that it uses the
1156 secondary stack when the return type is unconstrained.
1157
1158 2019-10-10 Bob Duff <duff@adacore.com>
1159
1160 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
1161 libgnat/a-cbhase.adb, libgnat/a-cbmutr.adb,
1162 libgnat/a-cborma.adb, libgnat/a-cborse.adb,
1163 libgnat/a-cdlili.adb, libgnat/a-cidlli.adb,
1164 libgnat/a-cihama.adb, libgnat/a-cihase.adb,
1165 libgnat/a-cimutr.adb, libgnat/a-ciorma.adb,
1166 libgnat/a-ciorse.adb, libgnat/a-cobove.adb,
1167 libgnat/a-cohama.adb, libgnat/a-cohase.adb,
1168 libgnat/a-coinve.adb, libgnat/a-comutr.adb,
1169 libgnat/a-conhel.adb, libgnat/a-convec.adb,
1170 libgnat/a-coorma.adb, libgnat/a-coorse.adb (Reference,
1171 Constant_Reference): Use Busy instead of Lock, so we forbid
1172 tampering with cursors, rather than tampering with elements.
1173
1174 2019-10-10 Ed Schonberg <schonberg@adacore.com>
1175
1176 * sem_cat.adb (Set_Categorization_From_Pragma): Do not modify
1177 any visibility settings if there are no compilation_unit pragmas
1178 following the package declaration. Add comments for future
1179 cleanup.
1180
1181 2019-10-10 Patrick Bernardi <bernardi@adacore.com>
1182
1183 * bindgen.adb (System_Secondary_Stack_Package_In_Closure):
1184 Renamed flag System_Secondary_Stack_Used to be clearer of what
1185 it represents.
1186 (Gen_Adainit): Refactor secondary stack related code to make it
1187 clearer.
1188 * rtsfind.adb (Load_RTU): Don't set Sec_Stack_Used flag here
1189 (RTE): Set Sec_Stack_Used if the System.Secondary_Stack is
1190 referenced, but not if we're ignoring ghost code.
1191
1192 2019-10-10 Piotr Trojanek <trojanek@adacore.com>
1193
1194 * sem_prag.adb (Analyze_Global_In_Decl_Part): Simplify previous
1195 test, just like in a recent commit we simplified a similar test
1196 for Depends contract.
1197
1198 2019-10-04 Joseph Myers <joseph@codesourcery.com>
1199
1200 * gcc-interface/utils.c (flag_isoc2x): New variable.
1201
1202 2019-10-01 Maciej W. Rozycki <macro@wdc.com>
1203
1204 * gcc-interface/Makefile.in (ADA_RTL_DSO_DIR): New variable.
1205 (install-gnatlib): Use it in place of ADA_RTL_OBJ_DIR for shared
1206 library installation.
1207
1208 2019-10-01 Maciej W. Rozycki <macro@wdc.com>
1209
1210 * gcc-interface/Make-lang.in (ada.install-common): Split into...
1211 (gnat-install-tools, gnat-install-lib): ... these.
1212
1213 2019-09-26 Alexandre Oliva <oliva@adacore.com>
1214
1215 * gcc-interface/decl.c (components_to_record): Set
1216 DECL_SIZE_UNIT for zero-sized fields.
1217
1218 2019-09-26 Arnaud Charlet <charlet@adacore.com>
1219
1220 * osint.adb (OS_Time_To_GNAT_Time): Remove dependency on To_C/To_Ada
1221
1222 2019-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1223
1224 * libgnarl/s-osinte__solaris.ads (sysconf): Declare.
1225 (SC_NPROCESSORS_ONLN): Define.
1226 * libgnarl/s-tasinf__solaris.ads (Number_Of_Processors): Declare.
1227 * libgnarl/s-tasinf__solaris.adb (N_CPU): New variable.
1228 (Number_Of_Processors): New function.
1229
1230 2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
1231
1232 * gcc-interface/trans.c (Regular_Loop_to_gnu): Do not rotate the loop
1233 if -Og is enabled.
1234 (build_return_expr): Do not perform NRV if -Og is enabled.
1235 (Subprogram_Body_to_gnu): Likewise.
1236 (gnat_to_gnu) <N_Simple_Return_Statement>: Likewise.
1237 (Handled_Sequence_Of_Statements_to_gnu): Do not inline finalizers if
1238 -Og is enabled.
1239 * gcc-interface/utils.c (convert_to_index_type): Return early if -Og
1240 is enabled.
1241
1242 2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
1243
1244 * gcc-interface/trans.c (gnat_compile_time_expr_list): New variable.
1245 (Pragma_to_gnu): Rename local variable. Save the (first) expression
1246 of pragma Compile_Time_{Error|Warning} for later processing.
1247 (Compilation_Unit_to_gnu): Process the expressions saved above.
1248
1249 2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
1250
1251 * gcc-interface/trans.c (Attribute_to_gnu): Test Can_Use_Internal_Rep
1252 on the underlying type of the node.
1253 (Call_to_gnu): Likewise with the type of the prefix.
1254
1255 2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
1256
1257 * gcc-interface/decl.c (components_to_record): Do not reorder fields
1258 in packed record types if they contain fixed-size fields that cannot
1259 be laid out in a packed manner.
1260
1261 2019-09-19 Tom Tromey <tromey@adacore.com>
1262
1263 * gcc-interface/misc.c (gnat_get_type_bias): Return the bias
1264 when -fgnat-encodings=gdb.
1265
1266 2019-09-19 Steve Baird <baird@adacore.com>
1267
1268 * sem_prag.adb (Preferred_String_Type): A new function. Given an
1269 expression, determines whether the preference rules defined for
1270 the third-and-later arguments of pragma Annotate suffice to
1271 determine the type of the expression. If so, then the preferred
1272 type is returned; if not then Empty is returned. Handles
1273 concatenations.
1274 (Analyze_Pragma): Replace previous code, which dealt only with
1275 string literals, with calls to the new Preferred_String_Type
1276 function, which also handles concatenations.
1277 * doc/gnat_rm/implementation_defined_pragmas.rst: Update
1278 documentation for pragma Annotate.
1279 * gnat_rm.texi: Regenerate.
1280
1281 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1282
1283 * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not return true
1284 on pure alignment considerations if the target does not require
1285 the strict alignment of memory accesses.
1286
1287 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1288
1289 * sem_ch12.adb (Check_Private_View): Add a comment to indicate
1290 future work.
1291
1292 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1293
1294 * exp_aggr.adb (Has_Mutable_Components): Look at the underlying
1295 type of components to find out whether they are mutable.
1296
1297 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1298
1299 * sem_ch12.adb (Instantiate_Package_Body): Check that the body
1300 has not already been instantiated when the body of the parent
1301 was being loaded.
1302
1303 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1304
1305 * sem_util.adb (In_Instance): Test whether the current unit has
1306 been analyzed instead of being on the scope stack to detect the
1307 case of actuals of an instantiation of a generic child unit done
1308 as a compilation unit.
1309
1310 2019-09-19 Dmitriy Anisimkov <anisimko@adacore.com>
1311
1312 * libgnat/g-socket.ads, libgnat/g-socket.adb
1313 (Create_Socket_Pair): New routine.
1314 * libgnat/g-socthi.ads (OS_Has_Socketpair): Boolean constant.
1315 (C_Socketpair): New imported routine.
1316 * libgnat/g-socthi__mingw.ads, libgnat/g-socthi__vxworks.ads
1317 (Default_Socket_Pair_Family): New constant.
1318 (C_Socketpair): New routine.
1319 * libgnat/g-socthi__mingw.adb, libgnat/g-socthi__vxworks.adb
1320 (C_Socketpair): Is separated in anouther file.
1321 * libgnat/g-sthcso.adb (C_Socketpair): Non UNIX implementation.
1322 * libgnat/g-stsifd__sockets.adb: Reuse C_Socketpair.
1323
1324 2019-09-19 Yannick Moy <moy@adacore.com>
1325
1326 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Simplify previous
1327 test.
1328
1329 2019-09-19 Ed Schonberg <schonberg@adacore.com>
1330
1331 * sem_ch7.adb (Install_Parent_Private_Declarations): If a
1332 generic child unit is instantiated within a sibling child unit,
1333 the analysis of its private part requires that the private part
1334 of the ancestor be available, as is done when the context
1335 includes an instance of the ancestor.
1336
1337 2019-09-19 Yannick Moy <moy@adacore.com>
1338
1339 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add special
1340 case for traversal functions.
1341
1342 2019-09-19 Yannick Moy <moy@adacore.com>
1343
1344 * sem_prag.adb (Analyze_Global_In_Decl_Part): Do not issue an
1345 error when a constant of an access type is used as output in a
1346 Global contract.
1347 (Analyze_Depends_In_Decl_Part): Do not issue an error when a
1348 constant of an access type is used as output in a Depends
1349 contract.
1350
1351 2019-09-19 Arnaud Charlet <charlet@adacore.com>
1352
1353 * exp_attr.adb: Remove obsolete comment.
1354
1355 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1356
1357 * sem_ch3.adb (Build_Derived_Access_Type): If this is an access-
1358 to-subprogram type, copy Can_Use_Internal_Rep from the parent.
1359
1360 2019-09-19 Yannick Moy <moy@adacore.com>
1361
1362 * gcc-interface/Make-lang.in: Remove references to sem_spark.
1363 * sem_spark.adb, sem_spark.ads: Remove unit.
1364
1365 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1366
1367 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Treat
1368 Machine_Rounding as an alias for Rounding.
1369 * sem_res.adb (Simplify_Type_Conversion): Likewise.
1370
1371 2019-09-19 Gary Dismukes <dismukes@adacore.com>
1372
1373 * exp_unst.adb (Unnest_Subprogram): Bypass the transformation of
1374 up-level references unless Opt.Generate_C_Code is enabled.
1375
1376 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1377
1378 * exp_ch4.adb (Expand_Array_Equality): If optimization is
1379 enabled, generate a simple conjunction of comparisons for the
1380 specific case of constrained 1-dimensional 2-element arrays.
1381 Fix formatting.
1382
1383 2019-09-19 Piotr Trojanek <trojanek@adacore.com>
1384
1385 * exp_dbug.ads, exp_dbug.adb (Get_Homonym_Number): Remove.
1386 (Append_Homonym_Number): Use Homonym_Number instead of
1387 Get_Homonym_Number.
1388 * exp_util.ads, exp_util.adb (Homonym_Number): Mirror style of
1389 the removed Get_Homonym_Number routine, i.e. initialize local
1390 objects at declaration and refine the type of result.
1391 * sem_util.adb (Add_Homonym_Suffix): Use Homonym_Number instead
1392 of Get_Homonym_Number.
1393
1394 2019-09-19 Ed Schonberg <schonberg@adacore.com>
1395
1396 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Simplify
1397 handling of expressions in predicates when the context is a
1398 generic unit.
1399
1400 2019-09-19 Bob Duff <duff@adacore.com>
1401
1402 * sem_attr.adb (Resolve_Attribute): Make sure the secondary
1403 stack is properly managed in the case of a 'Range attribute in a
1404 loop.
1405
1406 2019-09-19 Raphael Amiard <amiard@adacore.com>
1407
1408 * libgnat/a-cfhase.ads (Set): Add comments to public primitives.
1409
1410 2019-09-19 Raphael Amiard <amiard@adacore.com>
1411
1412 * libgnat/a-cbhama.ads, libgnat/a-cbhase.ads,
1413 libgnat/a-chtgop.ads (Clear): Refine comments
1414
1415 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1416
1417 * sem_ch12.adb (Restore_Private_Views): Comment out new code
1418 that clear the Is_Generic_Actual_Type also on the full view.
1419
1420 2019-09-19 Bob Duff <duff@adacore.com>
1421
1422 * exp_ch3.adb (Rewrite_As_Renaming): Return False if there are
1423 any aspect specifications, because otherwise Insert_Actions
1424 blows up.
1425
1426 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1427
1428 * exp_ch6.adb (Add_Simple_Call_By_Copy_Code): Add
1429 Bit_Packed_Array parameter and documet it. Always insert a copy
1430 if it is set True.
1431 (Expand_Actuals): Adjust the calls to
1432 Add_Simple_Call_By_Copy_Code.
1433
1434 2019-09-19 Bob Duff <duff@adacore.com>
1435
1436 * xref_lib.adb (Get_Symbol_Name): If we reach EOF in the first
1437 loop without finding the symbol, return "???". Otherwise, it's
1438 an infinite loop.
1439 (Parse_EOL): Assert that we're not already at EOF. Remove
1440 processing of LF/CR -- there are no operating systems that use
1441 that.
1442
1443 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1444
1445 * exp_ch6.adb (Is_Legal_Copy): Also return false for an aliased
1446 formal and a formal passed by reference in convention Ada. Add
1447 missing guard to the existing test on Is_Valued_Procedure.
1448
1449 2019-09-19 Bob Duff <duff@adacore.com>
1450
1451 * rtsfind.ads (RTE_Available): Improve comment.
1452
1453 2019-09-18 Bob Duff <duff@adacore.com>
1454
1455 * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Move call
1456 to RTE_Available later, so it doesn't disturb the elab order.
1457 The RE_Copy_Bitfield entity is defined in package
1458 System.Bitfields which has a dependency on package
1459 System.Bitfield_Utils, which has it its spec:
1460 pragma Elaborate_Body;
1461 The query on RTE_Available forces loading and analyzing
1462 System.Bitfields and all its withed units.
1463
1464 2019-09-18 Eric Botcazou <ebotcazou@adacore.com>
1465
1466 * checks.ads (Alignment_Warnings_Record): Add P component.
1467 * checks.adb (Apply_Address_Clause_Check): Be prepared to kill
1468 the warning also if the clause is of the form X'Address.
1469 (Validate_Alignment_Check_Warning): Kill the warning if the
1470 clause is of the form X'Address and the alignment of X is
1471 compatible.
1472
1473 2019-09-18 Ed Schonberg <schonberg@adacore.com>
1474
1475 * sem_res.adb (Set_Mixed_Node_Expression): If a conditional
1476 expression has universal_real alternaitves and the context is
1477 Universal_Fixed, as when it is an operand in a fixed-point
1478 multiplication or division, resolve the expression with a
1479 visible fixed-point type, which must be unique.
1480
1481 2019-09-18 Ed Schonberg <schonberg@adacore.com>
1482
1483 * sem_ch3.adb (Constrain_Component_Type): For a discriminated
1484 type, handle the case of a constraint given by a conversion of a
1485 discriminant of the enclosing type. Necessary when compiling a
1486 discriminated task for a restricted run-time, when the generated
1487 Secondary_Stack component may be set by means of an aspect on
1488 the task type.
1489
1490 2019-09-18 Ed Schonberg <schonberg@adacore.com>
1491
1492 * exp_aggr.adb (Expand_Record_Aggregate, Rewrite_Discriminant):
1493 After rewriting a reference to an outer discriminant as a
1494 selected component of the enclosing object, analyze the selected
1495 component to ensure that the entity of the selector name is
1496 properly set. This is necessary when the aggregate appears
1497 within an expression that may have been analyzed already.
1498
1499 2019-09-18 Justin Squirek <squirek@adacore.com>
1500
1501 * sem_ch8.adb (Use_One_Type): Add guard to prevent warning on a
1502 reundant use package clause where there is no previous
1503 use_clause in the chain.
1504
1505 2019-09-18 Justin Squirek <squirek@adacore.com>
1506
1507 * exp_ch4.adb (Expand_N_Type_Conversion): Add calculation of an
1508 alternative operand for the purposes of generating accessibility
1509 checks.
1510
1511 2019-09-18 Eric Botcazou <ebotcazou@adacore.com>
1512
1513 * exp_aggr.adb (Build_Array_Aggr_Code): In STEP 1 (c), duplicate
1514 the expression and reset the Loop_Actions for each loop
1515 generated for an others choice.
1516
1517 2019-09-18 Justin Squirek <squirek@adacore.com>
1518
1519 * einfo.adb, einfo.ads (Minimum_Accessibility): Added new field.
1520 (Set_Minimum_Accessibility): Added to set new field.
1521 (Minimum_Accessibility): Added to fetch new field.
1522 * exp_ch6.adb (Expand_Subprogram_Call): Modify calls to fetch
1523 accessibility levels to the new subprogram Get_Accessibility
1524 which handles cases where minimum accessibility might be needed.
1525 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Add section to
1526 generate a Minimum_Accessibility object within relevant
1527 subprograms.
1528 * sem_util.adb, sem_util.ads (Dynamic_Accessibility_Level):
1529 Additional documentation added and modify section to use new
1530 function Get_Accessibility.
1531 (Get_Accessibility): Added to centralize processing of
1532 accessibility levels.
1533
1534 2019-09-18 Steve Baird <baird@adacore.com>
1535
1536 * sem_util.ads (Interval_Lists): A new visible package. This
1537 package is visible because it is also intended for eventual use
1538 in Sem_Eval.Subtypes_Statically_Compatible when that function is
1539 someday upgraded to handle static predicates correctly. This
1540 new package doesn't really need to be visible for now, but it
1541 still seems like a good idea.
1542 * sem_util.adb (Gather_Components): Implement AI12-0086 via the
1543 following strategy. The existing code knows how to take a static
1544 discriminant value and identify the corresponding variant; in
1545 the newly-permitted case of a non-static value of a static
1546 subtype, we arbitrarily select a value of the subtype and find
1547 the corresponding variant using the existing code. Subsequently,
1548 we check that every other value of the discriminant's subtype
1549 corresponds to the same variant; this is done using the newly
1550 introduced Interval_Lists package.
1551 (Interval_Lists): Provide a body for the new package.
1552
1553 2019-09-18 Javier Miranda <miranda@adacore.com>
1554
1555 * exp_ch4.adb (Expand_N_Op_Eq): The frontend assumes that we can
1556 do a bit-for-bit comparison of two access to protected
1557 subprogram pointers. However, there are two reasons why we may
1558 not be able to do that: (1) there may be padding bits for
1559 alignment before the access to subprogram, and (2) the access to
1560 subprogram itself may not be compared bit-for- bit because the
1561 activation record part is undefined: two pointers are equal iff
1562 the subprogram addresses are equal. This patch fixes it by
1563 forcing a field-by-field comparison.
1564 * bindgen.adb (Gen_Adainit): The type No_Param_Proc is defined
1565 in the library as having Favor_Top_Level, but when we create an
1566 object of that type in the binder file we don't have that
1567 pragma, so the types are different. This patch fixes this issue.
1568 * libgnarl/s-interr.adb, libgnarl/s-interr__hwint.adb,
1569 libgnarl/s-interr__sigaction.adb, libgnarl/s-interr__vxworks.adb
1570 (Is_Registered): This routine erroneously assumes that the
1571 access to protected subprogram is two addresses. We need to
1572 create the same record that the compiler makes to ensure that
1573 any padding is the same. Then we have to look at just the first
1574 word of the access to subprogram. This patch fixes this issue.
1575
1576 2019-09-18 Bob Duff <duff@adacore.com>
1577
1578 * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): The call
1579 to Copy_Bitfield is now enabled.
1580 (Expand_Assign_Array_Bitfield): Multiply 'Length times
1581 'Component_Size "by hand" instead of using 'Size.
1582
1583 2019-09-18 Vasiliy Fofanov <fofanov@adacore.com>
1584
1585 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix minor
1586 formatting issue.
1587
1588 2019-09-18 Javier Miranda <miranda@adacore.com>
1589
1590 * exp_disp.adb (Make_DT, Make_Secondary_DT): Remove generation
1591 of alignment representation clause for the following tables:
1592 Predef_Prims, Iface_DT, TSD, ITable, DT.
1593
1594 2019-09-18 Steve Baird <baird@adacore.com>
1595
1596 * sem_eval.adb (Expr_Value): Do not fail "the type of a null
1597 literal must be an access type" assertion if errors have already
1598 been posted on the given node.
1599
1600 2019-09-18 Piotr Trojanek <trojanek@adacore.com>
1601
1602 * exp_dbug.ads, exp_dbug.adb (Get_Homonym_Number): Refine type
1603 from Nat to Pos.
1604 * sem_util.adb (Add_Homonym_Suffix): Refine type of a local
1605 variable.
1606
1607 2019-09-18 Yannick Moy <moy@adacore.com>
1608
1609 * exp_dbug.adb (Append_Homonym_Number): Use new function
1610 Get_Homonym_Number.
1611 (Get_Homonym_Number): New function to return the homonym number.
1612 (Qualify_Entity_Name): Remove special case for GNATprove.
1613 * exp_dbug.ads (Get_Homonym_Number): Make the new function
1614 public for use in GNATprove.
1615 * frontend.adb (Frontend): Do not qualify names in GNATprove
1616 mode.
1617 * sem_util.adb (Unique_Name): Append homonym suffix where needed
1618 for entities which have local homonyms in the same scope.
1619
1620 2019-09-18 Nicolas Roche <roche@adacore.com>
1621
1622 * libgnat/s-valrea.adb (Scan_Integral_Digits): New procedure.
1623 (Scan_Decimal_Digits): New procedure.
1624 (As_Digit): New function.
1625 (Scan_Real): Use Scan_Integral_Digits and Scan_Decimal_Digits.
1626
1627 2019-09-18 Claire Dross <dross@adacore.com>
1628
1629 * exp_attr.adb (Expand_N_Attribute_Reference): Call routine from
1630 Exp_Util to know the value of the Constrained attribute in the
1631 static case.
1632 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Make
1633 implicit dereferences inside the Constrained attribute explicit.
1634 * exp_util.ads, exp_util.adb
1635 (Attribute_Constrained_Static_Value): New routine to compute the
1636 value of a statically known reference to the Constrained
1637 attribute.
1638
1639 2019-09-18 Vadim Godunko <godunko@adacore.com>
1640
1641 * libgnat/g-expect.adb (Expect_Internal): Don't include invalid
1642 file descriptors into the set of file descriptors for Poll.
1643 Raise Process_Died exception when computed set of file
1644 descriptors to monitor is empty.
1645
1646 2019-09-18 Frederic Konrad <konrad@adacore.com>
1647
1648 * adaint.c: Include dosFsLib.h and vwModNum.h for VxWorks 6.
1649 (__gnat_rename): Map S_dosFsLib_FILE_NOT_FOUND to ENOENT.
1650
1651 2019-09-18 Steve Baird <baird@adacore.com>
1652
1653 * freeze.adb (Freeze_Object_Declaration): Do not call
1654 Check_Large_Modular_Array when the object declaration being
1655 frozen is an ignored ghost entity.
1656
1657 2019-09-18 Tom Tromey <tromey@adacore.com>
1658
1659 * make.adb (Initialize): Fix typo.
1660
1661 2019-09-18 Olivier Hainque <hainque@adacore.com>
1662
1663 * libgnat/s-win32.ads (DWORD_PTR): New type, pointer size
1664 unsigned int.
1665 (SYSTEM_INFO): Use it for dwActiveProcessorMask.
1666
1667 2019-09-18 Arnaud Charlet <charlet@adacore.com>
1668
1669 * doc/gnat_rm/implementation_defined_pragmas.rst: Improve doc on
1670 Warning_As_Error.
1671 * gnat_rm.texi: Regenerate.
1672
1673 2019-09-18 Arnaud Charlet <charlet@adacore.com>
1674
1675 * doc/gnat_rm/implementation_defined_characteristics.rst,
1676 doc/gnat_rm/implementation_defined_pragmas.rst,
1677 doc/gnat_rm/implementation_of_specific_ada_features.rst: Remove
1678 remaining references to VMS support
1679 * gnat_rm.texi: Regenerate.
1680
1681 2019-09-18 Arnaud Charlet <charlet@adacore.com>
1682
1683 * libgnat/s-stausa.adb: Fix a typo
1684
1685 2019-09-18 Bob Duff <duff@adacore.com>
1686
1687 * libgnat/a-cbhama.adb, libgnat/a-cbhase.adb,
1688 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb,
1689 libgnat/a-cborse.adb, libgnat/a-cobove.adb (Copy): Avoid reading
1690 the uninitialized variable C in the Checks = False case. Change
1691 variable to be a constant.
1692
1693 2019-09-18 Claire Dross <dross@adacore.com>
1694
1695 * libgnat/a-cofuma.adb (Remove, Elements_Equal_Except,
1696 Keys_Included, Keys_Included_Except): Rename loop indexes and
1697 global constants from I to J.
1698
1699 2019-09-18 Arnaud Charlet <charlet@adacore.com>
1700
1701 * exp_unst.adb (Unnest_Subprograms): Refine previous change.
1702
1703 2019-09-17 Claire Dross <dross@adacore.com>
1704
1705 * libgnat/a-cofuma.ads, libgnat/a-cofuma.adb (Remove): New
1706 function which returns a copy of the input container without a
1707 given mapping.
1708
1709 2019-09-17 Yannick Moy <moy@adacore.com>
1710
1711 * libgnat/s-arit64.adb (Double_Divide): Correctly handle the
1712 special case when rounding.
1713
1714 2019-09-17 Javier Miranda <miranda@adacore.com>
1715
1716 * sem_ch3.adb (Complete_Private_Subtype): Propagate attributes
1717 Has_Attributes and Predicate_Function to the cloned subtype.
1718
1719 2019-09-17 Eric Botcazou <ebotcazou@adacore.com>
1720
1721 * sem.adb (Do_Analyze): Save Style_Check_Max_Line_Length on
1722 entry and restore it on exit instead of recomputing it.
1723
1724 2019-09-17 Tom Tromey <tromey@adacore.com>
1725
1726 * exp_dbug.ads: Update character type comment.
1727
1728 2019-09-17 Yannick Moy <moy@adacore.com>
1729
1730 * libgnat/s-arit64.adb (Double_Divide): Simplify needlessly
1731 complex computation. Fix comments.
1732 (Scaled_Divide): Fix comments. Explain why implementation does
1733 not suffer from bugs in Algorithm D from 2nd Edition of TAOCP.
1734
1735 2019-09-17 Yannick Moy <moy@adacore.com>
1736
1737 * libgnat/s-arit64.adb (Scaled_Divide): Add protection against
1738 undesirable wrap-around.
1739
1740 2019-09-17 Yannick Moy <moy@adacore.com>
1741
1742 * libgnat/s-arit64.adb (Double_Divide): Fix two possible
1743 overflows.
1744
1745 2019-09-17 Dmitriy Anisimkov <anisimko@adacore.com>
1746
1747 * make_util.ads (On_Windows): Move...
1748 * osint.ads (On_Windows): There.
1749 * osint.adb (OS_Time_To_GNAT_Time): If odd incremented on
1750 Windows before conversion to Time_Stamp_Type.
1751
1752 2019-09-17 Yannick Moy <moy@adacore.com>
1753
1754 * sem_spark.adb (Check_Declaration): Do not check the assignment
1755 from an illegal declaration.
1756
1757 2019-09-17 Bob Duff <duff@adacore.com>
1758
1759 * doc/gnat_ugn/gnat_and_program_execution.rst: Clarify
1760 documentation.
1761 * gnat_ugn.texi: Regenerate.
1762 * libgnat/s-stausa.ads: Clarify comments.
1763
1764 2019-09-17 Steve Baird <baird@adacore.com>
1765
1766 * sem_util.adb (Wrong_Type): In deciding to suppress a message,
1767 it is not enough for In_Instance to be True; in addition,
1768 In_Generic_Actual (Expr) must be False.
1769 * sem_type.adb (In_Generic_Actual): Fix bug where traversal of
1770 parents skips every other node.
1771
1772 2019-09-17 Claire Dross <dross@adacore.com>
1773
1774 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): If the
1775 definition of a local borrower contains calls to traversal
1776 functions, the borrowed expression is the first parameter of the
1777 first traversal function call in the definition.
1778
1779 2019-09-17 Ed Falis <falis@adacore.com>
1780
1781 * doc/gnat_rm/implementation_defined_pragmas.rst: Remove
1782 section.
1783 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
1784
1785 2019-09-17 Vadim Godunko <godunko@adacore.com>
1786
1787 * libgnat/g-exptty.ads (Close_Input): New subprogram.
1788 * libgnat/g-exptty.adb (Close_Input): New subprogram.
1789 (Close): Move close of TTY to Close_Input.
1790 * terminals.c (__gnat_close_tty): Set file descriptors to
1791 invalid value after close.
1792
1793 2019-09-17 Vadim Godunko <godunko@adacore.com>
1794
1795 * libgnat/g-expect.adb (Expect_Internal): Try to call 'poll' few
1796 times.
1797
1798 2019-09-17 Vadim Godunko <godunko@adacore.com>
1799
1800 * libgnat/g-expect.ads, libgnat/g-expect.adb (Close_Input): New
1801 subprogram.
1802 (Get_Command_Output): Call Close_Input to close input stream.
1803 (Expect_Internal): Likewise.
1804 (Close): Likewise.
1805 * libgnat/g-exptty.adb (Close): Likewise.
1806
1807 2019-09-17 Piotr Trojanek <trojanek@adacore.com>
1808
1809 * sem_util.ads, sem_util.adb (Is_Attribute_Old): New utility
1810 routine.
1811
1812 2019-09-17 Yannick Moy <moy@adacore.com>
1813
1814 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add handling
1815 for dispatching operations.
1816
1817 2019-09-17 Ed Schonberg <schonberg@adacore.com>
1818
1819 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): In a
1820 generic context, for a Predicate aspect, use
1821 Preanalyze_Spec_Expression to verify conformance.
1822
1823 2019-09-17 Javier Miranda <miranda@adacore.com>
1824
1825 * sem_ch3.adb (Constrain_Corresponding_Record): Propagate
1826 attribute Is_Tagged_Type.
1827
1828 2019-09-17 Javier Miranda <miranda@adacore.com>
1829
1830 * exp_ch3.adb (Build_Record_Init_Proc): Do not generate code to
1831 adjust the tag component when the record is initialized with a
1832 raise expression.
1833 * sem_aggr.adb (Valid_Limited_Ancestor): Return True for
1834 N_Raise_Expression nodes.
1835 (Valid_Ancestor_Type): Return True for raise expressions.
1836 * sem_ch3.adb (Analyze_Component_Declaration): Do not report an
1837 error when a component is initialized with a raise expression.
1838 * sem_ch4.adb (Analyze_Qualified_Expression): Do not report an
1839 error when the aggregate has a raise expression.
1840
1841 2019-09-17 Piotr Trojanek <trojanek@adacore.com>
1842
1843 * ali.ads: Fix casing in comment.
1844 * ali-util.ads, ali-util.adb (Read_Withed_ALIs): Remove
1845 Ignore_Errors parameter; it was only set to non-default value of
1846 True when running in GNATprove_Mode and wrongly reset to False
1847 when calling this routine recursively. Now in GNATprove mode we
1848 want it to be always True, so in fact it is equivalent to
1849 GNATProve_Mode flag itself (which was already used in this
1850 routine).
1851
1852 2019-09-17 Arnaud Charlet <charlet@adacore.com>
1853
1854 * adaint.c (_REENTRANT, _THREAD_SAFE): Only define if needed.
1855
1856 2019-09-17 Arnaud Charlet <charlet@adacore.com>
1857
1858 * libgnat/s-bitfie.ads (Val_Bits, Val_Bytes): Define from
1859 Long_Long_Integer'Size.
1860
1861 2019-09-17 Javier Miranda <miranda@adacore.com>
1862
1863 * exp_ch6.ads (Needs_BIP_Task_Actuals): New subprogram.
1864 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): Code
1865 cleanup.
1866 (Check_Number_Of_Actuals): New subprogram.
1867 (Make_Build_In_Place_Call_In_Allocator): Adding assertion.
1868 (Make_Build_In_Place_Call_In_Anonymous_Context): Adding
1869 assertion.
1870 (Make_Build_In_Place_Call_In_Assignment): Adding assertion.
1871 (Make_Build_In_Place_Call_In_Object_Declaration): Code cleanup
1872 plus assertion addition.
1873 (Needs_BIP_Task_Actuals): New subprogram.
1874 * sem_ch6.adb (Create_Extra_Formals): Rely on
1875 Needs_BIP_Task_Actuals() to check if the master of the tasks to
1876 be created, and the caller's activation chain formals are
1877 needed.
1878
1879 2019-09-17 Bob Duff <duff@adacore.com>
1880
1881 * libgnat/s-bituti.adb (Get_Val_2, Set_Val_2): Use new routines
1882 for getting and setting a Val_2, avoiding touching the second
1883 half when that half might not exist.
1884 * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Correct
1885 tests for potential volatile or independent components. In
1886 particular, do not call Prefix unless we know it's a slice.
1887
1888 2019-09-17 Dmitriy Anisimkov <anisimko@adacore.com>
1889
1890 * gsocket.h: Include sys/un.h.
1891 * s-oscons-tmplt.c (AF_UNIX): New constant generation.
1892 (SIZEOF_sockaddr_un): Idem.
1893 * libgnat/g-socket.ads (Family_Type): New value Family_Unix
1894 added.
1895 (Family_Inet_4_6): New subtype only for network families.
1896 (Sock_Addr_Type): Add Unbounded_String field for Family_Unix
1897 variant.
1898 (Unix_Socket_Address): Create Sock_Addr_Type from socket
1899 pathname.
1900 (Network_Socket_Address): Create Sock_Addr_Type from
1901 Inet_Addr_Type and Port_Type parameters.
1902 * libgnat/g-socket.adb: Support local unix address in socket
1903 routines.
1904 (Get_Address_Info): Disable warning about Result may be
1905 referenced before it has a value. Remove duplicated code to exit
1906 from Look_For_Supported.
1907 * libgnat/g-sothco.ads (Unix_Name_Length): New constant defining
1908 maximum number of characters in local socket address path.
1909 (Sockaddr): Add variant for Family_Unix address family. Move
1910 Sin_Port and Sin_Family to Family_Inet section. Add Sin6_Port
1911 and Sin6_Family to Family_Inet6 section.
1912 (Set_Address): Add out parameter Length to return valuable
1913 Sockaddr data length.
1914 (Get_Address): Add input parameter Length to set valuable
1915 Sockaddr data length.
1916 * libgnat/g-sothco.adb: Support local unix address in socket
1917 routines.
1918
1919 2019-09-17 Eric Botcazou <ebotcazou@adacore.com>
1920
1921 * exp_attr.adb (Expand_Size_Attribute): Chain the special cases
1922 on the back-end path and rewrite the attribute appled to slices
1923 of bit-packed arrays into the product of the Length and the
1924 Compoent_Size attributes of the slices.
1925 * exp_ch5.adb (Expand_Assign_Array_Bitfield): Use Size attribute
1926 directly to compute the bitfield's size.
1927
1928 2019-09-17 Bob Duff <duff@adacore.com>
1929
1930 * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Add tests
1931 for potential volatile or independent components.
1932 * libgnat/s-bituti.adb (Copy_Small_Bitfield,
1933 Copy_Large_Bitfield): Move declarations to more appropriate
1934 place.
1935
1936 2019-09-13 Maciej W. Rozycki <macro@wdc.com>
1937
1938 * make.adb (Scan_Make_Arg): Also accept `--sysroot=' for the
1939 compiler and the linker.
1940
1941 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1942
1943 * gcc-interface/decl.c (maybe_saturate_size): New function.
1944 (gnat_to_gnu_entity): Invoke it on the Esize of types before sending
1945 it for back-annotations.
1946 * gcc-interface/trans.c: Fix typo.
1947
1948 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1949
1950 * gcc-interface/ada-tree.h (DECL_FORCED_BY_REF_P): New macro.
1951 * gcc-interface/decl.c (gnat_to_gnu_param): Set it on parameters
1952 whose mechanism was forced to by-reference.
1953 * gcc-interface/trans.c (Call_to_gnu): Do not issue a warning about a
1954 misaligned actual parameter if it is based on a CONSTRUCTOR. Remove
1955 obsolete warning for users of Starlet. Issue a warning if a temporary
1956 is make around the call for a parameter with DECL_FORCED_BY_REF_P set.
1957 (addressable_p): Return true for REAL_CST and ADDR_EXPR.
1958
1959 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1960
1961 * gcc-interface/trans.c (gnat_to_gnu): Do not set the location on an
1962 expression used for a tag.
1963
1964 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1965
1966 * gcc-interface/gigi.h (aggregate_type_contains_array_p): Declare.
1967 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: For an
1968 extension, test Has_Record_Rep_Clause instead of Has_Specified_Layout.
1969 (adjust_packed): Return 0 if the type of the field is an aggregate
1970 type that contains (or is) a self-referential array.
1971 (type_has_variable_size): Delete.
1972 * gcc-interface/utils.c (inish_record_type): Constify a variable.
1973 (aggregate_type_contains_array_p): Add parameter SELF_REFERENTIAL.
1974 <RECORD_TYPE>: Pass it in the recursive call.
1975 <ARRAY_TYPE>: If it is true, return true only if the array type is
1976 self-referential.
1977 (create_field_decl): Streamline the setting of the alignment on the
1978 field. Pass false to aggregate_type_contains_array_p.
1979
1980 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1981
1982 * gcc-interface/trans.c (lvalue_required_p) <N_Slice>: Adjust GNU_TYPE
1983 in the recursive call.
1984 <N_Selected_Component>: Likewise.
1985
1986 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1987
1988 * gcc-interface/utils.c (build_template): Deal with parameters
1989 passed by pointer to component of multi-dimensional arrays.
1990
1991 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1992
1993 * gcc-interface/decl.c (annotate_value) <CALL_EXPR>: Inline the call
1994 also if List_Representation_Info is greater than 3.
1995
1996 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
1997
1998 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Add assertion.
1999
2000 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
2001
2002 * gcc-interface/gigi.h (gigi_checking_assert): New macro.
2003 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type>:
2004 Remove redundant test and adjust comments. Minor tweaks.
2005 * gcc-interface/trans.c (Call_to_gnu): Do not generate range checks,
2006 instead assert that the Do_Range_Check flag is not set. Adjust call
2007 to convert_with_check.
2008 (gnat_to_gnu): Likewise.
2009 (assoc_to_constructor): Likewise.
2010 (pos_to_constructor): Likewise. Remove GNAT_COMPONENT_TYPE parameter.
2011 (emit_range_check): Delete.
2012 (convert_with_check): Remove RANGE_P parameter and adjust. Do a single
2013 overflow check for modular types.
2014
2015 2019-08-23 Jakub Jelinek <jakub@redhat.com>
2016
2017 PR middle-end/91283
2018 * gcc-interface/misc.c (gnat_post_options): Set flag_excess_precision
2019 instead of flag_excess_precision_cmdline.
2020
2021 2019-08-21 Vadim Godunko <godunko@adacore.com>
2022
2023 * libgnat/g-expect.adb (Expect_Internal): Attempt to read
2024 several times when 'read' returns non-positive.
2025
2026 2019-08-21 Piotr Trojanek <trojanek@adacore.com>
2027
2028 * einfo.adb (Is_Discriminal): Remove extra parens.
2029 (Is_Constant_Object): Simplify by reusing Ekind_In.
2030 (Is_Prival): Remove extra parens.
2031 * checks.adb, exp_ch4.adb, sem_ch3.adb, sem_spark.adb: Minor
2032 reformattings.
2033
2034 2019-08-21 Claire Dross <dross@adacore.com>
2035
2036 * libgnat/a-cofove.ads (Vector): Add an Iterable aspect to allow
2037 iteration.
2038 (Iter_First, Iter_Next): Primitives used for iteration.
2039
2040 2019-08-21 Yannick Moy <moy@adacore.com>
2041
2042 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit RM_Size
2043 field for formal type parameters in generic instantiations.
2044
2045 2019-08-21 Yannick Moy <moy@adacore.com>
2046
2047 * sem_spark.adb: Update references to the SPARK RM.
2048
2049 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2050
2051 * repinfo.adb (List_Array_Info): In -gnatR4 mode, set the
2052 relevant flag on the component type here instead of...
2053 (List_Object_Info): Likewise for the object type.
2054 (List_Entities): ...here. In -gnatR4 mode, recurse into
2055 entities local to a record type.
2056 (List_Component_Layout): In -gnatR4 mode, mark the type as
2057 relevant.
2058
2059 2019-08-21 Bob Duff <duff@adacore.com>
2060
2061 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-bitutil.o and
2062 s-biutin.o.
2063 * exp_ch5.adb (Expand_Assign_Array_Bitfield): New function to
2064 generate a call to Copy_Bitfield. This is disabled for now.
2065 (Expand_Assign_Array_Loop_Or_Bitfield): New function to decide
2066 whether to call Expand_Assign_Array_Bitfield.
2067 (Expand_Assign_Array): Call Expand_Assign_Array_Loop_Or_Bitfield
2068 instead of Expand_Assign_Array_Loop.
2069 * libgnat/s-bitfie.ads, libgnat/s-bituti.adb,
2070 libgnat/s-bituti.ads: New units.
2071 * rtsfind.ads: Add enum literals for accessing Copy_Bitfield.
2072
2073 2019-08-21 Piotr Trojanek <trojanek@adacore.com>
2074
2075 * bindo-graphs.ads (Iterate_Edges_To_Successors): Fix typo in
2076 pragma Inline.
2077 * bindo-graphs.adb (Delete_Edge): Fix layout in parameter list.
2078
2079 2019-08-21 Gary Dismukes <dismukes@adacore.com>
2080
2081 * exp_ch3.adb (Build_Master): Suppress call to
2082 Build_Class_Wide_Master in the case where the
2083 access-to-limited-class-wide type was created for a component in
2084 an entry's formal parameter
2085 block (Is_Parameter_Block_Component_Type), to prevent a master
2086 from being created for such access types generated by the front
2087 end in a task spec for entry formals in a parameter block. Add
2088 a ??? about whether this suppression should be done more
2089 generally (such as by using Comes_From_Source).
2090
2091 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2092
2093 * exp_ch6.adb (Expand_N_Extended_Return_Statement): In the case
2094 of a built-in-place function that doesn't need a BIP_Alloc_Form
2095 parameter but returns unconstrained, build the return
2096 consistently using the function's result subtype. Remove bypass
2097 added in previous change.
2098
2099 2019-08-21 Piotr Trojanek <trojanek@adacore.com>
2100
2101 * sem_prag.adb (Max_Entry_Queue_Length): Do not substitute
2102 expression of the pragma argument with its value during
2103 analysis.
2104 * sem_util.adb (Get_Max_Queue_Length): Compute value of the
2105 pragma argument when needed.
2106
2107 2019-08-21 Yannick Moy <moy@adacore.com>
2108
2109 * checks.adb (Install_Null_Excluding_Check): Do not install
2110 check in GNATprove mode.
2111
2112 2019-08-21 Yannick Moy <moy@adacore.com>
2113
2114 * sem_spark.adb (Process_Path): Do nothing on address of
2115 subprogram.
2116
2117 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2118
2119 * exp_util.adb (Finalize_Address): Deal consistently with
2120 subtypes of private protected types.
2121
2122 2019-08-21 Piotr Trojanek <trojanek@adacore.com>
2123
2124 * exp_util.adb (Corresponding_Runtime_Package): Use high-level
2125 Is_Protected_Type.
2126 * sem_ch8.adb (Analyze_Renamed_Entry): Likewise.
2127 * sem_ch9.adb (Analyze_Requeue): Likewise.
2128
2129 2019-08-21 Javier Miranda <miranda@adacore.com>
2130
2131 * sem_util.adb (Update_Named_Associations): Update
2132 First_Named_Actual when the subprogram call has a single named
2133 actual.
2134
2135 2019-08-21 Joel Brobecker <brobecker@adacore.com>
2136
2137 * doc/Makefile (mk_empty_dirs): New (PHONY) rule.
2138 (%.html, %.pdf, %.txt, %.info, %.texinfo): Add dependencies on
2139 mk_empty_dirs.
2140
2141 2019-08-21 Justin Squirek <squirek@adacore.com>
2142
2143 * doc/gnat_rm/implementation_defined_pragmas.rst: Modify
2144 documentation to reflect expected behavior.
2145 * gnat_rm.texi: Regenerate.
2146 * sem_prag.adb (Analyze_Pragma): Modify handling of pragma
2147 Max_Entry_Queue_Length to not reject integer values of negative
2148 one.
2149 * sem_util.adb (Get_Max_Queue_Length): Add processing for values
2150 of negative one to fit within the current scheme.
2151
2152 2019-08-20 Arnaud Charlet <charlet@adacore.com>
2153
2154 * exp_unst.adb (Unnest_Subprograms, Unnest_Subprogram): Take
2155 inlining (-gnatn) into account.
2156
2157 2019-08-20 Ed Schonberg <schonberg@adacore.com>
2158
2159 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
2160 Storage_Size): If the expression for Storage_Size is not static
2161 it may depend on characterstics of another type that may bot be
2162 frozen yet, so the elaboration of the expression for the aspect
2163 must be attached directly to the freeze actions of the type to
2164 which it applies.
2165
2166 2019-08-20 Piotr Trojanek <trojanek@adacore.com>
2167
2168 * exp_util.adb (Build_DIC_Procedure_Declaration): Set the last
2169 entity of the generated Default_Initial_Condition procedure in
2170 order to construct a proper entity chain.
2171
2172 2019-08-20 Yannick Moy <moy@adacore.com>
2173
2174 * exp_spark.adb (Expand_SPARK_N_Slice_Or_Indexed_Component):
2175 Renaming of function to apply to slices as well.
2176 (Expand_SPARK): Expand prefix of slices of access type.
2177
2178 2019-08-20 Bob Duff <duff@adacore.com>
2179
2180 * exp_aggr.adb (Expand_Array_Aggregate): Use build-in-place in
2181 the nonlimited case in STEP 4. This improves the efficiency of
2182 things like (1 .. 1000 => <>). We still generate some code for
2183 that, unfortunately, but it is much improved.
2184 (Aggr_Assignment_OK_For_Backend): Return false if <> components
2185 are present.
2186
2187 2019-08-20 Bob Duff <duff@adacore.com>
2188
2189 * exp_ch6.adb (Needs_BIP_Alloc_Form): Call
2190 Requires_Transient_Scope rather than checking constrainedness
2191 and so forth. We have previously improved
2192 Requires_Transient_Scope to return False in various cases,
2193 notably a limited record with an access discriminant. This
2194 change takes advantage of that to avoid using the secondary
2195 stack for functions returning such types.
2196 (Make_Build_In_Place_Call_In_Allocator): Be consistent by
2197 calling Needs_BIP_Alloc_Form rather than Is_Constrained and so
2198 forth.
2199 * sem_ch4.adb (Analyze_Allocator): The above change causes the
2200 compiler to generate code that is not legal Ada, in particular
2201 an uninitialized allocator for indefinite subtype. This is
2202 harmless, so we suppress the error message in this case.
2203
2204 2019-08-20 Gary Dismukes <dismukes@adacore.com>
2205
2206 * ali.adb, ali.ads, aspects.adb, checks.ads, checks.adb,
2207 doc/gnat_rm/implementation_defined_pragmas.rst,
2208 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2209 einfo.ads, exp_aggr.adb, exp_ch11.adb, exp_ch3.ads, exp_ch4.adb,
2210 exp_disp.adb, inline.adb, libgnat/a-locale.ads,
2211 libgnat/s-soflin.ads, par_sco.adb, repinfo.adb, sem_ch5.adb,
2212 sem_disp.adb, sem_elab.adb, sem_eval.adb, sem_spark.adb,
2213 sem_spark.ads, sinfo.ads: Minor reformattings, typo fixes and
2214 and rewordings.
2215
2216 2019-08-20 Dmitriy Anisimkov <anisimko@adacore.com>
2217
2218 * adaint.c (__gnat_to_gm_time): On _WIN32, don't round time up
2219 to even second.
2220
2221 2019-08-20 Ed Schonberg <schonberg@adacore.com>
2222
2223 * sem_ch3.adb (Analyze_Object_Declaration): If actual type is
2224 private and distinct from nominal type in declaration, propagate
2225 flags Is_Constr_Subt_For_U_Nominal and _UN_Aliased to full view
2226 of private type.
2227
2228 2019-08-20 Ed Schonberg <schonberg@adacore.com>
2229
2230 * exp_attr.adb (Expand_Loop_Entry_Attribute): When expanding a
2231 loop entry attribute for a while_loop we construct a function
2232 that incorporates the expanded condition of the loop. The itypes
2233 that may be generated in that expansion must carry the scope of
2234 the constructed function for proper handling in gigi.
2235
2236 2019-08-20 Ed Schonberg <schonberg@adacore.com>
2237
2238 * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When a
2239 dispatching call tp a subprogram with a class-wide precondition
2240 occurrs in the same declarative part as the ancestor subprogram
2241 being called, the`expression for the precondition has not been
2242 analyzed yet. Such a call may appear, e.g. in an expression
2243 function. In that case, the replacement of formals by actuals in
2244 the call cannot use the formal entities of the subprogram being
2245 called, and the occurrence of the formals in the expression must
2246 be located by name (Chars fields) as would be done at a later
2247 freeze point, when the expression is resolved in the context of
2248 the subprogram itself.
2249
2250 2019-08-20 Bob Duff <duff@adacore.com>
2251
2252 * sem_prag.adb (Persistent_BSS): If an initialization is present
2253 because of Initialize_Scalars or Normalize_Scalars, generate an
2254 implicit pragma Suppress_Initialization to remove that, because
2255 initialization is not allowed for these variables. Other
2256 initializations remain illegal.
2257
2258 2019-08-20 Gary Dismukes <dismukes@adacore.com>
2259
2260 * sem_ch3.adb (OK_For_Limited_Init_In_05): In the case of type
2261 conversions, apply the recursive call to the Original_Node of
2262 the expression Exp rather than the Expression of the
2263 Original_Node, in the case where Exp has been rewritten;
2264 otherwise, when Original_Node is the same as Exp, apply the
2265 recursive call to the Expression.
2266 (Check_Initialization): Revise condition for special check on
2267 type conversions of limited function calls to test Original_Node
2268 (avoiding spurious errors on expanded unchecked conversions
2269 applied to build-in-place dispatching calls).
2270
2271 2019-08-20 Patrick Bernardi <bernardi@adacore.com>
2272
2273 * exp_aggr.adb (Expand_Record_Aggregate): Always convert a
2274 record Aggregate to assignment statements if the option
2275 Aggregate_Individually_Assign is set.
2276 * opt.ads (Aggregate_Individually_Assign): New option.
2277 * par-prag.adb (Prag): Add Pragma_Aggregate_Individually_Assign.
2278 * sem_prag.adb (Analyze_Pragma): Likewise.
2279 * snames.ads-tmpl: Add Pragma_Aggregate_Individually_Assign and
2280 Name_Aggregate_Individually_Assign.
2281 * doc/gnat_rm/implementation_defined_pragmas.rst: Document
2282 pragma Aggregate_Individually_Assign.
2283 * gnat_rm.texi: Regenerate.
2284
2285 2019-08-20 Bob Duff <duff@adacore.com>
2286
2287 * par-ch4.adb: Minor wording change in error messages.
2288 * sem_aggr.adb (Resolve_Delta_Aggregate): Emit an error for Ada
2289 versions prior to Ada 2020.
2290
2291 2019-08-20 Bob Duff <duff@adacore.com>
2292
2293 * freeze.adb (Is_Atomic_VFA_Aggregate): Make the temp for
2294 initialization of the atomic variable be constant. This is
2295 cleaner, and might improve efficiency.
2296
2297 2019-08-20 Eric Botcazou <ebotcazou@adacore.com>
2298
2299 * repinfo.adb (List_Record_Info): In -gnatR4 mode, set the
2300 relevant flag on the implicit base type of a record subtype.
2301
2302 2019-08-20 Bob Duff <duff@adacore.com>
2303
2304 * sem_eval.adb (Expr_Value): Implement the case of an unchecked
2305 conversion of a static expression.
2306
2307 2019-08-20 Bob Duff <duff@adacore.com>
2308
2309 * sem_ch13.adb (Is_Null_Array): New function, used to detect the
2310 null array case; used to warn about uncheckedly converting to a
2311 zero-sized array. It is unfortunate that we can't just check
2312 the size, and warn on all cases of converting from a
2313 nonzero-sized type to a zero-sized one. That's because "0" means
2314 two different things: "size is zero" and "size is unknown".
2315 Until we fix that design flaw, we need this more targeted fix.
2316
2317 2019-08-20 Bob Duff <duff@adacore.com>
2318
2319 * libgnat/a-cborma.adb, libgnat/a-cborse.adb (Clear): Repeatedly
2320 call Delete. This avoids clearing the free list, which
2321 substantially speeds up future Delete operations.
2322
2323 2019-08-20 Bob Duff <duff@adacore.com>
2324
2325 * sem_ch13.adb (Component_Order_Check): New procedure to check
2326 for out-of-order clauses.
2327 * warnsw.ads, warnsw.adb: New -gnatw_r switch.
2328 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
2329 Document new switch.
2330 * gnat_ugn.texi: Regenerate.
2331
2332 2019-08-20 Bob Duff <duff@adacore.com>
2333
2334 * sem_ch13.adb (Object_Size): Give an error for zero. It really
2335 rubs me the wrong way that we don't honor "for T'Object_Size use
2336 0;", but it's not important enough to fix. In any case, if we're
2337 not going to obey the clause, we should give an error.
2338
2339 2019-08-20 Bob Duff <duff@adacore.com>
2340
2341 * errout.adb (Error_Msg_Internal): Set Warn_Err in case of
2342 Is_Style_Msg.
2343 * erroutc.adb (Output_Msg_Text): Do Warnings_Treated_As_Errors
2344 processing and [warning-as-error] modification for style
2345 messages. Clean up code, simplify, remove unnecessary block
2346 statement, add renaming of table entry.
2347 * erroutc.ads (Warning_Treated_As_Error): Fix comment: no such
2348 thing as Set_Warning_As_Error.
2349 * opt.ads: Clean up comments and move related declarations near
2350 each other.
2351 * par-prag.adb: Process Warning_As_Error. This is necessary
2352 because many style warning happen during parsing.
2353 * sem_prag.adb: Use new Acquire_Warning_Match_String.
2354 * sem_util.ads, sem_util.adb (Acquire_Warning_Match_String): New
2355 function shared by par-prag.adb and sem_prag.adb. Replaces the
2356 procedure in sem_prag.adb. Avoid use of global variables.
2357 * stringt.ads, stringt.adb (To_String): New function to convert
2358 String_Id to String.
2359 * doc/gnat_rm/implementation_defined_pragmas.rst: Document the
2360 new feature.
2361 * gnat_rm.texi: Regenerate.
2362
2363 2019-08-20 Eric Botcazou <ebotcazou@adacore.com>
2364
2365 * lib.ads: Add with clause for GNAT.HTable.
2366 Add pragma Inline for Is_Loaded and alphabetize the list.
2367 (Unit_Name_Table_Size): New constant.
2368 (Unit_Name_Header_Num): New subtype.
2369 (Unit_Name_Hash): New function declaration.
2370 (Unit_Names): New simple hash table.
2371 (Init_Unit_Name): New procedure declaration.
2372 * lib.adb (Set_Unit_Name): Unregister the old name in the table,
2373 if any, and then register the new name.
2374 (Init_Unit_Name): New procedure.
2375 (Is_Loaded): Reimplement using a lookup in the names table.
2376 (Remove_Unit): Unregister the name.
2377 (Unit_Name_Hash): New function.
2378 * lib-load.adb (Create_Dummy_Package_Unit): Call Init_Unit_Name.
2379 (Load_Unit): Use a lookup in the names table to find out whether
2380 the unit has already been loaded. Call Init_Unit_Name and then
2381 Remove_Unit if the loading has failed.
2382 (Make_Child_Decl_Unit): Call Init_Unit_Name.
2383 (Make_Instance_Unit): Likewise.
2384 * lib-writ.adb (Ensure_System_Dependency): Likewise.
2385
2386 2019-08-20 Bob Duff <duff@adacore.com>
2387
2388 * sem_ch13.adb (Record_Hole_Check): Initialize After_Last.
2389
2390 2019-08-20 Piotr Trojanek <trojanek@adacore.com>
2391
2392 * impunit.adb (Get_Kind_Of_Unit): Revert change for adapting
2393 this routine for gnatprove.
2394
2395 2019-08-20 Arnaud Charlet <charlet@adacore.com>
2396
2397 * doc/gnat_rm/implementation_defined_pragmas.rst: Document
2398 requirements for Pragma Lock_Free.
2399 * gnat_rm.texi: Regenerate.
2400
2401 2019-08-20 Philippe Gil <gil@adacore.com>
2402
2403 * bindgen.adb (Gen_Main): Set gnat_argc/gnat_argv to argc/argv
2404 only when still uninitialized.
2405
2406 2019-08-20 Bob Duff <duff@adacore.com>
2407
2408 * libgnat/g-comlin.ads (Exit_From_Command_Line): Fix
2409 documentation for GNAT.Command_Line.
2410
2411 2019-08-20 Pierre-Marie de Rodat <derodat@adacore.com>
2412
2413 PR ada/91492
2414 * gcc-interface/lang.opt (-fdump-scos): Add missing dot at the
2415 end of the documentation.
2416
2417 2019-08-20 Richard Sandiford <richard.sandiford@arm.com>
2418
2419 * gcc-interface/misc.c (default_pass_by_ref): Update call to
2420 pass_by_reference.
2421
2422 2019-08-19 Bob Duff <duff@adacore.com>
2423
2424 * doc/gnat_rm/implementation_advice.rst: Fix documentation for
2425 stream oriented attributes.
2426 * gnat_rm.texi: Regenerate.
2427
2428 2019-08-19 Gary Dismukes <dismukes@adacore.com>
2429
2430 * einfo.ads (E_Function, E_Procedure): Update comments to
2431 reflect that Renamed_Entity is also used for nongeneric
2432 subprograms.
2433
2434 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2435
2436 * sem_prag.adb (Is_Before_First_Decl): Deal with rewritten
2437 pragmas.
2438
2439 2019-08-19 Bob Duff <duff@adacore.com>
2440
2441 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
2442 on formal parameters of dispatching operations.
2443
2444 2019-08-19 Ed Schonberg <schonberg@adacore.com>
2445
2446 * sem_res.adb (Resolve_Call): A call to an expression function
2447 freezes when expander is active, unless the call appears within
2448 the body of another expression function,
2449
2450 2019-08-19 Dmitriy Anisimkov <anisimko@adacore.com>
2451
2452 * libgnat/s-os_lib.ads, libgnat/s-os_lib.adb (To_Ada, To_C): New
2453 routines.
2454
2455 2019-08-19 Bob Duff <duff@adacore.com>
2456
2457 * exp_attr.adb (Attribute_Valid): Correct the handling of
2458 private types where the full type is modular. System.Address is
2459 an example. Otherwise, we convert uncheckedly to a signed type,
2460 so we get an incorrect range 0 .. -1, for which all values will
2461 fail. The 'Valid attribute is illegal for such types, but we
2462 generate such illegal attribute_references for 'Valid_Scalars,
2463 and we generate 'Valid_Scalars when the -gnateV switch is used.
2464 Rename Btyp --> PBtyp to avoid hiding the outer Btyp, which was
2465 confusing.
2466 * libgnat/a-except.adb: Set the Exception_Raised component.
2467 Otherwise, we have incorrect reads of invalid data.
2468
2469 2019-08-19 Pierre-Marie de Rodat <derodat@adacore.com>
2470
2471 * libgnat/a-cgaaso.ads, libgnat/a-cgarso.ads,
2472 libgnat/a-cogeso.ads, libgnat/a-contai.ads,
2473 libgnat/a-locale.ads: Import documentation from the RM.
2474
2475 2019-08-19 Jerome Guitton <guitton@adacore.com>
2476
2477 * Makefile.rtl (system.o): New target to add generation of
2478 target properties.
2479 * gcc-interface/Makefile.in (install-gnatlib): Install
2480 ada_target_properties.
2481
2482 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2483
2484 * inline.adb (Add_Inlined_Body): Do not special-case instances
2485 that are compilation units.
2486 (Add_Pending_Instantiation): Likewise.
2487 (Instantiate_Body): Skip instantiations that are compilation
2488 units and have already been performed.
2489 * sem_ch12.adb (Needs_Body_Instantiated): Do not special-case
2490 instances that are compilation units.
2491 (Load_Parent_Of_Generic): Be prepared for parent that is a
2492 compilation unit but whose instantiation node has not been
2493 replaced.
2494
2495 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2496
2497 * inline.adb (Initialize, Lock): Deal with
2498 Called_Pending_Instantiations.
2499
2500 2019-08-19 Ed Schonberg <schonberg@adacore.com>
2501
2502 * sem_ch6.adb (Check_Synchronized_Overriding): Complete
2503 predicate that applies legality check in 9.4 (11.9/2): if an
2504 inherited subprogram is implemented by a protected procedure or
2505 entry, its first paarameter must be out, in_out or
2506 access_to_varible.
2507
2508 2019-08-19 Javier Miranda <miranda@adacore.com>
2509
2510 PR ada/65696
2511 * exp_atag.ads, exp_atag.adb (Build_Inherit_Predefined_Prims):
2512 Adding formal to specify how many predefined primitives are
2513 inherited from the parent type.
2514 * exp_disp.adb (Number_Of_Predefined_Prims): New subprogram.
2515 (Make_Secondary_DT): Compute the number of predefined primitives
2516 of all tagged types (including tagged types not defined at
2517 library level). Previously we unconditionally relied on the
2518 Max_Predef_Prims constant value when building the dispatch
2519 tables of tagged types not defined at library level (thus
2520 consuming more memory for their dispatch tables than required).
2521 (Make_DT): Compute the number of predefined primitives that must
2522 be inherited from their parent type when building the dispatch
2523 tables of tagged types not defined at library level. Previously
2524 we unconditionally relied on the Max_Predef_Prims constant value
2525 when building the dispatch tables of tagged types not defined at
2526 library level (thus copying more data than required from the
2527 parent type).
2528
2529 2019-08-19 Bob Duff <duff@adacore.com>
2530
2531 * sem_ch13.adb (Record_Hole_Check): Procedure to check for holes
2532 that incudes processing type extensions. A type extension is
2533 processed by first calling Record_Hole_Check recursively on the
2534 parent type to compute the bit number after the last component
2535 of the parent.
2536
2537 2019-08-19 Gary Dismukes <dismukes@adacore.com>
2538
2539 * checks.adb (Length_Mismatch_Info_Message): New function in
2540 Selected_Length_Checks to return a message indicating the
2541 element counts for the mismatched lengths for a failed
2542 compile-time length check.
2543 (Plural_Or_Singular_Ending): Support function in
2544 Length_Mismatch_Info_Message to return either "" or "s", for
2545 concatenating to the end of words.
2546 (Selected_Length_Checks): Pass the result of
2547 Length_Mismatch_Info_Message as an extra warning message to
2548 Compile_Time_Constraint_Error to indicate the mismatched lengths
2549 for a failed compile-time length check.
2550 * sem_util.ads (Compile_Time_Constraint_Error): Add an optional
2551 message formal (Extra_Msg), defaulted to the empty string.
2552 * sem_util.adb (Compile_Time_Constraint_Error): Output an extra
2553 message following the main warning message (when Extra_Msg is
2554 not the empty string).
2555
2556 2019-08-19 Patrick Bernardi <bernardi@adacore.com>
2557
2558 * socket.c: Removed the redefinition of getaddrinfo, getnameinfo
2559 and freeaddrinfo to internal VxWorks kernel calls because they
2560 are, well, internal kernel calls and cannot be called from RTPs.
2561 VxWorks provides the necessary components to call these routines
2562 directly.
2563
2564 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2565
2566 * exp_dist.adb (Is_Generic_Actual_Subtype): New predicate.
2567 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
2568 Use it instead of Is_Generic_Actual_Type flag to detect subtypes
2569 representing generic actual types.
2570
2571 2019-08-19 Ed Schonberg <schonberg@adacore.com>
2572
2573 * sem_warn.adb (Check_References, Generic_Body_Formal): When a
2574 formal parameter of a generic subprogram is not referenced in
2575 the body, place the corresponding warning on the corresponding
2576 entity in the specification of the generic body, as is done for
2577 non-generic subprograms.
2578
2579 2019-08-19 Bob Duff <duff@adacore.com>
2580
2581 * errout.ads (Size_Too_Small_Message): New constant.
2582 * errout.adb, freeze.adb, sem_ch13.adb: Use it.
2583
2584 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2585
2586 * exp_dist.adb (Build_Package_Stubs): Do not specifically visit
2587 the declarations of an N_Subprogram_Instantiation node.
2588
2589 2019-08-19 Bob Duff <duff@adacore.com>
2590
2591 * doc/gnat_ugn/gnat_utility_programs.rst: Document missing
2592 metrics switches.
2593
2594 2019-08-19 Piotr Trojanek <trojanek@adacore.com>
2595
2596 * sem_ch12.adb (Get_Unit_Instantiation_Node): Simplify Nkind_In
2597 membership test.
2598 * sem.adb (Depends_On_Main): Whitespace cleanup; only assign a
2599 local variable if needed.
2600
2601 2019-08-19 Claire Dross <dross@adacore.com>
2602
2603 * sem_spark.ads, sem_spark.adb (Is_Pledge_Function): New
2604 parameter of the generic. Function used to decide whether a
2605 function is a pledge function.
2606 (Check_Not_Borrowed): Disable check inside the second parameter
2607 of a pledge function for the path borrowed by the first
2608 parameter. Also disable checks for entities inside a Global
2609 contract.
2610
2611 2019-08-19 Joffrey Huguet <huguet@adacore.com>
2612
2613 * libgnat/a-cfdlli.ads, libgnat/a-cfhama.ads,
2614 libgnat/a-cfinve.ads, libgnat/a-cforma.ads,
2615 libgnat/a-cofove.ads, libgnat/a-cofuma.ads,
2616 libgnat/a-cofuve.ads: Add formal function parameter "=" (L, R :
2617 Element_Type) to the generic packages.
2618
2619 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2620
2621 * opt.ads: Clean up left-overs of earlier implementation in
2622 comment:
2623
2624 2019-08-19 Ed Schonberg <schonberg@adacore.com>
2625
2626 * sem_ch3.adb (Derived_Enumeration_Type): Do no freeze anonymous
2627 base type if the bounds in the derived type declaration are
2628 literals of the type.
2629
2630 2019-08-19 Yannick Moy <moy@adacore.com>
2631
2632 * sem_res.adb (Resolve_Call): Check non-aliasing rules before
2633 GNATprove inlining.
2634
2635 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2636
2637 * inline.adb (Add_Inlined_Body): Do not add pending
2638 instantiations.
2639 * sem_ch12.adb (Needs_Body_Instantiated): New predicate.
2640 (Analyze_Package_Instantiation): Use it to decide whether to add
2641 a pending instantiation for the body of the package.
2642
2643 2019-08-19 Olivier Hainque <hainque@adacore.com>
2644
2645 * gcc-interface/trans.c (Acc_Loop_to_gnu): Return the openacc
2646 BIND_EXPR node we have constructed on purpose. Remove unused
2647 variable.
2648
2649 2019-08-19 Pierre-Marie de Rodat <derodat@adacore.com>
2650
2651 * gcc-interface/lang.opt (fdump-scos): Define.
2652 * gcc-interface/misc.c (gnat_handle_option): Handle
2653 OPT_fdump_scos.
2654
2655 2019-08-14 Joffrey Huguet <huguet@adacore.com>
2656
2657 * libgnat/a-cofuba.ads: Add a Length attribute to type
2658 Container. Add a type Array_Base which replaces the previous
2659 Elements attribute of Container.
2660 (Content_Init): New subprogram. It is used to initialize the
2661 Base attribute of Container.
2662 * libgnat/a-cofuba.adb (Resize): New subprogram. It is used to
2663 resize the underlying array of a container if necessary.
2664 (=, <=, Find, Get, Intersection, Length, Num_Overlaps, Set,
2665 Union): Update to match changes in type declarations.
2666 (Add): Modify body to damp the time and space cost in a specific
2667 case.
2668 (Content_Init): New subprogram. It is used to initialize the
2669 Base attribute of Container.
2670 (Remove): Modify body to damp the time and space cost in a
2671 specific case.
2672
2673 2019-08-14 Bob Duff <duff@adacore.com>
2674
2675 * sem_ch13.adb (Get_Alignment_Value): Return 1 for Alignment 0,
2676 and do not give an error.
2677 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Update the
2678 corresponding documentation.
2679 * gnat_rm.texi: Regenerate.
2680
2681 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2682
2683 * inline.adb (Add_Pending_Instantiation): Fix off-by-one error
2684 in the comparison against the maximum number of instantiations.
2685
2686 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2687
2688 * inline.adb (Add_Pending_Instantiation): Use greater-or-equal
2689 in the comparison against the maximum number of instantiations.
2690
2691 2019-08-14 Ed Schonberg <schonberg@adacore.com>
2692
2693 * sem_aux.adb (Next_Rep_Item): If a node in the rep chain
2694 involves a Ghost aspect it may have been replaced by a null
2695 statement; use the original node to find next Rep_Item.
2696 * repinfo.adb (List_Entities): Do not list an Ignored
2697 Ghost_Entity, for which information may have been deleted.
2698
2699 2019-08-14 Bob Duff <duff@adacore.com>
2700
2701 * sem_prag.ads, sem_prag.adb
2702 (Process_Compile_Time_Warning_Or_Error): In parameterless
2703 version, improve detection of whether we are in a generic unit
2704 to cover the case of an instance within a generic unit.
2705 (Process_Compile_Time_Warning_Or_Error): Rename the
2706 two-parameter version to be
2707 Validate_Compile_Time_Warning_Or_Error, and do not export it.
2708 Issue a warning if the condition is not known at compile time.
2709 The key point is that the warning must be given only for pragmas
2710 deferred to the back end, because the back end discovers
2711 additional values that are known at compile time. Previous
2712 changes in this ticket have enabled this by deferring to the
2713 back end without checking for special cases such as 'Size.
2714 (Validate_Compile_Time_Warning_Or_Error): Rename to be
2715 Defer_Compile_Time_Warning_Error_To_BE.
2716 * warnsw.ads, warnsw.adb (Warn_On_Unknown_Compile_Time_Warning):
2717 Add new switches -gnatw_c and -gnatw_C to control the above
2718 warning.
2719 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
2720 Document new switches.
2721 * gnat_ugn.texi: Regenerate.
2722
2723 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2724
2725 * sem_ch12.adb (Might_Inline_Subp): Rework comment and restrict
2726 the shortcut based on Is_Inlined to the back-end inlining case.
2727
2728 2019-08-14 Bob Duff <duff@adacore.com>
2729
2730 * inline.adb (Check_And_Split_Unconstrained_Function): Ignore
2731 protected functions to get rid of spurious error. The
2732 transformation done by this procedure triggers legality errors
2733 in the generated code in this case.
2734
2735 2019-08-14 Bob Duff <duff@adacore.com>
2736
2737 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Defer
2738 processing to the back end in all cases where the pragma's
2739 condition is not known at compile time during the front end
2740 (except in generics), as opposed to detecting 'Size attributes
2741 and the like. This ensures that we take advantage of whatever
2742 can be compile-time known after running the back end, as opposed
2743 to having the front end guess what the back end can do. Remove
2744 a little duplicated code at the call site.
2745 * gnat1drv.adb (Post_Compilation_Validation_Checks): Unlock the
2746 Elists while in Validate_Compile_Time_Warning_Errors, because it
2747 does analysis and name resolution, which sometimes involves
2748 adding Elists.
2749
2750 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2751
2752 * einfo.ads (Is_Called): Document new usage on E_Package
2753 entities.
2754 * einfo.adb (Is_Called): Accept E_Package entities.
2755 (Set_Is_Called): Likewise.
2756 * exp_ch6.adb (Expand_Call_Helper): Move code dealing with
2757 instances for back-end inlining to Add_Inlined_Body.
2758 * inline.ads: Remove with clauses for Alloc and Table.
2759 (Pending_Instantiations): Move to...
2760 * inline.adb: Add with clauses for Alloc, Uintp, Table and
2761 GNAT.HTable.
2762 (Backend_Instances): New variable.
2763 (Pending_Instantiations): ...here.
2764 (Called_Pending_Instantiations): New table.
2765 (Node_Table_Size): New constant.
2766 (Node_Header_Num): New subtype.
2767 (Node_Hash): New function.
2768 (To_Pending_Instantiations): New hash table.
2769 (Add_Inlined_Body): Bail out early for subprograms in the main
2770 unit or subunit. Likewise if the Is_Called flag is set. If the
2771 subprogram is an instance, invoke Add_Inlined_Instance. Call
2772 Set_Is_Called earlier. If the subrogram is within an instance,
2773 invoke Add_Inlined_Instance. Also deal with the case where the
2774 call itself is within an instance.
2775 (Add_Inlined_Instance): New procedure.
2776 (Add_Inlined_Subprogram): Remove conditions always fulfilled.
2777 (Add_Pending_Instantiation): Move the defence against ludicruous
2778 number of instantiations to here. When back-end inlining is
2779 enabled, associate an instantiation with its index in table and
2780 mark a few selected kinds of instantiations as always needed.
2781 (Initialize): Set Backend_Instances to No_Elist.
2782 (Instantiate_Body): New procedure doing the work extracted
2783 from...
2784 (Instantiate_Bodies): ...here. When back-end inlining is
2785 enabled, loop over Called_Pending_Instantiations instead of
2786 Pending_Instantiations.
2787 (Is_Nested): Minor tweak.
2788 (List_Inlining_Info): Also list the contents of
2789 Backend_Instances.
2790 * sem_ch12.adb (Might_Inline_Subp): Return early if Is_Inlined
2791 is set and otherwise set it before returning true.
2792 (Analyze_Package_Instantiation): Remove the defence against
2793 ludicruous number of instantiations. Invoke
2794 Remove_Dead_Instance instead of doing the removal manually if
2795 there is a guaranteed ABE.
2796
2797 2019-08-14 Gary Dismukes <dismukes@adacore.com>
2798
2799 * exp_ch3.adb (Predef_Spec_Or_Body): For an equality operation
2800 of an interface type, create an expression function (that
2801 returns False) rather than declaring an abstract function.
2802 * freeze.adb (Check_Inherited_Conditions): Set Needs_Wrapper to
2803 False unconditionally at the start of the loop creating wrappers
2804 for inherited operations.
2805
2806 2019-08-14 Bob Duff <duff@adacore.com>
2807
2808 * table.adb: Assert that the table is not locked when increasing
2809 Last, even if it doesn't cause reallocation. In other words,
2810 assert that on operations that MIGHT cause reallocation.
2811 * table.ads: Fix comment accordingly.
2812
2813 2019-08-14 Arnaud Charlet <charlet@adacore.com>
2814
2815 * doc/gnat_ugn/gnat_and_program_execution.rst: Remove
2816 documentation of gnatelim.
2817
2818 2019-08-14 Bob Duff <duff@adacore.com>
2819
2820 * sem_prag.adb (Validate_Compile_Time_Warning_Error): Attach the
2821 warning to the Sloc of the first pragma argument, rather than to
2822 the pragma itself. This is to make pragmas processed after the
2823 back end use the same Sloc as pragmas processed earlier, in the
2824 front end. There's no reason for this discrepancy, and it
2825 hinders further work on this ticket.
2826
2827 2019-08-14 Bob Duff <duff@adacore.com>
2828
2829 * sem.ads (Inside_A_Generic): Remove the ??? comment.
2830
2831 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2832
2833 * inline.ads (Pending_Descriptor): Delete.
2834 * inline.adb (Initialize): Do not initialize it.
2835 * sem_ch12.adb (Delay_Descriptors): Delete.
2836 (Analyze_Package_Instantiation): Call
2837 Set_Delay_Subprogram_Descriptors instead of Delay_Descriptors
2838 throughout.
2839
2840 2019-08-14 Bob Duff <duff@adacore.com>
2841
2842 * exp_aggr.adb (Init_Hidden_Discriminants): Avoid processing the
2843 wrong discriminant, which could be of the wrong type.
2844
2845 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2846
2847 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
2848 the Is_Generic_Instance flag previously set on the package
2849 generated for the instantiation of a generic subprogram.
2850
2851 2019-08-14 Ed Schonberg <schonberg@adacore.com>
2852
2853 * exp_ch4.adb (Expand_N_Quantified_Expression): Freeze
2854 explicitly the type of the loop parameter.
2855
2856 2019-08-14 Javier Miranda <miranda@adacore.com>
2857
2858 * sem_util.adb (New_Copy_Tree.Copy_Node_With_Replacement):
2859 Update the Chars attribute of identifiers.
2860
2861 2019-08-14 Yannick Moy <moy@adacore.com>
2862
2863 * sem_spark.adb, sem_spark.ads (Is_Legal): New function exposed
2864 for use in GNATprove, to test legality rules not related to
2865 permissions.
2866 (Check_Declaration_Legality): Extract the part of
2867 Check_Declaration that checks rules not related to permissions.
2868 (Check_Declaration): Call the new Check_Declaration_Legality.
2869 (Check_Type_Legality): Rename of Check_Type. Introduce
2870 parameters to force or not checking, and update a flag detecting
2871 illegalities.
2872 (Check_Node): Ignore attribute references in statement position.
2873
2874 2019-08-14 Yannick Moy <moy@adacore.com>
2875
2876 * sem_spark.adb (Check_Old_Loop_Entry): New procedure to check
2877 correct use of Old and Loop_Entry.
2878 (Check_Node): Check subprogram contracts.
2879 (Check_Pragma): Check Loop_Variant.
2880 (Check_Safe_Pointers): Apply checking to library-level
2881 subprogram declarations as well, in order to check their
2882 contract.
2883
2884 2019-08-14 Yannick Moy <moy@adacore.com>
2885
2886 * sem_spark.adb (Is_Subpath_Expression): Take into account
2887 conversion and qualification.
2888
2889 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2890
2891 * sem_ch7.adb (Install_Private_Declarations)
2892 <Swap_Private_Dependents>: Do not rely solely on the
2893 Is_Child_Unit flag on the unit to recurse.
2894 (Uninstall_Declarations) <Swap_Private_Dependents>: New
2895 function. Use it to recurse on the private dependent entities
2896 for child units.
2897
2898 2019-08-14 Javier Miranda <miranda@adacore.com>
2899
2900 * exp_aggr.adb (Is_CCG_Supported_Aggregate): Return False for
2901 arrays with bounds not known at compile time.
2902
2903 2019-08-14 Ed Schonberg <schonberg@adacore.com>
2904
2905 * sem_util.adb (New_Copy_Tree, Visit_Entity): A quantified
2906 expression includes the implicit declaration of the loop
2907 parameter. When a quantified expression is copied during
2908 expansion, for example when building the precondition code from
2909 the generated pragma, a new loop parameter must be created for
2910 the new tree, to prevent duplicate declarations for the same
2911 symbol.
2912
2913 2019-08-14 Yannick Moy <moy@adacore.com>
2914
2915 * sem_disp.adb (Check_Dispatching_Operation): Update assertion
2916 for the separate declarations created in GNATprove mode.
2917 * sem_disp.ads (Is_Overriding_Subprogram): Update comment.
2918 * sem_elab.adb (SPARK_Processor): Fix test for checking of
2919 overriding primitives.
2920
2921 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2922
2923 * inline.adb (Add_Inlined_Body): Tweak comments.
2924 (List_Inlining_Info): Also list information about non-main
2925 units.
2926
2927 2019-08-14 Gary Dismukes <dismukes@adacore.com>
2928
2929 * sem_ch4.adb (Analyze_Selected_Component): In the case where
2930 the prefix is of a concurrent type, and the selected entity
2931 matching the selector is the first private declaration of the
2932 type (such as the first local variable in a task's body), set
2933 Is_Private_Op.
2934
2935 2019-08-14 Piotr Trojanek <trojanek@adacore.com>
2936
2937 * einfo.adb (Is_Generic_Actual_Subprogram): Replace repeated
2938 calls to Ekind with Ekind_In.
2939
2940 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2941
2942 PR middle-end/91421
2943 * gcc-interface/trans.c (gigi): Call set_decl_buillt_in_function.
2944 (Call_to_gnu): Use DECL_FE_FUNCTION_CODE instead of DECL_FUNCTION_CODE.
2945
2946 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2947
2948 * ali.ads (Linker_Option_Record): Remove Original_Pos component.
2949 * ali.adb (Scan_ALI): Do not set it.
2950
2951 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2952
2953 * sem_ch3.adb (Build_Derived_Concurrent_Type): Add a couple of
2954 local variables and use them. When the derived type fully
2955 constrains the parent type, rewrite it as a subtype of an
2956 implicit (unconstrained) derived type instead of the other way
2957 around.
2958 (Copy_And_Build): Deal with concurrent types and use predicates.
2959 (Build_Derived_Private_Type): Build the full derivation if
2960 needed for concurrent types too.
2961 (Build_Derived_Record_Type): Add marker comment.
2962 (Complete_Private_Subtype): Use predicates.
2963
2964 2019-08-13 Ed Schonberg <schonberg@adacore.com>
2965
2966 * sem_ch3.adb (Check_Generic_Ancestor): New subprogram,
2967 aubsidiary to Build_Derived_Record_Type. to enforce the rule
2968 that a type extension declared in a generic body cznnot have an
2969 ancestor that is a generic formal (RM 3.9.1 (4/2)). The rule
2970 applies to all ancestors of the type, including interface
2971 progenitors.
2972
2973 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
2974
2975 * sem_ch3.adb (Build_Underlying_Full_View): Delete.
2976 (Complete_Private_Subtype): Do not set the full view on the
2977 private subtype here. If the full base is itself derived from
2978 private, do not re-derive the parent type but instead constrain
2979 an existing underlying full view.
2980 (Prepare_Private_Subtype_Completion): Do not get to the
2981 underlying full view, if any. Set the full view on the private
2982 subtype here.
2983 (Process_Full_View): Likewise.
2984 * sem_ch12.adb (Check_Generic_Actuals): Also set
2985 Is_Generic_Actual_Type on the full view if the type of the
2986 actual is private.
2987 (Restore_Private_Views): Also reset Is_Generic_Actual_Type on
2988 the full view if the type of the actual is private.
2989 * sem_eval.adb (Subtypes_Statically_Match): Remove bypass for
2990 generic actual types.
2991
2992 2019-08-13 Javier Miranda <miranda@adacore.com>
2993
2994 * sem_res.adb (Resolve_Selected_Component): When the type of the
2995 component is an access to a class-wide type and the type of the
2996 context is an access to a tagged type the relevant type is that
2997 of the component (since in such case we may need to generate
2998 implicit type conversions or dispatching calls).
2999
3000 2019-08-13 Ed Schonberg <schonberg@adacore.com>
3001
3002 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Preanalyze
3003 expression, rather do a full analysis, to prevent unwanted
3004 removal of side effects which mask the intent of the expression.
3005
3006 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
3007
3008 * impunit.adb (Non_Imp_File_Names_95): Add
3009 GNAT.Branch_Prediction.
3010
3011 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
3012
3013 * exp_ch6.adb: Remove with and use clauses for Sem_Ch12.
3014 (Expand_Call_Helper): Swap the back-end inlining case and the
3015 special front-end expansion case. In back-end inlining mode, do
3016 not invoke Add_Inlined_Body unless the call may be inlined.
3017 * inline.ads (Add_Pending_Instantiation): New function moved
3018 from...
3019 * inline.adb (Add_Inlined_Body): Simplify comment. Turn test on
3020 the enclosing unit into assertion.
3021 (Add_Pending_Instantiation): New function moved from...
3022 * sem_ch12.ads (Add_Pending_Instantiation): ...here.
3023 * sem_ch12.adb (Add_Pending_Instantiation): ...here.
3024
3025 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
3026
3027 * sem.adb (Do_Analyze): Recompute Style_Check_Max_Line_Length
3028 after restoring Style_Max_Line_Length.
3029
3030 2019-08-13 Arnaud Charlet <charlet@adacore.com>
3031
3032 * sem_ch13.adb (Check_Iterator_Functions): Protect against
3033 cascaded errors.
3034
3035 2019-08-13 Ed Schonberg <schonberg@adacore.com>
3036
3037 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do no suppress mode
3038 conformance checks on child unit instance that is a compilation
3039 unit.
3040
3041 2019-08-13 Gary Dismukes <dismukes@adacore.com>
3042
3043 * exp_dbug.adb (Fully_Qualify_Name): Add full name qualification
3044 for the E_Exception case.
3045
3046 2019-08-13 Gary Dismukes <dismukes@adacore.com>
3047
3048 * exp_aggr.adb (Aggr_Size_OK): Compute the aggregate size using
3049 universal arithmetic, to avoid situations where the size
3050 computation overflows.
3051
3052 2019-08-13 Justin Squirek <squirek@adacore.com>
3053
3054 * repinfo.adb (List_Scalar_Storage_Order): Modify conditionals
3055 for displaying ordering to always be triggered when -gnatR4 is
3056 in effect.
3057
3058 2019-08-13 Justin Squirek <squirek@adacore.com>
3059
3060 * aspects.adb, aspects.ads: Register new aspect.
3061 * par-prag.adb (Prag): Register new pragma
3062 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
3063 for new aspect similar to Aspect_Max_Entry_Queue_Length.
3064 * sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new
3065 pragma and set it to use the same processing as
3066 Pragma_Max_Queue_Length.
3067 * snames.ads-tmpl: Move definition of
3068 Name_Max_Entry_Queue_Length so that it can be processed as a
3069 pragma in addition to a restriction and add an entry for the
3070 pragma itself.
3071
3072 2019-08-13 Yannick Moy <moy@adacore.com>
3073
3074 * sem_ch4.adb (Analyze_Allocator): Do not insert subtype
3075 declaration for allocator inside a spec expression.
3076
3077 2019-08-13 Yannick Moy <moy@adacore.com>
3078
3079 * sem_res.adb (Resolve_Call): Do not inline calls inside record
3080 types.
3081
3082 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
3083
3084 * sem_ch4.adb (Analyze_One_Call): Remove bypass for type
3085 mismatch in nested instantiations.
3086 * sem_ch8.adb (Find_Nearer_Entity): New function.
3087 (Find_Renamed_Entity): Use it to disambiguate the candidates for
3088 the renaming generated for an instantiation when it is
3089 ambiguous.
3090
3091 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
3092
3093 * gnat1drv.adb (Adjust_Global_Switches): Do not set
3094 Back_End_Inlining in ASIS mode either.
3095
3096 2019-08-13 Olivier Hainque <hainque@adacore.com>
3097
3098 * libgnat/s-win32.ads: Define size_t and fix the MapViewOfFile
3099 binding to use it instead of DWORD for the dwNumberOfBytesToMap
3100 argument.
3101 * libgnat/g-sercom__mingw.adb (Read): State which definition of
3102 size_t to fetch in call to Last_Index.
3103
3104 2019-08-13 Arnaud Charlet <charlet@adacore.com>
3105
3106 * gcc-interface/Make-lang.in: Remove unused TRACE variable. Pass
3107 LN_S to relevant gnatlib targets.
3108 * gcc-interface/Makefile.in: Systematically pass LN_S to
3109 relevant gnatlib targets.
3110
3111 2019-08-13 Yannick Moy <moy@adacore.com>
3112
3113 * sem_dim.adb (Analyze_Dimension,
3114 Analyze_Dimension_Array_Aggregate, Analyze_Dimension_Call,
3115 Analyze_Dimension_Extension_Or_Record_Aggregate): Return
3116 immediately when inside an inlined body.
3117 * sem_res.adb (Resolve_Call): Remove special checking now done
3118 inside Analyze_Dimension_Call.
3119
3120 2019-08-13 Justin Squirek <squirek@adacore.com>
3121
3122 * exp_ch4.adb (Expand_N_Allocator): Add condition to detect
3123 library-level object declarations
3124
3125 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
3126
3127 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
3128 (-gnateT): Document Double_Float_Alignment parameter and fix
3129 description of Double_Scalar_Alignment parameter.
3130 * gnat_ugn.texi: Regenerate.
3131
3132 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
3133
3134 * exp_ch6.adb (Expand_Call_Helper): If back-end inlining is
3135 enabled, also instantiate the body of a generic unit containing
3136 a subprogram subject to aspect/pragma Inline_Always at
3137 optimization level zero.
3138 * sem_ch12.adb (Might_Inline_Subp): Minor tweak.
3139 (Analyze_Package_Instantiation): Do not instantiate the package
3140 body because of inlining considerations if the instantiation is
3141 done in a generic unit. Move around similar condition involving
3142 the main unit. Add test on Back_End_Inlining to processing for
3143 front-end inlining.
3144
3145 2019-08-13 Javier Miranda <miranda@adacore.com>
3146
3147 * exp_disp.adb (Make_Secondary_DT): Handle record type
3148 derivations that have interface components located at fixed
3149 positions and interface components located at variable offset.
3150 The offset of components located at fixed positions is computed
3151 using the dummy object (similar to the case where all the
3152 interface components are located at fixed positions).
3153 (Make_DT): Build the dummy object for all tagged types that
3154 implement interface types (that is, build it also for types with
3155 variable size components), and use the dummy object to compute
3156 the offset of all tag components located at fixed positions when
3157 initializing the Interface_Table object.
3158
3159 2019-08-13 Justin Squirek <squirek@adacore.com>
3160
3161 * gnatcmd.adb (GNATCmd): Add constant for new compiler switch
3162 --help-ada, and include usage subprogram. Add line to usage help
3163 explaining the new flag.
3164 (GNATCmd_Usage): Rename from locally declared Usage so as not to
3165 confuse with the newly imported version. Add new argument case
3166 for --help-ada and add bug report email to implicit display of
3167 help without the --help flag so as to unify output between the
3168 two cases.
3169
3170 2019-08-13 Dmitriy Anisimkov <anisimko@adacore.com>
3171
3172 * libgnat/g-comlin.adb (Getopt): Quote unrecognized switch in
3173 Invalid_Switch exception message.
3174
3175 2019-08-13 Yannick Moy <moy@adacore.com>
3176
3177 * sem_util.adb (Traverse_More_Func): Take into account
3178 Loop_Actions inside N_Iterated_Component_Association nodes.
3179 * sinfo.ads: Document correctly Loop_Actions as a field of nodes
3180 of kind N_Iterated_Component_Association.
3181
3182 2019-08-13 Claire Dross <dross@adacore.com>
3183
3184 * libgnat/a-cfinve.adb, libgnat/a-cofove.adb (Find_Index,
3185 Reverse_Find_Index): Use bigger type to avoid range check
3186 failure at the last loop iteration.
3187
3188 2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
3189
3190 * libgnat/g-socket.adb (Is_IPv6_Address): Check that no less
3191 then 2 colons in IPv6 numeric address.
3192
3193 2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
3194
3195 * libgnat/g-comlin.ads, libgnat/g-comlin.adb (Getopt): Add
3196 parameter Quiet. Need to do not output error messages to
3197 console. Invalid_Switch exception generation surrounded by an
3198 error message.
3199
3200 2019-08-12 Ed Schonberg <schonberg@adacore.com>
3201
3202 * exp_ch6.adb (Expand_Actuals. Add_Call_By_Copy_Code): Add code
3203 to generate proper checks when an actual for an in-out or out
3204 parameter has a non-null access type. No constraints are
3205 applied to an inbound access parameter, but on exit a not-null
3206 check must be performed if the type of the actual requires it.
3207
3208 2019-08-12 Ed Schonberg <schonberg@adacore.com>
3209
3210 * sem_util.adb (Is_Expaned_Priority_Attribute): Check whether
3211 call comes from a rewritten attribute before comparing name with
3212 Get_Ceiling run-time subprogram.
3213
3214 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3215
3216 * exp_util.ads (Component_May_Be_Bit_Aligned): Small comment
3217 tweaks.
3218 (Possible_Bit_Aligned_Component): Likewise.
3219 (Type_May_Have_Bit_Aligned_Components): Likewise.
3220 * exp_util.adb (Component_May_Be_Bit_Aligned): Likewise.
3221 (Possible_Bit_Aligned_Component): Likewise.
3222 (Type_May_Have_Bit_Aligned_Components): Likewise.
3223
3224 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3225
3226 * exp_ch4.adb (Expand_N_Op_Eq): Expand the array equality if
3227 either operand is a possibly unaligned slice.
3228 * exp_ch6.adb (Expand_Simple_Function_Return): Do not generate a
3229 copy for a possibly unaligned object if it is represented as a
3230 scalar.
3231 * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not always
3232 return false if the target doesn't have strict alignment.
3233
3234 2019-08-12 Bob Duff <duff@adacore.com>
3235
3236 * sem_ch12.adb (Instantiate_Package_Body): Remove suppression of
3237 checks in instances of internal units.
3238 * sem_ch6.adb (Analyze_Function_Return): Do not generate a
3239 constraint check on an extended_return_statement if the subtype
3240 of the return object in the statement is identical to the return
3241 subtype of the function.
3242
3243 2019-08-12 Bob Duff <duff@adacore.com>
3244
3245 * libgnat/a-cbmutr.adb (Is_Reachable): Declare Idx to be of the
3246 base subtype. Clearly it makes no sense to loop "while Idx >=
3247 0", if Idx is of a nonnegative subtype.
3248
3249 2019-08-12 Bob Duff <duff@adacore.com>
3250
3251 * libgnat/a-tifiio.adb (Put_Scaled): Prevent AA from being
3252 negative, since Field is range 0 .. something.
3253
3254 2019-08-12 Bob Duff <duff@adacore.com>
3255
3256 * doc/gnat_ugn/gnat_utility_programs.rst (gnatmetric, gnatpp,
3257 gnatstub): Remove documentation for Ada language version
3258 switches, and note that they are no longer needed.
3259
3260 2019-08-12 Gary Dismukes <dismukes@adacore.com>
3261
3262 * sem_ch5.adb (Prepare_Param_Spec_Loop): Set the parents of the
3263 copied low and high bounds in the case where the loop range is
3264 given by a discrete_subtype_indication, to prevent hanging (or
3265 Assert_Failure) in Insert_Actions.
3266
3267 2019-08-12 Ed Schonberg <schonberg@adacore.com>
3268
3269 * sem_ch6.adb (heck_Untagged_Equality): Verify that user-defined
3270 equality has the same profile as the predefined equality before
3271 applying legality rule in RM 4.5.2 (9.8).
3272
3273 2019-08-12 Bob Duff <duff@adacore.com>
3274
3275 * libgnat/a-except.ads: Update obsolete comment, still making
3276 clear that this is a variant. Add explicit default for Id
3277 component of Exception_Occurrence, because that value is used.
3278 Define Null_Occurrence less redundantly.
3279 * libgnat/a-einuoc.adb: Minor simplification of code.
3280
3281 2019-08-12 Justin Squirek <squirek@adacore.com>
3282
3283 * libgnat/a-dhfina.adb, libgnat/a-dhfina.ads (Is_Simple_Name,
3284 Is_Root_Directory, Is_Parent_Directory,
3285 Is_Current_Directory_Name, Is_Relative_Name, Initial_Directory,
3286 Relative_Name, Compose): Add implementation and documentation.
3287 * libgnat/a-direct.adb (Containing_Directory): Modify routine to
3288 use routines from Ada.Directories.Hierarchical_File_Names and
3289 remove incorrect special case for parent directories.
3290 (Fetch_Next_Entry): Add check for current directory and parent
3291 directory and ignore them under certain circumstances.
3292 (Simple_Nmae): Add check for null result from
3293 Simple_Name_Internal and raise Name_Error.
3294 (Simple_Name_Internal): Add explicit check for root directories,
3295 sanitize trailing directory separators, and modify behavior so
3296 that current and parent directories are considered valid
3297 results.
3298 * Makefile.rtl: Add entry to GNATRTL_NONTASKING_OBJS.
3299
3300 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3301
3302 * freeze.adb (Freeze_Entity): Give the same error for an
3303 Object_Size clause on a variable-sized type as for a Size
3304 clause.
3305
3306 2019-08-12 Gary Dismukes <dismukes@adacore.com>
3307
3308 * sem_prag.adb (Analyze_Pragma, Pragma_Suppress_Initialization):
3309 For private types, set the Suppress_Initialization flag on the
3310 Full_View of the entity rather than the entity's base type.
3311
3312 2019-08-12 Yannick Moy <moy@adacore.com>
3313
3314 * aspects.adb, aspects.ads (Aspect_No_Caching): New aspect.
3315 * contracts.adb, contracts.ads (Add_Contract_Item): Add handling
3316 of No_Caching.
3317 (Analyze_Object_Contract): Add handling of No_Caching.
3318 * einfo.adb, einfo.ads
3319 (Get_Pragma): Add handling of No_Caching.
3320 * doc/gnat_rm/implementation_defined_aspects.rst,
3321 doc/gnat_rm/implementation_defined_pragmas.rst: Document new
3322 aspect/pragma.
3323 * gnat_rm.texi: Regenerate.
3324 * par-prag.adb (Prag): New pragma Pragma_No_Caching.
3325 * sem_ch13.adb (Analyze_Aspect_Specifications,
3326 Check_Aspect_At_Freeze_Point): Add handling of No_Caching.
3327 * sem_prag.adb (Analyze_Pragma): Deal with pragma No_Caching.
3328 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): Now
3329 applies to No_Caching.
3330 * sem_util.adb, sem_util.ads (Is_Effectively_Volatile): Add
3331 handling of No_Caching.
3332 (No_Caching_Enabled): New query function.
3333 * snames.ads-tmpl: New names for pragma.
3334
3335 2019-08-12 Yannick Moy <moy@adacore.com>
3336
3337 * sem_util.adb, sem_util.ads (Traverse_More_Func,
3338 Traverse_More_Proc): Add formal parameter for Itypes traversal.
3339
3340 2019-08-12 Yannick Moy <moy@adacore.com>
3341
3342 * exp_attr.adb, exp_attr.ads (Expand_Size_Attribute): New
3343 procedure to share part of the attribute expansion with
3344 GNATprove mode.
3345 (Expand_N_Attribute_Reference): Extract part of the
3346 Size/Object_Size expansion in the new procedure
3347 Expand_Size_Attribute.
3348 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
3349 Size/Object_Size attributes using the new procedure
3350 Expand_Size_Attribute.
3351
3352 2019-08-12 Yannick Moy <moy@adacore.com>
3353
3354 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Only
3355 expand Enum_Rep attribute when its parameter is a literal.
3356
3357 2019-08-12 Justin Squirek <squirek@adacore.com>
3358
3359 * sem_eval.adb (Check_Non_Static_Context): Add a condition to
3360 determine if a range violation constitues a warning or an error.
3361 (Out_Of_Range): Add a condition to determine if a range
3362 violation constitues a warning or an error.
3363
3364 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3365
3366 * exp_ch4.adb (Real_Range_Check): Do not rewrite the conversion
3367 node but its expression instead, after having fetched its
3368 current value. Clear the Do_Range_Check flag on entry. Return
3369 early for a rewritten float-to-float conversion. Remove
3370 redundant local variable. Suppress all checks when inserting
3371 the temporary and do not reanalyze the node.
3372
3373 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3374
3375 * sprint.ads: Minor comment tweak.
3376
3377 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3378
3379 * checks.adb (Insert_Valid_Check): Do not retrieve the
3380 Do_Range_Check flag from the Original_Node but from the
3381 Validated_Object. Remove useless bypass for floating-point
3382 types.
3383
3384 2019-08-12 Yannick Moy <moy@adacore.com>
3385
3386 * sem_util.adb, sem_util.ads (Traverse_More_Func,
3387 Traverse_More_Proc): New traversal subprograms.
3388
3389 2019-08-12 Jerome Lambourg <lambourg@adacore.com>
3390
3391 * libgnarl/s-taprop__vxworks.adb (Abort_Handler): Only call
3392 s-tpopsp.Self when actually needed.
3393
3394 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3395
3396 * exp_ch4.adb (Discrete_Range_Check): Return if checks are
3397 suppressed.
3398
3399 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3400
3401 * sem_res.adb: Add with & use clause for Sem_Mech and
3402 alphabetize.
3403 (Resolve_Actuals): Do not apply a scalar range check for the
3404 source of a conversion whose result is passed by reference to a
3405 valued procedure.
3406
3407 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3408
3409 * checks.adb (Insert_Valid_Check): Reset the Do_Range_Check flag
3410 on the validated object.
3411 * exp_ch6.adb (Add_Call_By_Copy_Code): Reset the Do_Range_Check
3412 flag on the actual here, as well as on the Expression if the
3413 actual is a N_Type_Conversion node.
3414 (Add_Validation_Call_By_Copy_Code): Generate the incoming range
3415 check if needed and reset the Do_Range_Check flag on the
3416 Expression if the actual is a N_Type_Conversion node.
3417 (Expand_Actuals): Do not reset the Do_Range_Check flag here.
3418 Generate the incoming range check for In parameters here instead
3419 of...
3420 (Expand_Call_Helper): ...here. Remove redudant condition.
3421 * sem_res.adb (Resolve_Actuals): Use local variable A_Typ and
3422 remove obsolete comments.
3423 (Resolve_Type_Conversion): Do not force the Do_Range_Check flag
3424 on the operand if range checks are suppressed.
3425
3426 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3427
3428 * checks.adb (Activate_Range_Check): Remove redundant argument.
3429 (Generate_Range_Check): Likewise.
3430 (Apply_Float_Conversion_Check): Reset the Do_Range_Check flag on
3431 entry and remove redundant condition.
3432
3433 2019-08-02 Alexandre Oliva <oliva@adacore.com>
3434
3435 * libgnat/a-exexpr.adb (Begin_Handler_v1, End_Handler_v1): New.
3436 (Claimed_Cleanup): New.
3437 (Begin_Handler, End_Handler): Document.
3438 * gcc-interface/trans.c (gigi): Switch to exception handler
3439 ABI #1.
3440 (Exception_Handler_to_gnu_gcc): Save the original cleanup
3441 returned by begin handler, pass it to end handler, and use
3442 EH_ELSE_EXPR to pass a propagating exception to end handler.
3443 (gnat_to_gnu): Leave the exception pointer alone for reraise.
3444 (add_cleanup): Handle EH_ELSE_EXPR, require it by itself.
3445
3446 2019-07-23 Ed Schonberg <schonberg@adacore.com>
3447
3448 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations,
3449 Freeze_Entity_Checks): Include Aspect_CPU with other aspects
3450 whose expresssion may depend on a discriminant, and thus require
3451 that components of the type be made visible.
3452
3453 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
3454
3455 * checks.adb (Convert_And_Check_Range): Add Suppress parameter
3456 and pass it in the call to Insert_Actions. Rename local
3457 variable.
3458 (Generate_Range_Check): Minor comment fixes. Pass Range_Check
3459 in the first call to Convert_And_Check_Range and All_Checks in
3460 the second call.
3461 * exp_ch4.adb (Expand_N_Type_Conversion): Reset the
3462 Do_Overflow_Check flag in the float-to-float case too if there
3463 is also a range check.
3464
3465 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
3466
3467 * checks.adb (Activate_Overflow_Check): Remove redundant
3468 argument.
3469 * exp_ch4.adb (Discrete_Range_Check): Reset the overflow flag.
3470 (Expand_N_Type_Conversion): Do not reset it here.
3471
3472 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
3473
3474 * repinfo.adb (List_Component_Layout): Pass Decimal to UI_Write.
3475 (Write_Val): Likewise.
3476
3477 2019-07-23 Ed Schonberg <schonberg@adacore.com>
3478
3479 * aspects.ads: New table Operational_Aspect, used to distinguish
3480 between aspects that are view-specific, such as those related to
3481 iterators, and representation aspects that apply to all views of
3482 a type.
3483 * aspects.adb (Find_Aspect): If the aspect being sought is
3484 operational, do not ecamine the full view of a private type to
3485 retrieve it.
3486 * sem_ch5.adb (Analyze_Iterator_Specification): Improve error
3487 message when the intended domain of iteration does not implement
3488 the required iterator aspects.
3489
3490 2019-07-23 Yannick Moy <moy@adacore.com>
3491
3492 * sem_spark.ads (Is_Local_Context): New function.
3493 * sem_spark.adb (Check_Declaration): Issue errors on violations
3494 of SPARK RM 3.10(4)
3495 (Process_Path): Do not issue error on borrow/observe during
3496 elaboration, as these are caught by the new rule.
3497
3498 2019-07-23 Yannick Moy <moy@adacore.com>
3499
3500 * exp_ch7.adb (Create_Finalizer): Force finalizer not to be
3501 Ghost enabled.
3502 * exp_dbug.adb (Get_External_Name): Explain special case of
3503 Ghost finalizer.
3504
3505 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3506
3507 * repinfo.adb (List_Entities): Also list compiled-generated
3508 types present as Etype of objects.
3509
3510 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3511
3512 * sinfo.ads: Update the documentation about the
3513 Do_Division_Check, Do_Overflow_Check and Do_Range_Check flags.
3514
3515 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3516
3517 * exp_ch4.adb (Expand_N_Type_Conversion): Beef up comment.
3518 (Fixup_Universal_Fixed_Operation): Set the base type instead of
3519 the type of the enclosing type conversion on the operation.
3520
3521 2019-07-22 Ed Schonberg <schonberg@adacore.com>
3522
3523 * exp_ch4.adb (Expand_N_In): Do not suggest the use of attribute
3524 'Valid as a replacement for a range check on a discrete type
3525 when the bounds of the range are given by type conversions,
3526 because in such a case there are distinct types involved and the
3527 subbested attribute replacement would be misplaced.
3528
3529 2019-07-22 Yannick Moy <moy@adacore.com>
3530
3531 * sem_spark.adb (Get_Root_Object, Is_Path_Expression,
3532 Is_Subpath_Expression): Add parameter Is_Traversal to adapt
3533 these functions to the case of paths returned from a traversal
3534 function.
3535 (Read_Indexes): Handle the case of an if-expression or
3536 case-expression.
3537 (Check_Statement): Check Emit_Messages only when issuing an
3538 error message. This is important as Emit_Messages may store the
3539 information that an error was detected.
3540
3541 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3542
3543 * checks.adb (Apply_Type_Conversion_Checks): Do not set
3544 Do_Range_Check flag on conversions from fixed-point types
3545 either.
3546 * exp_attr.adb: Add use and with clause for Expander.
3547 (Expand_N_Attribute_Reference) <Fixed_Value, Integer_Value>: Set
3548 the Conversion_OK flag and do not generate overflow/range checks
3549 manually.
3550 * exp_ch4.adb (Expand_N_Qualified_Expression): Remove
3551 superfluous clearing of Do_Range_Check flag.
3552 (Discrete_Range_Check): New procedure to generate a range check
3553 for discrete types.
3554 (Real_Range_Check): Remove redundant local variable and adjust.
3555 Remove useless shortcut. Clear Do_Range_Check flag on all
3556 paths.
3557 (Expand_N_Type_Conversion): Remove redundant test on
3558 Conversion_OK. Call Discrete_Range_Check to generate range
3559 checks on discrete types. Remove obsolete code for
3560 float-to-integer conversions. Add code to generate range checks
3561 for conversions involving fixed-point types.
3562
3563 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3564
3565 * sprint.ads: Fix pasto in comment.
3566
3567 2019-07-22 Javier Miranda <miranda@adacore.com>
3568
3569 * sem_res.adb (Resolve_Actuals): Replace code that displaces the
3570 pointer to an allocated object to reference its secondary
3571 dispatch table by a type conversion (which takes care of
3572 handling all cases).
3573
3574 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3575
3576 * sprint.adb (Sprint_Node_Actual)
3577 <N_Decimal_Fixed_Point_Definition>: Swap a couple of spaces.
3578 (Write_Itype): Minor consistency fixes throughout. Add support
3579 for printing ordinary and decimal fixed-point types and
3580 subtypes.
3581
3582 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3583
3584 * exp_attr.adb (Expand_Loop_Entry_Attribute): Beef up comment.
3585
3586 2019-07-22 Ed Schonberg <schonberg@adacore.com>
3587
3588 * libgnat/s-valboo.ads, libgnat/s-valcha.ads,
3589 libgnat/s-valdec.ads, libgnat/s-valenu.ads,
3590 libgnat/s-valint.ads, libgnat/s-vallld.ads,
3591 libgnat/s-vallli.ads, libgnat/s-valllu.ads,
3592 libgnat/s-valrea.ads, libgnat/s-valuns.ads,
3593 libgnat/s-valwch.ads: Change categorization of packages that
3594 implement attribute 'Value from Pure to Preelaborate, to prevent
3595 undesirable optimizations when the evaluation of the attribute
3596 raises Constraint_Error, but subsequent use of the result of
3597 this evsaluation is removed by a subsequent optimization.
3598
3599 2019-07-22 Ed Schonberg <schonberg@adacore.com>
3600
3601 * sem_warn.adb (Check_References): Do not emit s warning on a
3602 referenced entity with no explicit assignment if the type of the
3603 entity has Preelaborable_Initialixation, such as
3604 Exception_Occurrence.
3605
3606 2019-07-22 Javier Miranda <miranda@adacore.com>
3607
3608 * exp_ch4.adb (Size_In_Storage_Elements): Improve the expansion
3609 to handle array indexes that are modular type.
3610 (Expand_N_Allocator): For 32-bit targets improve the generation
3611 of the runtime check associated with large arrays supporting
3612 arrays initialized with a qualified expression.
3613 * libgnat/s-imenne.adb (Image_Enumeration_8,
3614 Image_Enumeration_16, Image_Enumeration_32): Define the index of
3615 Index_Table with range Natural'First .. Names'Length since in
3616 the worst case all the literals of the enumeration type would be
3617 single letter literals and the Table built by the frontend would
3618 have as many components as the length of the names string. As a
3619 result of this enhancement, the internal tables declared using
3620 Index_Table have a length closer to the real needs, thus
3621 avoiding the declaration of large arrays on 32-bit CCG targets.
3622
3623 2019-07-22 Yannick Moy <moy@adacore.com>
3624
3625 * sem_ch3.adb (Constrain_Access): Issue a message about ignored
3626 constraint.
3627
3628 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3629
3630 * sem_ch8.adb (End_Use_Type): Reset the In_Use flag on the
3631 class-wide type if the type is tagged.
3632 (Use_One_Type): Add commentary on the handling of the class-wide
3633 type.
3634
3635 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3636
3637 * einfo.ads (Is_For_Access_Subtype): Delete.
3638 (Set_Is_For_Access_Subtype): Likewise.
3639 * einfo.adb (Is_For_Access_Subtype): Likewise.
3640 (Set_Is_For_Access_Subtype): Likewise.
3641 (Write_Entity_Flags): Do not write Is_For_Access_Subtype.
3642 * exp_ch4.adb (Expand_N_Selected_Component): Do not deal with
3643 it.
3644 * exp_spark.adb (Expand_SPARK_N_Selected_Component): Likewise.
3645 * sem_ch4.adb (Analyze_Explicit_Dereference): Likewise.
3646 * sem_ch3.adb (Build_Discriminated_Subtype): Do not build a
3647 special private subtype for access-to-record subtypes.
3648
3649 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3650
3651 * sem_ch3.adb (Complete_Private_Subtype): Rework the setting of
3652 the Etype of the full view for full base types that cannot
3653 contain any discriminant. Remove code and comment about it in
3654 the main path.
3655
3656 2019-07-22 Ed Schonberg <schonberg@adacore.com>
3657
3658 * sem_ch3.adb (Convert_Bound): Subsidiary of
3659 Floating_Point_Type_Declaration, to handle properly range
3660 specifications with bounds that may include static constants of
3661 a given type rather than real literals.
3662
3663 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3664
3665 * sem_aggr.adb (Rewrite_Bound): Be prepared for discriminals
3666 too.
3667 (Rewrite_Range;): Minor tweak.
3668 (Resolve_Record_Aggregate): For a component with default
3669 initialization whose expression is an array aggregate, also
3670 rewrite the bounds of the component associations, if any.
3671
3672 2019-07-22 Gary Dismukes <dismukes@adacore.com>
3673
3674 * exp_ch5.adb (Expand_N_Case_Statement): In the case where a
3675 case statement is rewritten as an equivalent if statement,
3676 inherit the From_Condition_Expression flag from the case
3677 statement.
3678
3679 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3680
3681 * sem_ch8.adb (Check_Constrained_Object): Further extend the
3682 special optimization to all limited types.
3683
3684 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3685
3686 * exp_attr.adb (Expand_N_Attribute_Reference)
3687 <Attribute_Enum_Val>: Set No_Truncation on the
3688 N_Unchecked_Type_Conversion built around the argument passed to
3689 the attribute.
3690
3691 2019-07-22 Nicolas Roche <roche@adacore.com>
3692
3693 * libgnat/s-valrea.adb (Scan_Real): Ignore non significative
3694 digits to avoid converging to infinity in some cases.
3695
3696 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3697
3698 * libgnat/g-encstr.adb (Encode_Wide_String): Fix oversight.
3699 (Encode_Wide_Wide_String): Likewise.
3700
3701 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3702
3703 * sem_warn.adb (Find_Var): Bail out for a function call with an
3704 Out or In/Out parameter.
3705
3706 2019-07-22 Nicolas Roche <roche@adacore.com>
3707
3708 * terminals.c (__gnat_tty_waitpid): Support both blocking and
3709 not blocking mode.
3710 * libgnat/g-exptty.ads (Is_Process_Running): New function.
3711 * libgnat/g-exptty.adb (Close): Don't try to interrupt/terminate
3712 a process if it is already dead.
3713
3714 2019-07-22 Ed Schonberg <schonberg@adacore.com>
3715
3716 * freeze.adb (Freeze_Fixed_Point_Type): When freezing a
3717 fixed-point subtype, check whether the parent type declarastion
3718 includes an aspect specification for the 'Small type attribute,
3719 and inherit the specified value.
3720
3721 2019-07-22 Javier Miranda <miranda@adacore.com>
3722
3723 * freeze.adb (Freeze_Subprogram): Check that C++ constructors
3724 must have external or link name.
3725
3726 2019-07-22 Ed Schonberg <schonberg@adacore.com>
3727
3728 * sem_res.adb (Resolve_Selected_Component): If the prefix has a
3729 deferred reference, generate the correct reference now, to
3730 indicate that the previous assignment is used. This prevents
3731 spurious warnings on useless assignments when compiling with all
3732 warnings enabled. when there is a subsequent call in the same
3733 stqtement list, in which the prefix of the selected component is
3734 the actual for an out parameter.
3735
3736 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3737
3738 * exp_attr.adb (Expand_Loop_Entry_Attribute): Copy the condition
3739 of a while loop instead of simply relocating it.
3740
3741 2019-07-18 Arnaud Charlet <charlet@adacore.com>
3742
3743 * Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c,
3744 cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c,
3745 argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c,
3746 seh_init.c, exit.c, targext.c: Introduce a "STANDALONE" mode where C
3747 runtime files do not have any dependency on GCC include files.
3748 Remove unnecessary includes.
3749 Remove remaining references to VMS in runtime C file.
3750 * runtime.h: new File.
3751
3752 2019-07-13 Andreas Schwab <schwab@linux-m68k.org>
3753
3754 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
3755
3756 2019-07-11 Piotr Trojanek <trojanek@adacore.com>
3757
3758 * lib-writ.adb (Ensure_System_Dependency,
3759 Up_To_Date_ALI_File_Exists, Write_ALI): Replace low-level access
3760 to table with a high-level query.
3761
3762 2019-07-11 Piotr Trojanek <trojanek@adacore.com>
3763
3764 * checks.adb: Fix typo in comment.
3765 * sem.adb (Semantics): Avoid repeated calls to
3766 In_Extended_Main_Source_Unit by reusing an already-cached
3767 result.
3768 * sem_util.adb (First_Global): Fix style.
3769
3770 2019-07-11 Yannick Moy <moy@adacore.com>
3771
3772 * sem_res.adb (Resolve_Call): Do not perform dimensionality
3773 checking on inlined bodies.
3774
3775 2019-07-11 Yannick Moy <moy@adacore.com>
3776
3777 * debug.adb: Flip meaning of debug switch -gnatdF.
3778
3779 2019-07-11 Yannick Moy <moy@adacore.com>
3780
3781 * sem_eval.adb (Is_Same_Value): Add special case for rewritten
3782 Loop_Entry attribute.
3783
3784 2019-07-11 Claire Dross <dross@adacore.com>
3785
3786 * gnat1drv.adb: SPARK checking rules for pointer aliasing are
3787 moved to GNATprove backend.
3788 * sem_spark.ads, sem_spark.adb (Sem_SPARK): Is now a generic
3789 unit. Takes as parameters:
3790 - Retysp which is used to query the most underlying type
3791 visible in SPARK. We do not introduce aliasing checks for
3792 types which are not visibly deep.
3793 - Component_Is_Visible_In_SPARK is used to avoid doing pointer
3794 aliasing checks on components which are not visible in SPARK.
3795 - Emit_Messages returns True in the second phase of SPARK
3796 analysis. Error messages for failed aliasing checks are only
3797 output in this case.
3798 Additionally, errors on constructs not supported in SPARK are
3799 removed as duplicates of marking errors. Components are stored
3800 in the permission map using their original component to avoid
3801 inconsistencies between components of different views of the
3802 same type.
3803 (Check_Expression): Handle delta constraints.
3804 (Is_Deep): Exported so that we can check for SPARK restrictions
3805 on deep types inside SPARK semantic checkings.
3806 (Is_Traversal_Function): Exported so that we can check for SPARK
3807 restrictions on traversal functions inside SPARK semantic
3808 checkings.
3809 (Check_Call_Statement, Read_Indexes): Check wether we are
3810 dealing with a subprogram pointer type before querying called
3811 entity.
3812 (Is_Subpath_Expression): Image attribute can appear inside a
3813 path.
3814 (Check_Loop_Statement): Correct order of statements in the loop.
3815 (Check_Node): Ignore raise nodes.
3816 (Check_Statement): Use Last_Non_Pragma to get the object
3817 declaration in an extended return statement.
3818
3819 2019-07-11 Patrick Bernardi <bernardi@adacore.com>
3820
3821 * bindgen.adb (Gen_Main): Do not generate a reference to
3822 Ada_Main_Program_Name when the Minimal_Binder flag is set.
3823 (Gen_Output_File_Ada): Do not output GNAT_Version and
3824 Ada_Main_Program_Name info if Minimal_Binder flag is set.
3825 * bindusg.adb: Add documentation for new -minimal switch.
3826 * gnatbind.adb (Scan_Bind_Arg): Scan -minimal switch.
3827 * opt.ads: Add new global flag Minimal_Binder to indicate if the
3828 binder should not produce global variables.
3829 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
3830 Update documentation with new binder -minimal switch.
3831 * gnat_ugn.texi: Regenerate.
3832
3833 2019-07-11 Eric Botcazou <ebotcazou@adacore.com>
3834
3835 * Makefile.rtl: Add warning note about compilation flags and
3836 capitalize.
3837
3838 2019-07-11 Ed Schonberg <schonberg@adacore.com>
3839
3840 * exp_ch9.adb (Expand_N_Protected_Type_Declaaration): New
3841 subsidiary routine Replace_Access_Definition, to handle properly
3842 a protected type PT one of whose private components is of type
3843 access PT.
3844
3845 2019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
3846
3847 * libgnat/g-socket.ads (Level_Type): Add enumerators for
3848 IP_Protocol_For_ICMP, IP_Protocol_For_IGMP,
3849 IP_Protocol_For_RAW_Level.
3850 * libgnat/g-socket.adb (Levels): Handle them.
3851 * s-oscons-tmplt.c: Import socket protocols defined in
3852 netinet/in.h.
3853
3854 2019-07-11 Claire Dross <dross@adacore.com>
3855
3856 * libgnat/a-cfhama.adb, libgnat/a-cfhase.adb (Free): Do not
3857 reset the Has_Element flag if no element is freed.
3858
3859 2019-07-11 Arnaud Charlet <charlet@adacore.com>
3860
3861 * errno.c: Remove obsolete support for MaRTE OS.
3862
3863 2019-07-11 Ed Schonberg <schonberg@adacore.com>
3864
3865 * exp_ch4.adb (Expand_N_Type_Conversion): If a predicate check
3866 is generated, analyze it with range check suppressed, because
3867 that check has been previously applied.
3868 * exp_ch5.adb (Expand_N_Assignment_Statement): If the RHS is a
3869 type conversion to the type of the LHS, do not apply a predicate
3870 check to the RHS because it will have been generated already
3871 during its expansion.
3872 * exp_ch6.adb (Can_Fold_Predicate_Call): Extend processing to
3873 handle a predicate check on a constant entity whose value is
3874 static.
3875
3876 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3877
3878 * bindo.adb: Remove the documentation of switch -d_N because it
3879 is no longer in use.
3880 * bindo-graphs.ads, bindo-graphs.adb (Is_Spec_Before_Body_Edge):
3881 New routine.
3882 * bindo-writers.adb (Write_Dependency_Edge): Add the missing
3883 case of a spec-before-body edge.
3884
3885 2019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
3886
3887 * libgnat/g-socket.ads (Mode_Type): Add a Socket_Raw enumerator.
3888 * libgnat/g-socket.adb (Modes): Handle Socket_Raw.
3889
3890 2019-07-11 Justin Squirek <squirek@adacore.com>
3891
3892 * exp_ch9.adb (Build_Private_Protected_Declaration): Add
3893 exception for the moving of pragmas to internally generated
3894 specs for pragma Unreferenced.
3895
3896 2019-07-11 Bob Duff <duff@adacore.com>
3897
3898 * doc/gnat_ugn/gnat_utility_programs.rst: Fix inconsistent
3899 documentation for gnatmetric.
3900 * gnat_ugn.texi: Regenerate.
3901
3902 2019-07-11 Bob Duff <duff@adacore.com>
3903
3904 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
3905 --spaces-only switch.
3906
3907 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3908
3909 * sem_util.adb (Null_Status): Assume that an erroneous construct
3910 has an undefined null status.
3911
3912 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3913
3914 * checks.adb, exp_ch6.adb, gnat1drv.adb, sem_aux.adb,
3915 sem_ch2.adb, sem_ch8.adb, sem_res.adb: Minor reformatting.
3916
3917 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3918
3919 * sem_ch8.adb (Analyze_Object_Renaming): Obtain the object being
3920 renamed using routine Get_Object_Name which takes care of
3921 various name forms.
3922 (Get_Object_Name): New routine.
3923
3924 2019-07-11 Ed Schonberg <schonberg@adacore.com>
3925
3926 * exp_ch6.adb (Can_Fold_Predicate_Call): New function,
3927 subsidiary of Expand_Call_Helper, to compute statically a
3928 predicate check when the argument is a static integer.
3929
3930 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3931
3932 * sem_res.adb (Resolve_Op_Not): Do not rewrite an equality
3933 operator into a function call when the operator is intrinsic.
3934
3935 2019-07-11 Thomas Quinot <quinot@adacore.com>
3936
3937 * sem_prag.adb (Analyze_Pragma, case pragma Check): Do not call
3938 Set_SCO_Pragma_Enabled for the dynamic predicate case.
3939
3940 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3941
3942 * exp_util.ads, exp_util.adb (Needs_Finalization): Move to
3943 Sem_Util.
3944 * sem_ch9.adb (Analyze_Protected_Definition): Code cleanup. Mark
3945 the protected type as having controlled components when it
3946 contains at least one such component.
3947 * sem_util.ads, sem_util.adb (Needs_Finalization): New
3948 function.
3949
3950 2019-07-11 Eric Botcazou <ebotcazou@adacore.com>
3951
3952 * alloc.ads (Rep_JSON_Table_Initial): New constant.
3953 (Rep_JSON_Table_Increment): Likewise.
3954 * debug.adb: Document -gnatd_j switch.
3955 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add
3956 repinfo-input.o.
3957 * gnat1drv.adb: Add with clause for Repinfo.Input.
3958 Add with and use clauses for Sinput.
3959 (Read_JSON_Files_For_Repinfo): New procedure.
3960 (Gnat1drv1): Deal with -gnatd_j switch.
3961 * repinfo-input.ad[sb]: New unit.
3962 * snames.ads-tmpl (Name_Discriminant): New constant.
3963 (Name_Operands): Likewise.
3964
3965 2019-07-11 Justin Squirek <squirek@adacore.com>
3966
3967 * checks.adb (Apply_Accessibility_Check): Add check for constant
3968 folded conditions on accessibility checks.
3969
3970 2019-07-11 Arnaud Charlet <charlet@adacore.com>
3971
3972 * libgnarl/g-thread.ads, libgnarl/g-thread.adb (Get_Thread):
3973 Update comments. Add new version taking a Task_Id.
3974
3975 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3976
3977 * bindo.adb: Update the section of switches and debugging
3978 elaboration issues.
3979 * bindo.ads: Add type Elaboration_Phase.
3980 * bindo-augmentors.adb: Add use clause for
3981 Bindo.Writers.Phase_Writers.
3982 (Augment_Library_Graph): Signal the start and end of the
3983 aubmentation phase.
3984 * bindo-builders.adb: Add with and use clause for Bindo.Writers.
3985 Add use clause for Bindo.Writers.Phase_Writers.
3986 (Build_Invocation_Graph): Signal the start and end of the
3987 invocation graph construction phase.
3988 (Build_Library_Graph): Signal the start and end of the library
3989 graph construction phase.
3990 * bindo-diagnostics.adb: Add use clause for
3991 Bindo.Writers.Phase_Writers.
3992 (Diagnose_Cycle): Signal the start and end of the cycle
3993 diagnostic phase.
3994 * bindo-elaborators.adb: Add use clause for
3995 Bindo.Writers.Phase_Writers.
3996 (Elaborate_Units): Signal the start and end of the unit
3997 elaboration phase.
3998 * bindo-graphs.adb: Add use clause for
3999 Bindo.Writers.Phase_Writers.
4000 (Find_Components): Signal the start and end of the component
4001 discovery phase.
4002 (Find_Cycles): Signal the start and end of the cycle discovery
4003 phase.
4004 * bindo-units.adb: Add with and use clause for Bindo.Writers.
4005 Add use clause for Bindo.Writers.Phase_Writers.
4006 (Collect_Elaborable_Units): Signal the start and end of the unit
4007 collection phase.
4008 * bindo-validators.adb: Add with and use clause for
4009 Bindo.Writers. Add use clause for Bindo.Writers.Phase_Writers.
4010 (Validate_Cycles, Validate_Elaboration_Order,
4011 Validate_Invocation_Graph, Validate_Library_Graph): Signal the
4012 start and end of the libray graph validation phase.
4013 * bindo-writers.ads, bindo-writers.adb: Add new nested package
4014 Phase_Writers.
4015 * debug.adb: Update the documentation of switch d_S.
4016
4017 2019-07-11 Yannick Moy <moy@adacore.com>
4018
4019 * sem_res.adb (Check_Argument_Order): Special case calls to
4020 operators.
4021
4022 2019-07-10 Dmitriy Anisimkov <anisimko@adacore.com>
4023
4024 * libgnat/s-ststop.adb: Remove System.Strings.Stream_Ops
4025 dependence on System.Streams.Stream_IO.
4026
4027 2019-07-10 Ed Schonberg <schonberg@adacore.com>
4028
4029 * sem_ch2.adb (Analyze_Integer_Literal): Preserve the type of
4030 the literal if prior analysis determined that its type is a
4031 modular integer type.
4032
4033 2019-07-10 Doug Rupp <rupp@adacore.com>
4034
4035 * init.c: Do not attempt to re-arm guard page on x86_64-vx7(r2).
4036
4037 2019-07-10 Ed Schonberg <schonberg@adacore.com>
4038
4039 * sem_ch8.adb (Check_Constrained_Object): A record that is
4040 limited because of the presence of a limited component is
4041 constrained, and no subtype indiciation needs to be created for
4042 it, just as is the case for declared limited records.
4043
4044 2019-07-10 Yannick Moy <moy@adacore.com>
4045
4046 * sem_aux.adb, sem_aux.ads (Is_Protected_Operation): New
4047 function to determine if a subprogram is protected.
4048 * sem_spark.adb (Setup_Protected_Components): New procedure to
4049 add protected components to the environment.
4050 (Check_Callable_Body): Call the new Setup_Protected_Components.
4051 (Check_Package_Spec): Merge local environment with enclosing one
4052 when done.
4053
4054 2019-07-10 Claire Dross <dross@adacore.com>
4055
4056 * sem_spark.adb (Check_Expression): Allow digits constraints as
4057 input.
4058 (Illegal_Global_Usage): Pass in the entity.
4059 (Is_Subpath_Expression): New function to allow different nodes
4060 as inner parts of a path expression.
4061 (Read_Indexes): Allow concatenation and aggregates with box
4062 expressions. Allow attributes Update and Loop_Entry.
4063 (Check_Expression): Allow richer membership test.
4064 (Check_Node): Ignore bodies of generics.
4065 (Get_Root_Object): Allow concatenation and attributes.
4066
4067 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
4068
4069 * sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
4070 discover the type of a full view discriminant.
4071
4072 2019-07-10 Arnaud Charlet <charlet@adacore.com>
4073
4074 * doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
4075 doc for the depth switch.
4076
4077 2019-07-10 Bob Duff <duff@adacore.com>
4078
4079 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
4080 --source-line-breaks switch.
4081
4082 2019-07-10 Justin Squirek <squirek@adacore.com>
4083
4084 * doc/gnat_rm/implementation_defined_attributes.rst: Add mention
4085 of 'Image attribute with 'Img's entry to mention additional
4086 added 2012 usage of Obj'Image.
4087 * doc/gnat_rm/implementation_defined_pragmas.rst: Correct
4088 mispelling of Async_Writers.
4089 * gnat_rm.texi: Regenerate.
4090 * sem_prag.adb (Analyze_Pragma): Correct mispelling of
4091 Async_Writers.
4092 * sem_util.adb (State_Has_Enabled_Property): Correct mispelling
4093 of Async_Writers.
4094
4095 2019-07-10 Simon Buist <buist@adacore.com>
4096
4097 * sem_util.ads (Child_Prefix): New constant.
4098 * sem_util.adb (Unique_Name): Add a special prefix to child
4099 units that have a nested subprogram or package.
4100
4101 2019-07-10 Arnaud Charlet <charlet@adacore.com>
4102
4103 * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
4104
4105 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
4106
4107 * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
4108 spelling in certain error messages.
4109 (Check_Pragma_Implemented): Correct the spelling in certain
4110 error messages.
4111
4112 2019-07-10 Eric Botcazou <ebotcazou@adacore.com>
4113
4114 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-brapre.
4115 * libgnat/g-brapre.ads: New package specification.
4116 * doc/gnat_rm/the_gnat_library.rst: Document it.
4117 * gnat_rm.texi: Regenerate.
4118
4119 2019-07-10 Yannick Moy <moy@adacore.com>
4120
4121 * osint-c.adb (Set_File_Name): Always add extension for multiple
4122 units per file mode.
4123
4124 2019-07-10 Corentin Gay <gay@adacore.com>
4125
4126 * sysdep.c: Put include directive for 'vxWorks.h' before any
4127 other VxWorks headers.
4128
4129 2019-07-10 Eric Botcazou <ebotcazou@adacore.com>
4130
4131 * doc/gnat_rm/implementation_defined_attributes.rst
4132 (Scalar_Storage_Order): Minor tweaks. Add note about debuggers.
4133 * gnat_rm.texi: Regenerate.
4134
4135 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
4136
4137 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
4138 assignments to the temporary result as being OK because the
4139 expansion of case expressions is correct by construction.
4140 (Is_Copy_Type): Update the predicate to match the comment
4141 within.
4142
4143 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
4144
4145 * bindo-graphs.adb, bindo.adb, debug.adb, exp_ch6.adb,
4146 sem_ch10.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb,
4147 sem_ch6.adb, sem_ch7.adb, sem_res.adb, sem_spark.adb,
4148 sem_util.adb, warnsw.ads: Minor reformatting.
4149
4150 2019-07-10 Joffrey Huguet <huguet@adacore.com>
4151
4152 * libgnat/a-strbou.ads, libgnat/a-strfix.ads,
4153 libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add global
4154 contracts, contract cases, preconditions and postconditions to
4155 procedures and functions.
4156
4157 2019-07-10 Doug Rupp <rupp@adacore.com>
4158
4159 * sysdep.c (__gnat_is_file_not_found_error): Reformulate to also
4160 work for vxworks7r2 SR0610.
4161
4162 2019-07-10 Doug Rupp <rupp@adacore.com>
4163
4164 * env.c (__gnat_environ): Reformulate to also work for
4165 vxworks7r2 SR0610.
4166
4167 2019-07-10 Patrick Bernardi <bernardi@adacore.com>
4168
4169 * Makefile.rtl: Handle vxworks7r2 ppc target
4170
4171 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
4172
4173 * bindo.adb: Update the section on switches.
4174 * bindo-graphs.adb
4175 (Add_Cycle, Add_Vertex_And_Complement): Remove.
4176 (Create): The graph no longer needs a set of recorded cycles
4177 because the cycles are not rediscovered in permuted forms.
4178 (Cycle_End_Vertices): New routine.
4179 (Destroy): The graph no longer needs a set of recorded cycles
4180 because the cycles are not rediscovered in permuted forms.
4181 (Destroy_Library_Graph_Vertex): Move to the library level.
4182 (Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge):
4183 Remove.
4184 (Find_Cycles_From_Successor, Find_Cycles_From_Vertex,
4185 Find_Cycles_In_Component, Has_Elaborate_All_Edge): New routines.
4186 (Insert_And_Sort): Remove.
4187 (Is_Elaborate_Body_Edge): Use predicate
4188 Is_Vertex_With_Elaborate_Body.
4189 (Is_Recorded_Cycle): Remove.
4190 (Is_Vertex_With_Elaborate_Body): New routine.
4191 (Normalize_And_Add_Cycle): Remove.
4192 (Precedence): Rename to xxx_Precedence, where xxx relates to the
4193 input. These versions better reflect the desired input
4194 precedence.
4195 (Record_Cycle): New routine.
4196 (Remove_Vertex_And_Complement, Set_Is_Recorded_Cycle): Remove.
4197 (Trace_xxx): Update all versions to use debug switch -d_t.
4198 (Trace_Component): New routine.
4199 (Trace_Eol): Removed.
4200 (Trace_Vertex): Do not output the component as this information
4201 is already available when the component is traced.
4202 (Unvisit, Visit): New routine.
4203 * bindo-graphs.ads: Add new instance LGV_Lists. Remove instance
4204 RC_Sets. Update the structure of type Library_Graph_Attributes
4205 to remove the set of recorded cycles.
4206 (Destroy_Library_Graph_Vertex): Move to the library level.
4207 * bindo-writers.adb (Write_Component_Vertices): Output
4208 information about the number of vertices.
4209 * debug.adb: Document the use of binder switch -d_t. Update the
4210 use of binder switch -d_T.
4211
4212 2019-07-10 Yannick Moy <moy@adacore.com>
4213
4214 * sem_spark.adb (Get_Root_Object): Replace precondition by error
4215 message.
4216 (Read_Indexes): Replace precondition by error message.
4217 (Check_Callable_Body): Check only traversal function returns an
4218 anonymous access type.
4219 (Check_Expression): Issue error on unexpected expression as
4220 path.
4221 * sem_util.adb (First_Global): Fix access to global on
4222 entry/task.
4223
4224 2019-07-10 Javier Miranda <miranda@adacore.com>
4225
4226 * exp_ch6.adb (Is_Class_Wide_Interface_Type): New subprogram.
4227 (Expand_Call_Helper): Handle non-limited views when we check if
4228 any formal is a class-wide interface type.
4229 * exp_disp.adb (Expand_Interface_Actuals): Handle non-limited
4230 views when we look for interface type formals to force "this"
4231 displacement.
4232
4233 2019-07-10 Ed Schonberg <schonberg@adacore.com>
4234
4235 * sem_res.adb (Resolve_Equality_Op): Do not replace the resolved
4236 operator by its alias if expander is not active, because the
4237 operand type may not be frozen yet and its inherited operations
4238 have not yet been created.
4239
4240 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
4241
4242 * bindo-elaborators.adb (Elaborate_Units): Set attribute
4243 Elab_Position of all elaborated units.
4244 (Set_Unit_Elaboration_Positions): New routine.
4245
4246 2019-07-10 Gary Dismukes <dismukes@adacore.com>
4247
4248 * exp_util.adb: Reformatting and a typo fix.
4249
4250 2019-07-10 Yannick Moy <moy@adacore.com>
4251
4252 * exp_util.adb (Remove_Side_Effects): Prefer renamings for
4253 objects of possible owning type in GNATprove mode.
4254
4255 2019-07-09 Ed Schonberg <schonberg@adacore.com>
4256
4257 * sem_ch3.adb (Analyze_Object_Declaration): If the object type
4258 is a composite type that has a dynamic predicate and, the
4259 expression in the declaration is an aggregate, the generated
4260 predicate check must appear after the expanded code for the
4261 aggregate, which will appear after the rewritten object
4262 declarastion.
4263
4264 2019-07-09 Justin Squirek <squirek@adacore.com>
4265
4266 * sem_eval.adb (Expr_Value_E): Add conditional to correctly
4267 handle constant enumerated character types.
4268
4269 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
4270
4271 * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
4272 type for SpinCount component.
4273
4274 2019-07-09 Justin Squirek <squirek@adacore.com>
4275
4276 * exp_ch4.adb (Expand_N_Allocator): Add conditional to detect
4277 the presence of anoymous access type allocators and issue a
4278 warning if the appropriate warning flag is enabled.
4279 * warnsw.ads: Add new warning flag for anonymous allocators
4280 * warnsw.adb (All_Warnings, Restore_Warnings, Save_Warnings,
4281 Set_Underscore_Warning_Switch): Register new flags.
4282 (WA_Warnings): Register new flag as an "all warnings" switch
4283 * usage.adb,
4284 doc/gnat_ugn/building_executable_programs_with_gnat.rst:
4285 Document new warning switches -gnatw_a and -gnatw_A.
4286 * gnat_ugn.texi: Regenerate.
4287
4288 2019-07-09 Ed Schonberg <schonberg@adacore.com>
4289
4290 * sem_ch4.adb (Diagnose_Call): Improve error recovery when a
4291 local subprogram name hides a possible candidate name declared
4292 in a child package in the context of the current unit.
4293 * sem_ch6.adb (Process_Formals): Protect against malformed
4294 formal types when the parameter type does not denote an entity.
4295
4296 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
4297
4298 * bindo-augmentors.adb (Visit_Elaboration_Root): Do not start a
4299 DFS from an elaboration root whose corresponding unit lacks
4300 elaboration code. This behavior mimics that of the old
4301 elaboration order mechanism.
4302 * bindo-graphs.adb (Find_All_Cycles_Through_Vertex): Move the
4303 vertex tracing within the functional branches of the routine.
4304 This prevents spurious trace output.
4305 (Has_No_Elaboration_Code): New routine.
4306 (Trace_Cycle, Trace_Edge): Update the various Ids to use the
4307 "standard" trace format.
4308 * bindo-graphs.ads (Has_No_Elaboration_Code): New routine.
4309 * bindo-units.ads, bindo-units.adb (Has_No_Elaboration_Code):
4310 New routine.
4311
4312 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
4313
4314 * ali.ads, bindo-graphs.adb, bindo-validators.adb, clean.adb,
4315 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, einfo.ads,
4316 exp_aggr.adb, exp_ch13.adb, exp_ch4.adb, exp_ch5.adb,
4317 exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_pakd.adb,
4318 fname-uf.ads, gnatlink.adb, inline.adb, lib.ads, make.adb,
4319 namet.ads, opt.ads, par-ch4.adb, par-ch6.adb, par-labl.adb,
4320 prep.adb, sem_aggr.adb, sem_ch13.adb, sem_ch4.adb, sem_ch5.adb,
4321 sem_ch6.adb, sem_ch6.ads, sem_ch7.adb, sem_ch8.adb, sem_dim.adb,
4322 sem_disp.adb, sem_prag.adb, sem_res.adb, sem_warn.adb,
4323 sinfo.ads: Replace ". " with ". ". Minor reformatting and typo
4324 corrections.
4325 * gnat_ugn.texi: Generate.
4326
4327 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
4328
4329 * bindo.ads: Move type Precedence_Kind from the private to the
4330 visible part of the unit.
4331 * bindo-augmentors.adb: Remove the use of global data as it is
4332 bad practice.
4333 (Augment_Library_Graph): Update the parameter profile.
4334 (Is_Visited, Set_Is_Visited): Remove.
4335 (Visit_Elaboration_Root, Visit_Elaboration_Roots): Update the
4336 parameter profile and comment on usage.
4337 (Visit_Vertex): Likewise. Also keep track of which invocation
4338 edge activates a task.
4339 * bindo-augmentors.ads (Augment_Library_Graph): Update the
4340 parameter profile and comment on usage.
4341 * bindo-builders.adb (Create_Forced_Edge,
4342 Create_Spec_And_Body_Edge, Create_With_Edge): Update the call to
4343 Add_Edge.
4344 * bindo-diagnostics.adb: Add with end use clauses for Restrict
4345 and Rident.
4346 (Output_Dynamic_Model_Suggestions): Remove.
4347 (Output_Invocation_Related_Suggestions): New routine.
4348 (Output_Suggestions): Output all invocation-related suggestions
4349 together.
4350 * bindo-elaborators.adb: Remove types Comparator_Ptr and
4351 Predicate_Ptr.
4352 (Find_Best_Vertex): Update the parameter profile.
4353 * bindo-graphs.adb (Activates_Task): New routine.
4354 (Add_Body_Before_Spec_Edge): Update the call to
4355 Add_Edge_With_Return.
4356 (Add_Edge): Update the parameter profile and the call to
4357 Add_Edge_With_Return.
4358 (Add_Edge_With_Return): Update the parameter profile and comment
4359 on usage.
4360 (At_Least_One_Edge_Satisfies): New routine.
4361 (Contains_Elaborate_All_Edge): Reimplement.
4362 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
4363 routine.
4364 (Contains_Weak_Static_Successor): Remove.
4365 (Is_Static_Successor_Edge): New routine.
4366 * bindo-graphs.ads: Add types LGE_Predicate_Ptr,
4367 LGV_Comparator_Ptr, and LGV_Predicate_Ptr. Update type
4368 Library_Graph_Edge_Attributes to capture whether an invocation
4369 edge activates a task. Update the value of
4370 No_Library_Graph_Edge_Attributes.
4371 (Activates_Task): Update the parameter profile and comment on
4372 usage.
4373 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
4374 routines.
4375 (Contains_Weak_Static_Successor): Remove.
4376 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst:
4377 Update the documentation to reflect the new task-related advice.
4378 * gnat_ugn.texi: Regenerate.
4379
4380 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
4381
4382 * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
4383 low-level Ekind test with a high-level wrapper.
4384
4385 2019-07-09 Arnaud Charlet <charlet@adacore.com>
4386
4387 * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
4388 when ZCX_By_Default.
4389
4390 2019-07-09 Javier Miranda <miranda@adacore.com>
4391
4392 * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
4393 not allowed for a derivation of a generic type. Extend the
4394 current test to check that none of the parents is a generic
4395 type.
4396
4397 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
4398
4399 * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb,
4400 sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor
4401 reformatting.
4402
4403 2019-07-09 Ed Schonberg <schonberg@adacore.com>
4404
4405 * sem_res.adb (Resolve_Equality_Op): If the node was overloaded,
4406 set properly the entity to which the node has been resolved. The
4407 original entity is the first one found during analysis, and is
4408 not necessarily the resolved one.
4409 (Resolve_Op_Not): If the argument of negation is an overloaded
4410 equality operation, call its resolution directly given that the
4411 context type does not participate in overload resolution.
4412
4413 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
4414
4415 * bindo.adb: Remove with and use clauses for Debug. Add with
4416 and use clauses for Opt.
4417 (Find_Elaboration_Order): Enable the v4.0 elaboration order. The
4418 v3.0 mechanism is now available under binder switch -H.
4419 * bindusg.adb (Display): Enable switch -H.
4420 * debug.adb: Free compiler switch -gnatd_G. Free binder switch
4421 -d_N.
4422 * sem_elab.adb: Update the section on switches to remove
4423 -gnatd_G.
4424 (Invocation_Graph_Recording_OK): The invocation graph is now
4425 unconditionally recorded in ALI files.
4426 * switch-b.adb (Scan_Binder_Switches): Scan switch -H.
4427 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
4428 Update the documentation on compiler switches related to
4429 elaboration. Update the documentation on binder switches to
4430 include switch -H.
4431 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
4432 the documentation on elaboration order handling in GNAT.
4433 * gnat_ugn.texi: Regenerate.
4434
4435 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
4436
4437 * repinfo.adb (List_Entities): Disregard formals altogether.
4438 (List_Name): Properly escape the double quote in the JSON
4439 output.
4440
4441 2019-07-09 Javier Miranda <miranda@adacore.com>
4442
4443 * exp_util.adb (Remove_Side_Effects): Preserve the
4444 Do_Range_Check flag.
4445
4446 2019-07-09 Yannick Moy <moy@adacore.com>
4447
4448 * sinfo.ads: Refine comment for Do_Range_Check.
4449
4450 2019-07-09 Yannick Moy <moy@adacore.com>
4451
4452 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
4453 attribute reference on Enum_Rep.
4454
4455 2019-07-09 Ed Schonberg <schonberg@adacore.com>
4456
4457 * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the
4458 case where the actual for a formal package in an instance is the
4459 current instance of an enclosing generic package.
4460 (Check_Formal_Packages): If the formal package declaration is
4461 box-initialized or lacks associations altogether, no internal
4462 instance was created to verify conformance, and there is no
4463 validating package to remove from tree.
4464
4465 2019-07-09 Yannick Moy <moy@adacore.com>
4466
4467 * freeze.adb (Build_Renamed_Body): Do not set body to inline in
4468 GNATprove mode.
4469
4470 2019-07-09 Yannick Moy <moy@adacore.com>
4471
4472 * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type
4473 of static expressions in GNATprove_Mode.
4474 * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete
4475 special case for GNATprove_Mode.
4476
4477 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
4478
4479 * doc/gnat_rm/the_gnat_library.rst,
4480 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4481 erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads,
4482 libgnat/g-regexp.ads, libgnat/g-regpat.ads,
4483 libgnat/g-spipat.ads, libgnat/s-os_lib.ads,
4484 libgnat/s-regexp.ads: Reword "wild card" to "wildcard".
4485 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
4486
4487 2019-07-09 Yannick Moy <moy@adacore.com>
4488
4489 * sem_spark.adb (Check_Expression): Handle correctly implicit
4490 assignments as part of allocators and (extension) aggregates.
4491 (Get_Root_Object): Adapt for new path expressions.
4492 (Is_Path_Expression): Return True for (extension) aggregate.
4493
4494 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
4495
4496 * einfo.ads: Fix a typo.
4497
4498 2019-07-09 Ed Schonberg <schonberg@adacore.com>
4499
4500 * sem_util.adb (Scope_Within_Or_Same): Handle properly task
4501 bodies and protected bodies, so that local variables within have
4502 their proper scopes after these constructs have been rewritten
4503 during expansion. This patch resembles but is not identical to
4504 the code in Scope_Within.
4505
4506 2019-07-09 Arnaud Charlet <charlet@adacore.com>
4507
4508 * gnat1drv.adb (Adjust_Global_Switches): Set
4509 Dynamic_Elaboration_Checks to True in CodePeer mode.
4510
4511 2019-07-09 Yannick Moy <moy@adacore.com>
4512
4513 * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
4514 encountering unknown global variable.
4515
4516 2019-07-09 Yannick Moy <moy@adacore.com>
4517
4518 * sem_spark.adb (Check_Expression): Change signature to take an
4519 Extended_Checking_Mode, for handling read permission checking of
4520 sub-expressions in an assignment.
4521 (Check_Parameter_Or_Global): Adapt to new behavior of
4522 Check_Expression for mode Assign.
4523 (Check_Safe_Pointers): Do not analyze generic bodies.
4524 (Check_Assignment): Separate checking of the target of an
4525 assignment.
4526
4527 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
4528
4529 * repinfo.ads (JSON format): Adjust.
4530 * repinfo.adb (Need_Blank_Line): Rename to...
4531 (Need_Separator): ...this.
4532 (Blank_Line): Rename to...
4533 (Write_Separator): ...this and add JSON specific handling.
4534 (List_Array_Info): Adjust to above renaming.
4535 (List_Object_Info): Likewise.
4536 (List_Record_Info): Likewise.
4537 (List_Subprogram_Info): Likewise.
4538 (List_Type_Info): Likewise.
4539 (List_Entities): Do not set Need_Blank_Line.
4540 (List_Rep_Info): Set Need_Separator and add JSON specific
4541 handling. Output a single JSON stream in the normal case.
4542
4543 2019-07-09 Arnaud Charlet <charlet@adacore.com>
4544
4545 * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on
4546 -fdump-ada-spec now that we generate Ada 2012.
4547 * gnat_ugn.texi: Regenerate.
4548
4549 2019-07-08 Eric Botcazou <ebotcazou@adacore.com>
4550
4551 * repinfo.adb (List_Common_Type_Info): New procedure extracted
4552 from...
4553 (List_Type_Info): ...here. Call it for the common information,
4554 start with a blank line and output the linker section at the
4555 end, if any.
4556 (List_Mechanisms): Rename to...
4557 (List_Subprogram_Info): ...this.
4558 (List_Array_Info): Call List_Common_Type_Info.
4559 (List_Entities): Adjust to above change and renaming.
4560 (List_Record_Info): Call List_Common_Type_Info.
4561
4562 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
4563
4564 * libgnat/g-sercom.ads
4565 (Serial_Port_Descriptor): New type.
4566 (Serial_Port): Add a comment, make it hold a
4567 Serial_Port_Descriptor.
4568 (To_Ada, To_C): New procedures.
4569 (Port_Data, Port_Data_Access): Remove types.
4570 * libgnat/g-sercom.adb (To_Ada): New stub.
4571 * libgnat/g-sercom__linux.adb, libgnat/g-sercom__mingw.adb:
4572 Update implementations accordingly.
4573 * s-oscons-tmplt.c: Bind Serial_Port_Descriptor to
4574 System.Win32.HANDLE on Windows, and to Interfaces.C.int on
4575 Linux. Add "Interfaces.C." prefix for other basic integer type
4576 bindings.
4577 * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
4578 for subtypes generation.
4579
4580 2019-07-08 Arnaud Charlet <charlet@adacore.com>
4581
4582 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
4583 Update documentation on No_Exceptions restriction.
4584 * gnat_rm.texi: Regenerate.
4585
4586 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
4587
4588 * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
4589
4590 2019-07-08 Piotr Trojanek <trojanek@adacore.com>
4591
4592 * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
4593 package and subprogram bodies.
4594
4595 2019-07-08 Bob Duff <duff@adacore.com>
4596
4597 * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
4598 of ignored GNATpp switch.
4599
4600 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
4601
4602 * doc/gnat_rm/implementation_defined_pragmas.rst:
4603 Update the documentation of pragma Initialize_Scalars.
4604 * gnat_rm.texi: Regenerate.
4605
4606 2019-07-08 Javier Miranda <miranda@adacore.com>
4607
4608 * exp_ch4.adb (Tagged_Membership): Fix regression silently
4609 introduced in r260738 that erroneouslusy causes the evaluation
4610 to True of the membership test when the left operand of the
4611 membership test is a class-wide interface object and the right
4612 operand is a type that implements such interface type.
4613
4614 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
4615
4616 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
4617 register an address clause when its prefix denotes a generic
4618 formal object.
4619
4620 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
4621
4622 * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
4623 of an Elaborate_All edge before iterating over the edges of the
4624 cycle.
4625 (Output_Elaborate_Body_Transition): Update the parameter profile
4626 and the comment on usage. Add a missing case where the edge is
4627 within the context of an Elaborate_All.
4628 (Output_Transition): Update the call to
4629 Output_Elaborate_Body_Transition.
4630 * bindo-graphs.ads, bindo-graphs.adb
4631 (Contains_Elaborate_All_Edge): New routine.
4632
4633 2019-07-08 Piotr Trojanek <trojanek@adacore.com>
4634
4635 * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
4636 the fake __HEAP entity.
4637
4638 2019-07-08 Daniel Mercier <mercier@adacore.com>
4639
4640 * gnat1drv.adb: Suppress warnings on memory representation in
4641 CodePeer compiler mode.
4642
4643 2019-07-08 Nicolas Roche <roche@adacore.com>
4644
4645 * rtinit.c (__gnat_runtime_initialize): Remove dependency on
4646 CommandLineToArgvW.
4647
4648 2019-07-08 Doug Rupp <rupp@adacore.com>
4649
4650 * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
4651
4652 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
4653
4654 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
4655
4656 2019-07-08 Yannick Moy <moy@adacore.com>
4657
4658 * expander.adb (Expand): Do not reset Analyzed flag always.
4659 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
4660
4661 2019-07-08 Ed Schonberg <schonberg@adacore.com>
4662
4663 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
4664 the assignment statement that computes the delay value, to
4665 prevent improper tree sharing when the value is a type
4666 conversion and Float_Overflow checks are enabled.
4667
4668 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
4669
4670 * bindo.adb: Update the section on terminology to include new
4671 concepts. Update the section on switches to include new
4672 entries.
4673 * bindo.ads: Add type Precedence_Kind.
4674 * bindo-builders.adb: Add with and use clauses for Debug and
4675 Bindo.Validators. Add use clauses for
4676 Bindo.Validators.Invocation_Graph_Validators and
4677 Bindo.Validators.Library_Graph_Validators.
4678 (Build_Invocation_Graph): Validate the graph immediately after
4679 it was built.
4680 (Build_Library_Graph): Update the parameter profile. The
4681 creation of the graph is now elaboration model-agnostic.
4682 Validate the graph immediately after it was built.
4683 (Create_With_Edge): Create regular with edges for Elaborate and
4684 Elaborate_All edges when the appropriate debug switches are in
4685 effect.
4686 * bindo-builders.ads (Build_Library_Graph): Update the parameter
4687 profile.
4688 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
4689 an Elaborate_All edge throughout the inspection of the cycle's
4690 edges.
4691 (Output_Dynamic_Model_Suggestions): Output the suggestion only
4692 when the cycle contains at least one weak edge where the
4693 successor was statically elaborated.
4694 (Output_Elaborate_Body_Transition, Output_Forced_Transition,
4695 Output_With_Transition): Update the assertions.
4696 * bindo-elaborators.adb: Remove use clauses for
4697 Bindo.Validators.Invocation_Graph_Validators and
4698 Bindo.Validators.Library_Graph_Validators. Remove strings
4699 Add_To_All_Candidates_Msg and Add_To_Comp_Candidates_Msg.
4700 Remove type String_Ptr.
4701 (Add_Vertex, Add_Vertex_If_Elaborable, Create_All_Candidates_Set
4702 Create_Component_Candidates_Set): Remove.
4703 (Create_Component_Vertex_Sets, Create_Vertex_Sets): New routine.
4704 (Elaborate_Component): Update the parameter profile and the
4705 comment on usage. Reimplement the elaboration of a component.
4706 The algorithm will now attempt to elaborate as many vertices
4707 possible. If this is not possible, and a weakly elaborable
4708 vertex is available use unit was compiled using the dynamic
4709 model, the algorithm will elaborate it.
4710 (Elaborate_Library_Graph): Reimplement the elaboration of the
4711 graph. The algorithm will now attempt to elaborate as many
4712 vertices along with their components as possible. If this is not
4713 possible, and a weakly elaborable vertex is available use unit
4714 was compiled using the dynamic model, the algorithm will
4715 elaborate it along with its component.
4716 (Elaborate_Units): Merge with the functionality of
4717 Elaborate_Units_Common.
4718 (Elaborate_Units_Common, Elaborate_Units_Dynamic,
4719 Elaborate_Units_Static): Remove.
4720 (Elaborate_Vertex): Update the parameter profile and the comment
4721 on usage. Reimplemented.
4722 (Find_Best_Candidate): Remove.
4723 (Find_Best_Elaborable_Vertex, Find_Best_Vertex,
4724 Find_Best_Weakly_Elaborable_Vertex, Has_Elaborable_Body,
4725 Insert_Elaborable_Successor, Insert_Vertex): New routines.
4726 (Is_Better_Candidate): Remove.
4727 (Is_Better_Elaborable_Vertex,
4728 Is_Better_Weakly_Elaborable_Vertex,
4729 Is_Suitable_Elaborable_Vertex,
4730 Is_Suitable_Weakly_Elaborable_Vertex): New routines.
4731 (Trace_Candidate_Vertices): Remove.
4732 (Trace_Component): Output the number of strong and weak
4733 predecessors.
4734 (Trace_Unelaborated_Vertices): Remove.
4735 (Trace_Vertex): Output the number of strong and weak
4736 predecessors.
4737 (Trace_Vertices): New routine.
4738 (Update_Successor, Update_Successors): Update the parameter
4739 profile and the comment on usage.
4740 * bindo-graphs.adb: Remove type Precedence_Kind.
4741 (Add_Edge_With_Return): Update the increment of pending
4742 predecessors.
4743 (Add_Vertex): Provide default values for strong and weak
4744 predecessors.
4745 (Complementary_Vertex): Move the initial declaration to the
4746 spec. Update the parameter profile and the comment on usage.
4747 (Contains_Weak_Static_Successor): New routine.
4748 (Create): Update the parameter profile. The creation of the
4749 graph is now elaboration model-agnostic.
4750 (Decrement_Pending_Predecessors): Update the parameter profile
4751 and the comment on usage. Reimplemented.
4752 (Delete_Edge): Update the decrement of pending predecesors.
4753 (Has_Elaborate_Body): Do not treat a vertex as being subject to
4754 Elaborate_Body when a debug switch is in effect.
4755 (Increment_Pending_Predecessors): Update the parameter profile
4756 and the comment on usage. Reimplemented.
4757 (Is_Elaborable_Component): Reimplemented.
4758 (Is_Elaborable_Vertex): Move the initial declaration to the
4759 spec. Reimplemented.
4760 (Is_Elaborate_Body_Pair): New routine.
4761 (Is_Dynamically_Elaborated): Update the parameter profile.
4762 Reimplemented.
4763 (Is_Weakly_Elaborable_Vertex): New routine.
4764 (Pending_Predecessors): Removed.
4765 (Pending_Predecessors_For_Elaboration,
4766 Pending_Strong_Predecessors, Pending_Weak_Predecessors,
4767 Update_Pending_Predecessors): New routines.
4768 (Update_Pending_Predecessors_Of_Components): Update the
4769 increment of pending predecessors.
4770 * bindo-graphs.ads: Update the components of type
4771 Component_Attributes. Update the components of type
4772 Library_Graph_Attributes. Update the components of type
4773 Library_Graph_Vertex_Attributes. Update the initialization of
4774 No_Component_Attributes. Update the initialization of
4775 No_Library_Graph_Vertex_Attributes.
4776 (Complementary_Vertex, Contains_Weak_Static_Successor): New
4777 routines.
4778 (Create): Update the parameter profile and the comment on usage.
4779 (Decrement_Pending_Predecessors, Is_Dynamically_Elaborated):
4780 Update the parameter profile and the comment on usage.
4781 (Is_Elaborate_Body_Pair, Is_Weakly_Elaborable_Vertex): New
4782 routines.
4783 (Pending_Predecessors): Removed.
4784 (Pending_Predecessors_For_Elaboration,
4785 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
4786 routines.
4787 * bindo-writers.adb (Write_Components): Moved from the spec.
4788 (Write_Component): Output the strong and weak predecessors.
4789 (Write_Library_Graph): Output the components as part of the
4790 graph.
4791 (Write_Library_Graph_Vertex): Output the strong and weak
4792 predecessors.
4793 * bindo-writers.ads (Write_Components): Moved to the body.
4794 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
4795 -d_e.
4796 * bindo-validators.adb: Minor reformattings.
4797
4798 2019-07-08 Bob Duff <duff@adacore.com>
4799
4800 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
4801 Support additional data rates.
4802
4803 2019-07-08 Olivier Hainque <hainque@adacore.com>
4804
4805 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
4806 DECL_ARTIFICIAL_P on elab proc declarations.
4807
4808 2019-07-08 Eric Botcazou <ebotcazou@adacore.com>
4809
4810 * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and
4811 Not_In_Extended_Main local exceptions.
4812 (List_Structural_Record_Layout): For an extension, raise the
4813 former if the parent subtype has not been built and the latter
4814 if it is not declared in the main source unit. Fall back to the
4815 flat layout if either exception has been raised.
4816
4817 2019-07-08 Ed Schonberg <schonberg@adacore.com>
4818
4819 * libgnat/a-strfix.adb (Delete): The RM describes the semantics
4820 of Delete as equivalent to that of Replace_String with a null
4821 argument. As a result, deleting a null string that starts past
4822 the end of its argument is a noop and must not raise
4823 Index_Error.
4824
4825 2019-07-08 Javier Miranda <miranda@adacore.com>
4826
4827 * exp_disp.adb (Register_Primitive): When registering a
4828 primitive in the secondary dispatch table, handle primitive
4829 inherited through several levels of type derivation (required to
4830 properly handle inherited 'null' primitive).
4831
4832 2019-07-08 Bob Duff <duff@adacore.com>
4833
4834 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
4835 preprocessor directives in GNATpp.
4836
4837 2019-07-08 Javier Miranda <miranda@adacore.com>
4838
4839 * gnat1drv.adb (Post_Compilation_Validation_Checks:
4840 Validate_Compile_Time_Warning_Errors is now located in sem_prag
4841 (instead of sem_ch13).
4842 * sem_ch13.ads (Validate_Compile_Time_Warning_Error,
4843 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
4844 * sem_ch13.adb
4845 (Compile_Time_Warnings_Errors): Move to sem_prag.
4846 (Initialize): Remove initialization of table
4847 Compile_Time_Warning_Errors.
4848 (Validate_Compile_Time_Warning_Error,
4849 Validate_Compile_Time_Warning_Errors): Move to sem_prag.
4850 * sem_prag.ads (Validate_Compile_Time_Warning_Errors): New
4851 procedure.
4852 * sem_prag.adb (Initialize): Initialize table
4853 Compile_Time_Warning_Errors.
4854
4855 2019-07-08 Ed Schonberg <schonberg@adacore.com>
4856
4857 * sem_ch13.adb (Analyze_Aspect_Specifications): For a
4858 pre/postcondition of a generic subprogram declaration, do not
4859 use Relocate_Node on the aspect expression to construct the
4860 corresponding attribute specification, to prevent tree anomalies
4861 when the expression is a call with named actual parameters.
4862
4863 2019-07-08 Javier Miranda <miranda@adacore.com>
4864
4865 * sem_attr.adb (Analyze_Attribute [Attribute_Size]): For pragmas
4866 used to report user defined compile time warning or errors
4867 handle 'Size for types with known static RM size.
4868
4869 2019-07-08 Justin Squirek <squirek@adacore.com>
4870
4871 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
4872 the building of image tables.
4873 (Expand_Image_Attribute): Minor cleanup.
4874
4875 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
4876
4877 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
4878 documentation.
4879 (Get_Socket_Option, Set_Socket_Option): Remove default value for
4880 the Level formal.
4881
4882 2019-07-08 Ed Schonberg <schonberg@adacore.com>
4883
4884 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an
4885 unanalized aspect in a generic context that has not been
4886 analyzed yet, if the aspect applies to a type, place the type on
4887 the scope stack to make its components visible, before checking
4888 conformance with the version of the expression analyzed at the
4889 freeze point.
4890
4891 2019-07-05 Justin Squirek <squirek@adacore.com>
4892
4893 * checks.adb (Apply_Accessibility_Check): Add logic to fetch the
4894 function result accessibility level if one is required within
4895 the generated check.
4896 * exp_ch6.adb (Needs_Result_Accessibility_Level): Modify
4897 controlling elsif block to handle more cases such as anonymous
4898 access results and disable checking for coextensions.
4899
4900 2019-07-05 Ed Schonberg <schonberg@adacore.com>
4901
4902 * sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
4903 accept statement for an enclosing entry abandon analysis to
4904 prevent scope mismatches and potential infinite loops in
4905 compiler.
4906
4907 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
4908
4909 * ali.adb (For_Each_Invocation_Construct,
4910 For_Each_Invocation_Relation): New version.
4911 (Scan_ALI): Initialize field Invocation_Graph_Encoding.
4912 (Set_Invocation_Graph_Encoding): Update the setting of the
4913 invocation graph encoding.
4914 * ali.ads: Move field Invocation_Graph_Encoding from Unit_Record
4915 to ALI_Record because the encoding applies to the whole ALI,
4916 rather than one of the units (spec or body) for which the ALI
4917 file was created.
4918 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
4919 New version.
4920 * bindo.adb: Update the section on switches. Complete the
4921 section of debugging elaboration order issues.
4922 (Find_Elaboration_Order): Prepare the routine for the switch
4923 from the old to the new elaboration order mechanism.
4924 * bindo-diagnostics.adb (Find_And_Output_Invocation_Paths):
4925 Manage a visited set used by Visit_Vertex.
4926 (Output_All_Cycles_Suggestions,
4927 Output_Dynamic_Model_Suggestions): Clarify the nature of the
4928 suggested switch.
4929 (Output_Elaborate_Body_Transition): Update the diagnostic to
4930 emit a better message.
4931 (Output_Forced_Suggestions, Output_Full_Encoding_Suggestions):
4932 Clarify the nature of the suggested switch.
4933 (Visit_Vertex): Update the parameter profile to add a set of
4934 invokers visited during the transition. This set prevents
4935 infinite exploration of the graph in case the invocations are
4936 recursive.
4937 * bindo-elaborators.adb: Add a use clause for
4938 Bindo.Writers.Dependency_Writers.
4939 (Elaborate_Units_Common): Output the library graph after it has
4940 been augmented with invocation edges. Output just the components
4941 instead of outputting the whole library graph again.
4942 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Output the
4943 dependencies as expressed in the library graph.
4944 * bindo-units.adb (Invocation_Graph_Encoding): Update the
4945 extraction of the invocation graph encoding.
4946 * bindo-writers.adb: Add with and use clauses for Binderr and
4947 Butil.
4948 (palgc, plgc): New debug routine.
4949 (Write_Components): Moved to the spec. Add a header for the
4950 output.
4951 (Write_Dependencies, Write_Dependencies_Of_Vertex,
4952 Write_Dependency_Edge): New routine.
4953 (Write_Elaboration_Order): Update the logic to follow the format
4954 of Binde's order output.
4955 (Write_Library_Graph): Do not output the components every time
4956 the graph is written.
4957 (Write_Unit): Output the invocation graph encoding of the unit.
4958 Output the invocation constructs and relations for the unit
4959 only.
4960 * bindo-writers.ads (Write_Components): Moved from the body.
4961 (Write_Dependencies): New routine.
4962 * bindusg.adb: Prepare the routine for the switch from the old
4963 to the new elaboration order mechanism.
4964 * debug.adb: Binder switch -d_O is now not associated with any
4965 functionality.
4966 * einfo.adb (Is_Elaboration_Target): The attribute applies to
4967 packages, as specified by the comment on the attribute usage.
4968 * opt.ads: Add a global flag which controls the choice between
4969 the new and the legacy elaboration order mechanism.
4970 * sem_elab.adb: Add Package_Target to type Target_Kind.
4971 (Build_Elaborate_Body_Procedure, Build_Elaborate_Procedure,
4972 Build_Elaborate_Spec_Procedure, Check_Elaboration_Scenarios,
4973 Check_SPARK_Model_In_Effect): Use Main_Unit_Entity to obtain the
4974 entity of the main unit.
4975 (Create_Package_Rep): New routine.
4976 (Create_Target_Rep): Add processing for packages.
4977 (Declaration_Placement_Of_Node, Has_Prior_Elaboration): Use
4978 Main_Unit_Entity to obtain the entity of the main
4979 unit.
4980 (Invocation_Graph_Recording_OK): Prepare the routine for the
4981 switch from the old to the new elaboration order mechanism.
4982 (Main_Unit_Entity): New routine.
4983 (Meet_Elaboration_Requirement,
4984 Process_Conditional_ABE_Variable_Reference): Use
4985 Main_Unit_Entity to obtain the entity of the main unit.
4986 (Process_Invocation_Instantiation): New routine.
4987 (Process_Invocation_Scenario): Add processing for
4988 instantiations.
4989 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
4990 the switch from the old to the new elaboration order mechanism.
4991
4992 2019-07-05 Joffrey Huguet <huguet@adacore.com>
4993
4994 * libgnat/a-textio.adb: Add abstract state refinment.
4995 * libgnat/a-textio.ads: Add File_System abstract state. Add
4996 global contracts, contract cases, preconditions and
4997 postconditions to procedures and functions.
4998 (Set_Input, Set_Output, Set_Error, Standard_Input,
4999 Standard_Output, Standard_Error, Current_Input, Current_Output,
5000 Current_Error): Turn SPARK_Mode off.
5001 (Get_Line): Turn SPARK_Mode off on Get_Line functions.
5002 * libgnat/a-tideio.ads, libgnat/a-tienio.ads,
5003 libgnat/a-tifiio.ads, libgnat/a-tiflio.ads,
5004 libgnat/a-tiinio.ads, libgnat/a-timoio.ads: Add global
5005 contracts, contract cases, preconditions and postconditions to
5006 procedures and functions.
5007
5008 2019-07-05 Arnaud Charlet <charlet@adacore.com>
5009
5010 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
5011 installing from the command line on Windows. Remove obsolete
5012 part.
5013 * gnat_ugn.texi: Regenerate.
5014
5015 2019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
5016
5017 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
5018 the correct one. Also capitalize references to False
5019 throughout.
5020
5021 2019-07-05 Eric Botcazou <ebotcazou@adacore.com>
5022
5023 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
5024 parameters of function calls here either.
5025
5026 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
5027
5028 * bindo-units.adb, checks.adb, exp_attr.adb, exp_ch3.adb,
5029 exp_ch4.adb, exp_pakd.adb, lib-writ.adb, libgnat/g-traceb.adb,
5030 libgnat/g-traceb.ads, libgnat/s-stratt.ads, sem_aux.ads,
5031 sem_util.adb: Minor reformatting.
5032
5033 2019-07-05 Ed Schonberg <schonberg@adacore.com>
5034
5035 * sem_ch13.adb (Build_Predicate_Functions): If a subtype that
5036 carries a static predicate aspect is frozen immediately after
5037 its declaration, ensure that the generated function body created
5038 for predicate checking is inserted after the corresponding
5039 subprogram declaration, which is created at the point the
5040 declaration is elaborated.
5041
5042 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
5043
5044 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
5045 checking for components with tasks.
5046
5047 2019-07-05 Arnaud Charlet <charlet@adacore.com>
5048
5049 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
5050
5051 2019-07-05 Ed Schonberg <schonberg@adacore.com>
5052
5053 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Add explicit
5054 range checks when the index type of the bit-packed array is an
5055 enumeration type with a non-standard representation,
5056
5057 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
5058
5059 * sem_res.adb (Is_Control_Flow_Statement): Delay statements
5060 contain an expression, which in turn may have side effects and
5061 affect the infinite recursion. As a result, delay statements
5062 should not be treated specially.
5063
5064 2019-07-05 Arnaud Charlet <charlet@adacore.com>
5065
5066 * libgnarl/s-linux.ads, libgnarl/s-linux__alpha.ads,
5067 libgnarl/s-linux__android.ads, libgnarl/s-linux__hppa.ads,
5068 libgnarl/s-linux__mips.ads, libgnarl/s-linux__riscv.ads,
5069 libgnarl/s-linux__sparc.ads: Fix typos in comments.
5070
5071 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
5072
5073 * sem_res.adb (Check_Infinite_Recursion): Reimplemented.
5074 (Enclosing_Declaration_Or_Statement,
5075 Invoked_With_Different_Arguments, Is_Conditional_Statement,
5076 Is_Control_Flow_Statement, Is_Immediately_Within_Body,
5077 Is_Raise_Idiom, Is_Raise_Statement, Is_Sole_Statement,
5078 Preceded_By_Control_Flow_Statement,
5079 Within_Conditional_Statement): New routines.
5080
5081 2019-07-05 Javier Miranda <miranda@adacore.com>
5082
5083 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
5084 accessibility check when the conversion is an access to
5085 class-wide interface type and it is an actual parameter.
5086 * exp_ch6.adb (Expand_Call_Helper): Add documentation on the
5087 accessibility level of an anonymous allocator defining the value
5088 of an access parameter.
5089 * sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
5090 support for an anonymous allocator whose type is that of a
5091 stand-alone object of an anonymous access to object type.
5092
5093 2019-07-05 Piotr Trojanek <trojanek@adacore.com>
5094
5095 * einfo.ads, sem_res.adb: Typo fixes in comments.
5096
5097 2019-07-05 Bob Duff <duff@adacore.com>
5098
5099 * exp_ch6.adb (Is_Build_In_Place_Function): Narrow the check for
5100 Has_Foreign_Convention to the imported case only. If a
5101 build-in-place function is exported, and called from Ada code,
5102 build-in-place protocols should be used.
5103
5104 2019-07-05 Ed Schonberg <schonberg@adacore.com>
5105
5106 * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
5107 is a loop, continue climbing the scope stack to find the
5108 enclosing subprogram.
5109 (Gather_Components): Handle properly a choice in a record
5110 aggregate that is given by a subtype with a static predicate.
5111
5112 2019-07-05 Javier Miranda <miranda@adacore.com>
5113
5114 * debug.adb (-gnatd.K): Leave available this switch.
5115 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
5116 Remove.
5117 * scil_ll.ads, scil_ll.adb (Contract_Only_Body_Flag,
5118 Contract_Only_Body_Nodes, Get_Contract_Only_Body,
5119 Is_Contract_Only_Body, Set_Contract_Only_Body): Remove.
5120
5121 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
5122
5123 * libgnat/a-strunb.ads: Import documentation from the RM
5124
5125 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
5126
5127 * libgnat/a-strfix.ads: Import documentation from the RM
5128
5129 2019-07-05 Yannick Moy <moy@adacore.com>
5130
5131 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
5132 switches.
5133
5134 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
5135
5136 * ali.adb: Relocate types Invocation_Construct_Record,
5137 Invocation_Relation_Record, and Invocation_Signature_Record to
5138 the body of ALI. Relocate tables Invocation_Constructs,
5139 Invocation_Relations, and Invocation_Signatures to the body of
5140 ALI. Remove type Body_Placement_Codes. Add new types
5141 Declaration_Placement_Codes, and
5142 Invocation_Graph_Encoding_Codes. Update the literals of type
5143 Invocation_Graph_Line_Codes.
5144 (Add_Invocation_Construct): Update the parameter profile. Add an
5145 invocation construct built from all attributes provided.
5146 (Add_Invocation_Relation): Update the parameter profile. Add an
5147 invocation relation built from all attributes provided.
5148 (Body_Placement): New routine.
5149 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
5150 Removed.
5151 (Code_To_Declaration_Placement_Kind,
5152 Code_To_Invocation_Graph_Encoding_Kind, Column,
5153 Declaration_Placement_Kind_To_Code, Extra,
5154 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
5155 Invocation_Graph_Encoding,
5156 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
5157 Locations, Name): New routine.
5158 (Scan_Invocation_Construct_Line): Reimplement the scanning
5159 mechanism.
5160 (Scan_Invocation_Graph_Attributes_Line): New routine.
5161 (Scan_Invocation_Graph_Line): Use a case statement to dispatch.
5162 (Scan_Invocation_Relation_Line): Reimplement the scanning
5163 mechanism.
5164 (Scope): New routine.
5165 (Set_Invocation_Graph_Encoding, Signature, Spec_Placement,
5166 Target): New routine.
5167 * ali.ads: Add new type Invocation_Graph_Encoding_Kind. Add
5168 component Invocation_Graph_Encoding to type Unit_Record.
5169 Relocate various types and data structures to the body of ALI.
5170 (Add_Invocation_Construct, Add_Invocation_Relation): Update the
5171 parameter profile.
5172 (Body_Placement): New routine.
5173 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
5174 Removed.
5175 (Code_To_Declaration_Placement_Kind,
5176 Code_To_Invocation_Graph_Encoding_Kind, Column,
5177 Declaration_Placement_Kind_To_Code, Extra,
5178 For_Each_Invocation_Construct, For_Each_Invocation_Relation,
5179 Invocation_Graph_Encoding,
5180 Invocation_Graph_Encoding_Kind_To_Code, Invoker, Kind, Line,
5181 Locations, Name, Scope, Set_Invocation_Graph_Encoding,
5182 Signature, Spec_Placement, Target): New routine.
5183 * bindo.adb: Add with clause for Binde. Add with and use
5184 clauses for Debug. Update the documentation. Add new switches.
5185 (Find_Elaboration_Order): Dispatch to the proper elaboration
5186 mechanism.
5187 * bindo-augmentors.adb:
5188 Remove with and use clauses for GNAT and GNAT.Sets. Remove
5189 membership set VS. Update the parameter profiles of most
5190 routines to use better parameter names. Update the
5191 implementation of most routine to use the new parameter names.
5192 Remove various redundant assertions.
5193 * bindo-builders.adb: Use better names for instantiated data
5194 structures. Update all references to these names. Update the
5195 parameter profiles of most routines to use better parameter
5196 names. Update the implementation of most routine to use the new
5197 parameter names.
5198 (Build_Library_Graph): Update the parameter profile. Update the
5199 call to Create.
5200 (Create_Vertex): Reimplemented.
5201 (Declaration_Placement_Vertex): New routine.
5202 * bindo-builders.ads (Build_Library_Graph): Update the parameter
5203 profile and comment on usage.
5204 * bindo-diagnostics.adb: Almost a new unit.
5205 * bindo-diagnostics.ads: Add a use clause for
5206 Bindo.Graphs.Invocation_Graphs. Remove package
5207 Cycle_Diagnostics.
5208 (Diagnose_Circularities): New routine.
5209 * bindo-elaborators.adb: Remove the with and use clauses for
5210 Binderr and GNAT.Sets. Remove the use clause for
5211 Bindo.Diagnostics.Cycle_Diagnostics. Remove membership set VS.
5212 Update the parameter profiles of most routines to use better
5213 parameter names. Update the implementation of most routine to
5214 use the new parameter names. (Elaborate_Units_Common): Update
5215 the parameter profile. Pass an infication to the library graph
5216 builder whether the dynamic model is in effect.
5217 (Elaborate_Units_Dynamic, Elaborate_Units_Static): Use
5218 Diagnose_Circularities to provide diagnostics.
5219 (Update_Successor): Use routine In_Same_Component to determine
5220 whether the predecessor and successor reside in different
5221 components.
5222 * bindo-graphs.adb: Add with and use clauses for Butil, Debug,
5223 Output, and Bindo.Writers. Remove with and use clauses for
5224 GNAT.Lists. Update the parameter profiles of most routines to
5225 use better parameter names. Update the implementation of most
5226 routine to use the new parameter names. Remove various
5227 redundant assertions. Remove doubly linked list EL. Add new
5228 type Precedence_Kind.
5229 (Add_Cycle): New routine.
5230 (Add_Vertex): Update the parameter profile. Update the creation
5231 of vertex attributes.
5232 (Add_Vertex_And_Complement, Body_Vertex, Column,
5233 Complementary_Vertex, Copy_Cycle_Path, Cycle_Kind_Of): New
5234 routines.
5235 (Destroy_Invocation_Graph_Edge, Destroy_Library_Graph_Cycle,
5236 Destroy_Library_Graph_Edge, Extra, File_Name,
5237 Find_All_Cycles_Through_Vertex, Find_All_Cycles_With_Edge,
5238 Find_Cycles, Find_First_Lower_Precedence_Cycle,
5239 Get_LGC_Attributes, Has_Next, Hash_Library_Graph_Cycle,
5240 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
5241 Highest_Precedence_Edge, In_Same_Component, Insert_And_Sort,
5242 Invocation_Edge_Count, Invocation_Graph_Encoding,
5243 Is_Cycle_Initiating_Edge, Is_Cyclic_Edge,
5244 Is_Cyclic_Elaborate_All_Edge, Is_Cyclic_Elaborate_Body_Edge,
5245 Is_Cyclic_Elaborate_Edge, Is_Cyclic_Forced_Edge,
5246 Is_Cyclic_Invocation_Edge, Is_Cyclic_With_Edge,
5247 Is_Dynamically_Elaborated, Is_Elaborate_All_Edge,
5248 Is_Elaborate_Body_Edge, Is_Elaborate_Edge: New routines.
5249 (Is_Existing_Predecessor_Successor_Relation): Removed.
5250 (Is_Forced_Edge, Is_Invocation_Edge, Is_Recorded_Cycle,
5251 Is_Recorded_Edge, Is_With_Edge, Iterate_Edges_Of_Cycle, Kind,
5252 Length): New routine.
5253 (Lib_Vertex): Removed.
5254 (Line, Links_Vertices_In_Same_Component,
5255 Maximum_Invocation_Edge_Count, Next, Normalize_And_Add_Cycle,
5256 Normalize_Cycle_Path, Number_Of_Cycles, Path, Precedence,
5257 Remove_Vertex_And_Complement, Sequence_Next_Cycle): New routines.
5258 (Sequence_Next_IGE_Id): Renamed to Sequence_Next_Edge.
5259 (Sequence_Next_IGV_Id): Renamed to Sequence_Next_Vertex.
5260 (Sequence_Next_LGE_Id): Renamed to Sequence_Next_Edge.
5261 (Sequence_Next_LGV_Id): Renamed to Sequence_Next_Vertex.
5262 (Set_Is_Existing_Predecessor_Successor_Relation): Removed.
5263 (Set_Is_Recorded_Cycle, Set_Is_Recorded_Edge,
5264 Set_LGC_Attributes, Spec_Vertex, Trace_Cycle, Trace_Edge,
5265 Trace_Eol, Trace_Vertex): New routines.
5266 * bindo-graphs.ads: Add with and use clauses for Types and
5267 GNAT.Lists. Update the parameter profiles of most routines to
5268 use better parameter names. Update the implementation of most
5269 routine to use the new parameter names. Add the new
5270 instantiated data structures IGE_Lists, IGV_Sets, LGC_Lists,
5271 LGE_Lists, LGE_Sets, LGV_Sets, and RC_Sets. Add new type
5272 Library_Graph_Cycle_Id along with an empty and initial value.
5273 Remove component Lib_Vertex and add new components Body_Vertex
5274 and Spec_Vertex to type Invocation_Graph_Vertex_Attributes. Add
5275 new type Library_Graph_Cycle_Kind. Add new iterators
5276 All_Cycle_Iterator and Edges_Of_Cycle_Iterator. Add new type
5277 Library_Graph_Cycle_Attributes. Add new components
5278 Cycle_Attributes, Cycles, and Dynamically_Elaborated to type
5279 Library_Graph_Attributes.
5280 (Body_Vertex, Column, Destroy_Invocation_Graph_Edge,
5281 Destroy_Library_Graph_Cycle_Attributes,
5282 Destroy_Library_Graph_Edge, Extra, File_Name, Find_Cycles,
5283 Has_Elaborate_All_Cycle, Has_Next, Hash_Library_Graph_Cycle,
5284 Hash_Library_Graph_Cycle_Attributes, Highest_Precedence_Cycle,
5285 In_Same_Component, Invocation_Edge_Count,
5286 Invocation_Graph_Encoding, Is_Dynamically_Elaborated,
5287 Is_Elaborate_All_Edge, Is_Elaborate_Body_Edge,
5288 Is_Elaborate_Edge, Is_Forced_Edge, Is_Invocation_Edge,
5289 Is_With_Edge, Iterate_All_Cycles, Iterate_Edges_Of_Cycle, Kind):
5290 New routines.
5291 (Length, Lib_Vertex, (Line, Next, Number_Of_Cycles, Present,
5292 Same_Library_Graph_Cycle_Attributes, Spec_Vertex): New routines.
5293 * bindo-units.adb (File_Name, Invocation_Graph_Encoding): New
5294 routines.
5295 * bindo-units.ads: Add new instantiated data structure
5296 Unit_Sets.
5297 (File_Name, Invocation_Graph_Encoding): New routine.
5298 * bindo-validators.adb: Remove with and use clauses for GNAT and
5299 GNAT.Sets. Remove membership set US. Update the parameter
5300 profiles of most routines to use better parameter names. Update
5301 the implementation of most routine to use the new parameter
5302 names.
5303 (Validate_Cycle, Validate_Cycle_Path, Validate_Cycles,
5304 Validate_Invocation_Graph_Vertex): Remove the validation of
5305 component Lib_Vertex. Add the validation of components
5306 Body_Vertex and Spec_Vertex.
5307 (Write_Error): New routine.
5308 * bindo-validators.ads (Validate_Cycles): New routine.
5309 * bindo-writers.adb: Update the parameter profiles of most
5310 routines to use better parameter names. Update the
5311 implementation of most routine to use the new parameter names.
5312 (Write_Cycle, Write_Cyclic_Edge, Write_Cycles): New routines.
5313 (Write_Invocation_Graph_Vertex): Remove the output of component
5314 Lib_Vertex. Add the output of components Body_Vertex and
5315 Spec_Vertex.
5316 * bindo-writers.ads (Write_Cycles): New routine.
5317 * debug.adb: Use binder switches -d_C and -d_P, add
5318 documentation on their usage.
5319 * gnatbind.adb: Remove with and use clauses for Binde. Delegate
5320 the choice of elaboration mechanism to Bindo.
5321 * lib-writ.adb (Column, Extra, Invoker, Kind, Line, Locations,
5322 Name, Placement, Scope, Signature, Target): Removed.
5323 (Write_Invocation_Graph): Moved at the top level.
5324 (Write_Invocation_Graph_Attributes): New routine.
5325 (Write_Invocation_Relation, Write_Invocation_Signature): Moved
5326 at the top level.
5327 * lib-writ.ads: Add a documentation section on invocation graph
5328 attributes.
5329 * sem_elab.adb (Body_Placement_Of): New routine.
5330 (Declare_Invocation_Construct): Update the call to
5331 Add_Invocation_Construct.
5332 (Declaration_Placement_Of_Node): New routine.
5333 (Get_Invocation_Attributes): Correct the retrieval of the
5334 enclosing subprogram where the postcondition procedure lives.
5335 (Placement_Of, Placement_Of_Node): Removed.
5336 (Record_Invocation_Graph): Record the encoding format used.
5337 (Record_Invocation_Graph_Encoding): New routine.
5338 (Record_Invocation_Relation): Update the call to
5339 Add_Invocation_Relation.
5340 (Spec_Placement_Of): Removed.
5341 * libgnat/g-lists.ads, libgnat/g-lists.adb (Equal): New routine.
5342
5343 2019-07-05 Ed Schonberg <schonberg@adacore.com>
5344
5345 * checks.adb (Apply_Predicate_Check): Except within the
5346 subprogram body that defines the formal, do not apply predicate
5347 check on a formal IN parameter: such a check is redundant and
5348 its expansion can lead to out-of-scope references when it is
5349 originates in a function call in a precondition,
5350
5351 2019-07-05 Yannick Moy <moy@adacore.com>
5352
5353 * sem_res.adb (Resolve_Call): Cannot inline in quantified
5354 expressions.
5355 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
5356 function.
5357
5358 2019-07-05 Bob Duff <duff@adacore.com>
5359
5360 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
5361 Fix typo.
5362 * gnat_rm.texi: Regenerate.
5363
5364 2019-07-05 Bob Duff <duff@adacore.com>
5365
5366 * exp_attr.adb (Input): Take the No_Stream_Optimizations
5367 restriction into account.
5368
5369 2019-07-05 Claire Dross <dross@adacore.com>
5370
5371 * libgnat/a-cofove.ads, libgnat/a-cofove.adb: Definite formal
5372 vectors are now always bounded so that they do not need to be
5373 limited anymore.
5374
5375 2019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
5376
5377 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
5378 function.
5379
5380 2019-07-04 James Clarke <jrtc27@debian.org>
5381
5382 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
5383 definition public.
5384 (CLOCK_REALTIME): Make value public.
5385
5386 2019-07-04 Javier Miranda <miranda@adacore.com>
5387
5388 * exp_tss.adb (Init_Proc): Adding missing support for access to
5389 subprograms and access to protected subprograms of non-default
5390 C++ constructors.
5391
5392 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
5393
5394 * gnat1drv.adb (Adjust_Global_Switches): Use proper interface to
5395 set the validity settings in CodePeer mode.
5396 * par-load.adb (Load): Remove all code dealing with validity
5397 settings.
5398 * validsw.ads (Validity_Check_Copies): Alphabetize.
5399 * validsw.adb (Reset_Validity_Check_Options): Set all options to
5400 off.
5401 (Save_Validity_Check_Options): Save all options.
5402
5403 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
5404
5405 * exp_ch3.adb, exp_ch4.adb, exp_ch4.ads, exp_ch5.adb,
5406 exp_ch7.adb, exp_ch9.adb, exp_ch11.adb, exp_unst.adb,
5407 rtsfind.ads, sem_attr.adb, sem_ch10.adb, sem_ch12.adb,
5408 sem_ch13.adb, sem_dim.adb, sem_disp.adb, xref_lib.adb: Minor
5409 reformatting.
5410
5411 2019-07-04 Joffrey Huguet <huguet@adacore.com>
5412
5413 * libgnarl/a-taside.ads: Add assertion policy to ignore
5414 preconditions.
5415 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
5416
5417 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
5418
5419 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
5420 capitalization and parenthesis glitches.
5421 * gnat_rm.texi: Regenerate.
5422
5423 2019-07-04 Ed Schonberg <schonberg@adacore.com>
5424
5425 * sem_ch10.adb (Remove_Context_Clauses): Handle properly the
5426 removal of a limited_with_clause which appears in the library
5427 unit oF the main unit, when some other unit in the context has a
5428 regular with_clause on the same unit, to prevent spurious
5429 visibility errors in the subsequent analysis of pending instance
5430 bodies.
5431
5432 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
5433
5434 * sem_elab.adb: Add new type Elaboration_Phase_Status along with
5435 a global to keep track of the elaboration phase status.
5436 Initialize all internal data structures to Nil for services
5437 Elaborated_Units, Internal_Representation, and Scenario_Storage.
5438 (Build_Call_Marker): Do not create a call marker when the
5439 elaboration phase is not active.
5440 (Build_Variable_Reference_Marker): Do not create a call marker
5441 when the elaboration phase is not active.
5442 (Check_Elaboration_Scenarios): Destroy all internal structures
5443 when the elaboration phase does not have to run. Do not execute
5444 when the elaboration phase is not active.
5445 (Elaboration_Phase_Active): New routine.
5446 (Finalize_All_Data_Structures): New routine.
5447 (Initialize): Initialize all internal data structures and signal
5448 that the elaboration phase has started.
5449 (Initialize_All_Data_Structures): New routine.
5450 (Initialize_Elaborated_Units): Initialize all internal data
5451 structures.
5452 (Initialize_Internal_Representation): Initialize all internal
5453 data structures.
5454 (Initialize_Scenario_Storage): Initialize all internal data
5455 structures.
5456 (Kill_Elaboration_Scenario): Do not execute when the elaboration
5457 phase is not active.
5458 (Set_Elaboration_Phase): New routine.
5459 (Update_Elaboration_Scenario): Do not execute when the
5460 elaboration phase is not active.
5461
5462 2019-07-04 Gary Dismukes <dismukes@adacore.com>
5463
5464 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The special
5465 treatment of calling Mask_Unfrozen_Types must also be done in
5466 the case of an Ignored_Ghost_Entity, because Expander_Active is
5467 False in that case.
5468
5469 2019-07-04 Yannick Moy <moy@adacore.com>
5470
5471 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
5472 on SPARK_Mode.
5473
5474 2019-07-04 Justin Squirek <squirek@adacore.com>
5475
5476 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
5477 before type comparison.
5478
5479 2019-07-04 Ed Schonberg <schonberg@adacore.com>
5480
5481 * exp_ch4.ads, exp_ch4.adb (Build_Eq_Call): New visible
5482 subprogram, extracted from Expand_Composite_Equality, to handle
5483 properly the composition of equality for variant record types.
5484 * exp_ch3.adb (MAke_Eq_If): Use Build_Eq_Call for each
5485 component, to handle properly the case of a component with a
5486 user-defined equality. Revert to predefined equality if the
5487 user-defined operation is abstract, to maintain compatibility
5488 with older versions,
5489
5490 2019-07-04 Justin Squirek <squirek@adacore.com>
5491
5492 * exp_ch3.adb (Build_Initialization_Call): Fixup
5493 *_skip_null_excluding_check argument to handle new default.
5494 (Init_Formals): Make *_skip_null_excluding_check formal default
5495 to False
5496 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
5497 code duplication
5498
5499 2019-07-04 Bob Duff <duff@adacore.com>
5500
5501 * sem_ch3.adb (Access_Definition): Do not create a master unless
5502 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
5503
5504 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
5505
5506 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
5507 Default_Initial_Condition attributes to an incomplete type.
5508
5509 2019-07-04 Ed Schonberg <schonberg@adacore.com>
5510
5511 * sem_attr.adb (Check_Array_Type): An array type attribute such
5512 as 'First can be applied to an unconstrained array tyope when
5513 the attribute reference appears within an aspect specification
5514 and the prefix is a current instance, given that the prefix of
5515 the attribute will become a formal of the subprogram that
5516 implements the aspect (typically a predicate check).
5517
5518 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
5519
5520 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
5521 comments.
5522
5523 2019-07-04 Yannick Moy <moy@adacore.com>
5524
5525 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
5526 rule.
5527
5528 2019-07-04 Yannick Moy <moy@adacore.com>
5529
5530 * sem_spark.adb (Check_Statement): Only check permission of
5531 object in extended return when it is of a deep type.
5532
5533 2019-07-04 Justin Squirek <squirek@adacore.com>
5534
5535 * sem_ch12.adb (Perform_Appropriate_Analysis): Added for
5536 selecting which type of analysis based on wheither the
5537 instantiation is a generic at the library-level. In which case
5538 expansion during analysis.
5539 (Preanalyze_Actuals): Modify calls to Analyze to use the new
5540 routine.
5541
5542 2019-07-04 Ed Schonberg <schonberg@adacore.com>
5543
5544 * exp_unst.adb: Handle conditional expressions.
5545
5546 2019-07-04 Yannick Moy <moy@adacore.com>
5547
5548 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
5549 analyze parts of the code marked in SPARK.
5550
5551 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
5552
5553 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
5554 Minor reformatting.
5555
5556 2019-07-04 Yannick Moy <moy@adacore.com>
5557
5558 * sem_spark.adb (Explanation, Get_Expl): New functions to get
5559 the explanation for a permission mismatch.
5560 (Perm_Error, Perm_Mismatch, Perm_Error_Loop_Exit): Take
5561 explanation into account for issuing a more precise error
5562 message.
5563 (Set_Perm_Prefixes, Set_Perm_Extensions,
5564 Set_Perm_Extensions_Move): Pass suitable argument for the
5565 explanation node.
5566
5567 2019-07-04 Arnaud Charlet <charlet@adacore.com>
5568
5569 * exp_aggr.adb (In_Place_Assign_OK): Moved to top level and add
5570 support for record aggregates.
5571 (Component_Check): Use Is_CCG_Supported_Aggregate instead of a
5572 similar local predicate.
5573 (Convert_To_Assignments): Take advantage of In_Place_Assign_OK
5574 predicate when possible.
5575 (Is_CCG_Supported_Aggregate): Return False for records with
5576 representation clauses and fix the logic for dealing with nested
5577 aggregates.
5578
5579 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
5580
5581 * opt.adb (Set_Config_Switches): Keep assertions policy as
5582 enabled when analysing internal units in GNATprove mode.
5583
5584 2019-07-04 Arnaud Charlet <charlet@adacore.com>
5585
5586 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
5587 N_Variable_Reference_Marker when checking for the presence of
5588 actions.
5589
5590 2019-07-04 Arnaud Charlet <charlet@adacore.com>
5591
5592 * exp_aggr.adb (Check_Component): Take into account type
5593 conversions.
5594
5595 2019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
5596
5597 * doc/gnat_ugn/platform_specific_information.rst: Document
5598 Windows socket timeout particularity.
5599 * gnat_ugn.texi: Regenerate.
5600 * gsocket.h: Include versionhelpers.h.
5601 * socket.c (__gnat_minus_500ms): New function.
5602 * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
5603 imported function.
5604 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
5605 500ms from the requested timeout only on old Windows version.
5606
5607 2019-07-04 Thomas Quinot <quinot@adacore.com>
5608
5609 * get_scos.adb: Remove bogus, dead code.
5610
5611 2019-07-04 Ed Schonberg <schonberg@adacore.com>
5612
5613 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
5614 component is an entity name, its dimensions are those of its
5615 type.
5616
5617 2019-07-03 Bob Duff <duff@adacore.com>
5618
5619 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
5620 GNATpp.
5621
5622 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
5623
5624 * binde.adb: Remove with clause for System.OS_Lib.
5625 (Force_Elab_Order): Refactor the majority of the code in Butil.
5626 Use the new forced units iterator to obtain unit names.
5627 * bindo-builders.adb: Add with and use clauses for Binderr,
5628 Butil, Opt, Output, Types, GNAT, and GNAT.Dynamic_HTables. Add
5629 a hash table which maps units to line number in the forced
5630 elaboration order file.
5631 (Add_Unit): New routine.
5632 (Build_Library_Graph): Create forced edges between pairs of
5633 units listed in the forced elaboration order file.
5634 (Create_Forced_Edge, Create_Forced_Edges, Destroy_Line_Number,
5635 Duplicate_Unit_Error, Hash_Unit, Internal_Unit_Info,
5636 Is_Duplicate_Unit, Missing_Unit_Info): New routines.
5637 * bindo-graphs.adb (Is_Internal_Unit, Is_Predefined_Unit):
5638 Refactor some of the behavior to Bindo-Units.
5639 * bindo-graphs.ads: Enable the enumeration literal for forced
5640 edges.
5641 * bindo-units.adb, bindo-units.ads (Is_Internal_Unit,
5642 Is_Predefined_Unit): New routines.
5643 * butil.adb: Add with and use clauses for Opt, GNAT, and
5644 System.OS_Lib. Add with clause for Unchecked_Deallocation.
5645 (Has_Next, Iterate_Forced_Units, Next, Parse_Next_Unit_Name,
5646 Read_Forced_Elab_Order_File): New routines.
5647 * butil.ads: Add with and use clauses for Types. Add new
5648 iterator over the units listed in the forced elaboration order
5649 file.
5650 (Has_Next, Iterate_Forced_Units, Next): New routine.
5651 * namet.adb, namet.ads (Present): New routine.
5652
5653 2019-07-03 Bob Duff <duff@adacore.com>
5654
5655 * sem_ch3.adb (Access_Definition): The code was creating a
5656 master in the case where the designated type is a class-wide
5657 interface type. Create a master in the noninterface case as
5658 well. That is, create a master for all limited class-wide types.
5659
5660 2019-07-03 Yannick Moy <moy@adacore.com>
5661
5662 * erroutc.adb (Sloc_In_Range): New function to determine whether
5663 the range of a pragma Warnings covers a location, taking
5664 instantiations into account.
5665
5666 2019-07-03 Johannes Kanig <kanig@adacore.com>
5667
5668 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
5669 to access the first file provided on the command line.
5670
5671 2019-07-03 Ed Schonberg <schonberg@adacore.com>
5672
5673 * inline.adb (Process_Formals_In_Aspects): New procedure within
5674 Expand_Inlined_Call, to perform a replacement of references to
5675 formals that appear in aspect specifications within the body
5676 being inlined.
5677
5678 2019-07-03 Justin Squirek <squirek@adacore.com>
5679
5680 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
5681 the appropriate actual subtype of the object renaming being
5682 analyzed.
5683 (Check_Constrained_Object): Minor cleanup.
5684
5685 2019-07-03 Yannick Moy <moy@adacore.com>
5686
5687 * sem_spark.adb (Get_Observed_Or_Borrowed_Expr): New function to
5688 return go through traversal function call.
5689 (Check_Type): Consistently use underlying type.
5690 (Get_Perm): Adapt for case of elaboration code where variables
5691 are not declared in the environment. Remove incorrect handling
5692 of borrow and observe.
5693
5694 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
5695
5696 * inline.adb (Build_Return_Object_Formal): New routine.
5697 (Can_Split_Unconstrained_Function): Code clean up.
5698 (Copy_Formals,Copy_Return_Object): New routines.
5699 (Split_Unconstrained_Function): Code clean up and refactoring.
5700
5701 2019-07-03 Gary Dismukes <dismukes@adacore.com>
5702
5703 * bindo-augmentors.adb, bindo-augmentors.ads,
5704 bindo-builders.ads, bindo-elaborators.adb, sem_ch12.adb,
5705 sem_ch13.adb, sem_spark.adb, sinfo.ads: Minor editorial
5706 corrections and reformatting.
5707
5708 2019-07-03 Bob Duff <duff@adacore.com>
5709
5710 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
5711 if an Iterator_Specification is present.
5712
5713 2019-07-03 Bob Duff <duff@adacore.com>
5714
5715 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
5716 new-line behavior.
5717
5718 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
5719
5720 * ali.adb: Add with and use clauses for GNAT,
5721 GNAT.Dynamic_HTables, and Snames. Add a map from invocation
5722 signature records to invocation signature ids. Add various
5723 encodings of invocation-related attributes. Sort and update
5724 table Known_ALI_Lines.
5725 (Add_Invocation_Construct, Add_Invocation_Relation,
5726 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
5727 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
5728 Code_To_Invocation_Graph_Line_Kind, Destroy, Hash): New
5729 routines.
5730 (Initialize_ALI): Sort the initialization sequence. Add
5731 initialization for all invocation-related tables.
5732 (Invocation_Construct_Kind_To_Code,
5733 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
5734 Invocation_Signature_Of, Present): New routines.
5735 (Scan_ALI): Add the default values for invocation-related ids.
5736 Scan invocation graph lines.
5737 (Scan_Invocation_Graph_Line): New routine.
5738 * ali.ads: Add with clause for GNAT.Dynamic_Tables. Add types
5739 for invocation constructs, relations, and signatures. Add
5740 tables for invocation constructs, relations, and signatures.
5741 Update Unit_Record to capture invocation-related ids. Relocate
5742 table Unit_Id_Tables and subtypes Unit_Id_Table, Unit_Id_Array
5743 from Binde.
5744 (Add_Invocation_Construct, Add_Invocation_Relation,
5745 Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind,
5746 Code_To_Invocation_Construct_Kind, Code_To_Invocation_Kind,
5747 Code_To_Invocation_Graph_Line_Kind,
5748 Invocation_Construct_Kind_To_Code,
5749 Invocation_Graph_Line_Kind_To_Code, Invocation_Kind_To_Code,
5750 Invocation_Signature_Of, Present): New routines.
5751 * binde.adb: Add with and use clause for Types. Add use clause
5752 for ALI.Unit_Id_Tables;
5753 * binde.ads: Relocate table Unit_Id_Tables and subtypes
5754 Unit_Id_Table, Unit_Id_Array to ALI.
5755 * bindgen.adb: Remove with and use clause for ALI.
5756 * bindgen.ads: Remove with and use clause for Binde. Add with
5757 and use clause for ALI.
5758 * bindo.adb, bindo.ads, bindo-augmentors.adb,
5759 bindo-augmentors.ads, bindo-builders.adb, bindo-builders.ads,
5760 bindo-diagnostics.adb, bindo-diagnostics.ads,
5761 bindo-elaborators.adb, bindo-elaborators.ads, bindo-graphs.adb,
5762 bindo-graphs.ads, bindo-units.adb, bindo-units.ads,
5763 bindo-validators.adb, bindo-validators.ads, bindo-writers.adb,
5764 bindo-writers.ads: New units.
5765 * debug.adb: Use and describe GNAT debug switches -gnatd_F and
5766 -gnatd_G. Add GNATbind debug switches in the ranges dA .. dZ,
5767 d.a .. d.z, d.A .. d.Z, d.1 .. d.9, d_a .. d_z, d_A .. d_Z, and
5768 d_1 .. d_9. Use and describe GNATbind debug switches -d_A,
5769 -d_I, -d_L, -d_N, -d_O, -d_T, and -d_V.
5770 * exp_util.adb, exp_util.ads (Exceptions_OK): Relocate to
5771 Sem_Util.
5772 * gnatbind.adb: Add with and use clause for Bindo. Use the new
5773 Bindo elaboration order only when -d_N is in effect.
5774 * lib-writ.adb
5775 (Column, Extra, Invoker, Kind, Line, Locations, Name, Placement,
5776 Scope, Signature, Target): New routines.
5777 (Write_ALI): Output all invocation-related data.
5778 (Write_Invocation_Graph): New routine.
5779 * lib-writ.ads: Document the invocation graph ALI line.
5780 * namet.adb, namet.ads (Present): New routines.
5781 * sem_ch8.adb (Find_Direct_Name): Capture the status of
5782 elaboration checks and warnings of an identifier.
5783 (Find_Expanded_Name): Capture the status of elaboration checks
5784 and warnings of an expanded name.
5785 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Ensure
5786 that invocation graph-related data within the body of the main
5787 unit is encoded in the ALI file.
5788 (Analyze_Generic_Subprogram_Declaration): Ensure that invocation
5789 graph-related data within the body of the main unit is encoded
5790 in the ALI file.
5791 (Analyze_Package_Instantiation): Perform minimal decoration of
5792 the instance entity.
5793 (Analyze_Subprogram_Instantiation): Perform minimal decoration
5794 of the instance entity.
5795 * sem_elab.adb: Perform heavy refactoring of all code. The unit
5796 is now split into "services" which specialize in one area of ABE
5797 checks. Add processing in order to capture invocation-graph
5798 related attributes of the main unit, and encode them in the ALI
5799 file. The Processing phase can now operate in multiple modes,
5800 all described by type Processing_Kind. Scenarios and targets
5801 are now distinct at the higher level, and carry their own
5802 representations. This eliminates the need to constantly
5803 recompute their attributes, and offers the various processors a
5804 uniform interface. The various initial states of the Processing
5805 phase are now encoded using type Processing_In_State, and
5806 xxx_State constants.
5807 * sem_elab.ads: Update the literals of type
5808 Enclosing_Level_Kind. Add Inline pragmas on several routines.
5809 * sem_prag.adb (Process_Inline): Ensure that invocation
5810 graph-related data within the body of the main unit is encoded
5811 in the ALI file.
5812 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
5813 Code clean up.
5814 (Exceptions_OK): Relocated from Sem_Util.
5815 (Mark_Save_Invocation_Graph_Of_Body): New routine.
5816 * sem_util.ads (Exceptions_OK): Relocated from Sem_Util.
5817 (Mark_Save_Invocation_Graph_Of_Body): New routine.
5818 * sinfo.adb (Is_Elaboration_Checks_OK_Node): Now applicable to
5819 N_Variable_Reference_Marker.
5820 (Is_Elaboration_Warnings_OK_Node): Now applicable to
5821 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
5822 (Is_Read): Use Flag4.
5823 (Is_SPARK_Mode_On_Node): New applicable to
5824 N_Variable_Reference_Marker.
5825 (Is_Write): Use Flag5.
5826 (Save_Invocation_Graph_Of_Body): New routine.
5827 (Set_Is_Elaboration_Checks_OK_Node): Now applicable to
5828 N_Variable_Reference_Marker.
5829 (Set_Is_Elaboration_Warnings_OK_Node): Now applicable to
5830 N_Expanded_Name, N_Identifier, N_Variable_Reference_Marker.
5831 (Set_Is_SPARK_Mode_On_Node): New applicable to
5832 N_Variable_Reference_Marker.
5833 (Set_Save_Invocation_Graph_Of_Body): New routine.
5834 * sinfo.ads: Update the documentation of attributes
5835 Is_Elaboration_Checks_OK_Node, Is_Elaboration_Warnings_OK_Node,
5836 Is_SPARK_Mode_On_Node. Update the flag usage of attributes
5837 Is_Read, Is_Write. Add attribute Save_Invocation_Graph_Of_Body
5838 and update its occurrence in nodes.
5839 (Save_Invocation_Graph_Of_Body): New routine along with pragma
5840 Inline.
5841 (Set_Save_Invocation_Graph_Of_Body): New routine along with
5842 pragma Inline.
5843 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
5844 debug switches.
5845 (Scan_Debug_Switches): New routine.
5846 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads (Contains): New routine.
5847 * libgnat/g-graphs.adb (Associate_Vertices): Update the use of
5848 Component_Vertex_Iterator.
5849 (Contains_Component, Contains_Edge, Contains_Vertex, Has_Next):
5850 Reimplemented.
5851 (Iterate_Component_Vertices): New routine.
5852 (Iterate_Vertices): Removed.
5853 (Next): Update the parameter profile.
5854 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
5855 routines.
5856 * libgnat/g-graphs.ads: Update the initialization of
5857 No_Component. Add type Component_Vertex_Iterator. Remove type
5858 Vertex_Iterator.
5859 (Has_Next): Add new versions and remove old ones.
5860 (Iterate_Component_Vertices): New routine.
5861 (Iterate_Vertices): Removed.
5862 (Next): Add new versions and remove old ones.
5863 (Number_Of_Component_Vertices, Number_Of_Outgoing_Edges): New
5864 routines.
5865 * libgnat/g-sets.adb (Contains): Reimplemented.
5866 * gcc-interface/Make-lang.in (GNATBIND_OBJS): Add
5867 GNAT.Dynamic_HTables, GNAT.Graphs and Bindo units.
5868 * rtsfind.ads: Remove extra space.
5869
5870 2019-07-03 Yannick Moy <moy@adacore.com>
5871
5872 * sem_spark.adb: Add support for locally borrowing and observing
5873 a path.
5874 (Get_Root_Object): Add parameter Through_Traversal to denote
5875 when we are interesting in getting to the traversed parameter.
5876 (Is_Prefix_Or_Almost): New function to support detection of
5877 illegal access to borrowed or observed paths.
5878 (Check_Pragma): Add analysis of assertion pragmas.
5879
5880 2019-07-03 Ed Schonberg <schonberg@adacore.com>
5881
5882 * sem_ch13.adb (Build_Predicate_Functions): In a generic context
5883 we do not build the bodies of predicate fuctions, but the
5884 expression in a static predicate must be elaborated to allow
5885 case coverage checking within the generic unit.
5886 (Build_Discrete_Static_Predicate): In a generic context, return
5887 without building function body once the
5888 Static_Discrete_Predicate expression for the type has been
5889 constructed.
5890
5891 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
5892
5893 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
5894 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
5895
5896 2019-07-03 Bob Duff <duff@adacore.com>
5897
5898 * par-ch3.adb (P_Defining_Identifier): Call
5899 Check_Defining_Identifier_Casing.
5900 * style.ads, styleg.ads, styleg.adb
5901 (Check_Defining_Identifier_Casing): New procedure to check for
5902 mixed-case defining identifiers.
5903 * stylesw.ads, stylesw.adb (Style_Check_Mixed_Case_Decls): New
5904 flag for checking for mixed-case defining identifiers.
5905 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
5906 Document new feature.
5907 * gnat_ugn.texi: Regenerate.
5908
5909 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
5910
5911 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
5912 (Warning message control): Document that -gnatw.z/Z apply to
5913 array types.
5914 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
5915 types as well, but not if the specified alignment is the minimum
5916 one.
5917 * gnat_ugn.texi: Regenerate.
5918
5919 2019-07-03 Bob Duff <duff@adacore.com>
5920
5921 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
5922 correctly.
5923
5924 2019-07-03 Ed Schonberg <schonberg@adacore.com>
5925
5926 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): No error
5927 message on attribute applied to a renaming when the renamed
5928 object is an aggregate (from code reading).
5929 (Check_Aspect_At_End_Of_Declarations): In a generic context
5930 where freeze nodes are not generated, the original expression
5931 for an aspect may need to be analyzed to precent spurious
5932 conformance errors when compared with the expression that is
5933 anakyzed at the end of the current declarative list.
5934
5935 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
5936
5937 * layout.adb (Layout_Type): Do not set the component size of an
5938 array with a scalar component if the component type is
5939 overaligned.
5940
5941 2019-07-03 Ed Schonberg <schonberg@adacore.com>
5942
5943 * inline.adb (Make_Loop_Labels_Unique): New procedure to modify
5944 the source code of subprograms that are inlined by the
5945 front-end, to prevent accidental duplication between loop labels
5946 in the inlined code and the code surrounding the inlined call.
5947
5948 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
5949
5950 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update
5951 the section on resolving elaboration circularities to eliminate
5952 certain combinations of switches which together do not produce
5953 the desired effect and confuse users.
5954 * gnat_ugn.texi: Regenerate.
5955
5956 2019-07-03 Arnaud Charlet <charlet@adacore.com>
5957
5958 * bindgen.adb (Gen_Main): Disable generation of reference to
5959 Ada_Main_Program_Name for CCG.
5960 * bindusg.adb (Display): Add -G to the command-line usage for
5961 gnatbind.
5962 * opt.ads (Generate_C_Code): Update comment.
5963 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
5964
5965 2019-07-03 Arnaud Charlet <charlet@adacore.com>
5966
5967 * sem_ch7.adb (Has_Referencer): Do not consider inlined
5968 subprograms when generating C code, which allows us to generate
5969 static inline subprograms.
5970
5971 2019-07-03 Justin Squirek <squirek@adacore.com>
5972
5973 * sem_ch6.adb (Check_Conformance): Add expression checking for
5974 constant modifiers in anonymous access types (in addition to
5975 "non-null" types) so that they are considered "matching" for
5976 subsequent conformance tests.
5977
5978 2019-07-03 Arnaud Charlet <charlet@adacore.com>
5979
5980 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
5981 Clarify wording on No_Multiple_Elaboration.
5982 * gnat_rm.texi: Regenerate.
5983
5984 2019-07-03 Ed Schonberg <schonberg@adacore.com>
5985
5986 * sem_ch8.adb (Find_Selected_Component): If the prefix is the
5987 current instance of a type or subtype, complete the resolution
5988 of the name by finding the component of the type denoted by the
5989 selector name.
5990
5991 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
5992
5993 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C):
5994 Document that boolean types with convention C now map to C99 bool.
5995 * gnat_rm.texi: Regenerate.
5996
5997 2019-07-03 Javier Miranda <miranda@adacore.com>
5998
5999 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
6000 removing code that it is now never executed in the CCG compiler
6001 (dead code).
6002
6003 2019-07-02 Iain Sandoe <iain@sandoe.co.uk>
6004
6005 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
6006 PPC Darwin.
6007
6008 2019-07-01 Ed Schonberg <schonberg@adacore.com>
6009
6010 * sem_ch12.adb (Is_Defaulted): New predicate in
6011 Check_Formal_Package_Intance, to skip the conformance of checks
6012 on parameters of a formal package that are defaulted,
6013
6014 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
6015
6016 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
6017 sem_prag.adb, sem_spark.adb: Minor reformatting.
6018
6019 2019-07-01 Ed Schonberg <schonberg@adacore.com>
6020
6021 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
6022 of attribute to be an attribute reference of a discrete type.
6023
6024 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
6025
6026 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
6027 handling of Has_Pragma_Inline_Always and deal with
6028 Has_Pragma_No_Inline.
6029
6030 2019-07-01 Ed Schonberg <schonberg@adacore.com>
6031
6032 * sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
6033 declared as a subtype of a private type with an inherited
6034 discriminant constraint, its generated full base appears as a
6035 record subtype, so we need to retrieve its oen base type so that
6036 the inherited constraint can be applied to it.
6037
6038 2019-07-01 Yannick Moy <moy@adacore.com>
6039
6040 * sem_spark.adb: Completely rework the algorithm for ownership
6041 checking, as the rules in SPARK RM have changed a lot.
6042 * sem_spark.ads: Update comments.
6043
6044 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
6045
6046 * gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
6047 the sockaddr_in structure to determine the existence of length field
6048 before the sin_family.
6049
6050 2019-07-01 Ed Schonberg <schonberg@adacore.com>
6051
6052 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
6053 applies to entities with run-time addresses, not to types.
6054
6055 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
6056
6057 * einfo.adb, sem_ch7.adb, sem_prag.adb, sem_util.adb: Update
6058 references to the SPARK RM after the removal of Rule 7.1.4(5).
6059
6060 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
6061
6062 * sysdep.c: Cleanup references to LynuxWorks in docs and
6063 comments.
6064
6065 2019-07-01 Ed Schonberg <schonberg@adacore.com>
6066
6067 * checks.adb (Insert_Valid_Check): Do not apply validity check
6068 to variable declared within a protected object that uses the
6069 Lock_Free implementation, to prevent unwarranted constant
6070 folding, because entities within such an object msut be treated
6071 as volatile.
6072
6073 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
6074
6075 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
6076
6077 2019-07-01 Ed Schonberg <schonberg@adacore.com>
6078
6079 * exp_unst.adb (Visit_Node, Check_Static_Type): Improve the
6080 handling of private and incomplete types whose full view is an
6081 access type, to detect additional uplevel references in dynamic
6082 bounds. This is relevant to N_Free_Statement among others that
6083 manipulate types whose full viww may be an access type.
6084
6085 2019-07-01 Pat Rogers <rogers@adacore.com>
6086
6087 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Correct
6088 size indicated for R as a component of an array.
6089 * gnat_rm.texi: Regenerate.
6090
6091 2019-07-01 Justin Squirek <squirek@adacore.com>
6092
6093 * libgnat/s-win32.ads: Add definition for ULONG, modify
6094 OVERLAPPED type, and add appropriate pragmas.
6095
6096 2019-07-01 Bob Duff <duff@adacore.com>
6097
6098 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
6099 ignored-ghost.
6100
6101 2019-07-01 Yannick Moy <moy@adacore.com>
6102
6103 * sem_ch4.adb (Operator_Check): Refine error message.
6104
6105 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
6106
6107 * libgnat/a-calend.ads: Revert "Global => null" contracts on
6108 non-pure routines.
6109
6110 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
6111
6112 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
6113 componant -> component.
6114
6115 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
6116
6117 * libgnat/g-graphs.adb: Use type Directed_Graph rather than
6118 Instance in various routines.
6119 * libgnat/g-graphs.ads: Change type Instance to Directed_Graph.
6120 Update various routines that mention the type.
6121
6122 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
6123
6124 * libgnat/g-sets.adb: Use type Membership_Set rathern than
6125 Instance in various routines.
6126 * libgnat/g-sets.ads: Change type Instance to Membership_Set.
6127 Update various routines that mention the type.
6128
6129 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
6130
6131 * libgnat/g-lists.adb: Use type Doubly_Linked_List rather than
6132 Instance in various routines.
6133 * libgnat/g-lists.ads: Change type Instance to
6134 Doubly_Linked_List. Update various routines that mention the
6135 type.
6136
6137 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
6138
6139 * libgnat/g-dynhta.adb: Use type Dynamic_Hash_Table rather than
6140 Instance in various routines.
6141 * libgnat/g-dynhta.ads: Change type Instance to
6142 Dynamic_Hash_Table. Update various routines that mention the
6143 type.
6144
6145 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
6146
6147 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
6148 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
6149
6150 2019-07-01 Javier Miranda <miranda@adacore.com>
6151
6152 * exp_attr.adb (Expand_Min_Max_Attribute): Disable expansion of
6153 'Min/'Max on integer, enumeration, fixed point and floating
6154 point types since the CCG backend now provides in file
6155 standard.h routines to support it.
6156
6157 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
6158
6159 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
6160 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
6161 GNAT.Graphs.
6162 * libgnat/g-dynhta.adb: Various minor cleanups (use Present
6163 rather than direct comparisons).
6164 (Delete): Reimplement to use Delete_Node.
6165 (Delete_Node): New routine.
6166 (Destroy_Bucket): Invoke the provided destructor.
6167 (Present): New routines.
6168 * libgnat/g-dynhta.ads: Add new generic formal Destroy_Value.
6169 Use better names for the components of iterators.
6170 * libgnat/g-graphs.adb, libgnat/g-graphs.ads: New unit.
6171 * libgnat/g-lists.adb: Various minor cleanups (use Present
6172 rather than direct comparisons).
6173 (Delete_Node): Invoke the provided destructor.
6174 (Present): New routine.
6175 * libgnat/g-lists.ads: Add new generic formal Destroy_Element.
6176 Use better names for the components of iterators.
6177 (Present): New routine.
6178 * libgnat/g-sets.adb, libgnat/g-sets.ads (Destroy, Preset,
6179 Reset): New routines.
6180
6181 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
6182
6183 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
6184 is not defined.
6185
6186 2019-07-01 Ed Schonberg <schonberg@adacore.com>
6187
6188 * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
6189 Resolve result of call to Get_Simple_Init_Val, which may be a
6190 conversion of a literal.
6191
6192 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
6193
6194 * freeze.adb (Freeze_Expression): Remove the horrible useless
6195 name hiding of N. Insert the freeze nodes generated by the
6196 expression prior to the expression when the nearest enclosing
6197 scope is transient.
6198
6199 2019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
6200
6201 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
6202 formatting issues in the -gnatR section.
6203 * gnat_ugn.texi: Regenerate.
6204
6205 2019-06-30 Iain Sandoe <iain@sandoe.co.uk>
6206
6207 * gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
6208 Push -shared-libgcc explicitly, when it is the target default (unless
6209 overidden by the static flag).
6210 When the user has put an instance of shared/static-libgcc do not push
6211 a duplicate of this.
6212
6213 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
6214
6215 * gcc-interface/decl.c (gnat_to_gnu_entity): Beep up comment on SAVED,
6216 and tweak comment on the assertion about the scopes of Itypes. Do not
6217 skip the regular processing for Itypes that are E_Record_Subtype with
6218 a Cloned_Subtype. Get the Cloned_Subtype for every E_Record_Subtype
6219 if the type is dummy and hasn't got its own freeze node.
6220 <E_Record_Subtype>: Save again the DECL of the Cloned_Subtype, if any.
6221 <E_Access_Subtype>: Save again the DECL of the equivalent type.
6222 (Gigi_Equivalent_Type) <E_Access_Subtype>: New case.
6223
6224 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
6225
6226 * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip
6227 dereferences when padding to have the same size on both sides. Do it
6228 for destination types with self-referential size too.
6229
6230 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
6231
6232 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
6233 type requires strict alignment, then set the RM size to the type size.
6234 Rework handling of alignment and sizes of tagged types in ASIS mode.
6235 (validate_size): Rename local variable and remove special handling for
6236 strict-alignment types.
6237 * gcc-interface/utils.c (finish_record_type): Constify local variables
6238 and use properly typed constants.
6239
6240 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
6241
6242 * gcc-interface/decl.c (gnat_to_gnu_field): Rework error messages for
6243 fields requiring strict alignment, add explicit test on Storage_Unit
6244 for position and size, and mention type alignment for position.
6245
6246 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
6247
6248 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
6249 the main variant of a type, if any.
6250
6251 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
6252
6253 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add
6254 missing guard for the presence of TYPE_CANONICAL.
6255 (set_reverse_storage_order_on_array_type): Likewise.
6256
6257 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
6258
6259 * gcc-interface/gigi.h (make_packable_type): Remove default value.
6260 (value_factor_p): Tweak prototype.
6261 * gcc-interface/decl.c (gnat_to_gnu_entity): Add comment.
6262 (gnat_to_gnu_component_type): Likewise.
6263 (gnat_to_gnu_field): Likewise. Fetch the position of the field earlier
6264 and simplify the condition under which the type is packed. Declare
6265 local variable is_bitfield. Pass 1 as max_align to make_packable_type
6266 if it is set to true.
6267 (copy_and_substitute_in_layout): Pass 0 to make_packable_type.
6268 * gcc-interface/utils.c (make_packable_array_type): New function.
6269 (make_packable_type): Use it to rewrite the type of array field.
6270 (maybe_pad_type): Pass align parameter to make_packable_type.
6271 (create_field_decl): Minor tweaks.
6272 (value_factor_p): Assert that FACTOR is a power of 2 and replace the
6273 modulo computation by a masking operation.
6274
6275 2019-06-25 Eric Botcazou <ebotcazou@adacore.com>
6276
6277 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
6278 in previous change.
6279 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
6280 (maybe_character_value): Likewise.
6281
6282 2019-06-24 Jan Hubicka <jh@suse.cz>
6283
6284 * gcc-interface/decl.c (gnat_to_gnu_entity): Check that
6285 type is array or integer prior checking string flag.
6286 * gcc-interface/gigi.h (maybe_character_type): Likewise.
6287 (maybe_character_value): Likewise.
6288
6289 2019-06-24 Martin Sebor <msebor@redhat.com>
6290
6291 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
6292 name.
6293
6294 2019-06-18 Arnaud Charlet <charlet@adacore.com>
6295
6296 PR ada/80590
6297 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
6298 during normal processing.
6299
6300 2019-06-17 Arnaud Charlet <charlet@adacore.com>
6301
6302 PR ada/80590
6303 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
6304 conditions to avoid a unnecessary exception propagation in the default
6305 case.
6306
6307 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6308
6309 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
6310
6311 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6312
6313 * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
6314 Document additional optional parameters.
6315 * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
6316 more than one optional parameter.
6317 * gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
6318 the list of supported pragmas. Simplify the handling of parameters
6319 and add support for more than one optional parameter.
6320 * gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
6321 (gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
6322 used, cold, hot, target and target_clones.
6323 (begin_subprog_body): Do not create the RTL for the subprogram here.
6324 (handle_noicf_attribute): New static function.
6325 (handle_noipa_attribute): Likewise.
6326 (handle_flatten_attribute): Likewise.
6327 (handle_used_attribute): Likewise.
6328 (handle_cold_attribute): Likewise.
6329 (handle_hot_attribute): Likewise.
6330 (handle_target_attribute): Likewise.
6331 (handle_target_clones_attribute): Likewise.
6332
6333 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6334
6335 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
6336 for 'Size too.
6337 (Identifier_to_gnu): Use the actual subtype for a reference to a
6338 packed array in a return statement.
6339 (Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
6340 the prefix in every case.
6341
6342 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6343
6344 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
6345 Backend_Overflow_Checks_On_Target and rework comments.
6346
6347 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6348
6349 * gcc-interface/trans.c (walk_nesting_tree): New static function.
6350 (finalize_nrv): Use it to walk the entire nesting tree.
6351
6352 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6353
6354 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
6355 obsolete test on Is_For_Access_Subtype.
6356
6357 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6358
6359 * gcc-interface/decl.c (components_to_record): Set a name on the type
6360 created for the REP part, if any.
6361 * gcc-interface/utils.c (finish_record_type): Only take the maximum
6362 when merging sizes for a variant part at offset 0.
6363 (merge_sizes): Rename has_rep parameter into max.
6364
6365 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6366
6367 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
6368 for stack_protect attribute.
6369 (handle_stack_protect_attribute): New static function.
6370
6371 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6372
6373 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
6374 false if the internal builtin uses a variable list.
6375
6376 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
6377
6378 * gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
6379 created out of addressability concerns if it's for the _Init parameter
6380 of an initialization procedure.
6381
6382 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
6383
6384 * gcc-interface/ada-builtin-types.def: New file.
6385 * gcc-interface/ada-builtins.def: Likewise.
6386 * gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
6387 (BUILT_IN_UNLIKELY): Likewise.
6388 * gcc-interface/trans.c (independent_iterations_p): Initialize the
6389 auto-vector to 16 elements.
6390 (Call_to_gnu): Remove local variable and change the vector of actual
6391 parameters to an auto-vector. Do not convert actual parameters to
6392 the argument type for front-end built-in functions. Add support for
6393 front-end built-in functions.
6394 (build_noreturn_cond): Use internal instead of built-in function.
6395 * gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
6396 (install_builtin_function_types): Likewise.
6397 (install_builtin_functions): Include ada-builtins.def first.
6398
6399 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
6400
6401 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
6402 specific case of component types preferably.
6403
6404 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
6405
6406 * gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
6407 (gnat_to_gnu): Do not convert the result if it is a reference to an
6408 unconstrained array used as the prefix of an attribute reference that
6409 requires an lvalue.
6410
6411 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
6412
6413 * gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
6414 (Identifier_to_gnu): Use it to assert that the type of the identifier
6415 and that of its entity are compatible for gigi. Rename a couple of
6416 local variables and separate the processing of the result type.
6417
6418 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
6419
6420 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
6421 putting back an intermediate conversion the type of the actuals.
6422
6423 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
6424
6425 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
6426 count to the unsigned version of its base type before proceeding.
6427
6428 2019-05-16 Martin Sebor <msebor@redhat.com>
6429
6430 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
6431 reserved names.
6432
6433 2019-05-08 Arnaud Charlet <charlet@adacore.com>
6434
6435 * standard.ads.h: New file.
6436
6437 2019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6438
6439 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
6440 Honor DESTDIR.
6441
6442 2019-04-29 Michael K. Darling <darlingm@gmail.com>
6443
6444 * gnatvsn.ads: Bump Library_Version to 10.
6445
6446 2019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6447 Bernd Edlinger <bernd.edlinger@hotmail.de>
6448 Jakub Jelinek <jakub@redhat.com>
6449
6450 PR target/89093
6451 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
6452 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
6453 TARGET_ATTRIBUTE.
6454
6455 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
6456
6457 * libgnat/i-cexten.ads (CFloat_128): New type.
6458
6459 2019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
6460
6461 PR ada/89583
6462 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
6463 Send_Socket): Fix the computation of structure lengths passed to
6464 low level routines.
6465 (Is_IPv6_Address): Fix the number of expected colons.
6466
6467 2019-03-11 Martin Liska <mliska@suse.cz>
6468
6469 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
6470 format message and fix GNU coding style.
6471
6472 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
6473
6474 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
6475 * gcc-interface/utils.c (convert): Do not pad when doing an unchecked
6476 conversion here. Use TREE_CONSTANT throughout the function.
6477 (unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
6478 destination is a more aligned array type or a larger aggregate type,
6479 but not between original and packable versions of a type.
6480
6481 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
6482
6483 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
6484 operand with VOID_TYPE.
6485
6486 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
6487
6488 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
6489 entities of a package renaming another one.
6490
6491 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
6492
6493 * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
6494 individual flag_unswitch_loops and flag_tree_loop_vectorize switches
6495 with test on global optimize switch.
6496 (Raise_Error_to_gnu): Likewise.
6497
6498 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
6499
6500 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
6501
6502 2019-02-06 Arnaud Charlet <charlet@adacore.com>
6503
6504 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
6505
6506 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
6507
6508 * repinfo.adb (List_Component_Layout): Remove superfluous space for
6509 zero-sized field.
6510 * gcc-interface/ada-tree.h (TYPE_IS_EXTRA_SUBTYPE_P): New macro.
6511 * gcc-interface/gigi.h (create_extra_subtype): Declare.
6512 * gcc-interface/decl.c (TYPE_ARRAY_SIZE_LIMIT): Likewise.
6513 (update_n_elem): New function.
6514 (gnat_to_gnu_entity): Use create_extra_subtype to create extra subtypes
6515 instead of doing it manually.
6516 <E_Array_Type>: Use update_n_elem to compute the maximum size. Use the
6517 index type instead of base type for the bounds. Set TYPE_ARRAY_MAX_SIZE
6518 of the array to the maximum size.
6519 <E_Array_Subtype>: Create an extra subtype using the index type of the
6520 base array type for self-referential bounds. Use update_n_elem to
6521 compute the maximum size. Set TYPE_ARRAY_MAX_SIZE of the array to the
6522 maximum size.
6523 (gnat_to_gnu_field): Clear DECL_NONADDRESSABLE_P on discriminants.
6524 * gcc-interface/misc.c (gnat_get_alias_set): Return the alias set of
6525 the base type for an extra subtype.
6526 (gnat_type_max_size): Remove obsolete code.
6527 * gcc-interface/trans.c (Attribute_to_gnu): Minor tweak.
6528 (can_be_lower_p): Deal with pathological types.
6529 * gcc-interface/utils.c (create_extra_subtype): New function.
6530 (create_field_decl): Minor tweak.
6531 (max_size) <tcc_reference>: Compute a better value by using the extra
6532 subtypes on the self-referential bounds.
6533 <tcc_binary>: Rewrite. Deal with "negative value" in unsigned types.
6534 <tcc_expression>: Likewise.
6535 * gcc-interface/utils2.c (compare_arrays): Retrieve the original bounds
6536 of the arrays upfront. Swap only if the second length is not constant.
6537 Use comparisons on the original bounds consistently for the null tests.
6538 (build_binary_op): Use TYPE_IS_EXTRA_SUBTYPE_P macro.
6539 (build_allocator): Minor tweak.
6540
6541 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
6542
6543 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
6544 the same value for every dimension of a multidimensional array type.
6545
6546 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
6547
6548 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
6549 iteration scheme, if present, throughout the translation.
6550
6551 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
6552
6553 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use
6554 DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT for the size to be assigned
6555 by a call to memset if the LHS is a DECL.
6556
6557 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
6558
6559 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
6560 (Loop_Statement_to_gnu): Do not set it.
6561
6562 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
6563
6564 * gcc-interface/trans.c (Iterate_Acc_Clause_Arg): Fix formatting.
6565 (Acc_gnat_to_gnu): Likewise.
6566 (Acc_Data_to_gnu): Likewise.
6567 (Acc_Var_to_gnu): Likewise.
6568 (Acc_Reduc_to_gnu): Likewise.
6569 (Acc_Size_List_to_gnu): Likewise.
6570 (Pragma_to_gnu) <Pragma_Acc_Loop>: Likewise.
6571 <Pragma_Acc_Data>): Likewise.
6572 (find_loop_for): Remove default value for parameters.
6573 * gcc-interface/trans.c (gnat_to_gnu) <N_Op_And>: Merge into...
6574 <N_Op_Eq>): ...this.
6575
6576 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
6577
6578 * gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Use test on
6579 the sign bit instead of on the sign of the value.
6580 <PLUS_EXPR>: Turn addition of negative constant into subtraction.
6581 <MULT_EXPR>: Add test for degenerate case.
6582 <BIT_AND_EXPR>: Simplify.
6583
6584 2019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
6585
6586 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
6587
6588 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
6589
6590 PR other/16615
6591 * exp_ch11.adb: Change "can not" to "cannot".
6592 * sem_ch4.adb: Likewise.
6593
6594 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
6595
6596 PR other/16615
6597 * exp_ch9.adb: Mechanically replace "can not" with "cannot".
6598 * libgnat/s-regpat.ads: Likewise.
6599 * par-ch4.adb: Likewise.
6600 * set_targ.adb: Likewise.
6601 * types.ads: Likewise.
6602
6603 2019-01-08 Justin Squirek <squirek@adacore.com>
6604
6605 Revert:
6606 2018-07-31 Justin Squirek <squirek@adacore.com>
6607
6608 * lib-writ.adb (Write_With_Lines): Modfiy the generation
6609 of dependencies within ali files so that source unit
6610 bodies are properly listed even if said bodies are
6611 missing. Perform legacy behavior in GNATprove mode.
6612 * lib-writ.ads: Modify documentation to reflect current
6613 behavior.
6614
6615 and:
6616 2018-09-26 Justin Squirek <squirek@adacore.com>
6617
6618 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
6619 documentation and an extra conditional check for RCI
6620 units so that generated ali files will list the spec
6621 only instead of a body when a body is not found.
6622
6623 2019-01-04 Eric Botcazou <ebotcazou@adacore.com>
6624
6625 * gnatvsn.ads: Bump copyright year.
6626
6627 2019-01-01 Jakub Jelinek <jakub@redhat.com>
6628
6629 Update copyright years.
6630
6631 * gnat_ugn.texi: Bump @copying's copyright year.
6632 * gnat_rm.texi: Likewise.
6633 \f
6634 Copyright (C) 2019 Free Software Foundation, Inc.
6635
6636 Copying and distribution of this file, with or without modification,
6637 are permitted in any medium without royalty provided the copyright
6638 notice and this notice are preserved.