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