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