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