1 2019-12-18 Eric Botcazou <ebotcazou@adacore.com>
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).
7 2019-12-18 Justin Squirek <squirek@adacore.com>
9 * sem_ch6.adb (Analyze_Function_Return): Modify handling of
10 extended return statements to check accessibility of access
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.
17 2019-12-18 Arnaud Charlet <charlet@adacore.com>
19 * libgnat/s-regpat.adb (Parse_Literal, Parse_Piece): Ensure
20 Expr_Flags is always fully initialized.
22 2019-12-18 Arnaud Charlet <charlet@adacore.com>
24 * libgnat/s-atopar.ads, libgnat/s-atopex.ads (Atomic_Type): Can
25 now be marked Atomic. This requires marking the unit Ada 202x.
27 2019-12-18 Arnaud Charlet <charlet@adacore.com>
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
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.
37 2019-12-18 Piotr Trojanek <trojanek@adacore.com>
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.
46 2019-12-18 Gary Dismukes <dismukes@adacore.com>
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).
55 2019-12-18 Ed Schonberg <schonberg@adacore.com>
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
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.
75 2019-12-18 Eric Botcazou <ebotcazou@adacore.com>
77 * cstand.adb (Create_Standard): Remove duplicate line and
80 2019-12-18 Javier Miranda <miranda@adacore.com>
82 * debug.adb: Document -gnatd_K as a reserved switch for the
83 detection of known problem issues of previous releases.
85 2019-12-18 Ghjuvan Lacambre <lacambre@adacore.com>
87 * par-ch13.adb: Check if declarations allow aspect
90 2019-12-18 Piotr Trojanek <trojanek@adacore.com>
92 * einfo.ads (Is_Ghost_Entity): Fix typo in comment.
94 2019-12-18 Eric Botcazou <ebotcazou@adacore.com>
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
102 (validate_size): Be prepared to give an error on an Object_Size
105 2019-12-18 Eric Botcazou <ebotcazou@adacore.com>
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.
111 2019-12-18 Bob Duff <duff@adacore.com>
113 * sem_ch3.adb (Derive_Subprogram): Do not set the
114 Requires_Overriding flag in the above-mentioned case.
116 2019-12-18 Bob Duff <duff@adacore.com>
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.
122 2019-12-16 Bob Duff <duff@adacore.com>
124 * errout.adb (Handle_Serious_Error): Disable the above-mentioned
127 2019-12-16 Bob Duff <duff@adacore.com>
129 * errout.adb, errout.ads: Improve comments.
131 2019-12-16 Bob Duff <duff@adacore.com>
133 * sem_util.ads: Minor comment fix.
135 2019-12-16 Bob Duff <duff@adacore.com>
137 * errout.ads, errout.adb (Is_Size_Too_Small_Message): Check for
138 "size for" instead of "size for& too small, minimum allowed is
141 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
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.
147 2019-12-16 Arnaud Charlet <charlet@adacore.com>
149 * socket.c: Shutdown warning.
151 2019-12-16 Arnaud Charlet <charlet@adacore.com>
153 * libgnarl/s-tataat.ads (Deallocator): Mark as Favor_Top_Level.
155 2019-12-16 Arnaud Charlet <charlet@adacore.com>
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.
165 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
167 * freeze.adb (Check_Strict_Alignment): Remove new check on
168 Has_Aliased_Components for array types.
170 2019-12-16 Ed Schonberg <schonberg@adacore.com>
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.
179 2019-12-16 Ed Schonberg <schonberg@adacore.com>
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.
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.
205 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
207 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust calls to
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
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
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
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.
261 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
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
279 (Object_Has_Volatile_Components): Delete.
280 (Is_Volatile_Object): Simplify.
281 * gcc-interface/trans.c (node_is_volatile_full_access): Adjust
284 2019-12-16 Bob Duff <duff@adacore.com>
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.
297 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
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.
332 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
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.
340 2019-12-16 Gary Dismukes <dismukes@adacore.com>
342 * checks.adb, sem_util.adb: Minor reformatting and U.S. spelling
345 2019-12-16 Bob Duff <duff@adacore.com>
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.
351 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
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.
357 2019-12-16 Ed Schonberg <schonberg@adacore.com>
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
372 2019-12-16 Bob Duff <duff@adacore.com>
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
379 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
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.
386 2019-12-16 Yannick Moy <moy@adacore.com>
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.
393 2019-12-16 Arnaud Charlet <charlet@adacore.com>
395 * impunit.adb: Add a-nbnbin, a-nbnbre, a-nubinu to Ada 2020
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
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.
411 2019-12-16 Bob Duff <duff@adacore.com>
413 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
414 Correct documentation of -gnatw_C switch
415 * gnat_ugn.texi: Regenerate.
417 2019-12-16 Joel Brobecker <brobecker@adacore.com>
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.
424 2019-12-16 Gary Dismukes <dismukes@adacore.com>
426 * libgnat/g-exptty.adb, libgnat/g-exptty.ads: Typo fixes and
429 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
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.
441 2019-12-16 Ghjuvan Lacambre <lacambre@adacore.com>
443 * sem_ch12.adb (Validate_Access_Subprogram_Instance): Add
444 Can_Never_Be_Null checks.
446 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
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
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
467 * sem_util.ads (Is_Subcomponent_Of_Atomic_Object): Declare.
468 * sem_util.adb (Is_Subcomponent_Of_Atomic_Object): New
470 * gnat_rm.texi: Regenerate.
472 2019-12-13 Gary Dismukes <dismukes@adacore.com>
474 * doc/gnat_rm/implementation_defined_pragmas.rst: Minor
475 rewording of one sentence.
476 * gnat_rm.texi: Regenerate.
478 2019-12-13 Arnaud Charlet <charlet@adacore.com>
480 * exp_unst.adb (Unnest_Subprogram): Account for trees produced
481 by Annex E constructs.
483 2019-12-13 Ghjuvan Lacambre <lacambre@adacore.com>
485 * doc/gnat_rm/implementation_defined_pragmas.rst: Update
486 Initialize_Scalars documentation.
487 * gnat_rm.texi: Regenerate.
489 2019-12-13 Javier Miranda <miranda@adacore.com>
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.
497 2019-12-13 Eric Botcazou <ebotcazou@adacore.com>
499 * sem_res.adb (Resolve_Actuals): Give canonical error for
500 illegal case of atomic/volatile parameter also if the formal is
503 2019-12-13 Eric Botcazou <ebotcazou@adacore.com>
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
510 (Is_Atomic_Or_VFA_Object): Minor tweak.
512 2019-12-13 Arnaud Charlet <charlet@adacore.com>
514 * libgnat/a-calfor.ads, libgnat/a-calfor.adb (Split_Duration):
516 (Split, Image): Use Split_Duration. Update Image spec.
518 2019-12-13 Javier Miranda <miranda@adacore.com>
520 * exp_unst.adb (Unnest_Subprogram): Generate an extra temporary
521 to facilitate the C backend processing dereferences.
523 2019-12-13 Javier Miranda <miranda@adacore.com>
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.
529 2019-12-13 Yannick Moy <moy@adacore.com>
531 * sem_util.adb (Original_Aspect_Pragma_Name): Go through
532 Original_Node for pragma.
534 2019-12-13 Piotr Trojanek <trojanek@adacore.com>
536 * exp_aggr.adb, exp_unst.adb: Minor fix typo in comment.
538 2019-12-13 Steve Baird <baird@adacore.com>
540 * sem_res.adb (Resolve, Valid_Conversion): Add Base_Type call
541 when testing whether a type is a general access type.
543 2019-12-13 Javier Miranda <miranda@adacore.com>
545 * exp_ch4.adb (Expand_N_Unchecked_Type_Conversion): Generate an
546 extra temporary for cases unsupported by the C backend.
548 2019-12-13 Steve Baird <baird@adacore.com>
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.
566 2019-12-13 Eric Botcazou <ebotcazou@adacore.com>
568 * doc/gnat_rm/implementation_defined_pragmas.rst: Minor tweak to
569 Volatile_Full_Access wording in GNAT RM.
570 * gnat_rm.texi: Regenerate.
572 2019-12-13 Gary Dismukes <dismukes@adacore.com>
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
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).
585 2019-12-13 Ed Schonberg <schonberg@adacore.com>
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.
596 2019-12-13 Javier Miranda <miranda@adacore.com>
598 * exp_disp.ads (Expand_Interface_Thunk): Adding one formal (the
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.
617 2019-12-13 Bob Duff <duff@adacore.com>
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.
623 2019-12-13 Ed Schonberg <schonberg@adacore.com>
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.
632 2019-12-13 Yannick Moy <moy@adacore.com>
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
641 2019-12-13 Yannick Moy <moy@adacore.com>
643 * sem_res.adb (Resolve_Call): Prevent inlining inside while loop
645 * sem_util.adb, sem_util.ads (In_While_Loop_Condition): New
648 2019-12-13 Bob Duff <duff@adacore.com>
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
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.
659 2019-12-13 Bob Duff <duff@adacore.com>
661 * rtsfind.ads: Minor comment fix.
663 2019-12-13 Gary Dismukes <dismukes@adacore.com>
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.
670 2019-12-13 Arnaud Charlet <charlet@adacore.com>
672 * impunit.adb (Non_Imp_File_Names_12): Add
673 Ada.Containers.Vectors.Generic_Parallel_Sorting.
675 2019-12-13 Justin Squirek <squirek@adacore.com>
677 * sem_res.adb (Resolve_Allocator): Add calls to
678 Check_Cond_Expr_Accessibility when a conditional expression is
680 (Check_Allocator_Discrim_Accessibility_Exprs): Created to
681 recursively traverse a potentially compound conditional
682 expression and perform accessibility checks for each
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.
689 2019-12-13 Steve Baird <baird@adacore.com>
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.
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.
706 2019-12-13 Justin Squirek <squirek@adacore.com>
708 * sem_ch6.adb (Check_Overriding_Indicator): Modify condition to
709 take into account the modification of the Is_Hidden flag within
711 (Verify_Overriding_Indicator): Add an exception for controlled
712 primitives within an instance.
714 2019-12-13 Ed Schonberg <schonberg@adacore.com>
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
723 2019-12-12 Ed Schonberg <schonberg@adacore.com>
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
730 2019-12-12 Ed Schonberg <schonberg@adacore.com>
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.
738 2019-12-12 Steve Baird <baird@adacore.com>
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.
754 2019-12-12 Ed Schonberg <schonberg@adacore.com>
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.
763 2019-12-12 Ed Schonberg <schonberg@adacore.com>
765 * sem_ch8.adb: Improve error message for dispatching subprogram
768 2019-12-12 Gary Dismukes <dismukes@adacore.com>
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.
773 2019-12-12 Steve Baird <baird@adacore.com>
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
780 2019-12-12 Gary Dismukes <dismukes@adacore.com>
782 * sem_ch4.adb, sem_res.adb: Minor reformatting.
784 2019-12-12 Justin Squirek <squirek@adacore.com>
786 * sem_ch4.adb (Analyze_One_Call): Add condition to check for
787 incorrectly resolved hidden controlled primitives.
789 2019-12-12 Ed Schonberg <schonberg@adacore.com>
791 * sem_res.adb: Fix processing of standard predefined operators.
793 2019-12-12 Piotr Trojanek <trojanek@adacore.com>
795 * libgnarl/a-dispat.ads (Yield): Update Global contract.
797 2019-12-12 Piotr Trojanek <trojanek@adacore.com>
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.
819 2019-12-12 Eric Botcazou <ebotcazou@adacore.com>
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.
827 2019-12-12 Steve Baird <baird@adacore.com>
830 (Instantiate_Type.Validate_Derived_Type_Instance): Implement the
831 legality check of AI12-0036
833 2019-12-12 Ed Schonberg <schonberg@adacore.com>
835 * sem_ch10.adb (Analyze_Subunit): Fix spurious visibility error
836 on subunit with optimization.
838 2019-12-12 Arnaud Charlet <charlet@adacore.com>
840 * raise-gcc.c (__gnat_personality_v0): Define for SEH.
842 2019-12-12 Gary Dismukes <dismukes@adacore.com>
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
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.
855 2019-12-12 Justin Squirek <squirek@adacore.com>
857 * sem_attr.adb (Analyze_Attribute): Add error message for
858 invalid usage of Attribute_Result.
860 2019-12-12 Bob Duff <duff@adacore.com>
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.
867 2019-12-12 Ed Schonberg <schonberg@adacore.com>
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.
874 2019-12-12 Bob Duff <duff@adacore.com>
876 * sem_ch4.adb (Transform_Object_Operation): Deal properly with
877 prefix notation in instances.
879 2019-12-12 Claire Dross <dross@adacore.com>
881 * libgnat/a-cofove.adb, libgnat/a-cfinve.adb (Find_Index): Use
882 Extended_Index for call to Last.
884 2019-12-12 Gary Dismukes <dismukes@adacore.com>
886 * sem_ch3.adb, sem_util.adb: Minor reformatting.
888 2019-12-12 Bob Duff <duff@adacore.com>
890 * doc/gnat_ugn/gnat_utility_programs.rst: Update gnatmetric
891 documentation for average lengths
893 2019-12-12 Ed Schonberg <schonberg@adacore.com>
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.
907 2019-12-12 Justin Squirek <squirek@adacore.com>
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.
918 2019-12-12 Arnaud Charlet <charlet@adacore.com>
920 * raise-gcc.c: Remove references to VMS
922 2019-12-12 Eric Botcazou <ebotcazou@adacore.com>
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.
935 2019-12-12 Dmitriy Anisimkov <anisimko@adacore.com>
937 * libgnat/g-comlin.ads (Get_Argument): New routine similar to
938 original Get_Argument but with one more out parameter
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
946 2019-12-03 Eric Botcazou <ebotcazou@adacore.com>
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.
955 2019-12-03 Eric Botcazou <ebotcazou@adacore.com>
957 * gcc-interface/utils.c (fold_convert_size): New function.
958 (fold_bit_position): Invoke it to do further folding.
960 2019-12-03 Eric Botcazou <ebotcazou@adacore.com>
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.
967 2019-11-25 Eric Botcazou <ebotcazou@adacore.com>
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.
973 2019-11-25 Eric Botcazou <ebotcazou@adacore.com>
976 * expect.c (__gnat_expect_poll [VMS, HPUX]): Fix typo.
978 2019-11-06 Eric Botcazou <ebotcazou@adacore.com>
979 Alexandre Oliva <oliva@adacore.com>
981 * gcc-interface/misc.c (callgraph_info_file): Delete.
983 2019-10-27 Jakub Jelinek <jakub@redhat.com>
985 * locales.c (iso_3166): Add missing comma after "United-States".
987 2019-10-15 Arnaud Charlet <charlet@adacore.com>
989 * Makefile.rtl (a-except.o): Put -O1 earlier so that it can be
990 overriden if needed by other variables.
992 2019-10-12 Eric Botcazou <ebotcazou@adacore.com>
995 * sem_ch8.adb (Chain_Use_Clause): Remove second argument in calls
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.
1003 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
1005 * gcc-interface/decl.c (elaborate_reference_1): Specifically deal with
1006 pointer displacement.
1008 * gcc-interface/decl.c (components_to_record): Use proper name.
1010 * gcc-interface/trans.c (Sloc_to_locus): Use standard types.
1012 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
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.
1017 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
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.
1024 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
1026 * gcc-interface/decl.c (Gigi_Equivalent_Type) <E_Array_Subtype>: New
1027 case. Return the base type if the subtype is not constrained.
1029 2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
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
1041 (gnat_write_global_declarations): Output global constants.
1043 2019-10-10 Gary Dismukes <dismukes@adacore.com>
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.
1056 2019-10-10 Arnaud Charlet <charlet@adacore.com>
1058 * freeze.adb (Freeze_Subprogram): Ensure constructor is a C++
1061 2019-10-10 Gary Dismukes <dismukes@adacore.com>
1063 * libgnat/a-ststio.ads (File_Type): Apply pragma
1064 Preelaborable_Initialization to the type.
1066 2019-10-10 Yannick Moy <moy@adacore.com>
1068 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not peek
1069 under private types whose completion is SPARK_Mode Off.
1071 2019-10-10 Gary Dismukes <dismukes@adacore.com>
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
1077 2019-10-10 Ed Schonberg <schonberg@adacore.com>
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.
1082 2019-10-10 Gary Dismukes <dismukes@adacore.com>
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.
1091 2019-10-10 Ed Schonberg <schonberg@adacore.com>
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
1098 2019-10-10 Eric Botcazou <ebotcazou@adacore.com>
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
1104 2019-10-10 Eric Botcazou <ebotcazou@adacore.com>
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
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.
1117 2019-10-10 Bob Duff <duff@adacore.com>
1119 * treepr.ads, treepr.adb (ppar): New procedure.
1121 2019-10-10 Bob Duff <duff@adacore.com>
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.
1129 2019-10-10 Ed Schonberg <schonberg@adacore.com>
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.
1136 2019-10-10 Eric Botcazou <ebotcazou@adacore.com>
1138 * sem_ch3.adb (Analyze_Number_Declaration): Set
1139 Debug_Info_Needed in the case where the expression is an integer
1142 2019-10-10 Yannick Moy <moy@adacore.com>
1144 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add subprograms
1145 with deep parameter or result type as not candidates for
1148 2019-10-10 Vadim Godunko <godunko@adacore.com>
1150 * libgnat/g-exptty.ads (TTY_Process_Descriptor): Set default
1153 2019-10-10 Bob Duff <duff@adacore.com>
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.
1159 2019-10-10 Bob Duff <duff@adacore.com>
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.
1166 2019-10-10 Arnaud Charlet <charlet@adacore.com>
1168 * gnat1drv.adb (Gnat1drv): Skip code generation when handling an
1169 incomplete unit with -gnatceg.
1171 2019-10-10 Gary Dismukes <dismukes@adacore.com>
1173 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Various
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
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
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.
1214 2019-10-10 Anthony Leonardo Gracio <leonardo@adacore.com>
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.
1225 2019-10-10 Ed Schonberg <schonberg@adacore.com>
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.
1232 2019-10-10 Bob Duff <duff@adacore.com>
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.
1248 2019-10-10 Ed Schonberg <schonberg@adacore.com>
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
1255 2019-10-10 Patrick Bernardi <bernardi@adacore.com>
1257 * bindgen.adb (System_Secondary_Stack_Package_In_Closure):
1258 Renamed flag System_Secondary_Stack_Used to be clearer of what
1260 (Gen_Adainit): Refactor secondary stack related code to make it
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.
1266 2019-10-10 Piotr Trojanek <trojanek@adacore.com>
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.
1272 2019-10-04 Joseph Myers <joseph@codesourcery.com>
1274 * gcc-interface/utils.c (flag_isoc2x): New variable.
1276 2019-10-01 Maciej W. Rozycki <macro@wdc.com>
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.
1282 2019-10-01 Maciej W. Rozycki <macro@wdc.com>
1284 * gcc-interface/Make-lang.in (ada.install-common): Split into...
1285 (gnat-install-tools, gnat-install-lib): ... these.
1287 2019-09-26 Alexandre Oliva <oliva@adacore.com>
1289 * gcc-interface/decl.c (components_to_record): Set
1290 DECL_SIZE_UNIT for zero-sized fields.
1292 2019-09-26 Arnaud Charlet <charlet@adacore.com>
1294 * osint.adb (OS_Time_To_GNAT_Time): Remove dependency on To_C/To_Ada
1296 2019-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
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.
1304 2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
1306 * gcc-interface/trans.c (Regular_Loop_to_gnu): Do not rotate the loop
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
1313 * gcc-interface/utils.c (convert_to_index_type): Return early if -Og
1316 2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
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.
1323 2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
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.
1329 2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
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.
1335 2019-09-19 Tom Tromey <tromey@adacore.com>
1337 * gcc-interface/misc.c (gnat_get_type_bias): Return the bias
1338 when -fgnat-encodings=gdb.
1340 2019-09-19 Steve Baird <baird@adacore.com>
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
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.
1355 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
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.
1361 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1363 * sem_ch12.adb (Check_Private_View): Add a comment to indicate
1366 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1368 * exp_aggr.adb (Has_Mutable_Components): Look at the underlying
1369 type of components to find out whether they are mutable.
1371 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1373 * sem_ch12.adb (Instantiate_Package_Body): Check that the body
1374 has not already been instantiated when the body of the parent
1377 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
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.
1384 2019-09-19 Dmitriy Anisimkov <anisimko@adacore.com>
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.
1398 2019-09-19 Yannick Moy <moy@adacore.com>
1400 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Simplify previous
1403 2019-09-19 Ed Schonberg <schonberg@adacore.com>
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.
1411 2019-09-19 Yannick Moy <moy@adacore.com>
1413 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add special
1414 case for traversal functions.
1416 2019-09-19 Yannick Moy <moy@adacore.com>
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
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
1425 2019-09-19 Arnaud Charlet <charlet@adacore.com>
1427 * exp_attr.adb: Remove obsolete comment.
1429 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
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.
1434 2019-09-19 Yannick Moy <moy@adacore.com>
1436 * gcc-interface/Make-lang.in: Remove references to sem_spark.
1437 * sem_spark.adb, sem_spark.ads: Remove unit.
1439 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
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.
1445 2019-09-19 Gary Dismukes <dismukes@adacore.com>
1447 * exp_unst.adb (Unnest_Subprogram): Bypass the transformation of
1448 up-level references unless Opt.Generate_C_Code is enabled.
1450 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
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.
1457 2019-09-19 Piotr Trojanek <trojanek@adacore.com>
1459 * exp_dbug.ads, exp_dbug.adb (Get_Homonym_Number): Remove.
1460 (Append_Homonym_Number): Use Homonym_Number instead of
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.
1468 2019-09-19 Ed Schonberg <schonberg@adacore.com>
1470 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Simplify
1471 handling of expressions in predicates when the context is a
1474 2019-09-19 Bob Duff <duff@adacore.com>
1476 * sem_attr.adb (Resolve_Attribute): Make sure the secondary
1477 stack is properly managed in the case of a 'Range attribute in a
1480 2019-09-19 Raphael Amiard <amiard@adacore.com>
1482 * libgnat/a-cfhase.ads (Set): Add comments to public primitives.
1484 2019-09-19 Raphael Amiard <amiard@adacore.com>
1486 * libgnat/a-cbhama.ads, libgnat/a-cbhase.ads,
1487 libgnat/a-chtgop.ads (Clear): Refine comments
1489 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1491 * sem_ch12.adb (Restore_Private_Views): Comment out new code
1492 that clear the Is_Generic_Actual_Type also on the full view.
1494 2019-09-19 Bob Duff <duff@adacore.com>
1496 * exp_ch3.adb (Rewrite_As_Renaming): Return False if there are
1497 any aspect specifications, because otherwise Insert_Actions
1500 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
1502 * exp_ch6.adb (Add_Simple_Call_By_Copy_Code): Add
1503 Bit_Packed_Array parameter and documet it. Always insert a copy
1505 (Expand_Actuals): Adjust the calls to
1506 Add_Simple_Call_By_Copy_Code.
1508 2019-09-19 Bob Duff <duff@adacore.com>
1510 * xref_lib.adb (Get_Symbol_Name): If we reach EOF in the first
1511 loop without finding the symbol, return "???". Otherwise, it's
1513 (Parse_EOL): Assert that we're not already at EOF. Remove
1514 processing of LF/CR -- there are no operating systems that use
1517 2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
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.
1523 2019-09-19 Bob Duff <duff@adacore.com>
1525 * rtsfind.ads (RTE_Available): Improve comment.
1527 2019-09-18 Bob Duff <duff@adacore.com>
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.
1538 2019-09-18 Eric Botcazou <ebotcazou@adacore.com>
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
1547 2019-09-18 Ed Schonberg <schonberg@adacore.com>
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.
1555 2019-09-18 Ed Schonberg <schonberg@adacore.com>
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
1564 2019-09-18 Ed Schonberg <schonberg@adacore.com>
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.
1573 2019-09-18 Justin Squirek <squirek@adacore.com>
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.
1579 2019-09-18 Justin Squirek <squirek@adacore.com>
1581 * exp_ch4.adb (Expand_N_Type_Conversion): Add calculation of an
1582 alternative operand for the purposes of generating accessibility
1585 2019-09-18 Eric Botcazou <ebotcazou@adacore.com>
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.
1591 2019-09-18 Justin Squirek <squirek@adacore.com>
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
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.
1608 2019-09-18 Steve Baird <baird@adacore.com>
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.
1627 2019-09-18 Javier Miranda <miranda@adacore.com>
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.
1650 2019-09-18 Bob Duff <duff@adacore.com>
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.
1657 2019-09-18 Vasiliy Fofanov <fofanov@adacore.com>
1659 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix minor
1662 2019-09-18 Javier Miranda <miranda@adacore.com>
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.
1668 2019-09-18 Steve Baird <baird@adacore.com>
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.
1674 2019-09-18 Piotr Trojanek <trojanek@adacore.com>
1676 * exp_dbug.ads, exp_dbug.adb (Get_Homonym_Number): Refine type
1678 * sem_util.adb (Add_Homonym_Suffix): Refine type of a local
1681 2019-09-18 Yannick Moy <moy@adacore.com>
1683 * exp_dbug.adb (Append_Homonym_Number): Use new function
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
1691 * sem_util.adb (Unique_Name): Append homonym suffix where needed
1692 for entities which have local homonyms in the same scope.
1694 2019-09-18 Nicolas Roche <roche@adacore.com>
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.
1701 2019-09-18 Claire Dross <dross@adacore.com>
1703 * exp_attr.adb (Expand_N_Attribute_Reference): Call routine from
1704 Exp_Util to know the value of the Constrained attribute in the
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
1713 2019-09-18 Vadim Godunko <godunko@adacore.com>
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.
1720 2019-09-18 Frederic Konrad <konrad@adacore.com>
1722 * adaint.c: Include dosFsLib.h and vwModNum.h for VxWorks 6.
1723 (__gnat_rename): Map S_dosFsLib_FILE_NOT_FOUND to ENOENT.
1725 2019-09-18 Steve Baird <baird@adacore.com>
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.
1731 2019-09-18 Tom Tromey <tromey@adacore.com>
1733 * make.adb (Initialize): Fix typo.
1735 2019-09-18 Olivier Hainque <hainque@adacore.com>
1737 * libgnat/s-win32.ads (DWORD_PTR): New type, pointer size
1739 (SYSTEM_INFO): Use it for dwActiveProcessorMask.
1741 2019-09-18 Arnaud Charlet <charlet@adacore.com>
1743 * doc/gnat_rm/implementation_defined_pragmas.rst: Improve doc on
1745 * gnat_rm.texi: Regenerate.
1747 2019-09-18 Arnaud Charlet <charlet@adacore.com>
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.
1755 2019-09-18 Arnaud Charlet <charlet@adacore.com>
1757 * libgnat/s-stausa.adb: Fix a typo
1759 2019-09-18 Bob Duff <duff@adacore.com>
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.
1767 2019-09-18 Claire Dross <dross@adacore.com>
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.
1773 2019-09-18 Arnaud Charlet <charlet@adacore.com>
1775 * exp_unst.adb (Unnest_Subprograms): Refine previous change.
1777 2019-09-17 Claire Dross <dross@adacore.com>
1779 * libgnat/a-cofuma.ads, libgnat/a-cofuma.adb (Remove): New
1780 function which returns a copy of the input container without a
1783 2019-09-17 Yannick Moy <moy@adacore.com>
1785 * libgnat/s-arit64.adb (Double_Divide): Correctly handle the
1786 special case when rounding.
1788 2019-09-17 Javier Miranda <miranda@adacore.com>
1790 * sem_ch3.adb (Complete_Private_Subtype): Propagate attributes
1791 Has_Attributes and Predicate_Function to the cloned subtype.
1793 2019-09-17 Eric Botcazou <ebotcazou@adacore.com>
1795 * sem.adb (Do_Analyze): Save Style_Check_Max_Line_Length on
1796 entry and restore it on exit instead of recomputing it.
1798 2019-09-17 Tom Tromey <tromey@adacore.com>
1800 * exp_dbug.ads: Update character type comment.
1802 2019-09-17 Yannick Moy <moy@adacore.com>
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.
1809 2019-09-17 Yannick Moy <moy@adacore.com>
1811 * libgnat/s-arit64.adb (Scaled_Divide): Add protection against
1812 undesirable wrap-around.
1814 2019-09-17 Yannick Moy <moy@adacore.com>
1816 * libgnat/s-arit64.adb (Double_Divide): Fix two possible
1819 2019-09-17 Dmitriy Anisimkov <anisimko@adacore.com>
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.
1826 2019-09-17 Yannick Moy <moy@adacore.com>
1828 * sem_spark.adb (Check_Declaration): Do not check the assignment
1829 from an illegal declaration.
1831 2019-09-17 Bob Duff <duff@adacore.com>
1833 * doc/gnat_ugn/gnat_and_program_execution.rst: Clarify
1835 * gnat_ugn.texi: Regenerate.
1836 * libgnat/s-stausa.ads: Clarify comments.
1838 2019-09-17 Steve Baird <baird@adacore.com>
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.
1846 2019-09-17 Claire Dross <dross@adacore.com>
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.
1853 2019-09-17 Ed Falis <falis@adacore.com>
1855 * doc/gnat_rm/implementation_defined_pragmas.rst: Remove
1857 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
1859 2019-09-17 Vadim Godunko <godunko@adacore.com>
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.
1867 2019-09-17 Vadim Godunko <godunko@adacore.com>
1869 * libgnat/g-expect.adb (Expect_Internal): Try to call 'poll' few
1872 2019-09-17 Vadim Godunko <godunko@adacore.com>
1874 * libgnat/g-expect.ads, libgnat/g-expect.adb (Close_Input): New
1876 (Get_Command_Output): Call Close_Input to close input stream.
1877 (Expect_Internal): Likewise.
1879 * libgnat/g-exptty.adb (Close): Likewise.
1881 2019-09-17 Piotr Trojanek <trojanek@adacore.com>
1883 * sem_util.ads, sem_util.adb (Is_Attribute_Old): New utility
1886 2019-09-17 Yannick Moy <moy@adacore.com>
1888 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add handling
1889 for dispatching operations.
1891 2019-09-17 Ed Schonberg <schonberg@adacore.com>
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.
1897 2019-09-17 Javier Miranda <miranda@adacore.com>
1899 * sem_ch3.adb (Constrain_Corresponding_Record): Propagate
1900 attribute Is_Tagged_Type.
1902 2019-09-17 Javier Miranda <miranda@adacore.com>
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
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.
1915 2019-09-17 Piotr Trojanek <trojanek@adacore.com>
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
1926 2019-09-17 Arnaud Charlet <charlet@adacore.com>
1928 * adaint.c (_REENTRANT, _THREAD_SAFE): Only define if needed.
1930 2019-09-17 Arnaud Charlet <charlet@adacore.com>
1932 * libgnat/s-bitfie.ads (Val_Bits, Val_Bytes): Define from
1933 Long_Long_Integer'Size.
1935 2019-09-17 Javier Miranda <miranda@adacore.com>
1937 * exp_ch6.ads (Needs_BIP_Task_Actuals): New subprogram.
1938 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): Code
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
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
1953 2019-09-17 Bob Duff <duff@adacore.com>
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.
1962 2019-09-17 Dmitriy Anisimkov <anisimko@adacore.com>
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
1969 (Family_Inet_4_6): New subtype only for network families.
1970 (Sock_Addr_Type): Add Unbounded_String field for Family_Unix
1972 (Unix_Socket_Address): Create Sock_Addr_Type from socket
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
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
1993 2019-09-17 Eric Botcazou <ebotcazou@adacore.com>
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.
2002 2019-09-17 Bob Duff <duff@adacore.com>
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
2010 2019-09-13 Maciej W. Rozycki <macro@wdc.com>
2012 * make.adb (Scan_Make_Arg): Also accept `--sysroot=' for the
2013 compiler and the linker.
2015 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
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.
2022 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
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.
2033 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
2035 * gcc-interface/trans.c (gnat_to_gnu): Do not set the location on an
2036 expression used for a tag.
2038 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
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
2051 (create_field_decl): Streamline the setting of the alignment on the
2052 field. Pass false to aggregate_type_contains_array_p.
2054 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
2056 * gcc-interface/trans.c (lvalue_required_p) <N_Slice>: Adjust GNU_TYPE
2057 in the recursive call.
2058 <N_Selected_Component>: Likewise.
2060 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
2062 * gcc-interface/utils.c (build_template): Deal with parameters
2063 passed by pointer to component of multi-dimensional arrays.
2065 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
2067 * gcc-interface/decl.c (annotate_value) <CALL_EXPR>: Inline the call
2068 also if List_Representation_Info is greater than 3.
2070 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
2072 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Add assertion.
2074 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
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.
2089 2019-08-23 Jakub Jelinek <jakub@redhat.com>
2092 * gcc-interface/misc.c (gnat_post_options): Set flag_excess_precision
2093 instead of flag_excess_precision_cmdline.
2095 2019-08-21 Vadim Godunko <godunko@adacore.com>
2097 * libgnat/g-expect.adb (Expect_Internal): Attempt to read
2098 several times when 'read' returns non-positive.
2100 2019-08-21 Piotr Trojanek <trojanek@adacore.com>
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
2108 2019-08-21 Claire Dross <dross@adacore.com>
2110 * libgnat/a-cofove.ads (Vector): Add an Iterable aspect to allow
2112 (Iter_First, Iter_Next): Primitives used for iteration.
2114 2019-08-21 Yannick Moy <moy@adacore.com>
2116 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit RM_Size
2117 field for formal type parameters in generic instantiations.
2119 2019-08-21 Yannick Moy <moy@adacore.com>
2121 * sem_spark.adb: Update references to the SPARK RM.
2123 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
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
2133 2019-08-21 Bob Duff <duff@adacore.com>
2135 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-bitutil.o and
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.
2147 2019-08-21 Piotr Trojanek <trojanek@adacore.com>
2149 * bindo-graphs.ads (Iterate_Edges_To_Successors): Fix typo in
2151 * bindo-graphs.adb (Delete_Edge): Fix layout in parameter list.
2153 2019-08-21 Gary Dismukes <dismukes@adacore.com>
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).
2165 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
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.
2173 2019-08-21 Piotr Trojanek <trojanek@adacore.com>
2175 * sem_prag.adb (Max_Entry_Queue_Length): Do not substitute
2176 expression of the pragma argument with its value during
2178 * sem_util.adb (Get_Max_Queue_Length): Compute value of the
2179 pragma argument when needed.
2181 2019-08-21 Yannick Moy <moy@adacore.com>
2183 * checks.adb (Install_Null_Excluding_Check): Do not install
2184 check in GNATprove mode.
2186 2019-08-21 Yannick Moy <moy@adacore.com>
2188 * sem_spark.adb (Process_Path): Do nothing on address of
2191 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2193 * exp_util.adb (Finalize_Address): Deal consistently with
2194 subtypes of private protected types.
2196 2019-08-21 Piotr Trojanek <trojanek@adacore.com>
2198 * exp_util.adb (Corresponding_Runtime_Package): Use high-level
2200 * sem_ch8.adb (Analyze_Renamed_Entry): Likewise.
2201 * sem_ch9.adb (Analyze_Requeue): Likewise.
2203 2019-08-21 Javier Miranda <miranda@adacore.com>
2205 * sem_util.adb (Update_Named_Associations): Update
2206 First_Named_Actual when the subprogram call has a single named
2209 2019-08-21 Joel Brobecker <brobecker@adacore.com>
2211 * doc/Makefile (mk_empty_dirs): New (PHONY) rule.
2212 (%.html, %.pdf, %.txt, %.info, %.texinfo): Add dependencies on
2215 2019-08-21 Justin Squirek <squirek@adacore.com>
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
2223 * sem_util.adb (Get_Max_Queue_Length): Add processing for values
2224 of negative one to fit within the current scheme.
2226 2019-08-20 Arnaud Charlet <charlet@adacore.com>
2228 * exp_unst.adb (Unnest_Subprograms, Unnest_Subprogram): Take
2229 inlining (-gnatn) into account.
2231 2019-08-20 Ed Schonberg <schonberg@adacore.com>
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
2240 2019-08-20 Piotr Trojanek <trojanek@adacore.com>
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.
2246 2019-08-20 Yannick Moy <moy@adacore.com>
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.
2252 2019-08-20 Bob Duff <duff@adacore.com>
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
2261 2019-08-20 Bob Duff <duff@adacore.com>
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
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.
2278 2019-08-20 Gary Dismukes <dismukes@adacore.com>
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
2290 2019-08-20 Dmitriy Anisimkov <anisimko@adacore.com>
2292 * adaint.c (__gnat_to_gm_time): On _WIN32, don't round time up
2295 2019-08-20 Ed Schonberg <schonberg@adacore.com>
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
2302 2019-08-20 Ed Schonberg <schonberg@adacore.com>
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.
2310 2019-08-20 Ed Schonberg <schonberg@adacore.com>
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.
2324 2019-08-20 Bob Duff <duff@adacore.com>
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.
2332 2019-08-20 Gary Dismukes <dismukes@adacore.com>
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).
2345 2019-08-20 Patrick Bernardi <bernardi@adacore.com>
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.
2359 2019-08-20 Bob Duff <duff@adacore.com>
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.
2365 2019-08-20 Bob Duff <duff@adacore.com>
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.
2371 2019-08-20 Eric Botcazou <ebotcazou@adacore.com>
2373 * repinfo.adb (List_Record_Info): In -gnatR4 mode, set the
2374 relevant flag on the implicit base type of a record subtype.
2376 2019-08-20 Bob Duff <duff@adacore.com>
2378 * sem_eval.adb (Expr_Value): Implement the case of an unchecked
2379 conversion of a static expression.
2381 2019-08-20 Bob Duff <duff@adacore.com>
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.
2391 2019-08-20 Bob Duff <duff@adacore.com>
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.
2397 2019-08-20 Bob Duff <duff@adacore.com>
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.
2406 2019-08-20 Bob Duff <duff@adacore.com>
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.
2413 2019-08-20 Bob Duff <duff@adacore.com>
2415 * errout.adb (Error_Msg_Internal): Set Warn_Err in case of
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
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
2435 * gnat_rm.texi: Regenerate.
2437 2019-08-20 Eric Botcazou <ebotcazou@adacore.com>
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.
2460 2019-08-20 Bob Duff <duff@adacore.com>
2462 * sem_ch13.adb (Record_Hole_Check): Initialize After_Last.
2464 2019-08-20 Piotr Trojanek <trojanek@adacore.com>
2466 * impunit.adb (Get_Kind_Of_Unit): Revert change for adapting
2467 this routine for gnatprove.
2469 2019-08-20 Arnaud Charlet <charlet@adacore.com>
2471 * doc/gnat_rm/implementation_defined_pragmas.rst: Document
2472 requirements for Pragma Lock_Free.
2473 * gnat_rm.texi: Regenerate.
2475 2019-08-20 Philippe Gil <gil@adacore.com>
2477 * bindgen.adb (Gen_Main): Set gnat_argc/gnat_argv to argc/argv
2478 only when still uninitialized.
2480 2019-08-20 Bob Duff <duff@adacore.com>
2482 * libgnat/g-comlin.ads (Exit_From_Command_Line): Fix
2483 documentation for GNAT.Command_Line.
2485 2019-08-20 Pierre-Marie de Rodat <derodat@adacore.com>
2488 * gcc-interface/lang.opt (-fdump-scos): Add missing dot at the
2489 end of the documentation.
2491 2019-08-20 Richard Sandiford <richard.sandiford@arm.com>
2493 * gcc-interface/misc.c (default_pass_by_ref): Update call to
2496 2019-08-19 Bob Duff <duff@adacore.com>
2498 * doc/gnat_rm/implementation_advice.rst: Fix documentation for
2499 stream oriented attributes.
2500 * gnat_rm.texi: Regenerate.
2502 2019-08-19 Gary Dismukes <dismukes@adacore.com>
2504 * einfo.ads (E_Function, E_Procedure): Update comments to
2505 reflect that Renamed_Entity is also used for nongeneric
2508 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2510 * sem_prag.adb (Is_Before_First_Decl): Deal with rewritten
2513 2019-08-19 Bob Duff <duff@adacore.com>
2515 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
2516 on formal parameters of dispatching operations.
2518 2019-08-19 Ed Schonberg <schonberg@adacore.com>
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,
2524 2019-08-19 Dmitriy Anisimkov <anisimko@adacore.com>
2526 * libgnat/s-os_lib.ads, libgnat/s-os_lib.adb (To_Ada, To_C): New
2529 2019-08-19 Bob Duff <duff@adacore.com>
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
2540 * libgnat/a-except.adb: Set the Exception_Raised component.
2541 Otherwise, we have incorrect reads of invalid data.
2543 2019-08-19 Pierre-Marie de Rodat <derodat@adacore.com>
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.
2549 2019-08-19 Jerome Guitton <guitton@adacore.com>
2551 * Makefile.rtl (system.o): New target to add generation of
2553 * gcc-interface/Makefile.in (install-gnatlib): Install
2554 ada_target_properties.
2556 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
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
2569 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2571 * inline.adb (Initialize, Lock): Deal with
2572 Called_Pending_Instantiations.
2574 2019-08-19 Ed Schonberg <schonberg@adacore.com>
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
2582 2019-08-19 Javier Miranda <miranda@adacore.com>
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
2603 2019-08-19 Bob Duff <duff@adacore.com>
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
2611 2019-08-19 Gary Dismukes <dismukes@adacore.com>
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).
2630 2019-08-19 Patrick Bernardi <bernardi@adacore.com>
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
2638 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
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.
2645 2019-08-19 Ed Schonberg <schonberg@adacore.com>
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.
2653 2019-08-19 Bob Duff <duff@adacore.com>
2655 * errout.ads (Size_Too_Small_Message): New constant.
2656 * errout.adb, freeze.adb, sem_ch13.adb: Use it.
2658 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2660 * exp_dist.adb (Build_Package_Stubs): Do not specifically visit
2661 the declarations of an N_Subprogram_Instantiation node.
2663 2019-08-19 Bob Duff <duff@adacore.com>
2665 * doc/gnat_ugn/gnat_utility_programs.rst: Document missing
2668 2019-08-19 Piotr Trojanek <trojanek@adacore.com>
2670 * sem_ch12.adb (Get_Unit_Instantiation_Node): Simplify Nkind_In
2672 * sem.adb (Depends_On_Main): Whitespace cleanup; only assign a
2673 local variable if needed.
2675 2019-08-19 Claire Dross <dross@adacore.com>
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
2685 2019-08-19 Joffrey Huguet <huguet@adacore.com>
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.
2693 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2695 * opt.ads: Clean up left-overs of earlier implementation in
2698 2019-08-19 Ed Schonberg <schonberg@adacore.com>
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.
2704 2019-08-19 Yannick Moy <moy@adacore.com>
2706 * sem_res.adb (Resolve_Call): Check non-aliasing rules before
2709 2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
2711 * inline.adb (Add_Inlined_Body): Do not add pending
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.
2717 2019-08-19 Olivier Hainque <hainque@adacore.com>
2719 * gcc-interface/trans.c (Acc_Loop_to_gnu): Return the openacc
2720 BIND_EXPR node we have constructed on purpose. Remove unused
2723 2019-08-19 Pierre-Marie de Rodat <derodat@adacore.com>
2725 * gcc-interface/lang.opt (fdump-scos): Define.
2726 * gcc-interface/misc.c (gnat_handle_option): Handle
2729 2019-08-14 Joffrey Huguet <huguet@adacore.com>
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
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
2747 2019-08-14 Bob Duff <duff@adacore.com>
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.
2755 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2757 * inline.adb (Add_Pending_Instantiation): Fix off-by-one error
2758 in the comparison against the maximum number of instantiations.
2760 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2762 * inline.adb (Add_Pending_Instantiation): Use greater-or-equal
2763 in the comparison against the maximum number of instantiations.
2765 2019-08-14 Ed Schonberg <schonberg@adacore.com>
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.
2773 2019-08-14 Bob Duff <duff@adacore.com>
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
2793 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
2794 Document new switches.
2795 * gnat_ugn.texi: Regenerate.
2797 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2799 * sem_ch12.adb (Might_Inline_Subp): Rework comment and restrict
2800 the shortcut based on Is_Inlined to the back-end inlining case.
2802 2019-08-14 Bob Duff <duff@adacore.com>
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.
2809 2019-08-14 Bob Duff <duff@adacore.com>
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
2824 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2826 * einfo.ads (Is_Called): Document new usage on E_Package
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
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
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
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.
2871 2019-08-14 Gary Dismukes <dismukes@adacore.com>
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.
2880 2019-08-14 Bob Duff <duff@adacore.com>
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.
2887 2019-08-14 Arnaud Charlet <charlet@adacore.com>
2889 * doc/gnat_ugn/gnat_and_program_execution.rst: Remove
2890 documentation of gnatelim.
2892 2019-08-14 Bob Duff <duff@adacore.com>
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.
2901 2019-08-14 Bob Duff <duff@adacore.com>
2903 * sem.ads (Inside_A_Generic): Remove the ??? comment.
2905 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
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
2914 2019-08-14 Bob Duff <duff@adacore.com>
2916 * exp_aggr.adb (Init_Hidden_Discriminants): Avoid processing the
2917 wrong discriminant, which could be of the wrong type.
2919 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
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.
2925 2019-08-14 Ed Schonberg <schonberg@adacore.com>
2927 * exp_ch4.adb (Expand_N_Quantified_Expression): Freeze
2928 explicitly the type of the loop parameter.
2930 2019-08-14 Javier Miranda <miranda@adacore.com>
2932 * sem_util.adb (New_Copy_Tree.Copy_Node_With_Replacement):
2933 Update the Chars attribute of identifiers.
2935 2019-08-14 Yannick Moy <moy@adacore.com>
2937 * sem_spark.adb, sem_spark.ads (Is_Legal): New function exposed
2938 for use in GNATprove, to test legality rules not related to
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
2946 (Check_Node): Ignore attribute references in statement position.
2948 2019-08-14 Yannick Moy <moy@adacore.com>
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
2958 2019-08-14 Yannick Moy <moy@adacore.com>
2960 * sem_spark.adb (Is_Subpath_Expression): Take into account
2961 conversion and qualification.
2963 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
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
2972 2019-08-14 Javier Miranda <miranda@adacore.com>
2974 * exp_aggr.adb (Is_CCG_Supported_Aggregate): Return False for
2975 arrays with bounds not known at compile time.
2977 2019-08-14 Ed Schonberg <schonberg@adacore.com>
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
2987 2019-08-14 Yannick Moy <moy@adacore.com>
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.
2995 2019-08-14 Eric Botcazou <ebotcazou@adacore.com>
2997 * inline.adb (Add_Inlined_Body): Tweak comments.
2998 (List_Inlining_Info): Also list information about non-main
3001 2019-08-14 Gary Dismukes <dismukes@adacore.com>
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
3009 2019-08-14 Piotr Trojanek <trojanek@adacore.com>
3011 * einfo.adb (Is_Generic_Actual_Subprogram): Replace repeated
3012 calls to Ekind with Ekind_In.
3014 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
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.
3020 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
3022 * ali.ads (Linker_Option_Record): Remove Original_Pos component.
3023 * ali.adb (Scan_ALI): Do not set it.
3025 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
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
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.
3038 2019-08-13 Ed Schonberg <schonberg@adacore.com>
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
3047 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
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
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
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.
3066 2019-08-13 Javier Miranda <miranda@adacore.com>
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).
3074 2019-08-13 Ed Schonberg <schonberg@adacore.com>
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.
3080 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
3082 * impunit.adb (Non_Imp_File_Names_95): Add
3083 GNAT.Branch_Prediction.
3085 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
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
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.
3099 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
3101 * sem.adb (Do_Analyze): Recompute Style_Check_Max_Line_Length
3102 after restoring Style_Max_Line_Length.
3104 2019-08-13 Arnaud Charlet <charlet@adacore.com>
3106 * sem_ch13.adb (Check_Iterator_Functions): Protect against
3109 2019-08-13 Ed Schonberg <schonberg@adacore.com>
3111 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do no suppress mode
3112 conformance checks on child unit instance that is a compilation
3115 2019-08-13 Gary Dismukes <dismukes@adacore.com>
3117 * exp_dbug.adb (Fully_Qualify_Name): Add full name qualification
3118 for the E_Exception case.
3120 2019-08-13 Gary Dismukes <dismukes@adacore.com>
3122 * exp_aggr.adb (Aggr_Size_OK): Compute the aggregate size using
3123 universal arithmetic, to avoid situations where the size
3124 computation overflows.
3126 2019-08-13 Justin Squirek <squirek@adacore.com>
3128 * repinfo.adb (List_Scalar_Storage_Order): Modify conditionals
3129 for displaying ordering to always be triggered when -gnatR4 is
3132 2019-08-13 Justin Squirek <squirek@adacore.com>
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
3146 2019-08-13 Yannick Moy <moy@adacore.com>
3148 * sem_ch4.adb (Analyze_Allocator): Do not insert subtype
3149 declaration for allocator inside a spec expression.
3151 2019-08-13 Yannick Moy <moy@adacore.com>
3153 * sem_res.adb (Resolve_Call): Do not inline calls inside record
3156 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
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
3165 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
3167 * gnat1drv.adb (Adjust_Global_Switches): Do not set
3168 Back_End_Inlining in ASIS mode either.
3170 2019-08-13 Olivier Hainque <hainque@adacore.com>
3172 * libgnat/s-win32.ads: Define size_t and fix the MapViewOfFile
3173 binding to use it instead of DWORD for the dwNumberOfBytesToMap
3175 * libgnat/g-sercom__mingw.adb (Read): State which definition of
3176 size_t to fetch in call to Last_Index.
3178 2019-08-13 Arnaud Charlet <charlet@adacore.com>
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.
3185 2019-08-13 Yannick Moy <moy@adacore.com>
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.
3194 2019-08-13 Justin Squirek <squirek@adacore.com>
3196 * exp_ch4.adb (Expand_N_Allocator): Add condition to detect
3197 library-level object declarations
3199 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
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.
3206 2019-08-13 Eric Botcazou <ebotcazou@adacore.com>
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
3219 2019-08-13 Javier Miranda <miranda@adacore.com>
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.
3233 2019-08-13 Justin Squirek <squirek@adacore.com>
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
3244 2019-08-13 Dmitriy Anisimkov <anisimko@adacore.com>
3246 * libgnat/g-comlin.adb (Getopt): Quote unrecognized switch in
3247 Invalid_Switch exception message.
3249 2019-08-13 Yannick Moy <moy@adacore.com>
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.
3256 2019-08-13 Claire Dross <dross@adacore.com>
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.
3262 2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
3264 * libgnat/g-socket.adb (Is_IPv6_Address): Check that no less
3265 then 2 colons in IPv6 numeric address.
3267 2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
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
3274 2019-08-12 Ed Schonberg <schonberg@adacore.com>
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.
3282 2019-08-12 Ed Schonberg <schonberg@adacore.com>
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.
3288 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3290 * exp_util.ads (Component_May_Be_Bit_Aligned): Small comment
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.
3298 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
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
3305 * exp_util.adb (Is_Possibly_Unaligned_Slice): Do not always
3306 return false if the target doesn't have strict alignment.
3308 2019-08-12 Bob Duff <duff@adacore.com>
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.
3317 2019-08-12 Bob Duff <duff@adacore.com>
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.
3323 2019-08-12 Bob Duff <duff@adacore.com>
3325 * libgnat/a-tifiio.adb (Put_Scaled): Prevent AA from being
3326 negative, since Field is range 0 .. something.
3328 2019-08-12 Bob Duff <duff@adacore.com>
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.
3334 2019-08-12 Gary Dismukes <dismukes@adacore.com>
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.
3341 2019-08-12 Ed Schonberg <schonberg@adacore.com>
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).
3347 2019-08-12 Bob Duff <duff@adacore.com>
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.
3355 2019-08-12 Justin Squirek <squirek@adacore.com>
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
3372 * Makefile.rtl: Add entry to GNATRTL_NONTASKING_OBJS.
3374 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3376 * freeze.adb (Freeze_Entity): Give the same error for an
3377 Object_Size clause on a variable-sized type as for a Size
3380 2019-08-12 Gary Dismukes <dismukes@adacore.com>
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.
3386 2019-08-12 Yannick Moy <moy@adacore.com>
3388 * aspects.adb, aspects.ads (Aspect_No_Caching): New aspect.
3389 * contracts.adb, contracts.ads (Add_Contract_Item): Add handling
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
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.
3409 2019-08-12 Yannick Moy <moy@adacore.com>
3411 * sem_util.adb, sem_util.ads (Traverse_More_Func,
3412 Traverse_More_Proc): Add formal parameter for Itypes traversal.
3414 2019-08-12 Yannick Moy <moy@adacore.com>
3416 * exp_attr.adb, exp_attr.ads (Expand_Size_Attribute): New
3417 procedure to share part of the attribute expansion with
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.
3426 2019-08-12 Yannick Moy <moy@adacore.com>
3428 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Only
3429 expand Enum_Rep attribute when its parameter is a literal.
3431 2019-08-12 Justin Squirek <squirek@adacore.com>
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.
3438 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
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.
3447 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3449 * sprint.ads: Minor comment tweak.
3451 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
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
3458 2019-08-12 Yannick Moy <moy@adacore.com>
3460 * sem_util.adb, sem_util.ads (Traverse_More_Func,
3461 Traverse_More_Proc): New traversal subprograms.
3463 2019-08-12 Jerome Lambourg <lambourg@adacore.com>
3465 * libgnarl/s-taprop__vxworks.adb (Abort_Handler): Only call
3466 s-tpopsp.Self when actually needed.
3468 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3470 * exp_ch4.adb (Discrete_Range_Check): Return if checks are
3473 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
3475 * sem_res.adb: Add with & use clause for Sem_Mech and
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
3481 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
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
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.
3500 2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
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.
3507 2019-08-02 Alexandre Oliva <oliva@adacore.com>
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
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.
3520 2019-07-23 Ed Schonberg <schonberg@adacore.com>
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.
3527 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
3529 * checks.adb (Convert_And_Check_Range): Add Suppress parameter
3530 and pass it in the call to Insert_Actions. Rename local
3532 (Generate_Range_Check): Minor comment fixes. Pass Range_Check
3533 in the first call to Convert_And_Check_Range and All_Checks in
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.
3539 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
3541 * checks.adb (Activate_Overflow_Check): Remove redundant
3543 * exp_ch4.adb (Discrete_Range_Check): Reset the overflow flag.
3544 (Expand_N_Type_Conversion): Do not reset it here.
3546 2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
3548 * repinfo.adb (List_Component_Layout): Pass Decimal to UI_Write.
3549 (Write_Val): Likewise.
3551 2019-07-23 Ed Schonberg <schonberg@adacore.com>
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
3557 * aspects.adb (Find_Aspect): If the aspect being sought is
3558 operational, do not ecamine the full view of a private type to
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.
3564 2019-07-23 Yannick Moy <moy@adacore.com>
3566 * sem_spark.ads (Is_Local_Context): New function.
3567 * sem_spark.adb (Check_Declaration): Issue errors on violations
3569 (Process_Path): Do not issue error on borrow/observe during
3570 elaboration, as these are caught by the new rule.
3572 2019-07-23 Yannick Moy <moy@adacore.com>
3574 * exp_ch7.adb (Create_Finalizer): Force finalizer not to be
3576 * exp_dbug.adb (Get_External_Name): Explain special case of
3579 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3581 * repinfo.adb (List_Entities): Also list compiled-generated
3582 types present as Etype of objects.
3584 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3586 * sinfo.ads: Update the documentation about the
3587 Do_Division_Check, Do_Overflow_Check and Do_Range_Check flags.
3589 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
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.
3595 2019-07-22 Ed Schonberg <schonberg@adacore.com>
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.
3603 2019-07-22 Yannick Moy <moy@adacore.com>
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
3609 (Read_Indexes): Handle the case of an if-expression or
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.
3615 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3617 * checks.adb (Apply_Type_Conversion_Checks): Do not set
3618 Do_Range_Check flag on conversions from fixed-point types
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
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
3628 (Real_Range_Check): Remove redundant local variable and adjust.
3629 Remove useless shortcut. Clear Do_Range_Check flag on all
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.
3637 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3639 * sprint.ads: Fix pasto in comment.
3641 2019-07-22 Javier Miranda <miranda@adacore.com>
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).
3648 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
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
3656 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3658 * exp_attr.adb (Expand_Loop_Entry_Attribute): Beef up comment.
3660 2019-07-22 Ed Schonberg <schonberg@adacore.com>
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.
3673 2019-07-22 Ed Schonberg <schonberg@adacore.com>
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.
3680 2019-07-22 Javier Miranda <miranda@adacore.com>
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.
3697 2019-07-22 Yannick Moy <moy@adacore.com>
3699 * sem_ch3.adb (Constrain_Access): Issue a message about ignored
3702 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
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
3709 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
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
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.
3723 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
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
3730 2019-07-22 Ed Schonberg <schonberg@adacore.com>
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.
3737 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3739 * sem_aggr.adb (Rewrite_Bound): Be prepared for discriminals
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.
3746 2019-07-22 Gary Dismukes <dismukes@adacore.com>
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
3753 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3755 * sem_ch8.adb (Check_Constrained_Object): Further extend the
3756 special optimization to all limited types.
3758 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
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
3765 2019-07-22 Nicolas Roche <roche@adacore.com>
3767 * libgnat/s-valrea.adb (Scan_Real): Ignore non significative
3768 digits to avoid converging to infinity in some cases.
3770 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3772 * libgnat/g-encstr.adb (Encode_Wide_String): Fix oversight.
3773 (Encode_Wide_Wide_String): Likewise.
3775 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3777 * sem_warn.adb (Find_Var): Bail out for a function call with an
3778 Out or In/Out parameter.
3780 2019-07-22 Nicolas Roche <roche@adacore.com>
3782 * terminals.c (__gnat_tty_waitpid): Support both blocking and
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.
3788 2019-07-22 Ed Schonberg <schonberg@adacore.com>
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.
3795 2019-07-22 Javier Miranda <miranda@adacore.com>
3797 * freeze.adb (Freeze_Subprogram): Check that C++ constructors
3798 must have external or link name.
3800 2019-07-22 Ed Schonberg <schonberg@adacore.com>
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.
3810 2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
3812 * exp_attr.adb (Expand_Loop_Entry_Attribute): Copy the condition
3813 of a while loop instead of simply relocating it.
3815 2019-07-18 Arnaud Charlet <charlet@adacore.com>
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.
3826 2019-07-13 Andreas Schwab <schwab@linux-m68k.org>
3828 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
3830 2019-07-11 Piotr Trojanek <trojanek@adacore.com>
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.
3836 2019-07-11 Piotr Trojanek <trojanek@adacore.com>
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
3842 * sem_util.adb (First_Global): Fix style.
3844 2019-07-11 Yannick Moy <moy@adacore.com>
3846 * sem_res.adb (Resolve_Call): Do not perform dimensionality
3847 checking on inlined bodies.
3849 2019-07-11 Yannick Moy <moy@adacore.com>
3851 * debug.adb: Flip meaning of debug switch -gnatdF.
3853 2019-07-11 Yannick Moy <moy@adacore.com>
3855 * sem_eval.adb (Is_Same_Value): Add special case for rewritten
3856 Loop_Entry attribute.
3858 2019-07-11 Claire Dross <dross@adacore.com>
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
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
3883 (Check_Call_Statement, Read_Indexes): Check wether we are
3884 dealing with a subprogram pointer type before querying called
3886 (Is_Subpath_Expression): Image attribute can appear inside a
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.
3893 2019-07-11 Patrick Bernardi <bernardi@adacore.com>
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.
3907 2019-07-11 Eric Botcazou <ebotcazou@adacore.com>
3909 * Makefile.rtl: Add warning note about compilation flags and
3912 2019-07-11 Ed Schonberg <schonberg@adacore.com>
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
3919 2019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
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
3928 2019-07-11 Claire Dross <dross@adacore.com>
3930 * libgnat/a-cfhama.adb, libgnat/a-cfhase.adb (Free): Do not
3931 reset the Has_Element flag if no element is freed.
3933 2019-07-11 Arnaud Charlet <charlet@adacore.com>
3935 * errno.c: Remove obsolete support for MaRTE OS.
3937 2019-07-11 Ed Schonberg <schonberg@adacore.com>
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
3950 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
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):
3956 * bindo-writers.adb (Write_Dependency_Edge): Add the missing
3957 case of a spec-before-body edge.
3959 2019-07-11 Dmitriy Anisimkov <anisimko@adacore.com>
3961 * libgnat/g-socket.ads (Mode_Type): Add a Socket_Raw enumerator.
3962 * libgnat/g-socket.adb (Modes): Handle Socket_Raw.
3964 2019-07-11 Justin Squirek <squirek@adacore.com>
3966 * exp_ch9.adb (Build_Private_Protected_Declaration): Add
3967 exception for the moving of pragmas to internally generated
3968 specs for pragma Unreferenced.
3970 2019-07-11 Bob Duff <duff@adacore.com>
3972 * doc/gnat_ugn/gnat_utility_programs.rst: Fix inconsistent
3973 documentation for gnatmetric.
3974 * gnat_ugn.texi: Regenerate.
3976 2019-07-11 Bob Duff <duff@adacore.com>
3978 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
3979 --spaces-only switch.
3981 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3983 * sem_util.adb (Null_Status): Assume that an erroneous construct
3984 has an undefined null status.
3986 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3988 * checks.adb, exp_ch6.adb, gnat1drv.adb, sem_aux.adb,
3989 sem_ch2.adb, sem_ch8.adb, sem_res.adb: Minor reformatting.
3991 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
3993 * sem_ch8.adb (Analyze_Object_Renaming): Obtain the object being
3994 renamed using routine Get_Object_Name which takes care of
3996 (Get_Object_Name): New routine.
3998 2019-07-11 Ed Schonberg <schonberg@adacore.com>
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.
4004 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
4006 * sem_res.adb (Resolve_Op_Not): Do not rewrite an equality
4007 operator into a function call when the operator is intrinsic.
4009 2019-07-11 Thomas Quinot <quinot@adacore.com>
4011 * sem_prag.adb (Analyze_Pragma, case pragma Check): Do not call
4012 Set_SCO_Pragma_Enabled for the dynamic predicate case.
4014 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
4016 * exp_util.ads, exp_util.adb (Needs_Finalization): Move to
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
4024 2019-07-11 Eric Botcazou <ebotcazou@adacore.com>
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
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.
4039 2019-07-11 Justin Squirek <squirek@adacore.com>
4041 * checks.adb (Apply_Accessibility_Check): Add check for constant
4042 folded conditions on accessibility checks.
4044 2019-07-11 Arnaud Charlet <charlet@adacore.com>
4046 * libgnarl/g-thread.ads, libgnarl/g-thread.adb (Get_Thread):
4047 Update comments. Add new version taking a Task_Id.
4049 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com>
4051 * bindo.adb: Update the section of switches and debugging
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
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
4068 * bindo-elaborators.adb: Add use clause for
4069 Bindo.Writers.Phase_Writers.
4070 (Elaborate_Units): Signal the start and end of the unit
4072 * bindo-graphs.adb: Add use clause for
4073 Bindo.Writers.Phase_Writers.
4074 (Find_Components): Signal the start and end of the component
4076 (Find_Cycles): Signal the start and end of the cycle discovery
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
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
4089 * debug.adb: Update the documentation of switch d_S.
4091 2019-07-11 Yannick Moy <moy@adacore.com>
4093 * sem_res.adb (Check_Argument_Order): Special case calls to
4096 2019-07-10 Dmitriy Anisimkov <anisimko@adacore.com>
4098 * libgnat/s-ststop.adb: Remove System.Strings.Stream_Ops
4099 dependence on System.Streams.Stream_IO.
4101 2019-07-10 Ed Schonberg <schonberg@adacore.com>
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.
4107 2019-07-10 Doug Rupp <rupp@adacore.com>
4109 * init.c: Do not attempt to re-arm guard page on x86_64-vx7(r2).
4111 2019-07-10 Ed Schonberg <schonberg@adacore.com>
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.
4118 2019-07-10 Yannick Moy <moy@adacore.com>
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
4128 2019-07-10 Claire Dross <dross@adacore.com>
4130 * sem_spark.adb (Check_Expression): Allow digits constraints as
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.
4141 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
4143 * sem_ch6.adb (Check_Discriminant_Conformance): Use Find_Type to
4144 discover the type of a full view discriminant.
4146 2019-07-10 Arnaud Charlet <charlet@adacore.com>
4148 * doc/gnat_ugn/gnat_and_program_execution.rst: Improve gnatmem's
4149 doc for the depth switch.
4151 2019-07-10 Bob Duff <duff@adacore.com>
4153 * doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
4154 --source-line-breaks switch.
4156 2019-07-10 Justin Squirek <squirek@adacore.com>
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
4166 * sem_util.adb (State_Has_Enabled_Property): Correct mispelling
4169 2019-07-10 Simon Buist <buist@adacore.com>
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.
4175 2019-07-10 Arnaud Charlet <charlet@adacore.com>
4177 * sfn_scan.adb (Scan_SFN_Pragmas): Add pragma Assert.
4179 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
4181 * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the
4182 spelling in certain error messages.
4183 (Check_Pragma_Implemented): Correct the spelling in certain
4186 2019-07-10 Eric Botcazou <ebotcazou@adacore.com>
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.
4193 2019-07-10 Yannick Moy <moy@adacore.com>
4195 * osint-c.adb (Set_File_Name): Always add extension for multiple
4196 units per file mode.
4198 2019-07-10 Corentin Gay <gay@adacore.com>
4200 * sysdep.c: Put include directive for 'vxWorks.h' before any
4201 other VxWorks headers.
4203 2019-07-10 Eric Botcazou <ebotcazou@adacore.com>
4205 * doc/gnat_rm/implementation_defined_attributes.rst
4206 (Scalar_Storage_Order): Minor tweaks. Add note about debuggers.
4207 * gnat_rm.texi: Regenerate.
4209 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
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
4217 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
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.
4224 2019-07-10 Joffrey Huguet <huguet@adacore.com>
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.
4231 2019-07-10 Doug Rupp <rupp@adacore.com>
4233 * sysdep.c (__gnat_is_file_not_found_error): Reformulate to also
4234 work for vxworks7r2 SR0610.
4236 2019-07-10 Doug Rupp <rupp@adacore.com>
4238 * env.c (__gnat_environ): Reformulate to also work for
4241 2019-07-10 Patrick Bernardi <bernardi@adacore.com>
4243 * Makefile.rtl: Handle vxworks7r2 ppc target
4245 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
4247 * bindo.adb: Update the section on switches.
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):
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
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.
4286 2019-07-10 Yannick Moy <moy@adacore.com>
4288 * sem_spark.adb (Get_Root_Object): Replace precondition by error
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
4295 * sem_util.adb (First_Global): Fix access to global on
4298 2019-07-10 Javier Miranda <miranda@adacore.com>
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"
4307 2019-07-10 Ed Schonberg <schonberg@adacore.com>
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.
4314 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
4316 * bindo-elaborators.adb (Elaborate_Units): Set attribute
4317 Elab_Position of all elaborated units.
4318 (Set_Unit_Elaboration_Positions): New routine.
4320 2019-07-10 Gary Dismukes <dismukes@adacore.com>
4322 * exp_util.adb: Reformatting and a typo fix.
4324 2019-07-10 Yannick Moy <moy@adacore.com>
4326 * exp_util.adb (Remove_Side_Effects): Prefer renamings for
4327 objects of possible owning type in GNATprove mode.
4329 2019-07-09 Ed Schonberg <schonberg@adacore.com>
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
4338 2019-07-09 Justin Squirek <squirek@adacore.com>
4340 * sem_eval.adb (Expr_Value_E): Add conditional to correctly
4341 handle constant enumerated character types.
4343 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
4345 * libgnarl/s-osinte__mingw.ads (CRITICAL_SECTION): Use proper
4346 type for SpinCount component.
4348 2019-07-09 Justin Squirek <squirek@adacore.com>
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
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.
4362 2019-07-09 Ed Schonberg <schonberg@adacore.com>
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.
4370 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
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):
4386 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
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
4399 * gnat_ugn.texi: Generate.
4401 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
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
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
4418 * bindo-diagnostics.adb: Add with end use clauses for Restrict
4420 (Output_Dynamic_Model_Suggestions): Remove.
4421 (Output_Invocation_Related_Suggestions): New routine.
4422 (Output_Suggestions): Output all invocation-related suggestions
4424 * bindo-elaborators.adb: Remove types Comparator_Ptr and
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
4434 (At_Least_One_Edge_Satisfies): New routine.
4435 (Contains_Elaborate_All_Edge): Reimplement.
4436 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
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
4447 (Contains_Static_Successor_Edge, Contains_Task_Activation): New
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.
4454 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
4456 * exp_util.adb (Containing_Package_With_Ext_Axioms): Replace
4457 low-level Ekind test with a high-level wrapper.
4459 2019-07-09 Arnaud Charlet <charlet@adacore.com>
4461 * libgnat/s-memory.adb: Disable calls to Abort defer/undefer
4462 when ZCX_By_Default.
4464 2019-07-09 Javier Miranda <miranda@adacore.com>
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
4471 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
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
4477 2019-07-09 Ed Schonberg <schonberg@adacore.com>
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.
4487 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com>
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
4496 * sem_elab.adb: Update the section on switches to remove
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
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.
4509 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
4511 * repinfo.adb (List_Entities): Disregard formals altogether.
4512 (List_Name): Properly escape the double quote in the JSON
4515 2019-07-09 Javier Miranda <miranda@adacore.com>
4517 * exp_util.adb (Remove_Side_Effects): Preserve the
4518 Do_Range_Check flag.
4520 2019-07-09 Yannick Moy <moy@adacore.com>
4522 * sinfo.ads: Refine comment for Do_Range_Check.
4524 2019-07-09 Yannick Moy <moy@adacore.com>
4526 * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand
4527 attribute reference on Enum_Rep.
4529 2019-07-09 Ed Schonberg <schonberg@adacore.com>
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.
4539 2019-07-09 Yannick Moy <moy@adacore.com>
4541 * freeze.adb (Build_Renamed_Body): Do not set body to inline in
4544 2019-07-09 Yannick Moy <moy@adacore.com>
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.
4551 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
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.
4561 2019-07-09 Yannick Moy <moy@adacore.com>
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.
4568 2019-07-09 Piotr Trojanek <trojanek@adacore.com>
4570 * einfo.ads: Fix a typo.
4572 2019-07-09 Ed Schonberg <schonberg@adacore.com>
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.
4580 2019-07-09 Arnaud Charlet <charlet@adacore.com>
4582 * gnat1drv.adb (Adjust_Global_Switches): Set
4583 Dynamic_Elaboration_Checks to True in CodePeer mode.
4585 2019-07-09 Yannick Moy <moy@adacore.com>
4587 * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when
4588 encountering unknown global variable.
4590 2019-07-09 Yannick Moy <moy@adacore.com>
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
4601 2019-07-09 Eric Botcazou <ebotcazou@adacore.com>
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.
4617 2019-07-09 Arnaud Charlet <charlet@adacore.com>
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.
4623 2019-07-08 Eric Botcazou <ebotcazou@adacore.com>
4625 * repinfo.adb (List_Common_Type_Info): New procedure extracted
4627 (List_Type_Info): ...here. Call it for the common information,
4628 start with a blank line and output the linker section at the
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.
4636 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
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
4651 * xoscons.adb (Output_Info): Remove the "Interfaces.C." prefix
4652 for subtypes generation.
4654 2019-07-08 Arnaud Charlet <charlet@adacore.com>
4656 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
4657 Update documentation on No_Exceptions restriction.
4658 * gnat_rm.texi: Regenerate.
4660 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
4662 * libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
4664 2019-07-08 Piotr Trojanek <trojanek@adacore.com>
4666 * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
4667 package and subprogram bodies.
4669 2019-07-08 Bob Duff <duff@adacore.com>
4671 * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation
4672 of ignored GNATpp switch.
4674 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
4676 * doc/gnat_rm/implementation_defined_pragmas.rst:
4677 Update the documentation of pragma Initialize_Scalars.
4678 * gnat_rm.texi: Regenerate.
4680 2019-07-08 Javier Miranda <miranda@adacore.com>
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.
4688 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
4690 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
4691 register an address clause when its prefix denotes a generic
4694 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
4696 * bindo-diagnostics.adb (Diagnose_Cycle): Capture the presence
4697 of an Elaborate_All edge before iterating over the edges of the
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.
4707 2019-07-08 Piotr Trojanek <trojanek@adacore.com>
4709 * lib-xref-spark_specific.adb (Create_Heap): Set dummy Etype for
4710 the fake __HEAP entity.
4712 2019-07-08 Daniel Mercier <mercier@adacore.com>
4714 * gnat1drv.adb: Suppress warnings on memory representation in
4715 CodePeer compiler mode.
4717 2019-07-08 Nicolas Roche <roche@adacore.com>
4719 * rtinit.c (__gnat_runtime_initialize): Remove dependency on
4722 2019-07-08 Doug Rupp <rupp@adacore.com>
4724 * Makefile.rtl: Handle vxworks7r2 in x86_64 and x86 vxworks7.
4726 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
4728 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
4730 2019-07-08 Yannick Moy <moy@adacore.com>
4732 * expander.adb (Expand): Do not reset Analyzed flag always.
4733 * sem_eval.adb (Fold_Ureal): Mark node as analyzed.
4735 2019-07-08 Ed Schonberg <schonberg@adacore.com>
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.
4742 2019-07-08 Hristian Kirtchev <kirtchev@adacore.com>
4744 * bindo.adb: Update the section on terminology to include new
4745 concepts. Update the section on switches to include new
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
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
4760 * bindo-builders.ads (Build_Library_Graph): Update the parameter
4762 * bindo-diagnostics.adb (Diagnose_Cycle): Track the presence of
4763 an Elaborate_All edge throughout the inspection of the cycle's
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
4808 (Trace_Unelaborated_Vertices): Remove.
4809 (Trace_Vertex): Output the number of strong and weak
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
4817 (Add_Vertex): Provide default values for strong and weak
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.
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
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
4857 (Pending_Predecessors): Removed.
4858 (Pending_Predecessors_For_Elaboration,
4859 Pending_Strong_Predecessors, Pending_Weak_Predecessors): New
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
4865 (Write_Library_Graph_Vertex): Output the strong and weak
4867 * bindo-writers.ads (Write_Components): Moved to the body.
4868 * debug.adb: Add and document new GNATbind switches -d_a, -d_b,
4870 * bindo-validators.adb: Minor reformattings.
4872 2019-07-08 Bob Duff <duff@adacore.com>
4874 * libgnat/g-sercom.ads, libgnat/g-sercom__linux.adb (Data_Rate):
4875 Support additional data rates.
4877 2019-07-08 Olivier Hainque <hainque@adacore.com>
4879 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request
4880 DECL_ARTIFICIAL_P on elab proc declarations.
4882 2019-07-08 Eric Botcazou <ebotcazou@adacore.com>
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.
4891 2019-07-08 Ed Schonberg <schonberg@adacore.com>
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
4899 2019-07-08 Javier Miranda <miranda@adacore.com>
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).
4906 2019-07-08 Bob Duff <duff@adacore.com>
4908 * doc/gnat_ugn/gnat_utility_programs.rst: Document handling of
4909 preprocessor directives in GNATpp.
4911 2019-07-08 Javier Miranda <miranda@adacore.com>
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.
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
4926 * sem_prag.adb (Initialize): Initialize table
4927 Compile_Time_Warning_Errors.
4929 2019-07-08 Ed Schonberg <schonberg@adacore.com>
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.
4937 2019-07-08 Javier Miranda <miranda@adacore.com>
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.
4943 2019-07-08 Justin Squirek <squirek@adacore.com>
4945 * exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
4946 the building of image tables.
4947 (Expand_Image_Attribute): Minor cleanup.
4949 2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
4951 * libgnat/g-socket.ads, libgnat/g-socket.adb: Improve
4953 (Get_Socket_Option, Set_Socket_Option): Remove default value for
4956 2019-07-08 Ed Schonberg <schonberg@adacore.com>
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
4965 2019-07-05 Justin Squirek <squirek@adacore.com>
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.
4974 2019-07-05 Ed Schonberg <schonberg@adacore.com>
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
4981 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
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
4992 (For_Each_Invocation_Construct, For_Each_Invocation_Relation):
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
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
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
5022 (palgc, plgc): New debug routine.
5023 (Write_Components): Moved to the spec. Add a header for the
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
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
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
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
5063 * switch-b.adb (Scan_Binder_Switches): Prepare the routine for
5064 the switch from the old to the new elaboration order mechanism.
5066 2019-07-05 Joffrey Huguet <huguet@adacore.com>
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.
5082 2019-07-05 Arnaud Charlet <charlet@adacore.com>
5084 * doc/gnat_ugn/platform_specific_information.rst: Refresh doc on
5085 installing from the command line on Windows. Remove obsolete
5087 * gnat_ugn.texi: Regenerate.
5089 2019-07-05 Vasiliy Fofanov <fofanov@adacore.com>
5091 * libgnat/a-wichha.ads (Is_Alphanumeric): Replace comment with
5092 the correct one. Also capitalize references to False
5095 2019-07-05 Eric Botcazou <ebotcazou@adacore.com>
5097 * exp_ch4.adb (Expand_N_Indexed_Component): Do not expand actual
5098 parameters of function calls here either.
5100 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
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.
5107 2019-07-05 Ed Schonberg <schonberg@adacore.com>
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.
5116 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
5118 * exp_ch7.adb (Cleanup_Record): Use the underlying type when
5119 checking for components with tasks.
5121 2019-07-05 Arnaud Charlet <charlet@adacore.com>
5123 * libgnarl/s-osinte__linux.ads: Link with -lrt before -lpthread.
5125 2019-07-05 Ed Schonberg <schonberg@adacore.com>
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,
5131 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
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.
5138 2019-07-05 Arnaud Charlet <charlet@adacore.com>
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.
5145 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
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.
5155 2019-07-05 Javier Miranda <miranda@adacore.com>
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.
5167 2019-07-05 Piotr Trojanek <trojanek@adacore.com>
5169 * einfo.ads, sem_res.adb: Typo fixes in comments.
5171 2019-07-05 Bob Duff <duff@adacore.com>
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.
5178 2019-07-05 Ed Schonberg <schonberg@adacore.com>
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.
5186 2019-07-05 Javier Miranda <miranda@adacore.com>
5188 * debug.adb (-gnatd.K): Leave available this switch.
5189 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
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.
5195 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
5197 * libgnat/a-strunb.ads: Import documentation from the RM
5199 2019-07-05 Pierre-Marie de Rodat <derodat@adacore.com>
5201 * libgnat/a-strfix.ads: Import documentation from the RM
5203 2019-07-05 Yannick Moy <moy@adacore.com>
5205 * adabkend.adb (Scan_Back_End_Switches): Accept -Og and -Ofast
5208 2019-07-05 Hristian Kirtchev <kirtchev@adacore.com>
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):
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
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
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
5246 (Body_Placement): New routine.
5247 (Body_Placement_Kind_To_Code, Code_To_Body_Placement_Kind):
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
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
5272 (Build_Library_Graph): Update the parameter profile. Update the
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
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
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
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):
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
5369 * bindo-units.ads: Add new instantiated data structure
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
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
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
5401 * lib-writ.ads: Add a documentation section on invocation graph
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.
5417 2019-07-05 Ed Schonberg <schonberg@adacore.com>
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,
5425 2019-07-05 Yannick Moy <moy@adacore.com>
5427 * sem_res.adb (Resolve_Call): Cannot inline in quantified
5429 * sem_util.adb, sem_util.ads (In_Quantified_Expression): New
5432 2019-07-05 Bob Duff <duff@adacore.com>
5434 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
5436 * gnat_rm.texi: Regenerate.
5438 2019-07-05 Bob Duff <duff@adacore.com>
5440 * exp_attr.adb (Input): Take the No_Stream_Optimizations
5441 restriction into account.
5443 2019-07-05 Claire Dross <dross@adacore.com>
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
5449 2019-07-05 Dmitriy Anisimkov <anisimko@adacore.com>
5451 * libgnat/g-traceb.ads, libgnat/g-traceb.adb (Call_Chain): New
5454 2019-07-04 James Clarke <jrtc27@debian.org>
5456 * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
5458 (CLOCK_REALTIME): Make value public.
5460 2019-07-04 Javier Miranda <miranda@adacore.com>
5462 * exp_tss.adb (Init_Proc): Adding missing support for access to
5463 subprograms and access to protected subprograms of non-default
5466 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
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
5472 * validsw.ads (Validity_Check_Copies): Alphabetize.
5473 * validsw.adb (Reset_Validity_Check_Options): Set all options to
5475 (Save_Validity_Check_Options): Save all options.
5477 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
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
5485 2019-07-04 Joffrey Huguet <huguet@adacore.com>
5487 * libgnarl/a-taside.ads: Add assertion policy to ignore
5489 (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
5491 2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
5493 * doc/gnat_rm/implementation_defined_pragmas.rst: Fix
5494 capitalization and parenthesis glitches.
5495 * gnat_rm.texi: Regenerate.
5497 2019-07-04 Ed Schonberg <schonberg@adacore.com>
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
5506 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
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
5526 (Initialize_Internal_Representation): Initialize all internal
5528 (Initialize_Scenario_Storage): Initialize all internal data
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.
5536 2019-07-04 Gary Dismukes <dismukes@adacore.com>
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
5543 2019-07-04 Yannick Moy <moy@adacore.com>
5545 * sem_prag.adb (Check_Library_Level_Entity): Update for new rule
5548 2019-07-04 Justin Squirek <squirek@adacore.com>
5550 * sem_disp.adb (Check_Controlling_Formals): Obtain the full view
5551 before type comparison.
5553 2019-07-04 Ed Schonberg <schonberg@adacore.com>
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,
5564 2019-07-04 Justin Squirek <squirek@adacore.com>
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
5570 * exp_ch4.adb (Expand_N_Allocator): Add comment to note heavy
5573 2019-07-04 Bob Duff <duff@adacore.com>
5575 * sem_ch3.adb (Access_Definition): Do not create a master unless
5576 Tasking_Allowed. Otherwise, this fails on restricted runtimes.
5578 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
5580 * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
5581 Default_Initial_Condition attributes to an incomplete type.
5583 2019-07-04 Ed Schonberg <schonberg@adacore.com>
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).
5592 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
5594 * sem_util.adb (Yields_Synchronized_Object): Fix typos in
5597 2019-07-04 Yannick Moy <moy@adacore.com>
5599 * sem_util.adb (Yields_Synchronized_Object): Adapt to new SPARK
5602 2019-07-04 Yannick Moy <moy@adacore.com>
5604 * sem_spark.adb (Check_Statement): Only check permission of
5605 object in extended return when it is of a deep type.
5607 2019-07-04 Justin Squirek <squirek@adacore.com>
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
5616 2019-07-04 Ed Schonberg <schonberg@adacore.com>
5618 * exp_unst.adb: Handle conditional expressions.
5620 2019-07-04 Yannick Moy <moy@adacore.com>
5622 * sem_spark.adb (Check_Package_Spec, Check_Package_Body): Only
5623 analyze parts of the code marked in SPARK.
5625 2019-07-04 Hristian Kirtchev <kirtchev@adacore.com>
5627 * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
5630 2019-07-04 Yannick Moy <moy@adacore.com>
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
5637 (Set_Perm_Prefixes, Set_Perm_Extensions,
5638 Set_Perm_Extensions_Move): Pass suitable argument for the
5641 2019-07-04 Arnaud Charlet <charlet@adacore.com>
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
5653 2019-07-04 Piotr Trojanek <trojanek@adacore.com>
5655 * opt.adb (Set_Config_Switches): Keep assertions policy as
5656 enabled when analysing internal units in GNATprove mode.
5658 2019-07-04 Arnaud Charlet <charlet@adacore.com>
5660 * exp_ch4.adb (Expand_Short_Circuit_Operator): Strip
5661 N_Variable_Reference_Marker when checking for the presence of
5664 2019-07-04 Arnaud Charlet <charlet@adacore.com>
5666 * exp_aggr.adb (Check_Component): Take into account type
5669 2019-07-04 Dmitriy Anisimkov <anisimko@adacore.com>
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
5678 * libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
5679 500ms from the requested timeout only on old Windows version.
5681 2019-07-04 Thomas Quinot <quinot@adacore.com>
5683 * get_scos.adb: Remove bogus, dead code.
5685 2019-07-04 Ed Schonberg <schonberg@adacore.com>
5687 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): If the
5688 component is an entity name, its dimensions are those of its
5691 2019-07-03 Bob Duff <duff@adacore.com>
5693 * doc/gnat_ugn/gnat_utility_programs.rst: Document new flags in
5696 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
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
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
5724 (Has_Next, Iterate_Forced_Units, Next): New routine.
5725 * namet.adb, namet.ads (Present): New routine.
5727 2019-07-03 Bob Duff <duff@adacore.com>
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.
5734 2019-07-03 Yannick Moy <moy@adacore.com>
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.
5740 2019-07-03 Johannes Kanig <kanig@adacore.com>
5742 * osint.ads, osint.adb (Get_First_Main_File_Name): New routine
5743 to access the first file provided on the command line.
5745 2019-07-03 Ed Schonberg <schonberg@adacore.com>
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
5752 2019-07-03 Justin Squirek <squirek@adacore.com>
5754 * sem_ch8.adb (Analyze_Object_Renaming): Add call to search for
5755 the appropriate actual subtype of the object renaming being
5757 (Check_Constrained_Object): Minor cleanup.
5759 2019-07-03 Yannick Moy <moy@adacore.com>
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.
5768 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
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.
5775 2019-07-03 Gary Dismukes <dismukes@adacore.com>
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.
5782 2019-07-03 Bob Duff <duff@adacore.com>
5784 * sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
5785 if an Iterator_Specification is present.
5787 2019-07-03 Bob Duff <duff@adacore.com>
5789 * doc/gnat_ugn/gnat_utility_programs.rst: Document default
5792 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
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
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
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
5846 * gnatbind.adb: Add with and use clause for Bindo. Use the new
5847 Bindo elaboration order only when -d_N is in effect.
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
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
5886 * sem_util.adb (Enclosing_Generic_Body, Enclosing_Generic_Unit):
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
5915 (Set_Save_Invocation_Graph_Of_Body): New routine along with
5917 * switch-b.adb (Scan_Binder_Switches): Refactor the scanning of
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):
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
5930 * libgnat/g-graphs.ads: Update the initialization of
5931 No_Component. Add type Component_Vertex_Iterator. Remove type
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
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.
5944 2019-07-03 Yannick Moy <moy@adacore.com>
5946 * sem_spark.adb: Add support for locally borrowing and observing
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.
5954 2019-07-03 Ed Schonberg <schonberg@adacore.com>
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
5965 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
5967 * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
5968 sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
5970 2019-07-03 Bob Duff <duff@adacore.com>
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.
5983 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
5985 * doc/gnat_ugn/building_executable_programs_with_gnat.rst
5986 (Warning message control): Document that -gnatw.z/Z apply to
5988 * freeze.adb (Freeze_Entity): Give -gnatw.z warning for array
5989 types as well, but not if the specified alignment is the minimum
5991 * gnat_ugn.texi: Regenerate.
5993 2019-07-03 Bob Duff <duff@adacore.com>
5995 * einfo.ads, exp_util.adb, layout.ads, sinfo.ads: Spell "laid"
5998 2019-07-03 Ed Schonberg <schonberg@adacore.com>
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.
6009 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
6011 * layout.adb (Layout_Type): Do not set the component size of an
6012 array with a scalar component if the component type is
6015 2019-07-03 Ed Schonberg <schonberg@adacore.com>
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.
6022 2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
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.
6030 2019-07-03 Arnaud Charlet <charlet@adacore.com>
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
6036 * opt.ads (Generate_C_Code): Update comment.
6037 * switch-b.adb (Scan_Binder_Switches): Add handling for -G.
6039 2019-07-03 Arnaud Charlet <charlet@adacore.com>
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.
6045 2019-07-03 Justin Squirek <squirek@adacore.com>
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.
6052 2019-07-03 Arnaud Charlet <charlet@adacore.com>
6054 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
6055 Clarify wording on No_Multiple_Elaboration.
6056 * gnat_rm.texi: Regenerate.
6058 2019-07-03 Ed Schonberg <schonberg@adacore.com>
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
6065 2019-07-03 Eric Botcazou <ebotcazou@adacore.com>
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.
6071 2019-07-03 Javier Miranda <miranda@adacore.com>
6073 * exp_attr.adb (Expand_Min_Max_Attribute): Code cleanup:
6074 removing code that it is now never executed in the CCG compiler
6077 2019-07-02 Iain Sandoe <iain@sandoe.co.uk>
6079 * libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
6082 2019-07-01 Ed Schonberg <schonberg@adacore.com>
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,
6088 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
6090 * checks.adb, exp_ch9.adb, exp_unst.adb, sem_ch4.adb,
6091 sem_prag.adb, sem_spark.adb: Minor reformatting.
6093 2019-07-01 Ed Schonberg <schonberg@adacore.com>
6095 * sem_attr.adb (Analyze_Attribute, case Enum_Rep): Allow prefix
6096 of attribute to be an attribute reference of a discrete type.
6098 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
6100 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
6101 handling of Has_Pragma_Inline_Always and deal with
6102 Has_Pragma_No_Inline.
6104 2019-07-01 Ed Schonberg <schonberg@adacore.com>
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.
6112 2019-07-01 Yannick Moy <moy@adacore.com>
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.
6118 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
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.
6124 2019-07-01 Ed Schonberg <schonberg@adacore.com>
6126 * sem_prag.adb (Analyze_Pragma, case Weak_External): Pragma only
6127 applies to entities with run-time addresses, not to types.
6129 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
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).
6134 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
6136 * sysdep.c: Cleanup references to LynuxWorks in docs and
6139 2019-07-01 Ed Schonberg <schonberg@adacore.com>
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
6147 2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
6149 * exp_ch9.adb (Check_Inlining): Deal with Has_Pragma_No_Inline.
6151 2019-07-01 Ed Schonberg <schonberg@adacore.com>
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.
6159 2019-07-01 Pat Rogers <rogers@adacore.com>
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.
6165 2019-07-01 Justin Squirek <squirek@adacore.com>
6167 * libgnat/s-win32.ads: Add definition for ULONG, modify
6168 OVERLAPPED type, and add appropriate pragmas.
6170 2019-07-01 Bob Duff <duff@adacore.com>
6172 * gnat1drv.adb (gnat1drv): Call Write_ALI if the main unit is
6175 2019-07-01 Yannick Moy <moy@adacore.com>
6177 * sem_ch4.adb (Operator_Check): Refine error message.
6179 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
6181 * libgnat/a-calend.ads: Revert "Global => null" contracts on
6184 2019-07-01 Piotr Trojanek <trojanek@adacore.com>
6186 * exp_attr.adb, libgnat/g-graphs.ads: Fix typos in comments:
6187 componant -> component.
6189 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
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.
6196 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
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.
6203 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
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
6211 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
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
6219 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
6221 * exp_attr.adb, exp_ch7.adb, exp_unst.adb, sem_ch3.adb,
6222 sem_util.adb, uintp.adb, uintp.ads: Minor reformatting.
6224 2019-07-01 Javier Miranda <miranda@adacore.com>
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.
6231 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
6233 * impunit.adb: Add GNAT.Graphs to list Non_Imp_File_Names_95.
6234 * Makefile.rtl, gcc-interface/Make-lang.in: Register unit
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.
6255 2019-07-01 Dmitriy Anisimkov <anisimko@adacore.com>
6257 * libgnat/g-sothco.adb (Get_Address): Fix the case when AF_INET6
6260 2019-07-01 Ed Schonberg <schonberg@adacore.com>
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.
6266 2019-07-01 Hristian Kirtchev <kirtchev@adacore.com>
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
6273 2019-07-01 Pierre-Marie de Rodat <derodat@adacore.com>
6275 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
6276 formatting issues in the -gnatR section.
6277 * gnat_ugn.texi: Regenerate.
6279 2019-06-30 Iain Sandoe <iain@sandoe.co.uk>
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.
6287 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
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.
6298 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
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.
6304 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
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.
6314 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
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.
6320 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
6322 * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
6323 the main variant of a type, if any.
6325 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
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.
6331 2019-06-29 Eric Botcazou <ebotcazou@adacore.com>
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.
6349 2019-06-25 Eric Botcazou <ebotcazou@adacore.com>
6351 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
6353 * gcc-interface/gigi.h (maybe_character_type): Fix formatting.
6354 (maybe_character_value): Likewise.
6356 2019-06-24 Jan Hubicka <jh@suse.cz>
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.
6363 2019-06-24 Martin Sebor <msebor@redhat.com>
6365 * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
6368 2019-06-18 Arnaud Charlet <charlet@adacore.com>
6371 * sem_ch5.adb (Analyze_Loop_Statement): Avoid exception propagation
6372 during normal processing.
6374 2019-06-17 Arnaud Charlet <charlet@adacore.com>
6377 * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
6378 conditions to avoid a unnecessary exception propagation in the default
6381 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6383 * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
6385 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
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.
6407 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6409 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
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.
6416 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6418 * gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
6419 Backend_Overflow_Checks_On_Target and rework comments.
6421 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6423 * gcc-interface/trans.c (walk_nesting_tree): New static function.
6424 (finalize_nrv): Use it to walk the entire nesting tree.
6426 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6428 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
6429 obsolete test on Is_For_Access_Subtype.
6431 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
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.
6439 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6441 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
6442 for stack_protect attribute.
6443 (handle_stack_protect_attribute): New static function.
6445 2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
6447 * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
6448 false if the internal builtin uses a variable list.
6450 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
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.
6456 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
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.
6473 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
6475 * gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
6476 specific case of component types preferably.
6478 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
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
6485 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
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.
6492 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
6494 * gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
6495 putting back an intermediate conversion the type of the actuals.
6497 2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
6499 * gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
6500 count to the unsigned version of its base type before proceeding.
6502 2019-05-16 Martin Sebor <msebor@redhat.com>
6504 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
6507 2019-05-08 Arnaud Charlet <charlet@adacore.com>
6509 * standard.ads.h: New file.
6511 2019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6513 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
6516 2019-04-29 Michael K. Darling <darlingm@gmail.com>
6518 * gnatvsn.ads: Bump Library_Version to 10.
6520 2019-04-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6521 Bernd Edlinger <bernd.edlinger@hotmail.de>
6522 Jakub Jelinek <jakub@redhat.com>
6525 * raise-gcc.c (TARGET_ATTRIBUTE): Define.
6526 (continue_unwind, personality_body, PERSONALITY_FUNCTION): Add
6529 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
6531 * libgnat/i-cexten.ads (CFloat_128): New type.
6533 2019-03-22 Dmitriy Anisimkov <anisimko@adacore.com>
6536 * libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
6537 Send_Socket): Fix the computation of structure lengths passed to
6539 (Is_IPv6_Address): Fix the number of expected colons.
6541 2019-03-11 Martin Liska <mliska@suse.cz>
6543 * gcc-interface/misc.c (gnat_post_options): Wrap option name in string
6544 format message and fix GNU coding style.
6546 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
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.
6555 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
6557 * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
6558 operand with VOID_TYPE.
6560 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
6562 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
6563 entities of a package renaming another one.
6565 2019-02-08 Eric Botcazou <ebotcazou@adacore.com>
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.
6572 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
6574 * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
6576 2019-02-06 Arnaud Charlet <charlet@adacore.com>
6578 * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
6580 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
6582 * repinfo.adb (List_Component_Layout): Remove superfluous space for
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
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.
6615 2019-01-27 Eric Botcazou <ebotcazou@adacore.com>
6617 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
6618 the same value for every dimension of a multidimensional array type.
6620 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
6622 * gcc-interface/trans.c (Regular_Loop_to_gnu): Use the SLOC of the
6623 iteration scheme, if present, throughout the translation.
6625 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
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.
6631 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
6633 * gcc-interface/trans.c (struct loop_info_d): Remove artificial field.
6634 (Loop_Statement_to_gnu): Do not set it.
6636 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
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.
6650 2019-01-26 Eric Botcazou <ebotcazou@adacore.com>
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.
6658 2019-01-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
6660 * s-oscons-tmplt.c (AF_INET6): Do not undefine for RTEMS.
6662 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
6665 * exp_ch11.adb: Change "can not" to "cannot".
6666 * sem_ch4.adb: Likewise.
6668 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
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.
6677 2019-01-08 Justin Squirek <squirek@adacore.com>
6680 2018-07-31 Justin Squirek <squirek@adacore.com>
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
6690 2018-09-26 Justin Squirek <squirek@adacore.com>
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.
6697 2019-01-04 Eric Botcazou <ebotcazou@adacore.com>
6699 * gnatvsn.ads: Bump copyright year.
6701 2019-01-01 Jakub Jelinek <jakub@redhat.com>
6703 Update copyright years.
6705 * gnat_ugn.texi: Bump @copying's copyright year.
6706 * gnat_rm.texi: Likewise.
6708 Copyright (C) 2019 Free Software Foundation, Inc.
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.